USSD

This payment method allows you to collect payments offline from your customers. Payment is completed by the customer dialling a USSD code on their mobile device.

Before you begin

Ensure you have your public key. You can find this on the SeerBit Merchant dashboard under accounts > api keys. If you don’t have an account with us yet, you can create a test account now

How it works

  1. To initiate a USSD payment, make a request to the USSD payments service with the payments/initiates endpoint.
  2. When the request is made you are expected to get a dial code.
  3. Customer completes transactions using the USSDdial code generated
  4. Verify the payment

Initialising a USSD Payment

For the full specification, see our API Reference
Request Sample
The code snippet below shows an example request for generating a payment link to complete a payment
1curl --location 'https://seerbitapi.com/api/v2/payments/initiates' \
2--header 'Content-Type: application/json' \
3--header 'Authorization: Bearer YOUR_ENCRYPTION_KEY' \
4--data-raw '{
5    "publicKey":"YOUR_PUBLIC_KEY",
6    "amount":"100",
7    "fullName": "FirstName LastName",
8    "mobileNumber": "customer mobile number",
9    "email":"firstname@mail.com",
10    "currency": "NGN",
11    "country": "NG",
12    "paymentReference": "dsffererer",
13    "callbackUrl": "http://yourdomain.com",
14    "redirectUrl": "http://yourdomain.com",
15    "paymentType": "USSD",
16    "bankCode":"044"
17  }'
1var request = require('request');
2var options = {
3  'method': 'POST',
4  'url': 'https://seerbitapi.com/api/v2/payments/initiates',
5  'headers': {
6    'Content-Type': 'application/json',
7    'Authorization': 'Bearer YOUR_ENCRYPTION_KEY'
8  },
9  body: JSON.stringify({
10    "publicKey": "YOUR_PUBLIC_KEY",
11    "amount": "100",
12    "fullName": "FirstName LastName",
13    "mobileNumber": "customer mobile number",
14    "email": "firstname@mail.com",
15    "currency": "NGN",
16    "country": "NG",
17    "paymentReference": "dsffererer",
18    "callbackUrl": "http://yourdomain.com",
19    "redirectUrl": "http://yourdomain.com",
20    "paymentType": "USSD",
21    "bankCode": "044"
22  })
23
24};
25request(options, function (error, response) {
26  if (error) throw new Error(error);
27  console.log(response.body);
28});
1<?php
2
3$curl = curl_init();
4
5curl_setopt_array($curl, array(
6  CURLOPT_URL => 'https://seerbitapi.com/api/v2/payments/initiates',
7  CURLOPT_RETURNTRANSFER => true,
8  CURLOPT_ENCODING => '',
9  CURLOPT_MAXREDIRS => 10,
10  CURLOPT_TIMEOUT => 0,
11  CURLOPT_FOLLOWLOCATION => true,
12  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13  CURLOPT_CUSTOMREQUEST => 'POST',
14  CURLOPT_POSTFIELDS =>'{
15    "publicKey":"YOUR_PUBLIC_KEY",
16    "amount":"100",
17    "fullName": "FirstName LastName",
18    "mobileNumber": "customer mobile number",
19    "email":"firstname@mail.com",
20    "currency": "NGN",
21    "country": "NG",
22    "paymentReference": "dsffererer",
23    "callbackUrl": "http://yourdomain.com",
24    "redirectUrl": "http://yourdomain.com",
25    "paymentType": "USSD",
26    "bankCode":"044"
27  }',
28  CURLOPT_HTTPHEADER => array(
29    'Content-Type: application/json',
30    'Authorization: Bearer YOUR_ENCRYPTION_KEY'
31  ),
32));
33
34$response = curl_exec($curl);
35
36curl_close($curl);
37echo $response;
Response Sample
The code snippet below shows an example request for generating a payment link to complete a payment
1{
2  "status": "SUCCESS",
3  "data": {
4    "code": null,
5    "payments": {
6        "paymentReference": "dsffererer",
7        "linkingReference": "CSEERBIT724622561618580872054",
8        "providerreference": "8206",
9        "ussdDailCode": "*901*000*8206#"
10    },
11    "message": null
12  }
13}
Need something else?
If you have any questions or need general help, visit our support page
Signup for developer update
You can unsubscribe at any time. Read our privacy policy.