Skip to main content
PATCH
/
api
/
v2.0
/
card
/
{account_id}
/
cancel
/
{id}
Cancel Transaction
curl --request PATCH \
  --url https://sandbox-payment-b2b.singapay.id/api/v2.0/card/{account_id}/cancel/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'X-PARTNER-ID: <api-key>'
{
  "response_code": "SP000",
  "response_message": "Successfully",
  "data": {
    "transaction_id": "101222025010112000099887766",
    "reference_no": "INV-2024-0012",
    "status": "success",
    "cancel_type": "void"
  }
}

Authorizations

Authorization
string
header
required

JWT issued by POST /api/v1.1/access-token/b2b. Send Authorization: Bearer <token>.

X-PARTNER-ID
string
header
required

Merchant API key (Credential.api_key). Required on every request.

Path Parameters

account_id
string
required

Account ULID

id
string
required

Transaction lookup key

Response

SP000 Successfully — transaction voided or refunded (see data.cancel_type).

Merchant v2 envelope returned on a successful cancel (SP000, HTTP 200).

response_code
string
required

SingaPay custom business response code.

Example:

"SP000"

response_message
string
required

Human-readable label paired with response_code.

Example:

"Successfully"

data
object
required

Payload returned on a successful cancel. cancel_type is void for a not-yet-settled transaction or refund for a settled one.