Skip to main content
POST
/
api
/
commerce
/
merchant
/
orders
/
{orderId}
/
cancel
Request cancellation for a commerce order (merchant scoped)
curl --request POST \
  --url https://api-beta.pepay.io/api/commerce/merchant/orders/{orderId}/cancel \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --header 'x-commerce-api-key: <api-key>' \
  --data '
{
  "refundDestinationWalletAddressBsc": "<string>"
}
'
{
  "success": true,
  "data": {
    "orderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "status": "<string>",
    "substatus": "<string>",
    "customerId": "<string>",
    "refundQuote": {}
  }
}

Authorizations

x-commerce-api-key
string
header
required

Legacy alias for commerce-scoped API keys. Prefer x-api-key with scope=commerce.

Headers

Idempotency-Key
string
required

Required to safely retry cancellation requests.

Path Parameters

orderId
string<uuid>
required

Body

application/json
refundDestinationWalletAddressBsc
string

Optional BSC wallet address to receive refunds (when applicable).

Response

Cancellation requested

success
boolean
Example:

true

data
object