Sub topic 3
Authorization, capture, and settlement
This chapter assumes you know the actors in a card payment (merchant, PSP, acquirer, card network, issuer), basic HTTP APIs, and relational database transactions. It covers the three phases that move a card payment from "the customer clicked pay" to "the merchant has money." Each phase has different guarantees, and your data model has to keep them apart.
Why a payment has three phases
A card payment is not one event. The merchant first needs to know the customer can pay. It often needs to wait before it commits, for example until goods ship. Money moves between banks only after that.
| Phase | What happens | Does money move? | Typical timing |
|---|---|---|---|
| Authorization | The issuer checks the card and account and places a hold on the amount | No | Seconds |
| Capture | The merchant tells the PSP to claim some or all of the held amount | No, it creates a claim | Immediately, or hours to days after authorization |
| Settlement | Funds move from issuer to acquirer to merchant, minus fees | Yes | Usually one to a few business days after capture |
Many integrations also offer a one-step "sale" that authorizes and captures together. It suits digital goods, where fulfillment is immediate. Separate steps suit shipping, hotels, and anything where the final amount can differ from the first estimate.
Authorization
An authorization asks the issuer: "Will you honor a charge of this amount on this card?" The issuer checks that the card is valid, the account is in good standing, and enough funds or credit are available. It also applies its own fraud rules. If it approves, it places a hold on the customer's available balance and returns an authorization code.
Three points matter for your design.
- An approval is a promise, not a payment. No money has moved. The customer's available balance drops, but the merchant has nothing yet.
- A decline is not one thing. Responses include hard declines, such as a stolen card, where you must not retry. They also include soft declines, such as insufficient funds or a request for extra authentication, where retrying or asking the customer for a step-up may work. Store the normalized decline category and the raw PSP code.
- Holds expire. If you do not capture in time, the issuer releases the hold. The window depends on the network, card type, and merchant category, and is commonly several days. Treat it as a per-payment
expires_atvalue reported or estimated from your PSP, not a constant in your code.
If the customer abandons the order after an approval, you should void the authorization. A void tells the issuer to release the hold now, so the customer does not see reduced funds until expiry.
Capture
A capture says: "Charge this amount against that authorization." Rules vary by PSP and card network, but these are common:
- The captured amount may be less than the authorized amount. The unused remainder is released.
- Some merchant categories, such as restaurants for tips, may capture slightly more than authorized within a tolerance. Do not rely on this in general.
- Some PSPs allow several partial captures against one authorization, for split shipments. Others allow one capture only.
- A capture after expiry fails, or succeeds only as a new authorization that can be declined.
Your payment record should therefore hold two amounts, authorized_minor and captured_minor, plus the currency and expires_at. Keep them separate so you can answer "how much is still capturable?" without arithmetic on a status string. Use integer minor units for both, as the money-representation chapter describes.
The sketch below shows capture rules as a small domain object.
from dataclasses import dataclass
from datetime import datetime, timedelta, timezone
@dataclass
class Authorization:
amount_minor: int
currency: str
expires_at: datetime
captured_minor: int = 0
voided: bool = False
@property
def capturable_minor(self) -> int:
if self.voided:
return 0
return self.amount_minor - self.captured_minor
def capture(self, amount_minor: int, now: datetime) -> int:
"""Capture part or all of the hold. Returns the amount still capturable."""
if self.voided:
raise ValueError("authorization was voided")
if now >= self.expires_at:
raise ValueError("authorization expired")
if amount_minor <= 0:
raise ValueError("capture amount must be positive")
if amount_minor > self.capturable_minor:
raise ValueError("capture exceeds authorized amount")
self.captured_minor += amount_minor
return self.capturable_minor
def net_settlement(captured_minor: int, fee_bps: int, fixed_fee_minor: int) -> int:
"""Amount paid out: captured minus a percentage fee (rounded half up) and a fixed fee."""
percent_fee = (captured_minor * fee_bps + 5000) // 10000
return captured_minor - percent_fee - fixed_fee_minor
now = datetime(2026, 11, 26, 12, 0, tzinfo=timezone.utc)
auth = Authorization(5000, "USD", expires_at=now + timedelta(days=7))
left = auth.capture(4000, now)
print("still capturable:", left)
print("net payout:", net_settlement(auth.captured_minor, fee_bps=290, fixed_fee_minor=30))This prints still capturable: 1000 and net payout: 3854. The fee is 116 for the 2.9% part (4000 × 290 / 10000 = 116) plus 30 fixed.
Clearing and settlement
After capture, the acquirer collects captured transactions into batches and submits them through the card network. This step is called clearing. The network presents each transaction to the issuer, which posts it to the customer's statement and agrees to pay.
Settlement is the actual movement of funds. The issuer pays the network. The network pays the acquirer net of interchange, which is the fee set between issuer and acquirer. The acquirer pays the merchant, or the PSP that holds funds for the merchant. The PSP then pays out to the merchant's bank account on a schedule, often daily or weekly, minus its own fees.
Two consequences follow:
- "Captured" is not "available." A merchant dashboard that shows captured revenue as cash will be wrong for days. Many PSPs expose a pending balance and an available balance. Mirror that distinction.
- Settlement arrives in aggregate. A bank deposit lists a total for many payments, not one line per payment. You match them with the PSP's settlement report. The reconciliation chapter covers that process, but you need to record the settlement batch ID against each captured payment now so the match is possible later.
Designing around the phases
Several decisions in your system follow from the three phases.
- Status values. Authorization and capture are separate states. The state machine chapter lists the allowed transitions. For now, notice that
authorizedandcapturedmust be different values. - Ledger timing. An authorization does not move money, so it usually does not create ledger entries. Many designs track it as a memo or hold record. Capture creates the claim on funds. Settlement or payout moves real balances. The ledger chapter shows how to post these.
- Scheduled work. A job should find authorizations close to expiry and either capture or void them. Without it, you leave customer funds held for no reason, or you lose the right to capture.
- Idempotency. Capture and void are money-affecting calls, so each needs its own idempotency key. A retried capture that is not idempotent can capture twice.
- Amount checks. Validate currency on capture as well as amount. A capture must use the currency of the authorization.
Common errors
- Fulfilling an order on authorization success when your policy requires capture first, or capturing before the goods ship, which in some jurisdictions and card rules is not allowed.
- Retrying a hard decline, which harms your approval rate with the issuer.
- Assuming a void and an expiry are the same. A void is explicit and immediate. Expiry depends on the issuer, and the customer's available funds may stay reduced for longer than you expect.
- Computing refunds from the authorized amount instead of the captured amount.
- Marking a payment settled when the PSP reports capture. Wait for the settlement report.
Exercise
A customer's order is authorized for 80.00 USD. Two of the three items ship, and you capture 55.00 USD. The third item is cancelled. What are authorized_minor, captured_minor, and the amount you should do something about, and what is the right action on the remainder?
Show answer
authorized_minor is 8000 and captured_minor is 5500. The remaining 2500 is still held on the customer's card. Because the third item is cancelled, void the authorization remainder (or let your PSP release it after a partial capture) so the hold ends now instead of at expiry. Funds for the 5500 are not yet with the merchant. They arrive at settlement, net of fees.
Exercise
Why should a payment system keep captured amount and settled amount as separate pieces of data?
Show answer
Capture is the merchant's claim and happens when the PSP accepts it. Settlement is when money moves, usually one or more business days later and in aggregate batches. Separate data lets you report pending versus available balances accurately and lets reconciliation match your captured payments to the settlement report.