Cancel or refund a card transfer
Reverses a card transfer by initiating a cancellation or refund depending on the transaction status. 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.
POST
/accounts/{accountID}/transfers/{transferID}/reversals
|
|
Successfully initiated a reversal.
{
"cancellation": {
"cancellationID": "89ca7f54-13ba-4714-b9af-17163eae2057",
"createdOn": "2025-01-19T03:02:43.255309588Z",
"status": "completed"
}
}{
"refund": {
"amount": {
"currency": "USD",
"value": 1938
},
"cardDetails": {
"confirmedOn": "2025-01-19T03:07:26.602114307Z",
"status": "confirmed"
},
"createdOn": "2025-01-19T03:07:26.001024809Z",
"refundID": "89ca7f54-13ba-4714-b9af-17163eae2057",
"status": "pending",
"updatedOn": "2025-01-19T03:07:26.602114307Z"
}
}Response headers
x-request-id
string
<uuid>
required
A unique identifier used to trace requests.
Successfully initiated a reversal but an error occurred while waiting for a synchronous response.
Contains either a cancellation or refund, depending on the method used to reverse the transfer.
{
"cancellation": {
"cancellationID": "string",
"createdOn": "2019-08-24T14:15:22Z",
"status": "pending"
}
}Response headers
x-request-id
string
<uuid>
required
A unique identifier used to trace requests.
The server could not understand the request due to invalid syntax.
{
"error": "string"
}Response headers
x-request-id
string
<uuid>
required
A unique identifier used to trace requests.
The request contained missing or expired authentication.
Response headers
x-request-id
string
<uuid>
required
A unique identifier used to trace requests.
The user is not authorized to make the request.
Response headers
x-request-id
string
<uuid>
required
A unique identifier used to trace requests.
The requested resource was not found.
Response headers
x-request-id
string
<uuid>
required
A unique identifier used to trace requests.
The request conflicted with the current state of the target resource.
{
"error": "string"
}Response headers
x-request-id
string
<uuid>
required
A unique identifier used to trace requests.
The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields.
{
"amount": "string"
}Response headers
x-request-id
string
<uuid>
required
A unique identifier used to trace requests.
Request was refused due to rate limiting.
Response headers
x-request-id
string
<uuid>
required
A unique identifier used to trace requests.
The request failed due to an unexpected error.
Response headers
x-request-id
string
<uuid>
required
A unique identifier used to trace requests.
The request failed because a downstream service failed to respond.
Response headers
x-request-id
string
<uuid>
required
A unique identifier used to trace requests.
Headers
x-moov-version
string
API version
Specify an API version.
API versioning follows the format vYYYY.QQ.BB, where
YYYYis the yearQQis the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)BBis the build number, starting at.01, for subsequent builds in the same quarter.- For example,
v2024.01.00is the initial release of the first quarter of 2024.
- For example,
The latest version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
Default:
v2024.01.00x-idempotency-key
string
<uuid>
required
Prevents duplicate reversals from being created.
Path parameters
accountID
string
<uuid>
required
The Moov account ID.
transferID
string
<uuid>
required
The transfer ID to reverse.
Body
application/json
amount
integer<int64>
required
Amount to reverse in cents. Partial amounts will automatically trigger a refund instead of a cancellation.
Response
application/json
cancellation
object
Show child attributes
cancellationID
string
required
createdOn
string<date-time>
required
status
string<enum>
required
Possible values:
pending,
completed,
failed
refund
object
Details of a card refund.
Show child attributes
amount
object
required
Show child attributes
currency
string
required
Pattern
A 3-letter ISO 4217 currency code.
value
integer<int64>
required
Quantity in the smallest unit of the specified currency.
In USD this is cents, for example, $12.04 is 1204 and $0.99 is 99.
createdOn
string<date-time>
required
refundID
string<uuid>
required
Identifier for the refund.
status
string<enum>
required
Possible values:
created,
pending,
completed,
failed
updatedOn
string<date-time>
required
cardDetails
object
Show child attributes
status
string<enum>
required
Possible values:
initiated,
confirmed,
settled,
failed,
completed
completedOn
string<date-time>
confirmedOn
string<date-time>
failedOn
string<date-time>
failureCode
string<enum>
Possible values:
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,
unknown-issue,
duplicate-transaction
initiatedOn
string<date-time>
settledOn
string<date-time>