Skip to main content
POST
/
commands
/
cancel
Cancel Payment
curl --request POST \
  --url http://{IP_ADDRESS}:{PORT}/commands/cancel \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --header 'provider: <provider>' \
  --data '
{
  "terminal_id": "10362517",
  "payment_method": "QRIS",
  "terminal_reference": "1750407594445|1750407594"
}
'
{
  "terminal_id": "10362517",
  "terminal_reference": "1750407594445|1750407725",
  "payment_method": "QRIS",
  "amount": 1000,
  "currency": "IDR",
  "transaction_date": "2025-06-20T08:22:05.000Z",
  "status": "SUCCESS"
}

Authorizations

X-API-KEY
string
header
required

API key for authentication

Headers

provider
enum<string>
required

Provider name.

Available options:
BRI,
NTT
simulation
boolean

Simulation/mock response flag.

pretty-print
boolean

Json Pretty Formatter flag.

Body

application/json
terminal_id
string
required

Terminal's ID.

Required string length: 1 - 50
Example:

"10362517"

payment_method
enum<string>
required

Available payment methods

Available options:
CARD,
EWALLET,
QRIS
Example:

"QRIS"

terminal_reference
string
required

terminal_reference from /pay response.

Required string length: 1 - 100
Example:

"1750407594445|1750407594"

Response

Successful cancellation response.

status
enum<string>
required

Transaction status values

Available options:
SUCCESS,
FAILED
Example:

"SUCCESS"

terminal_reference
string

Reference for Void & Receipt.

Example:

"1750407594445|1750407594"

payment_method
enum<string>

Available payment methods

Available options:
CARD,
EWALLET,
QRIS
Example:

"QRIS"

amount
number<double>

The transaction amount.

Required range: x >= 0
Example:

100

currency
string

The transaction currency (ISO 4217).

Required string length: 3
Example:

"IDR"

transaction_date
string<date-time>

The date and time of the transaction.

Example:

"2025-06-20T08:19:54.000Z"