Card Payments Lifecycle
Card payments move through a lifecycle that may include authorization, voiding, settlement, refund requested, refund, or decline.
Anchor represents this lifecycle using two resources:
| Resource | Description |
|---|---|
CardPayment | The customer-visible record for one logical card payment. It contains the payment’s current status, amounts, merchant information, and other summary details. |
CardPaymentHistory | An immutable, append-only event in the payment lifecycle. Entries explain how the payment reached its current state. |
New entries are added to a CardPayment as payment events occur. This gives customers a consistent history of the payment without exposing the underlying processing details.
A CardPayment does not have a payment kind or direction.
Supported lifecycle entries
| Entry | Description |
|---|---|
CARD_AUTHORIZATION | Authorizes an amount for a proposed card payment. |
CARD_REVERSAL | Voids an authorization that was cancelled before settlement. |
CARD_SETTLEMENT | Records the clearing and movement of funds. |
CARD_SETTLEMENT_ADJUSTMENT | Records a financial correction received after settlement. |
CARD_REFUND_REQUESTED | Starts a separate refund payment without immediately moving funds. |
CARD_DECLINED | Records a rejected payment attempt. |
CARD_REFUND |
Typical payment lifecycle
Most card payments begin with an authorization and finish with one settlement.
card_authorization
│
├── card_reversal
│
└── card_settlement
│
└── 0..n card_settlement_adjustmentAn authorization does not move money. A settlement represents the actual movement of funds.
A payment cannot have both a successful settlement and an authorization reversal. A reversal closes the authorization without settlement.
Exact settlement
When the authorized and settled amounts are the same:
card_authorization: USD 10,000
card_settlement: USD 10,000The CardPayment becomes settled with:
authorized_amount: USD 10,000
settled_amount: USD 10,000Settlement adjustments
A CARD_SETTLEMENT_ADJUSTMENT is a financial correction received when the payment is being settled.
card_authorization
│
└── card_settlement_adjustmentFor example:
card_authorization: NGN 10,000
card_settlement_adjustment: NGN 2,000 additional debit
settled_amount: NGN 12,000The original settlement remains in the payment history. The adjustment records the subsequent correction, while the parent CardPayment exposes the resulting adjusted amount.
A settlement adjustment may increase or reduce the final amount.
adjusted_amount =
settled_amount
+ debit adjustments
- credit adjustmentsVoiding an authorization
A card_reversal means an authorized transaction was cancelled before it settled.
card_authorization
│
└── card_reversalFor example:
card_authorization: NGN 10,000
card_reversal: NGN 10,000The reversal voids the complete authorization. No settlement is created, and the CardPayment becomes voided.
Anchor does not currently support partial reversals. A reversal applies to the full authorized amount.
Direct settlement
A payment may settle without a preceding authorization.
CardPayment
│
└── card_settlementIn this flow:
- A new
CardPaymentis created. - No synthetic authorization is added.
- One
card_settlemententry records the complete amount. - The payment becomes
settled.
Refund lifecycle
A refund is represented as a separate CardPaymentHistory. It is added to the original purchase’s lifecycle.
Original CardPayment
│
└── card_settlement
⋮
└── optional relationship
Refund CardPayment
│
├── card_refund_request
└── card_refundThe refund lifecycle works as follows:
- A separate refund
CardPaymentHistoryis created. - A
CARD_REFUND_REQUESTentry records the refund request with an amount of0. - No money moves when the refund is requested.
- The refund payment remains pending.
- A
CARD_REFUNDentry records the credited amount. - The refund payment becomes settled.
Example:
card_refund_request: NGN 0
card_refund: NGN 10,000 creditThe refund may be related to the original purchase when a reliable identifier is available. The refund must still be processed when the original purchase cannot be identified.
The original purchase remains settled after the refund. Any refunded amount displayed on the purchase is calculated from related refund payments.
Standalone credit
A credit or refund may be received without a preceding refund request.
CardPayment
│
└── card_refundIn this case:
- A separate
CardPaymentis created. - No synthetic
card_refund_requestis added. - The credit is represented by one
card_refund. - The payment is marked as settled.
Declined payment
A decline is a terminal payment attempt that does not move money.
card_declineA declined payment may contain a decline reason, such as:
insufficient_fundsincorrect_pinincorrect_expiration_datecard_inactive_or_invalidamount_limit_exceededsuspected_frauddo_not_honorrestricted_cardmcc_deny_listcountry_deny_listunspecified_decline
The CardPayment becomes declined, and no settlement is created.
Payment amounts
The parent CardPayment exposes amounts derived from its lifecycle entries:
| Field | Description |
|---|---|
amount.authorized | The amount authorized for the payment. |
amount.settled | The complete amount recorded by the initial settlement. |
amount.adjusted | The resulting amount after post-settlement adjustments. |
amount.refunded | An optional amount calculated from related refund payments. |
amount.reversed | |
amount.refundAuthorized |
There is no held_amount field.
Payment statuses
A payment’s status is derived from its lifecycle entries.
| Status | Meaning |
|---|---|
authorized | The payment has been authorized but not settled or voided. |
settled | The payment has one completed settlement. |
voided | The authorization was cancelled before settlement. |
declined | The payment attempt was rejected. |
refunded | A refund request has been created but has not settled. |
refund_requested |
A settlement adjustment changes the payment amount but does not create a second settlement. The payment remains settled.
Updated about 13 hours ago