Ginger Payments

Void payments

Release all or part of a pre-authorized amount that you no longer want to capture.

A void cancels all or part of a pre-authorization. The voided amount is released to your customer and can't be captured anymore. Void the amount you no longer need, for example when your customer cancels the order or part of it.

Voids work on transactions created with capture_mode set to manual or delayed, as long as they haven't been captured yet. To return money after a capture, create a refund instead.

Void the full amount

Send a POST request to the voids endpoint of the transaction. No request body is needed:

curl https://api.dev.gingerpayments.com/v1/orders/$ORDER_ID/transactions/$TRANSACTION_ID/voids/ \
  --user "$API_KEY:" \
  --request POST

The full remaining authorized amount is released.

Void a partial amount

Send the amount to void, in the smallest currency unit, and a description to the voids/amount endpoint. This example reduces a € 100.00 pre-authorization by € 25.00:

curl https://api.dev.gingerpayments.com/v1/orders/$ORDER_ID/transactions/$TRANSACTION_ID/voids/amount/ \
  --user "$API_KEY:" \
  --header "Content-Type: application/json" \
  --data '{
    "amount": 2500,
    "description": "Void 25.00 of the full 100.00"
  }'
FieldRequiredDescription
amountYesAmount to void in the smallest currency unit.
descriptionYesDescription of the void.

The pre-authorization is reduced to € 75.00, which you can still capture.

Void, capture or refund?

You want toUse
Take the reserved moneyCapture
Release reserved money you won't takeVoid
Return money you've already capturedRefund

On this page