Skip to main content
POST
cURL
A refund submits a reversal against a previous sale or capture. Identify both the originating transaction and its order in the request body. Provide amount for a partial refund, or omit it to use the remaining refundable amount.
Safe retries for this POST endpoint use the Idempotency-Key header. Reuse the same key only when retrying the exact same request body. See Idempotency.

Authorizations

x-api-key
string
header
required

Headers

idempotency-key
string

Optional idempotency key, scoped to terminal + matched route pattern. A replayed request returns the cached response with Idempotency-Replayed: true.

Maximum string length: 255
Pattern: ^[\w-]+$

Path Parameters

terminal_friendly_id
string
required

The unique identifier of the terminal.

Required string length: 6
Pattern: ^[\dA-Za-z]{6}$

Body

application/json
transaction_reference_id
string
required

The transaction friendly ID of the original transaction to be refunded

Required string length: 8
Pattern: ^[\dA-Za-z]{8}$
order_reference_id
string
required

The order friendly ID associated with the original transaction to be refunded

Required string length: 8
Pattern: ^[\dA-Za-z]{8}$
merchant_transaction_id
string
amount
number

Amount to refund, in major currency units (e.g. 10.00 for $10.00 USD). Defaults to the full transaction amount if omitted.

Required range: 0.01 <= x <= 999999.99
currency
enum<string>
Available options:
AED,
AFN,
ALL,
AMD,
ANG,
AOA,
ARS,
AUD,
AWG,
AZN,
BAM,
BBD,
BDT,
BGN,
BHD,
BIF,
BMD,
BND,
BOB,
BOV,
BRL,
BSD,
BTN,
BWP,
BYN,
BZD,
CAD,
CDF,
CHE,
CHF,
CHW,
CLF,
CLP,
CNY,
COP,
COU,
CRC,
CUC,
CUP,
CVE,
CZK,
DJF,
DKK,
DOP,
DZD,
EGP,
ERN,
ETB,
EUR,
FJD,
FKP,
GBP,
GEL,
GHS,
GIP,
GMD,
GNF,
GTQ,
GYD,
HKD,
HNL,
HRK,
HTG,
HUF,
IDR,
ILS,
INR,
IQD,
IRR,
ISK,
JMD,
JOD,
JPY,
KES,
KGS,
KHR,
KMF,
KPW,
KRW,
KWD,
KYD,
KZT,
LAK,
LBP,
LKR,
LRD,
LSL,
LYD,
MAD,
MDL,
MGA,
MKD,
MMK,
MNT,
MOP,
MRU,
MUR,
MVR,
MWK,
MXN,
MXV,
MYR,
MZN,
NAD,
NGN,
NIO,
NOK,
NPR,
NZD,
OMR,
PAB,
PEN,
PGK,
PHP,
PKR,
PLN,
PYG,
QAR,
RON,
RSD,
RUB,
RWF,
SAR,
SBD,
SCR,
SDG,
SEK,
SGD,
SHP,
SLL,
SOS,
SRD,
SSP,
STN,
SVC,
SYP,
SZL,
THB,
TJS,
TMT,
TND,
TOP,
TRY,
TTD,
TWD,
TZS,
UAH,
UGX,
USD,
USN,
UYI,
UYU,
UYW,
UZS,
VED,
VES,
VND,
VUV,
WST,
XAF,
XAG,
XAU,
XBA,
XBB,
XBC,
XBD,
XCD,
XDR,
XOF,
XPD,
XPF,
XPT,
XSU,
XTS,
XUA,
XXX,
YER,
ZAR,
ZMW,
ZWL

Response

Default Response

transaction_id
string
required
Required string length: 8
Pattern: ^[\dA-Za-z]{8}$
accepted
boolean
required
order_id
string
required
Required string length: 8
Pattern: ^[\dA-Za-z]{8}$
merchant_transaction_id
string
merchant_order_id
string