Skip to main content
POST
/
api
/
v1
/
payments
Create a payment
curl --request POST \
  --url https://payments.oaknetwork.org/api/v1/payments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "provider": "stripe",
  "source": {
    "amount": 5000,
    "currency": "usd",
    "customer": {
      "id": "550e8400-e29b-41d4-a716-446655440000"
    },
    "payment_method": {
      "type": "card",
      "id": "660e8400-e29b-41d4-a716-446655440000"
    },
    "capture_method": "automatic"
  },
  "confirm": true,
  "metadata": {
    "order_id": "ORD-12345"
  }
}
'
{
  "msg": "Transaction was Initiated Successfully!",
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "provider": "<string>",
    "source": {
      "amount": 123,
      "currency": "<string>",
      "payment_method": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "type": "<string>",
        "chain": "<string>"
      },
      "customer": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      }
    },
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "settlement_date": "2023-11-07T05:31:56Z",
    "metadata": {}
  }
}

Authorizations

Authorization
string
header
required

Merchant authentication token. Obtained via POST /api/v1/merchant/token/grant. Pass as: Authorization: Bearer

Headers

Ref-App-Key
string

App key for subscription service authentication

Payment-Type
enum<string>

Set to 'recurring_payment' for subscription payment flows

Available options:
recurring_payment

Body

application/json

Payment creation request. The exact schema varies by provider and payment method type. Fields like provider, currency, and type are case-insensitive (uppercased internally).

provider
enum<string>
required

Payment provider

Available options:
stripe
source
object
required
destination
object

Destination details for cross-currency or split payments

fee
object

Fee configuration for destination flow

flow
enum<string>
default:platform

Payment flow type (Stripe)

Available options:
platform,
destination
allocations
object[]

Fund allocation splits (for platform flow)

total_installments
integer

Total installment count

Required range: x >= 1
confirm
boolean

Whether to auto-confirm the payment

metadata
object

Merchant-supplied arbitrary metadata, stored with the transaction and echoed back on the response and on any derived webhook deliveries. Shape is defined by the merchant.

Response

Payment created successfully

msg
string
required

Human-readable message describing the result

Example:

"Transaction was Initiated Successfully!"

data
object
required

Payment transaction response object