# PayIn Overview

PayIn API lets you collect payments from your customers using their preferred payment method and local currency. From your application's perspective, it's a simple two-step flow:

1. [**Create the order**](/payin/create-payin-order.md) - `POST` the payment details to Nexterpay. We route the collection to the appropriate channel.
2. [**Check the status**](/payin/check-payin-status.md) - Poll until you reach a terminal state. Update your records accordingly.

Behind the scenes, the customer authorizes the payment with their chosen provider. The exact authorization experience depends on the payment method - for Mobile Money this is typically a USSD prompt or app notification; for other methods it may be a different flow such as redirect, OTP, etc

### The flow at a glance

<pre class="language-mermaid"><code class="lang-mermaid">sequenceDiagram
    participant App as Your System
<strong>    participant NXP as NexterPay
</strong>    participant Provider as Payment Provider
    participant Cust as Customer

    App->>NXP: 1. Create PayIn order
    Note right of App: POST with externalID,&#x3C;br/>amount, payment method, etc.
    
    NXP->>Provider: Initiate collection
    NXP-->>App: orderID + Pending status
    
    Provider->>Cust: Request authorization
    Cust->>Provider: Authorize payment
    Provider->>NXP: Confirmation
    
    App->>NXP: 2. Check status (poll)
    Note right of App: Using externalID
    NXP-->>App: Pending / Processing /&#x3C;br/>Completed / Failed
    
    App->>App: Update transaction record
</code></pre>

### Supported payment methods

See Payment method page for full coverage

More payment methods are being onboarded. Contact your NexterPay representative for the latest list.

### Polling strategy

PayIns are not always instantaneous, most payment methods require the customer to authorize the transaction on their device. After creating the order, poll the status endpoint until you reach a terminal state.

A reasonable backoff schedule:

* First check: 5 seconds after create
* Subsequent checks: 10s, 30s, 60s
* Cap at 60s intervals
* after \~10 minutes and call [Get Order Errors](/errors-order-errors.md) with the `orderID`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nexterpay.io/payin/payin-overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
