Payments & Fund TransfersRefunds
Create a Refund
Authorization
authorization AuthorizationBearer <token>
Set Your Secret API Key
In: header
Header Parameters
Idempotency-Key?string
A unique value, eg. a UUID.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
amount*number
A positive integer value in the specified currency's smallest unit. e.g. $10 would be represented as 1000 (cents).
Range
1 <= value <= 20000000currency*string
Three-letter ISO 4217 currency code in full uppercase. Must be a supported currency.
transactionId*string
ID of transaction to refund.
Use these transaction IDs in test mode to simulate various outcomes:
txn_SuccessfulRefund: Create a successful refund. Thestatuswill change fromPENDINGtoSUCCEEDEDafter a short while.txn_FailedRefund: Create a failed refund. Thestatuswill change fromPENDINGtoFAILEDafter a short while.txn_InvalidTransaction: Simulate attempting to refund a transaction that cannot be refunded.txn_AlreadyRefunded: Simulate attempting to refund a transaction that has already been refunded.txn_RejectOverRefund: Simulate attempting to refund an amount that is greater than the transaction's refundable amount.txn_NoLongerRefundable: Simulate attempting to refund a transaction that is no longer refundable (e.g. exceeded refund window).
Length
1 <= lengthResponse Body
*/*
curl -X POST "https://example.com/v1/refunds" \ -H "Content-Type: application/json" \ -d '{ "amount": 1, "currency": "string", "transactionId": "string" }'{ "amount": 0, "createdAt": "string", "currency": "string", "id": "string", "resultCode": "string", "status": "string", "transactionId": "string", "updatedAt": "string"}