Cancel or refund a card transfer
Reverses a card transfer by initiating a cancellation or refund depending on the transaction status.
In v2026.10 and later, reversing an auth-capture card-payment transfer with no captures cancels the entire capturableAmount.
In those API versions, an auth-capture card-payment transfer with one final capture is canceled or refunded depending on its processing state.
Auth-capture card-payment transfers with a non-final capture or multiple captures are not supported in those API versions.
Read our reversals guide
to learn more.
To access this endpoint using a token you'll need
to specify the /accounts/{accountID}/transfers.write scope.
curl -X POST "https://api.moov.io/accounts/{accountID}/transfers/{transferID}/reversals" \
-H "Authorization: Bearer {token}" \
-H "X-Moov-Version: v2027.01.00" \
-H "X-Idempotency-Key: 7d8f2a64-4b1e-4c3a-9f2d-1e5b6c7a8d90"mc, _ := moov.NewClient()
var accountID string // Partner account
var transferID string
// Idempotency Key is a unique identifier for this Transfer request
// Using the github.com/google/uuid library:
idempotencyKey := moov.WithReversalsIdempotencyKey(uuid.New())
mc.ReverseTransfer(ctx, accountID, transferID, moov.CreateReversal{
Amount: 1000,
}, idempotencyKey)
{
"cancellation": {
"cancellationID": "89ca7f54-13ba-4714-b9af-17163eae2057",
"status": "completed",
"createdOn": "2025-01-19T03:02:43.255309588Z"
}
}Response headers
x-request-id
string
required
{
"cancellation": {
"cancellationID": "string",
"status": "pending",
"createdOn": "2019-08-24T14:15:22Z"
}
}Response headers
x-request-id
string
required
{
"error": "string"
}Response headers
x-request-id
string
required
Response headers
x-request-id
string
required
Response headers
x-request-id
string
required
Response headers
x-request-id
string
required
{
"error": "string"
}Response headers
x-request-id
string
required
{
"amount": "string",
"amountDetails": {
"surcharge": "string"
}
}Response headers
x-request-id
string
required
Response headers
x-request-id
string
required
Response headers
x-request-id
string
required
Response headers
x-request-id
string
required
Headers
X-Moov-Version
string
v2026.08.00 uses v2026.07.00.
A malformed value, such as 2022, returns a 404 response.
v2027.01.00
x-idempotency-key
string
required
Path parameters
accountID
string
required
transferID
string
required
Body
amount
object
card-payment reversals in v2026.10 and later, a transfer with no captures uses the full capturableAmount.
For those transfers with one final capture, a cancellation uses the full capture amount, while a refund may be partial.
Show child attributes
amount
currency
string
required
Pattern
valueDecimal
string
required
Pattern
A decimal-formatted numerical string that represents up to 9 decimal place precision.
For example, $12.987654321 is '12.987654321'.
amountDetails
object
Show child attributes
amountDetails
surcharge
object
Show child attributes
amountDetails.surcharge
currency
string
required
Pattern
valueDecimal
string
required
Pattern
A decimal-formatted numerical string that represents up to 9 decimal place precision.
For example, $12.987654321 is '12.987654321'.
Response
cancellation
object
Show child attributes
cancellation
cancellationID
string
required
createdOn
string<date-time>
required
status
string<enum>
required
pending,
completed,
failed
refund
object
Show child attributes
refund
amount
object
required
Show child attributes
refund.amount
currency
string
required
Pattern
valueDecimal
string
required
Pattern
A decimal-formatted numerical string that represents up to 9 decimal place precision.
For example, $12.987654321 is '12.987654321'.
createdOn
string<date-time>
required
processingDetails
object
required
Show child attributes
refund.processingDetails
cardPayment
object
Show child attributes
refund.processingDetails.cardPayment
failureCode
string<enum>
call-issuer,
do-not-honor,
processing-error,
invalid-transaction,
invalid-amount,
no-such-issuer,
reenter-transaction,
cvv-mismatch,
lost-or-stolen,
insufficient-funds,
invalid-card-number,
invalid-merchant,
expired-card,
incorrect-pin,
transaction-not-allowed,
suspected-fraud,
amount-limit-exceeded,
velocity-limit-exceeded,
revocation-of-authorization,
card-not-activated,
issuer-not-available,
could-not-route,
cardholder-account-closed,
account-closed,
account-not-activated,
authentication-failed,
authentication-required,
cardholder-action-required,
format-error,
invalid-pin,
offline-approved,
offline-declined,
partial-approval,
payment-stopped,
pin-required,
record-not-found,
surcharge-not-permitted,
transaction-reversed,
verification-failed,
unknown-issue,
duplicate-transaction
networkTransactionID
string
refundID
string
required
status
string<enum>
required
created,
pending,
completed,
failed
updatedOn
string<date-time>
required
amountDetails
object
Show child attributes
refund.amountDetails
surcharge
object
Show child attributes
refund.amountDetails.surcharge
currency
string
required
Pattern
valueDecimal
string
required
Pattern
A decimal-formatted numerical string that represents up to 9 decimal place precision.
For example, $12.987654321 is '12.987654321'.
captureID
string
card-payment transfer.