> 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/online-api/payment-flow.md).

# Payment Flow

## Payment Flow

Implementing Aplazo’s payment solution is straightforward. The typical payment flow involves these steps:

{% stepper %}
{% step %}

### Authentication

* Send a request to the authentication endpoint to retrieve a Bearer token.
* Use this token to authenticate subsequent requests.
  {% endstep %}

{% step %}

### Request an Aplazo Payment

* When customers choose Aplazo as their payment method, send a payment request to Aplazo.
* This request returns a Checkout URL, which is used to complete the payment.
  {% endstep %}

{% step %}

### Redirect to checkout

* Redirect your customer to the **checkout URL** provided in the payment response.
  {% endstep %}

{% step %}

### Checkout process

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

{% step %}

### Receive webhook notification

* When the payment is confirmed, Aplazo sends a webhook notification to your server, indicating the payment status.
  {% endstep %}

{% step %}

### Success

* After the customer completes the payment, they’re redirected to the **successUrl** you specified during the payment request.
  {% endstep %}
  {% endstepper %}

{% hint style="info" %}
Aplazo will pay you upfront, while taking the credit and fraud risk.
{% endhint %}

## Sequence Diagram

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