Integration examples

This section assumes that you already have a registered merchant and know how to sign the pay widget URLs.

On-ramp to a predefined address

Let's say you want a user to pay fiat, and the system must send 10 Polygon USDT to this wallet address: 0x41018795fA95783117242244303fd7e26e964eE8. To do so, you must provide the next URL params:

  • source

  • signature

  • network - POLYGON

  • asset - USDT

  • address - 0x41018795fA95783117242244303fd7e26e964eE8

  • amount - 10

  • currency - crypto

  • freezeWallet - true, doesn't allow a user to change the wallet address

  • freezeAmount - true, doesn't allow a user to change the amount

So the end URL would look like next:

https://sandbox-pay.fonbnk.com?source=...&signature=...&network=POLYGON&asset=USDT&address=0x41018795fA95783117242244303fd7e26e964eE8&amount=10&currency=crypto&freezeWallet=true&freezeAmount=true

If a user creates an order using this URL, you will receive webhooks to the configured server endpoint in the merchant dashboard.

Off-ramp to a specific fiat type

Let's say you want a user to buy 50000 NGN using his Celo CUSD wallet. To do so, you must provide the next URL params:

  • source

  • signature

  • network - CELO

  • asset - CUSD

  • amount - 50000

  • currency - local

  • countryIsoCode - NG

So the end URL would look like next:

On-ramp using a quote

Let's say you're an on-ramp aggregator and want to display our pricing before redirecting a user to our widget, and you want a price to remain unchanged. To do so, you must make an API request to our create quote endpoint and use the quoteId from the response as a URL query parameter. Let's say you want a user to convert his M-PESA 1000KES to Tron USDT, you must provide the next URL params:

  • source

  • signature

  • quoteId - quote ID received from the API response

  • network - TRON

  • asset - USDT

  • amount - 1000

  • currency - local

  • paymentChannel - mobile_money

  • countryIsoCode - NG

So the end URL would look like next:

Last updated