The states a payment moves through, and which actions each state allows.
Every payment has a state that tells you where it is in its life, from created to captured or
refunded. Use it to decide what your system should do next.
States
| State | Meaning |
|---|---|
pending | The payment is created, but the customer has not paid yet. A failed attempt to pay leaves the payment pending, so the customer can try again. |
authorized | The customer has paid, and the amount is reserved on their card or account. You can now capture it. |
captured | Some or all of the amount has been captured. Compare captured with amount to see whether there is more to capture. |
refunded | Some or all of the captured amount has been refunded. Compare refunded with captured to see whether there is more to refund. |
canceled | The payment is canceled. No money was captured. |
rejected | The payment was rejected. |
expired | The authorization expired at the acquirer before it was captured. It can no longer be captured. |
How a payment moves between states
flowchart LR pending --> authorized pending --> canceled authorized --> captured authorized --> canceled authorized --> expired captured --> refunded
A payment can be captured more than once, and refunded more than once. It stays captured or
refunded while you do so.
Actions allowed in each state
| Action | Allowed in | Limit |
|---|---|---|
| Capture | authorized, captured | Up to amount plus any card fee, minus what is already captured. |
| Refund | captured, refunded | Up to captured minus refunded. |
| Cancel | pending, authorized | Only before anything is captured. |
| Update | Any state | Only variables can be changed. |
An action that is not allowed in the payment's current state is rejected with
422 Unprocessable Entity.
Partial and repeated capturesWhether a payment can be captured in several parts depends on the acquirer and payment method.
If you plan to capture in parts, test it with the payment methods you use.
Amounts
These fields on a payment show how much has moved. All amounts are integers in the currency's
smallest unit.
| Field | Description |
|---|---|
amount | The amount of the payment. |
card_fee | The card fee added to the amount, if your account charges one. |
captured | The total amount captured so far. |
refunded | The total amount refunded so far. |