> For the complete documentation index, see [llms.txt](https://docs.fonbnk.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fonbnk.com/v1/on-ramp/how-it-works.md).

# How it works

Fonbnk Pay Widget is a secure and efficient way to accept payments in stable coins from customers in an integrated and non-integrated way.

It's a P2P platform that connects people who want to sell mobile money(Airtime, M-PESA, Bank, etc.) with people who would like to buy it.

How it works for end users:

1. A customer selects his funds source (Airtime, M-PESA, Bank, etc.) and the amount of crypto he would like to receive
2. Customer provides his wallet details
3. Customer transfers funds to an agent we found for him and confirms the order
4. An agent confirms the order and the system sends USDC to a customer's wallet

{% @mermaid/diagram content="sequenceDiagram
User->>Widget: Specify amount of USDC/cUSD to buy
Widget->>User: Show the best offer
User->>Widget: Specify wallet details
User->>Widget: Verify email
User->>Widget: Create order
Widget->>User: Provide transfer funds instructions
Note over User: Send funds to an agent
User->>Widget: Confirm that funds are sent
Note over Agent: Check if funds are received
Agent->>Widget: Confirm that funds are received
Widget->>User: Send USDC/cUSD to user wallet" %}

Example of a flow:

Pay Widget supports configuration via [URL parameters](/v1/on-ramp/url-parameters.md). Merchants can force the widget to use specific wallet address, memo, crypto amount, etc. This allows integrating the widget as a payment system.<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.fonbnk.com/v1/on-ramp/how-it-works.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
