RedotPay Connect
Payment

Close Payment Order

POST
/openapi/v2/order/close

Close all pending orders under this payment order. If payment has already been made, the closure will fail.

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.

close payment order in progress

Response Body

*/*

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/openapi/v2/order/close" \  -H "X-R-Ts: 1762327084929" \  -H "X-R-Ak: string" \  -H "X-R-Signature: string" \  -H "Content-Type: application/json" \  -d '{    "orderSn": "RAP20260205064728752085952"  }'
"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"}