Void
Overview
The void method cancels an authorized payment before funds are captured. This releases the held funds back to the customer's payment method, effectively canceling the transaction.
Business Use Case: A customer cancels their order before it ships. The payment was authorized at checkout, but since you're not shipping, you void the authorization to release the hold on their funds.
Purpose
Why use void?
Order cancellation
Release funds when customer cancels
Fulfillment failure
Void if item is out of stock
Authorization timing out
Clean up old authorizations
Fraud prevention
Void suspicious transactions before capture
Key outcomes:
Held funds released immediately
No charge to customer
Transaction terminated cleanly
Request Fields
merchant_transaction_id
string
Yes
Your unique transaction reference
connector_transaction_id
string
Yes
The connector's transaction ID from authorize
void_reason
string
No
Reason for voiding
Response Fields
merchant_transaction_id
string
Your transaction reference (echoed back)
connector_transaction_id
string
Connector's transaction ID
status
PaymentStatus
Current status: VOIDED
voided_amount
int64
Amount voided in minor units
status_code
int
HTTP-style status code (200, 404, etc.)
Example
SDK Setup
Request
Response
Void vs Refund
Void
Before capture, during authorization hold
Funds released immediately, no charge
Refund
After capture, funds already transferred
Funds returned, may take 5-10 days
Error Handling
404
Transaction not found
Verify connector_transaction_id
409
Already captured
Cannot void, use refund instead
410
Already voided
Already voided, idempotent result
Best Practices
Void as soon as you know the transaction won't complete
Void is cheaper than refund (no chargeback risk, no settlement costs)
Authorizations typically expire in 7-10 days if not captured
Next Steps
Last updated
Was this helpful?

