DiscHub

Processing your request, please wait...

2-Step API Documentation

Welcome to the official Dischub API documentation. This API allows users to interact with the Dischub payment gateway, enabling users to create orders and manage transactions efficiently on their platforms.

Dischub 2-step integration


2-Step API Overview

Dischub provides an easy-to-use payment gateway API for sending and receiving payments between users. This API documentation focuses on how to:

  1. Make payment : Enable users to make and complete transactions seamlessly on Dischub platforms.
  2. Receive payment status : Get payment statuses on your platform’s return URL for efficient management.

If you have no programming skills, you can find a developer




Step 1. Activating Demo Accounts

You are going to use demo accounts to test our API on your plaform(s). Follow below steps on how to activate demo accounts.

  1. Register accounts : Create both individual and business accounts. If you already have them, skip this stage and go to step 2.
  2. Activate Demo : Navigate to your settings in both accounts and activate demo accounts. For individual accounts use this button Individual and for business accounts use this button Business.
  3. Add Funds : Add funds to your Individual Demo Account because you are going to test the integration by sending funds from Individual account to Business account.



Step 2. Configure A Callback Url

You need to configure a callback URL in your backend to receive payment status updates from Dischub as soon as a user completes a payment on your Dischub page (NB : Make sure your notify_url is well set to receive POST request from external traffic & make sure to use an "https://..." attached to your domain otherwise using "https://..." without proper domain name will raise errors or you might not receive your order's transaction status !!!)




Step 3. Save Callback Url In Settings

Now you are going to save the url path of your callback function in your business account settings. Copy the callback url and go to your settings to save !




Step 4. Make Payment

4a) User will make and complete a payment using your Dischub account number or via "Verified Merchants" page

**Dischub is the only payment method for testing environment**

Responsive Image



Step 5: Receiving Payment Status

Once a payment is processed, Dischub will send a status update to the callback URL (notify_url) you provided in your business account settings. This allows you to track the success or failure of transactions in real-time.


Steps to Handle Payment Status
  1. Set Your Callback URL : Ensure that your system is configured to receive POST requests at the callback URL you registered.
  2. Receive the Payment Status : Dischub sends the payment status as a JSON payload in the body of the POST request.
  3. Update Your Records : Use the received data to update your database or application with the current payment status.
Sample Payload
{
'transaction_id': 277602,
'reference' : 'Brian Shumba',
'status': 'success', 
'currency': 'USD', 
'amount': '14.58', 
'timestamp': '2025-01-09 04:20:08.702591+00:00'
}
                    

The status field can have values such as "success" or "failed". Use this information to handle the transaction appropriately in your system.

Error Handling

If your callback URL is unreachable or returns an error, Dischub will retry the notification several times over a period of time. Ensure your endpoint is reliable and logs any issues for debugging purposes.




Recommendations

We recommend you to add more funds of all currencies in your individual demo accounts and test our api as many times as you can. When you get satisfied you can turn off all demo accounts and start receiving real funds.





Developers Forum

If you face challenges, get help from other developers in our forum telegram group chat

Copyright © DiscHub 2024