Create a Payment Intent
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.
bearerAuthAuthorizationBearer <token>The access_token obtained from POST /oauth2/token. Header format: Authorization: Bearer {accessToken}.
Idempotency-Key*stringA 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
application/json- body
amount*stringPayment 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*stringFiat currency as an ISO 4217 code, such as USD. Case-insensitive. Always returned in uppercase
referenceNo*stringThe merchant order number or business reference number
description?stringOrder description
customer?stringThe merchant's internal customer ID
brand?stringBrand name shown on the checkout page
successUrl*stringRedirect URL after a successful payment
cancelUrl*stringRedirect URL after the customer cancels the payment
expiryMinutes?integerValidity period of the checkout page, in minutes. Defaults to 30
30metadata?Custom merchant metadata
Returns the Payment Intent object.
application/json- response
code?integerBusiness status code
message?stringtraceId?stringRequest 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.
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" }}'{ "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" } ] }}