Reverse (Void)
A reverse voids a transaction before settlement, releasing the hold on the cardholder's funds immediately. Use it to cancel a sale or preauth that hasn't settled yet.
For returning funds after settlement, see Refund.
Full Reverse
iOS:
let response = try await KoardMerchantSDK.shared.reverse(
transactionId: transactionId,
eventId: UUID().uuidString
)
Android:
sdk.reverse(
transactionId = transactionId,
eventId = UUID.randomUUID().toString()
)
Partial Reverse
Reduce the authorized amount without voiding the entire transaction:
iOS:
let response = try await KoardMerchantSDK.shared.reverse(
transactionId: transactionId,
amount: 5000, // reduce hold by $50
eventId: UUID().uuidString
)
Android:
sdk.reverse(
transactionId = transactionId,
amount = 5000,
eventId = UUID.randomUUID().toString()
)
Surcharge Handling
When reversing a surcharged transaction, the full surcharge is released automatically. No breakdown is needed—the processor handles the surcharge reversal.
When to Use Reverse vs. Refund
| Reverse | Refund | |
|---|---|---|
| Timing | Before settlement | After settlement |
| Speed | Immediate hold release | 3–5 business days |
| Surcharge | Full surcharge voided | Surcharge prorated |
| Use case | Cancel, customer changed mind | Post-settlement return |
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
transactionId |
String |
Yes | Transaction to reverse |
amount |
Int? |
No | Partial reverse amount in minor units. Omit for full void. |
eventId |
String? |
No | Idempotency key |
