> For the complete documentation index, see [llms.txt](https://aplazo.gitbook.io/aplazo-integrations/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aplazo.gitbook.io/aplazo-integrations/in-store-api/payment-flow.md).

# Payment Flow

## Payment Flow

{% stepper %}
{% step %}

### Initiate Payment

When paying with Aplazo, the cashier should collect the customer's phone number (if using SMS/Whatsapp).

Send a request to [create a payment](/aplazo-integrations/api-reference/in-store-api/create-a-payment.md) with the order details.
{% endstep %}

{% step %}

### Present Checkout

* Send Link via SMS/WhatsApp: Aplazo will text or message the checkout URL to the customer’s phone.
* Or Generate QR Code: Display the QR code on a screen or printout so the customer can scan and open the checkout page.
  {% endstep %}

{% step %}

### Customer Pays

The customer reviews their installment plan and makes the first payment on Aplazo’s secure checkout.
{% endstep %}

{% step %}

### Payment Confirmation

While waiting for the customer, show a “Payment Pending” status on your POS for the cashier.

Set up a [webhook](/aplazo-integrations/api-reference/webhook-confirmation.md) to be notified when payment is confirmed, you can also periodically [consult the payment status.](/aplazo-integrations/api-reference/in-store-api/get-payment-status.md)

If the customer loses the checkout link [send again the checkout link](/aplazo-integrations/api-reference/in-store-api/resend-checkout-via-sms-or-whatsapp.md) or [generate a QR ](/aplazo-integrations/api-reference/in-store-api/get-checkout-qr-code.md)code.
{% endstep %}

{% step %}

### Refunds & Cancellations

If the customer changes their mind before paying, the cashier can [cancel the payment.](/aplazo-integrations/api-reference/in-store-api/cancel-payment.md)&#x20;
{% endstep %}
{% endstepper %}

## Sequence Diagram

<figure><img src="/files/BE132Wu1lwFAOifh8jhD" alt=""><figcaption></figcaption></figure>
