capture_unsupported
HTTP 422, type invalid_request_error.
This capture, or in the third case below a void, cannot be done through the API.
Why it happened
A payment that was already captured, in full or in part, answers payment_not_capturable instead: that check runs first. This code is about an authorization that is still held. The message says which of three causes applies:
- On a capture: the payment has no provider reference recorded, so its authorization cannot be addressed at the gateway. That happens when the gateway returned no provider reference, or the payment was made before the platform recorded one.
- On a capture: no route is currently configured that can capture this payment.
- On a capture or a void: this environment has no gateway configured that can authorize without capturing. Here a payment is taken in full when it is created, so there is no separate authorization to capture and no hold to void.
How to fix it
- For causes 1 and 2, the authorization is still held at the gateway: capture it in the gateway's
own console, or contact support with the request id. If a route that can capture it is configured
later (cause 2), send the capture as a new request with a new
Idempotency-Key: this refusal happened after the key was claimed. - For cause 3, there is nothing to capture or void. To give money back, refund the payment with
POST /payments/{id}/refunds.
Retrying: do not retry the same request. It will not succeed.
Related codes
payment_not_capturable-- the payment is in a state that cannot be capturedvoid_unsupportedrefund_unsupported