Payment states

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

StateMeaning
pendingThe 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.
authorizedThe customer has paid, and the amount is reserved on their card or account. You can now capture it.
capturedSome or all of the amount has been captured. Compare captured with amount to see whether there is more to capture.
refundedSome or all of the captured amount has been refunded. Compare refunded with captured to see whether there is more to refund.
canceledThe payment is canceled. No money was captured.
rejectedThe payment was rejected.
expiredThe 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

ActionAllowed inLimit
Captureauthorized, capturedUp to amount plus any card fee, minus what is already captured.
Refundcaptured, refundedUp to captured minus refunded.
Cancelpending, authorizedOnly before anything is captured.
UpdateAny stateOnly 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 captures

Whether 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.

FieldDescription
amountThe amount of the payment.
card_feeThe card fee added to the amount, if your account charges one.
capturedThe total amount captured so far.
refundedThe total amount refunded so far.