Skip to main content
This page is part of the REST API Guides. Card capture happens in the frontend through the Payments Library; see the Payments Library Guides.
Prerequisites: API key, Payment Gateway Account, and an existing transaction to refund or void. Use void to cancel an authorization before capture, or refund to return funds after a transaction has been captured.

When to Use Each

Voids release the hold on the customer’s card immediately. Refunds may take 5-10 business days to appear on the customer’s statement.

Void

Cancel an authorization before capturing. Uses DELETE method.
Void requires re-sending the currency, amount, card, and other details from the original authorization.
The standard integration voids a token captured by the Payments Library. Reference it in the cardNumber field with an @ prefix; cvv is optional and can be left out for a tokenized card.

Void API Reference

Complete parameter reference for void requests

Refund

Refund a captured transaction. Uses PUT method. The standard integration refunds a token captured by the Payments Library (for example with the library’s CHARGE_AND_TOKENIZE operation or via String Tokens). Pass it in card.cardNumber with an @ prefix; there is no dedicated token field on refund or void.

Refund API Reference

Complete parameter reference for refund requests
The token replaces the card number only. You must still send cardHolderName, expirationMonth, and expirationYear. When tokenizing through the library, these are returned alongside the token in tokenAndMaskedCardModel.bankCard.
Gateway-native tokens (gatewayToken from Gateway Tokenization) are not accepted on refund or void. The userToken field exists only on charge and authorize. Use a String Token (@ prefix) here instead.

Partial Refunds

You can refund less than the original amount:

Sending Raw Card Details (Non-Standard)

These examples show raw card details for completeness. Sending raw card data means it passes through your systems and puts you in PCI DSS scope. The standard integration captures the card with the Payments Library and references it here as a token (an @TOKEN value in the cardNumber field); see Void and Refund above.

Void

Refund

Authorize & Capture

Full transaction lifecycle

Transaction Status

Check refund status