On Ramp
On-ramp
Returns a list of supported blockchain assets for the on-ramp
GET /api/pay-widget-merchant/assets HTTP/1.1
Host: sandbox-api.fonbnk.com
x-client-id: YOUR_API_KEY
Accept: */*
Successful response
[
{
"network": "POLYGON",
"asset": "USDC"
},
{
"network": "CELO",
"asset": "USDC"
},
{
"network": "ETHEREUM",
"asset": "USDC"
},
{
"network": "BASE",
"asset": "USDC"
},
{
"network": "AVALANCHE",
"asset": "USDC"
},
{
"network": "POLYGON",
"asset": "USDC_E"
},
{
"network": "SOLANA",
"asset": "USDC"
},
{
"network": "OPTIMISM",
"asset": "USDC"
},
{
"network": "CELO",
"asset": "CUSD"
},
{
"network": "POLYGON",
"asset": "USDT"
},
{
"network": "AVALANCHE",
"asset": "USDT"
},
{
"network": "CELO",
"asset": "USDT"
},
{
"network": "ETHEREUM",
"asset": "USDT"
},
{
"network": "TON",
"asset": "USDT"
},
{
"network": "STELLAR",
"asset": "USDC"
},
{
"network": "SOLANA",
"asset": "USDT"
},
{
"network": "OPTIMISM",
"asset": "USDT"
},
{
"network": "CELO",
"asset": "CKES"
},
{
"network": "LISK",
"asset": "USDT"
},
{
"network": "BNB",
"asset": "USDT"
},
{
"network": "BNB",
"asset": "USDC"
},
{
"network": "ARBITRUM",
"asset": "USDT"
},
{
"network": "ARBITRUM",
"asset": "USDC"
}
]
Returns a single pay widget order by its ID or orderParams query parameter.
id of the order which you could receive via a webhook or iframe events
Value which you provided in the orderParams parameter of the pay widget URL
GET /api/pay-widget-merchant/order HTTP/1.1
Host: sandbox-api.fonbnk.com
x-client-id: YOUR_API_KEY
Accept: */*
Successful response
{
"_id": "651e764399a4b360c7eb0178",
"walletType": "SOLANA",
"asset": "USDC",
"walletAddress": "53L9ahwHcNnD4F11TqNHQgVUa75WgaCL2WGeiKiK2gCc",
"feePercent": 2.5,
"fonbnkFeePercent": 1.5,
"partnerFeePercent": 1,
"gasUsdAmount": 0,
"merchantId": "645a20cbaf1d31dbd52c0fda",
"createdAt": "2023-10-05T08:39:31.691Z",
"buySwap": {
"_id": "651e764399a4b360c7eb016d",
"buyerUserPhone": "380962669394",
"sellerUserPhone": "380960000000",
"amount": 210,
"airtimeAmount": 2100,
"status": "seller_confirmed",
"provider": "bank_transfer",
"expiresAt": "2023-10-05T09:39:31.492Z",
"createdAt": "2023-10-05T08:39:31.500Z",
"buyerConfirmedAt": "2023-10-05T08:39:37.027Z",
"countryIsoCode": "NG"
},
"withdrawal": {
"_id": "651e7653db37ee6b74883fe1",
"status": "complete",
"withdrawAmount": 2,
"withdrawCryptoAmount": 2,
"transactionHash": "F19TfyGxBgebZt4q8h5bgf9Luabpypm3zSSzWR5ZUp8CKGNvL2r58zqGvWXvKftppiWKszV11jNQtsMUoFppmyb"
},
"feeAmount": 0.05,
"localCurrencyFeeAmount": 50,
"fonbnkFeeAmount": 0.03,
"localCurrencyFonbnkFeeAmount": 30,
"partnerFeeAmount": 0.02,
"localCurrencyPartnerFeeAmount": 20,
"networkFeeAmount": 0,
"localCurrencyNetworkFeeAmount": 0,
"resumeUrl": "https://pay.fonbnk.com/swap-status?orderId=651e764399a4b360c7eb0178"
}
Returns a paginated list of pay widget orders. Filters can be applied to the list by providing query parameters.
this parameter should be provided in order to get a next page from the pagination, it should be taken from "nextCursor" response value
number from 1 to 100, describes how many records should be in each pagination page
wallet type of orders
phone number of the client, should include country code
email of the client
- initiated: The buy swap has been initiated
- expired: The buy swap has expired
- buyer_confirmed: The buyer has confirmed the buy swap
- seller_confirmation_pending: The agent is yet to confirm the buy swap
- seller_confirmation_failed: The agent has failed to confirm the buy swap
- seller_confirmed: The agent has confirmed the buy swap
- seller_rejected: The agent has rejected the buy swap
status of a crypto transfer
GET /api/pay-widget-merchant/orders HTTP/1.1
Host: sandbox-api.fonbnk.com
x-client-id: YOUR_API_KEY
Accept: */*
Successful response
{
"nextCursor": "651e764399a4b360c7eb0178",
"list": [
{
"_id": "651e764399a4b360c7eb0178",
"walletType": "SOLANA",
"asset": "USDC",
"walletAddress": "53L9ahwHcNnD4F11TqNHQgVUa75WgaCL2WGeiKiK2gCc",
"feePercent": 2.5,
"fonbnkFeePercent": 1.5,
"partnerFeePercent": 1,
"gasUsdAmount": 0,
"merchantId": "645a20cbaf1d31dbd52c0fda",
"createdAt": "2023-10-05T08:39:31.691Z",
"buySwap": {
"_id": "651e764399a4b360c7eb016d",
"buyerUserPhone": "380962669394",
"sellerUserPhone": "380960000000",
"amount": 210,
"airtimeAmount": 2100,
"status": "seller_confirmed",
"provider": "bank_transfer",
"expiresAt": "2023-10-05T09:39:31.492Z",
"createdAt": "2023-10-05T08:39:31.500Z",
"buyerConfirmedAt": "2023-10-05T08:39:37.027Z",
"countryIsoCode": "NG"
},
"withdrawal": {
"_id": "651e7653db37ee6b74883fe1",
"status": "complete",
"withdrawAmount": 2,
"withdrawCryptoAmount": 2,
"transactionHash": "F19TfyGxBgebZt4q8h5bgf9Luabpypm3zSSzWR5ZUp8CKGNvL2r58zqGvWXvKftppiWKszV11jNQtsMUoFppmyb"
},
"feeAmount": 0.05,
"localCurrencyFeeAmount": 50,
"fonbnkFeeAmount": 0.03,
"localCurrencyFonbnkFeeAmount": 30,
"partnerFeeAmount": 0.02,
"localCurrencyPartnerFeeAmount": 20,
"networkFeeAmount": 0,
"localCurrencyNetworkFeeAmount": 0,
"resumeUrl": "https://pay.fonbnk.com/swap-status?orderId=651e764399a4b360c7eb0178"
}
]
}
Returns expected price in USDC, cUSD etc. for a given amount of mobile money and vice versa.
country ISO code, e.g. NG
GET /api/pay-widget-merchant/price HTTP/1.1
Host: sandbox-api.fonbnk.com
x-client-id: YOUR_API_KEY
Accept: */*
Successful response
{
"quoteId": "651e764399a4b360c7eb0178",
"cryptoTotalAmount": 5.12,
"cryptoWithdrawAmount": 5,
"cryptoFeeAmount": 0.12,
"cryptoGasAmount": 0,
"localCurrencyAmount": 5120,
"feePercent": 2.5,
"fonbnkFeePercent": 1.5,
"partnerFeePercent": 1,
"totalAmount": 5.12,
"withdrawAmount": 5,
"feeAmount": 0.12,
"localCurrencyFeeAmount": 120,
"fonbnkFeeAmount": 0.07,
"localCurrencyFonbnkFeeAmount": 70,
"partnerFeeAmount": 0.05,
"localCurrencyPartnerFeeAmount": 50,
"networkFeeAmount": 0,
"localCurrencyNetworkFeeAmount": 0,
"usdcTotalAmount": 5.12,
"usdcWithdrawAmount": 5,
"usdcFeeAmount": 0.12,
"usdcGasAmount": 0
}
Returns a list of providers. Optionally includes limitations data.
Should limitations data be included in the response. Defaults to true. If limitations are not included the request will be much faster.
true
GET /api/pay-widget-merchant/providers HTTP/1.1
Host: sandbox-api.fonbnk.com
x-client-id: YOUR_API_KEY
Accept: */*
Successful response
[
{
"countryIsoCode": "NG",
"currencyIsoCode": "NGN",
"providers": [
{
"name": "bank_transfer",
"description": "Bank transfer",
"requiresCarrier": false,
"carriers": [],
"limits": {
"POLYGON": {
"cryptoLimits": {
"min": 1,
"max": 200
},
"localCurrencyLimits": {
"type": "open_range",
"min": 1714,
"max": 348047,
"step": 1,
"withCents": false
},
"fees": {
"feePercent": 2.5,
"fonbnkFeePercent": 2.5,
"partnerFeePercent": 0,
"gasAmount": 0,
"minFee": 0.01
}
},
"STELLAR": {
"cryptoLimits": {
"min": 1,
"max": 200
},
"localCurrencyLimits": {
"type": "open_range",
"min": 1730,
"max": 348064,
"step": 1,
"withCents": false
},
"fees": {
"feePercent": 2.5,
"fonbnkFeePercent": 2.5,
"partnerFeePercent": 0,
"gasAmount": 0.01,
"minFee": 0.01
}
},
"AVALANCHE": {
"cryptoLimits": {
"min": 1,
"max": 200
},
"localCurrencyLimits": {
"type": "open_range",
"min": 1797,
"max": 348132,
"step": 1,
"withCents": false
},
"fees": {
"feePercent": 2.5,
"fonbnkFeePercent": 2.5,
"partnerFeePercent": 0,
"gasAmount": 0.05,
"minFee": 0.01
}
},
"SOLANA": {
"cryptoLimits": {
"min": 1,
"max": 200
},
"localCurrencyLimits": {
"type": "open_range",
"min": 1714,
"max": 348047,
"step": 1,
"withCents": false
},
"fees": {
"feePercent": 2.5,
"fonbnkFeePercent": 2.5,
"partnerFeePercent": 0,
"gasAmount": 0,
"minFee": 0.01
}
},
"BASE": {
"cryptoLimits": {
"min": 1,
"max": 200
},
"localCurrencyLimits": {
"type": "open_range",
"min": 1714,
"max": 348047,
"step": 1,
"withCents": false
},
"fees": {
"feePercent": 2.5,
"fonbnkFeePercent": 2.5,
"partnerFeePercent": 0,
"gasAmount": 0,
"minFee": 0.01
}
},
"TON": {
"cryptoLimits": {
"min": 1,
"max": 200
},
"localCurrencyLimits": {
"type": "open_range",
"min": 1747,
"max": 348081,
"step": 1,
"withCents": false
},
"fees": {
"feePercent": 2.5,
"fonbnkFeePercent": 2.5,
"partnerFeePercent": 0,
"gasAmount": 0.02,
"minFee": 0.01
}
},
"CELO": {
"cryptoLimits": {
"min": 1,
"max": 200
},
"localCurrencyLimits": {
"type": "open_range",
"min": 1714,
"max": 348047,
"step": 1,
"withCents": false
},
"fees": {
"feePercent": 2.5,
"fonbnkFeePercent": 2.5,
"partnerFeePercent": 0,
"gasAmount": 0,
"minFee": 0.01
}
}
}
}
]
},
{
"countryIsoCode": "KE",
"currencyIsoCode": "KES",
"providers": [
{
"name": "carrier",
"description": "Airtime",
"requiresCarrier": true,
"carriers": [
{
"id": "618e43914f57e07d255ff353",
"name": "Safaricom Kenya",
"limits": {
"POLYGON": {
"cryptoLimits": {
"min": 1,
"max": 1.47
},
"localCurrencyLimits": {
"type": "open_range",
"min": 157,
"max": 230,
"step": 1,
"withCents": false
},
"fees": {
"feePercent": 2.5,
"fonbnkFeePercent": 2.5,
"partnerFeePercent": 0,
"gasAmount": 0,
"minFee": 0.01
}
},
"STELLAR": {
"cryptoLimits": {
"min": 1,
"max": 1.46
},
"localCurrencyLimits": {
"type": "open_range",
"min": 158,
"max": 230,
"step": 1,
"withCents": false
},
"fees": {
"feePercent": 2.5,
"fonbnkFeePercent": 2.5,
"partnerFeePercent": 0,
"gasAmount": 0.01,
"minFee": 0.01
}
},
"AVALANCHE": {
"cryptoLimits": {
"min": 1,
"max": 1.42
},
"localCurrencyLimits": {
"type": "open_range",
"min": 164,
"max": 230,
"step": 1,
"withCents": false
},
"fees": {
"feePercent": 2.5,
"fonbnkFeePercent": 2.5,
"partnerFeePercent": 0,
"gasAmount": 0.05,
"minFee": 0.01
}
},
"SOLANA": {
"cryptoLimits": {
"min": 1,
"max": 1.47
},
"localCurrencyLimits": {
"type": "open_range",
"min": 157,
"max": 230,
"step": 1,
"withCents": false
},
"fees": {
"feePercent": 2.5,
"fonbnkFeePercent": 2.5,
"partnerFeePercent": 0,
"gasAmount": 0,
"minFee": 0.01
}
},
"CELO": {
"cryptoLimits": {
"min": 1,
"max": 1.47
},
"localCurrencyLimits": {
"type": "open_range",
"min": 157,
"max": 230,
"step": 1,
"withCents": false
},
"fees": {
"feePercent": 2.5,
"fonbnkFeePercent": 2.5,
"partnerFeePercent": 0,
"gasAmount": 0,
"minFee": 0.01
}
},
"BASE": {
"cryptoLimits": {
"min": 1,
"max": 1.47
},
"localCurrencyLimits": {
"type": "open_range",
"min": 157,
"max": 230,
"step": 1,
"withCents": false
},
"fees": {
"feePercent": 2.5,
"fonbnkFeePercent": 2.5,
"partnerFeePercent": 0,
"gasAmount": 0,
"minFee": 0.01
}
},
"TON": {
"cryptoLimits": {
"min": 1,
"max": 1.45
},
"localCurrencyLimits": {
"type": "open_range",
"min": 160,
"max": 230,
"step": 1,
"withCents": false
},
"fees": {
"feePercent": 2.5,
"fonbnkFeePercent": 2.5,
"partnerFeePercent": 0,
"gasAmount": 0.02,
"minFee": 0.01
}
}
}
}
]
},
{
"name": "mpesa",
"description": "M-PESA",
"requiresCarrier": true,
"carriers": [
{
"id": "618e43914f57e07d255ff353",
"name": "Safaricom Kenya",
"limits": {
"POLYGON": {
"cryptoLimits": {
"min": 1,
"max": 200
},
"localCurrencyLimits": {
"type": "open_range",
"min": 153,
"max": 30506,
"step": 1,
"withCents": false
},
"fees": {
"feePercent": 2.5,
"fonbnkFeePercent": 2.5,
"partnerFeePercent": 0,
"gasAmount": 0,
"minFee": 0.01
}
},
"AVALANCHE": {
"cryptoLimits": {
"min": 1,
"max": 200
},
"localCurrencyLimits": {
"type": "open_range",
"min": 161,
"max": 30513,
"step": 1,
"withCents": false
},
"fees": {
"feePercent": 2.5,
"fonbnkFeePercent": 2.5,
"partnerFeePercent": 0,
"gasAmount": 0.05,
"minFee": 0.01
}
},
"STELLAR": {
"cryptoLimits": {
"min": 1,
"max": 200
},
"localCurrencyLimits": {
"type": "open_range",
"min": 155,
"max": 30508,
"step": 1,
"withCents": false
},
"fees": {
"feePercent": 2.5,
"fonbnkFeePercent": 2.5,
"partnerFeePercent": 0,
"gasAmount": 0.01,
"minFee": 0.01
}
},
"SOLANA": {
"cryptoLimits": {
"min": 1,
"max": 200
},
"localCurrencyLimits": {
"type": "open_range",
"min": 153,
"max": 30506,
"step": 1,
"withCents": false
},
"fees": {
"feePercent": 2.5,
"fonbnkFeePercent": 2.5,
"partnerFeePercent": 0,
"gasAmount": 0,
"minFee": 0.01
}
},
"CELO": {
"cryptoLimits": {
"min": 1,
"max": 200
},
"localCurrencyLimits": {
"type": "open_range",
"min": 153,
"max": 30506,
"step": 1,
"withCents": false
},
"fees": {
"feePercent": 2.5,
"fonbnkFeePercent": 2.5,
"partnerFeePercent": 0,
"gasAmount": 0,
"minFee": 0.01
}
},
"BASE": {
"cryptoLimits": {
"min": 1,
"max": 200
},
"localCurrencyLimits": {
"type": "open_range",
"min": 153,
"max": 30506,
"step": 1,
"withCents": false
},
"fees": {
"feePercent": 2.5,
"fonbnkFeePercent": 2.5,
"partnerFeePercent": 0,
"gasAmount": 0,
"minFee": 0.01
}
},
"TON": {
"cryptoLimits": {
"min": 1,
"max": 200
},
"localCurrencyLimits": {
"type": "open_range",
"min": 156,
"max": 30509,
"step": 1,
"withCents": false
},
"fees": {
"feePercent": 2.5,
"fonbnkFeePercent": 2.5,
"partnerFeePercent": 0,
"gasAmount": 0.02,
"minFee": 0.01
}
}
}
}
]
}
]
}
]
Returns minimum and maximum amount of order in crypto and local currency and applied fees.
GET /api/pay-widget-merchant/limits HTTP/1.1
Host: sandbox-api.fonbnk.com
x-client-id: YOUR_API_KEY
Accept: */*
Successful response
{
"cryptoLimits": {
"min": 1,
"max": 200
},
"localCurrencyLimits": {
"type": "open_range",
"min": 1702,
"max": 343959,
"step": 1,
"withCents": false
},
"fees": {
"feePercent": 2.5,
"fonbnkFeePercent": 2.5,
"partnerFeePercent": 0,
"gasAmount": 0,
"minFee": 0.01
}
}