- A valid API key — see Obtain API credentials
- A transaction in
authorizedorcapturedstate (before batch closure)
Retrieve the transaction to verify it has not already settled.
curl -X GET \
https://api.dev.paradisegateway.net/v1/transactions/TRANSACTION-01JMRSPCK7XVNP3KS8F2W4T6Y \
-H "APIKEY: YOUR-API-KEY"Check the transaction_state field. If it is authorized or captured, you can cancel. If it is settled, you must refund instead.
Send POST /v1/transactions/{id}/cancel with the cancel type and amount.
curl -X POST \
https://api.dev.paradisegateway.net/v1/transactions/TRANSACTION-01JMRSPCK7XVNP3KS8F2W4T6Y/cancel \
-H "Content-Type: application/json" \
-H "APIKEY: YOUR-API-KEY" \
-d '{
"type": "cancel",
"amount": 15000
}'Use the appropriate cancel type for ACH transactions.
| Original transaction type | Cancel type |
|---|---|
payment | cancel |
payout | cancel |
{
"type": "cancel",
"amount": 50000
}A successful cancel returns transaction_state: canceled.
{
"id": "TRANSACTION-01JMRSPCK7XVNP3KS8F2W4T6Y",
"object": "CancelTransactionResponse",
"type": "cancel",
"transaction_state": "canceled",
"response_status": "Approved",
"response_code": "00",
"response_message": "The API request is approved.",
"amount": 15000,
"correlation_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}The hold on the person's funds is released immediately.
Cancel vs. refund
If the transaction_state is settled, a cancel will fail. Use a refund instead.
- Refund a settled transaction — return funds after settlement
- About cancels and refunds