CheckoutPayment Intent

Create a Payment Intent

POST
/openapi/v1/payment-intents

Creates a Payment Intent and generates a hosted checkout page link. After creation succeeds, redirect the customer to checkoutUrl in the response to complete the payment.

Returns HTTP 200 on success. After creation, status is AWAITING_PAYMENT.

Authorization

bearerAuth
headerAuthorizationBearer <token>

The access_token obtained from POST /oauth2/token. Header format: Authorization: Bearer {accessToken}.

Header Parameters

Idempotency-Key*string

A unique request identifier. Use a UUID or a unique business serial number. Reuse the same key when you retry the same business request. Use a different key for each different business request

Request Body

application/json
  1. body
amount*string

Payment amount as a decimal string in standard units, such as "20.00". The number of decimal places cannot exceed the currency precision (2 for USD, 0 for JPY). Requests that exceed it are rejected

currency*string

Fiat currency as an ISO 4217 code, such as USD. Case-insensitive. Always returned in uppercase

referenceNo*string

The merchant order number or business reference number

description?string

Order description

customer?string

The merchant's internal customer ID

brand?string

Brand name shown on the checkout page

successUrl*string

Redirect URL after a successful payment

cancelUrl*string

Redirect URL after the customer cancels the payment

expiryMinutes?integer

Validity period of the checkout page, in minutes. Defaults to 30

Default30
metadata?

Custom merchant metadata

Response Body

Returns the Payment Intent object.

application/json
  1. response
code?integer

Business status code

message?string
traceId?string

Request trace ID. Provide it when you contact technical support

data?

The Payment Intent object. All amount fields are decimal strings in standard units, formatted to the currency precision. All time fields are in ISO 8601 with a time zone offset. Fields with empty values are omitted.

Example Request
curl -X POST 'https://api.test.stabofx.com/openapi/v1/payment-intents' \  -H 'Idempotency-Key: pi_20260511_0001' \  -H 'Content-Type: application/json' \  -d '{  "amount": "20.00",  "currency": "USD",  "referenceNo": "ORD-20260511-0001",  "description": "Order #20260511-0001",  "customer": "cus_123456",  "brand": "Acme Coffee",  "successUrl": "https://merchant.example.com/success",  "cancelUrl": "https://merchant.example.com/cancel",  "expiryMinutes": 30,  "metadata": {    "orderId": "ORD-20260511-0001",    "merchantUserId": "user_123456"  }}'
Example Response
{  "code": 200,  "message": "OK",  "traceId": "6a017352cef4f5dd023f6f4479faf669",  "data": {    "paymentIntentId": "pi_MNOL0POUV8IDPXCD",    "status": "AWAITING_PAYMENT",    "clientSecret": "v1.xxx",    "checkoutUrl": "https://app.test.stabofx.com/en/checkout/pi_MNOL0POUV8IDPXCD?secret=v1.xxx",    "amount": "20.00",    "currency": "USD",    "referenceNo": "ORD-20260511-0001",    "description": "Order #20260511-0001",    "customer": "cus_123456",    "brand": "Acme Coffee",    "receivedAmount": "0.00",    "refundedAmount": "0.00",    "hasRefund": false,    "expiresAt": "2026-05-11T14:42:34+08:00",    "createdAt": "2026-05-11T14:12:34+08:00",    "metadata": {      "orderId": "ORD-20260511-0001",      "merchantUserId": "user_123456"    },    "paymentOptions": [      {        "currency": "USDT",        "network": "Polygon"      },      {        "currency": "USDC",        "network": "Ethereum"      }    ]  }}