# Onramp

This endpoint calls the Pretium payment protocol to initiate cash collection from the user, confirm receipt via mobile money or bank transfer, and release the equivalent amount in stablecoins.

```
POST {{uri}}/v1/onramp/GHS
```

**Body Request**

***

| Name            | Type    | Description                                                          |
| --------------- | ------- | -------------------------------------------------------------------- |
| shortcode       | String  | Customer's phone number                                              |
| amount          | Integer | Amount to collect                                                    |
| mobile\_network | String  | Mobile money network i.e MTN  MoMo, AirtelTigo Money or Telecel Cash |
| chain           | String  | CELO                                                                 |
| asset           | String  | USDT, USDC or CUSD                                                   |
| address         | String  | 0x3Eaab84B42F9fCf2A9B3f2FDB83572B4153eE958                           |
| callback\_url   | URL     | URL to receive payment notification                                  |

{% tabs %}
{% tab title="Sample Request" %}

```
{
    "shortcode": "0525212418",
    "amount": 50,
    "mobile_network": "MTN MoMo",
    "chain": "BASE",
    "fee":10,
    "asset": "USDC",
    "address": "0x3Eaab84B42F9fCf2A9B3f2FDB83572B4153eE958",
    "callback_url": "https://pretium.africa/b2c/log-test"
}
```

{% endtab %}

{% tab title="200 - Success" %}

```
{
    "code": 200,
    "message": "Prompt sent",
    "data": {
        "status": "PENDING",
        "transaction_code": "DDM6D",
        "message": "Success! Processing payment..."
    }
}
```

{% endtab %}

{% tab title="400 - Bad Request" %}

```
{
   "code": 400,
   "message": "Failed - Bad Request"
}
```

{% endtab %}
{% endtabs %}


---

# 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.pretium.africa/on-off-ramps/ghana/onramp.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.
