Skip to main content

payment_not_voidable

HTTP 422, type invalid_request_error.

This payment is in a state that cannot be voided.

Why it happened​

A void releases money that was authorized and never taken: only a payment whose status is authorized can be voided. The message names the payment's money state, a finer internal word. Read the payment's status with GET /payments/{id}; the steps below use those status values.

How to fix it​

If the status is succeeded, partially_captured or partially_refunded, the money was taken: refund it with POST /payments/{id}/refunds. If it is refunded or voided, there is nothing left to release. If it is declined, failed, expired or canceled, the payment is final and never held funds, so there is nothing to void. If the status is created, requires_payment, authenticating or processing, the payment has not finished yet and can still become authorized or succeeded: read it again with GET /payments/{id} until its status changes, then act on the new status.

Retrying: do not retry the same request while the status is one of those above. If a payment that had not finished becomes authorized, send the void as a new request with a new Idempotency-Key: this refusal happened after the key was claimed.