Fonbnk Docs
  • Intro
  • Integration Guide
  • On-ramp
    • How it works
    • URL Parameters
    • Webhook
  • Off-ramp
    • How it works
    • URL Parameters
    • Webhook
  • Reference
    • Servers
    • Signing requests
    • Endpoints
      • On-ramp
        • Assets
        • Order
        • Orders
        • Price
        • Providers
        • Limits
      • Off-ramp
        • Order
        • Orders
        • Best offer
        • Limits
        • Countries
        • Wallets
        • Validate fields
        • Create order
        • Confirm order
      • Util
        • Check address
        • Assets
      • Kyc
        • State
        • Submit
    • Specification
Powered by GitBook
On this page
  • Video tutorial
  • Setting Up Your Sandbox Environment
  • Generating Payment URLs and Creating Orders
  • Merchant API
  • Transitioning to Production

Integration Guide

PreviousIntroNextOn-ramp

Last updated 1 day ago

Video tutorial

Setting Up Your Sandbox Environment

Configuring Webhook Integration

Once you have a sandbox account, navigate to the Settings page on the dashboard. Here, you can configure a webhook URL to receive notifications regarding order status changes.

You can also test your webhook integration using the Simulate the webhook request feature. Provide a URL and click the Send Request button to have the dashboard send a test notification to the specified URL.

Generating Payment URLs and Creating Orders

To create an order in the sandbox environment, you must use one of the following phone numbers:

Country
Carrier
Phone Number
Password

Nigeria

MTN

2347000000007

ZoA8dA9CXF

Kenya

Safaricom

254740719977

ZoA8dA9CXF

Make sure to use the Login with Password flow:

Warning

During sandbox testing, do not use real money. Simply confirm the order, and it will be marked as paid.

If the correct source parameter is present in the URL, the order will be displayed in the Orders tab of the dashboard:

Webhook requests will also be visible in the Webhooks tab of the dashboard:

Merchant API

For those who wish to access pay widget-related data from their back-end, our merchant API is available. You can find the API documentation here.

Transitioning to Production

After registering, you'll need to contact our support team and complete a KYB process. Thereafter, you'll be able to receive webhooks and preconfigure user wallet addresses.

To begin integrating with our system, the first step is to register a merchant account in the sandbox environment. Follow this link to initiate the registration process: .

Learn more about the webhook structure and signature .

If you want to preview webhook notifications without setting up a server, you can use the .

To create sandbox orders, utilize the sandbox pay widget, which can be accessed at . To associate an order with your merchant account, you must include the source parameter in the pay widget URL. You can find the source parameter value in the Additional Details section of the Settings page on the dashboard.

Additionally, you must provide a unique signature parameter, which is a JWT token (HS256 encryption algorithm) generated using "URL signature secret" value as a secret. You must add some unique value to the token payload to make each token unique because we don't allow to create more than 1 order using the same signature. During testing, you can generate a JWT signature using this website, . You can also provide in the JWT token payload. With the provided source parameter, the pay widget URL will look like this: .

To create a live merchant account, proceed to register it here: . The live pay widget can be accessed at .

https://sandbox-dashboard.fonbnk.com/register-initiate
here
webhooks service
Sandbox Pay Widget
https://jwt.io/
URL configuration parameters
https://sandbox-pay.fonbnk.com/?source=bd3X9Cgq&signature=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJlcmcyMmYyZkBAIn0.Z1BB4eiClKH_k18w5I3tMiutuWpPgPb5gI33FrkpJcY
https://dashboard.fonbnk.com/register-initiate
https://pay.fonbnk.com/
Webhook setup in the merchant dashboard
Webhook simulation in the merchant dashboard
Source param in the merchant dashboard
Pay widget login with password
Merchant dashboard on-ramp orders list
Merchant dashboard on-ramp webhooks