Cancel or refund a card transfer | Moov Documentation
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
Ask
curl -X POST "https://api.moov.io/accounts/{accountID}/transfers/{transferID}/reversals" \
-H "Authorization: Bearer {token}" \
-H "X-Moov-Version: v2026.07.00" \
-d '{
"amount": 1000
}'
Ask
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)
Ask
import { Moov } from "@moovio/sdk";
const moov = new Moov({
security: {
username: "",
password: "",
},
});
async function run() {
const result = await moov.transfers.createReversal({
xIdempotencyKey: "b91d00b2-4ecb-4eb4-a67f-d6f76c0b7ad8",
accountID: "f225b49d-911b-440b-baed-6065968b69cb",
transferID: "a17b29e2-4af6-4c9d-ad3a-dd0ded2966ad",
createReversal: {
amount: 1000,
amountDetails: {
surcharge: {
currency: "USD",
valueDecimal: "12.987654321",
},
},
},
});
console.log(result);
}
run();
Ask
declare(strict_types=1);
require 'vendor/autoload.php';
use Moov\