3DPay API Documentation

API Overview

The 3DPay API allows you to integrate our secure payment processing capabilities into your applications. Our RESTful API supports various operations including creating payments, managing customers, and handling refunds.

Base URL: https://api.3dpay.org/v1

Authentication

All API requests must be authenticated using your API key. Include it in the Authorization header of your requests:

Authorization: Bearer YOUR_API_KEY
Payments API

Create a Payment

Endpoint: POST /payments

Create a new payment for processing.


curl -X POST https://api.3dpay.org/v1/payments \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 1000,
    "currency": "USD",
    "source": "tok_visa",
    "description": "Example payment"
  }'
                    

Retrieve a Payment

Endpoint: GET /payments/:id

Retrieve details of a specific payment.


curl https://api.3dpay.org/v1/payments/pay_1234567890 \
  -H "Authorization: Bearer YOUR_API_KEY"
                    
Best Practices
  • Always use HTTPS for API requests to ensure data security.
  • Store your API key securely and never expose it in client-side code.
  • Implement proper error handling to gracefully manage API errors.
  • Use idempotency keys for POST requests to prevent duplicate transactions.
  • Regularly update to the latest version of our API for new features and security improvements.