Create a refund
Initiate a refund for a card transfer.
The accountID must identify the partner account for the transfer.
Use the Cancel or refund a card transfer endpoint for more comprehensive cancel and refund options.
See the reversals guide for more information.
To access this endpoint using an access token
you'll need to specify the /accounts/{accountID}/transfers.write scope.
curl -X POST "https://api.moov.io/accounts/{accountID}/transfers/{transferID}/refunds" \
-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
var transferID string
mc.RefundTransfer(ctx, accountID, transferID, moov.CreateRefund{
Amount: 1700,
})
{
"refundID": "d4963079-5b35-4d17-981e-8f851753f786",
"createdOn": "2023-09-09T14:15:22Z",
"amount": {
"currency": "USD",
"valueDecimal": "12.04"
}
}{
"refundID": "d4963079-5b35-4d17-981e-8f851753f786",
"createdOn": "2023-09-09T14:15:22Z",
"updatedOn": "2023-09-09T14:17:41Z",
"status": "pending",
"amount": {
"currency": "USD",
"valueDecimal": "12.04"
},
"processingDetails": {}
}Response headers
x-request-id
string
required
{
"refundID": "string",
"createdOn": "2019-08-24T14:15:22Z",
"updatedOn": "2019-08-24T14:15:22Z",
"status": "created",
"amount": {
"currency": "USD",
"valueDecimal": "12.987654321"
},
"captureID": "string",
"amountDetails": {
"surcharge": {
"currency": "USD",
"valueDecimal": "12.987654321"
}
},
"processingDetails": {
"cardPayment": {
"networkTransactionID": "string",
"failureCode": "call-issuer"
}
}
}Response headers
x-request-id
string
required
{
"error": "string"
}Response headers
x-request-id
string
required
Response headers
x-request-id
string
required
{
"refundID": "string",
"createdOn": "2019-08-24T14:15:22Z",
"updatedOn": "2019-08-24T14:15:22Z",
"status": "created",
"amount": {
"currency": "USD",
"valueDecimal": "12.987654321"
},
"captureID": "string",
"amountDetails": {
"surcharge": {
"currency": "USD",
"valueDecimal": "12.987654321"
}
},
"processingDetails": {
"cardPayment": {
"networkTransactionID": "string",
"failureCode": "call-issuer"
}
}
}Response headers
x-request-id
string
required
{
"amount": "string",
"amountDetails": {
"surcharge": "string"
},
"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
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
x-wait-for
string
rail-response
Path parameters
accountID
string
required
transferID
string
required
Body
Specifies a partial amount to refund.
Before v2026.10, this request body may be omitted. In v2026.10 and later, send an empty object to refund the full amount of the original transfer.
amount
object
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'.
captureID
string
card-payment transfer.
Response
amount
object
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'.
captureID
string
card-payment transfer.
createdOn
string<date-time>
processingDetails
object
Show child attributes
processingDetails
cardPayment
object
Show child attributes
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
status
string<enum>
created,
pending,
completed,
failed
updatedOn
string<date-time>
amount
object
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'.
captureID
string
card-payment transfer.
createdOn
string<date-time>
refundID
string