RedotPay Connect
Payment

Create payment order and obtain checkout URLs

POST
/openapi/v2/order/create

Create a payment order and return checkout URLs / deep links for supported channels (WEB, H5, APP). The response contains redirect URLs and the list of available payment methods. Redirect the payer to the returned URL to complete the transaction.

For PSP merchants only, the optional request field subMerchantCode may be provided to tag the order with a sub-merchant business code. Non-PSP merchants sending a non-empty subMerchantCode will be rejected (subMerchantNotAllowed). Blank / omitted is allowed for all merchants.

Sandbox

This API works in sandbox; you still must complete payment on the sandbox checkout after creating an order. See Testing Payments in the Sandbox.

Header Parameters

X-R-Ts*string

request timestamp in milliseconds

X-R-Ak*string

merchant's appKey

X-R-Signature*string

request signature

X-R-Key-Version?string

merchant's private key version, default is 1

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

create payment request

Response Body

*/*

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/openapi/v2/order/create" \  -H "X-R-Ts: 1762327084929" \  -H "X-R-Ak: string" \  -H "X-R-Signature: string" \  -H "Content-Type: application/json" \  -d '{    "outerOrderSn": "ORD20260101001",    "outerUid": "user-5001",    "orderAmount": 120,    "discountAmount": 0,    "orderCurrency": "USD",    "timeExpire": 1704070800000,    "env": "H5",    "rateExtra": 0.0025,    "orderDesc": "Electronic accessories",    "goods": [      {        "goodsType": "01",        "goodsCategory": "0000",        "goodsCode": "SKU-ACC-001",        "goodsName": "Wireless Charger",        "goodsCount": 1,        "goodsAmount": 120,        "goodsCoin": "BTC"      }    ],    "buyer": {      "email": "buyer@example.com",      "country": "US"    },    "redirectUrl": "https://merchant.example.com/checkout/return",    "deeplink": "merchantapp://checkout/result",    "merchantName": "Redot Pay Connect",    "subMerchantCode": "STORE_A"  }'
"open api common response"
{  "code": "paramFormatError",  "message": "request param invalid"}
{  "code": "authorizationInvalid",  "message": "authorizationInvalid invalid"}
{  "code": "notInWhiteList",  "message": "request ip not in the white list"}
{  "code": "frequencyLimited",  "message": "Too many requests, please try again later"}