Ramp resource
Onboard your users to the first of its kind naira compliant stablecoin.
This ramp resource will guide you through the process of onboarding your users on to the cNGN stablecoin, and payout when you need to get back to fiat naira.
Overview
Use the /ramp/initialise route to initiate a ramp transaction, specifying the type in the body.
Ramp transaction:
The ramp transaction initialise endpoint is a simple endpoint that enables you to initiate a ramp transaction. It accepts a JSON payload with the following properties:
curl --request POST \
--url https://stables.flintapi.io/v1/ramp/initialise \
--header 'Content-Type: application/json' \
--header 'x-api-key: <FLINT_API_KEY>' \
--data '{
"type": "on",
"reference": "trx_ref_rand00093942885990385824",
"network": "base", // base | bsc
"amount": 3500,
"notifyUrl": "https://webhook.site/34645843-485887534-nf758883dc-0985n93v774",
"destination": {
"address": "0x1234567890abcdef1234567890abcdef12345678",
},
}'| Prop | Type | Default |
|---|---|---|
type | on | off | on |
reference | string | ref_trx_1234567890 |
network | base | bsc | base |
amount | number | 100 |
notifyUrl | string | https://webhook.site/34645843-485887534-nf758883dc-0985n93v774 |
destination | { address: string } | { bankCode: string; accountNumber: string } | { address: "0x1234567890abcdef1234567890abcdef12345678" } |
The type prop tells us what direction you want to transact in, acceptable values are on and off that represent on-ramp and off-ramp respectively.
Destination details:
curl --request POST \
--url https://stables.flintapi.io/v1/ramp/initialise \
--header 'Content-Type: application/json' \
--header 'x-api-key: <FLINT_API_KEY>' \
--data '{
"type": "on",
"reference": "trx_ref_rand00093942885990385824",
"network": "base", // base | bsc
"amount": 3500,
"notifyUrl": "https://webhook.site/34645843-485887534-nf758883dc-0985n93v774",
"destination": {
"address": "0x1234567890abcdef1234567890abcdef12345678",
},
}'Wallet destination
The destination prop can accept an object of {"address": "0x1234567890abcdef1234567890abcdef12345678"} for on ramp transaction, specify a destination address which can be your users wallet address that can be credited with the stablecoin token
Bank destination
For off-ramp transactions the destination object accepts an object of {"bankCode": "000013", "accountNumber": "1234567890"} which tells us which bank account to credit with fiat.
You can use the <BASE_ULR>/v1/ramp/banks endpoint to get the list of supported banks and their bank code.
curl --location --request POST 'https://stables.flintapi.io/v1/ramp/initialise' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <FLINT_API_KEY>' \
--data-raw '{
"type": "off",
"reference": "trx_ref_rand00093942885990385824",
"network": "base", // base | bsc
"amount": 3500,
"notifyUrl": "https://webhook.site/34645843-485887534-nf758883dc-0985n93v774",
"destination": {
"bankCode": "000013",
"accountNumber": "1234567890"
},
}'HTTP Response
The response for the /ramp/initialise endpoint will contain collection information depending on the transaction type, bankCode and accountNumber for on ramp transaction and address for off ramp transactions.
{
"status": "success",
"message": "Transaction initialised successfully",
"data": {
"status": "pending",
"transactionId": "trx_randasdbvobsad80o03bv9bsadv0bb9b3v",
"depositAddress": "0x0000000000000000000000000000000000000000"
}
}