Skip to content
Last updated

Cancel an authorized transaction

Prerequisites

  • A valid API key — see Obtain API credentials
  • A transaction in authorized or captured state (before batch closure)

Step 1: Confirm the transaction state

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.

Step 2: Cancel the transaction

Send POST /v1/transactions/{id}/cancel with the cancel type and amount.

Card cancel

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
  }'

ACH cancel

Use the appropriate cancel type for ACH transactions.

Original transaction typeCancel type
paymentcancel
payoutcancel
{
  "type": "cancel",
  "amount": 50000
}

Step 3: Verify the response

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.

Next steps