> ## Documentation Index
> Fetch the complete documentation index at: https://docs.waffo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Payment Flow

> Step-by-step breakdown of how payments work

## Overview

When a customer pays, here's exactly what happens:

```
Customer → Checkout → Payment Processing → Settlement → Payout
```

Let's break down each stage.

***

## Stage 1: Customer Checkout

Customer arrives at your checkout page.

**1. Select Product**

Customer chooses what to buy.

**2. Enter Details**

* Email address
* Payment method (card, wallet, etc.)
* Billing address (if required)

**3. Click Pay**

Submits payment for processing.

**Time: 30 seconds - 2 minutes** (depends on customer)

***

## Stage 2: Payment Processing

This is where the magic happens. In milliseconds:

```
┌──────────────┐     ┌─────────────┐     ┌─────────────┐
│Waffo Pancake │────▶│    Card     │────▶│   Issuing   │
│              │     │   Network   │     │    Bank     │
└──────────────┘     └─────────────┘     └─────────────┘
       │                                       │
       │◀──────────────────────────────────────┘
       │           Approve / Decline
```

### What We Check

| Check | Purpose |
| - | - |
| Card validity | Is this a real, active card? |
| Fraud signals | Does this look suspicious? |
| 3D Secure | Extra authentication if needed |
| Sufficient funds | Can customer afford this? |

### What the Bank Checks

| Check | Purpose |
| - | - |
| Card status | Active, not blocked/stolen |
| Available credit | Enough balance/limit |
| Spending patterns | Unusual activity? |
| Geographic risk | Transaction from expected location? |

**Time: 2-5 seconds**

***

## Stage 3: Authorization

If all checks pass:

1. Bank **authorizes** the payment
2. Funds are **held** (reserved) on customer's card
3. Authorization code returned

> [!NOTE]
>
> Authorization ≠ Money transferred. It's a promise that the money is available.

### Authorization Hold

* Reduces customer's available balance
* Typically held for 7-30 days if not captured
* Shows as "pending" on customer's statement

***

## Stage 4: Capture

After authorization, we **capture** the payment:

* Tells the bank "yes, take the money"
* Initiates actual fund transfer
* Payment status changes to `succeeded`

For digital products, authorization + capture happen together (instantly).

***

## Stage 5: Settlement

After capture, the sale sits in a short waiting period before it becomes spendable:

```
Day 0: Payment captured → counted in the store's pending balance
~10 business days: settlement waiting period
Then: auto-settles into your merchant balance
```

Business days follow the **Hong Kong public-holiday calendar**, so around a long holiday the wait can run past two calendar weeks. The waiting period is the same for every payment method. It is not a dispute deadline: refunds and chargebacks can still arise after funds have settled, and are then deducted from your balance.

***

## Stage 6: Payout

Once settled, you request a payout from Finance whenever your balance clears the minimum:

```
Settled Funds → Merchant Balance → Your Bank Account / Alipay / PayNow
```

| Rule | Detail |
| - | - |
| Schedule | On-demand — no fixed cycle, you initiate each payout |
| Minimum | More than **\$10 USD** per payout |
| Fee | **1% per payout, \$10 minimum** |
| Arrival | **1–3 business days** after you request it |

See [Payout Flow](https://docs.waffo.ai/merchant/payout-flow.md) for the step-by-step guide and failure reasons.

***

## Complete Timeline Example

**Scenario**: Customer buys \$50 subscription on Monday 10am

| Time | Event |
| - | - |
| Mon 10:00:00 | Customer clicks "Pay" |
| Mon 10:00:02 | Authorization approved |
| Mon 10:00:02 | Capture initiated |
| Mon 10:00:03 | Payment succeeded ✓ |
| Mon 10:00:03 | Customer sees confirmation |
| Mon 10:00:05 | Webhook sent to your server |
| Mon → \~10 business days | Settlement waiting period |
| \~2 weeks later | Funds settle into your merchant balance |
| When you request it | Payout arrives in your bank 1–3 business days later |

***

## What You See

In your Dashboard:

1. **Payment created** - Customer started checkout
2. **Payment processing** - Being authorized
3. **Payment succeeded** - Money captured
4. **Available for payout** - Settlement complete

***

## What Customer Sees

On their bank statement:

| Stage | Statement Shows |
| - | - |
| Authorization | "Pending: WAFFO\* YourStore \$50.00" |
| Captured | "WAFFO\* YourStore \$50.00" |
| Refunded | "WAFFO\* YourStore -\$50.00" |

***

## Failed Payments

If payment fails at any stage:

```
Customer notified → Can retry → Different card/method
```

Common failure points:

| Stage | Failure Reason | Solution |
| - | - | - |
| Checkout | Invalid card number | Customer re-enters |
| Authorization | Insufficient funds | Try different card |
| Authorization | Bank decline | Contact bank |
| 3D Secure | Auth not completed | Retry payment |

***

## Subscriptions

For recurring payments:

```
Initial Payment → Store Card → Charge on Schedule
```

1. First payment: full checkout flow, during which the buyer authorizes future recurring charges
2. Subsequent payments: we charge the stored payment method on the billing date, normally with no action from the buyer
3. A renewal can still fail — expired card, insufficient funds, issuer decline — or the issuer may require the buyer to re-authenticate

> [!NOTE]
>
> Failed renewals are retried once; if the retry also fails, the subscription is cancelled and the buyer is notified. See [Subscriptions](https://docs.waffo.ai/features/subscriptions.md).

***

## Next Steps

> [card] [Payment Methods](https://docs.waffo.ai/payments/methods.md)
>
> Supported payment methods

> [card] [Security](https://docs.waffo.ai/payments/security.md)
>
> How payments are protected


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.