> For the complete documentation index, see [llms.txt](https://docs.pretium.africa/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pretium.africa/on-off-ramps/uganda/onramp.md).

# 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/UGX
```

**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, or Airtel |
| chain           | String  | CELO                                    |
| asset           | String  | USDT, USDC or CUSD                      |
| callback\_url   | URL     | URL to receive payment notification     |

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

```
{
    "shortcode": "0725212418",
    "amount": 1000,
    "mobile_network": "Safaricom",
    "chain": "BASE",
    "asset": "USDC",
    "fee":10,
    "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 %}
