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

**Body Request**

***

| Name            | Type    | Description                                |
| --------------- | ------- | ------------------------------------------ |
| shortcode       | String  | Customer's phone number                    |
| amount          | Integer | Amount to collect                          |
| chain           | String  | CELO                                       |
| asset           | String  | USDT, USDC or CUSD                         |
| mobile\_network | String  | Mobile money network i.e Airtel Money      |
| address         | String  | 0x3Eaab84B42F9fCf2A9B3f2FDB83572B4153eE958 |
| 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 %}
