Standard Checkout

The SeerBit Standard Checkout allows you to accept payments securely by calling our /payment initialize endpoint from your server to generate a checkout link which redirects your users to the generated link for them to make payment.

How it Works

When a customer clicks on a payment button on your application a POST request is made to our API. We will return a redirect link for the customer to input their payment details to complete the transaction. After payment has been made the users are redirected to your website using the callback_url

Before you begin

When a customer clicks on a payment button on your application a POST request is made to our API. We will return a redirect link for the customer to input their payment details to complete the transaction. After payment has been made the users are redirected to your website using the callback_url.

Authenticating your API calls

Key Encryption
This service allows you to generate a bearer token that will be used in authenticating your API calls to SeerBit. It expects a string of your 'merchantPrivateKey' 'merchantPublicKey' in a JSON request. SeerBit inturn returns the token in the encryptedKey field.
See sample request and response below.
Request Sample
The code snippet below shows an example request for generating a bearer token
1curl --location 'https://seerbitapi.com/api/v2/encrypt/keys' \
2--header 'Content-Type: application/json' \
3--data '{
4  "key": "YOUR_SECRET_KEY.YOUR_PUBLIC_KEY"
5}'
1var request = require('request');
2var options = {
3  'method': 'POST',
4  'url': 'https://seerbitapi.com/api/v2/encrypt/keys',
5  'headers': {
6    'Content-Type': 'application/json'
7  },
8  body: JSON.stringify({
9    "key": "YOUR_SECRET_KEY.YOUR_PUBLIC_KEY"
10  })
11
12};
13request(options, function (error, response) {
14  if (error) throw new Error(error);
15  console.log(response.body);
16});
1<?php
2
3$curl = curl_init();
4
5curl_setopt_array($curl, array(
6  CURLOPT_URL => 'https://seerbitapi.com/api/v2/encrypt/keys',
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  "key": "YOUR_SECRET_KEY.YOUR_PUBLIC_KEY"
16}',
17  CURLOPT_HTTPHEADER => array(
18    'Content-Type: application/json'
19  ),
20));
21
22$response = curl_exec($curl);
23
24curl_close($curl);
25echo $response;
Response Sample
The code snippet below shows an example request for generating a bearer token
1{
2    "status": "SUCCESS",
3    "data": {
4        "code": "00",
5        "EncryptedSecKey": {
6            "encryptedKey": "WquhSwMepYp6k+AIAlU1Jp18QwRWMm2SK0WVIOACIArw6ao3Ql4qKOMGwFVMvI9nOiM1xarW6qAIxE+GTOyINRVQnnFuy2EJk+DwmCgiFUuRVkOIdMBgwpJTCSzcFFfD"
7        },
8        "message": "Successful"
9    }
10}
1{
2  "message": "Bad Request",
3  "error": "There has been a problem with reading or understanding the request."
4}
1{
2  "error": "Not Found"
3}
1{
2 "message": "Internal Server Error",
3 "error": "PROCESSING"
4}

Requesting a Payment/ Initializing a Transaction

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' \
2--header 'Content-Type: application/json' \
3--header 'Authorization: Bearer YOUR_ENCRYPTED_KEY' \
4--data-raw '{
5    "publicKey": "YOUR_PUBLIC_KEY",
6    "amount": "500",
7    "currency": "NGN",
8    "country": "NG",
9    "paymentReference": "payment_reference",
10    "email": "ts@emaildomain.com",
11    "fullName": "Halil TS",
12    "tokenize": "false",
13    "callbackUrl": "https://seerbit.com",
14    "splitCode": "" // Split rule code
15}'
1var request = require('request');
2var options = {
3  'method': 'POST',
4  'url': 'https://seerbitapi.com/api/v2/payments',
5  'headers': {
6    'Content-Type': 'application/json',
7    'Authorization': 'Bearer YOUR_ENCRYPTED_KEY'
8  },
9  body: JSON.stringify({
10    "publicKey": "YOUR_PUBLIC_KEY",
11    "amount": "500",
12    "currency": "NGN",
13    "country": "NG",
14    "paymentReference": "payment_reference",
15    "email": "ts@emaildomain.com",
16    "fullName": "Halil TS",
17    "tokenize": "false",
18    "callbackUrl": "https://seerbit.com",
19    "splitCode": "" // Split rule code
20  })
21
22};
23request(options, function (error, response) {
24  if (error) throw new Error(error);
25  console.log(response.body);
26});
1<?php
2
3$curl = curl_init();
4
5curl_setopt_array($curl, array(
6  CURLOPT_URL => 'https://seerbitapi.com/api/v2/payments',
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": "500",
17    "currency": "NGN",
18    "country": "NG",
19    "paymentReference": "payment_reference",
20    "email": "ts@emaildomain.com",
21    "fullName": "Halil TS",
22    "tokenize": "false",
23    "callbackUrl": "https://seerbit.com",
24    "splitCode": "" // Split rule code
25}',
26  CURLOPT_HTTPHEADER => array(
27    'Content-Type: application/json',
28    'Authorization: Bearer YOUR_ENCRYPTED_KEY'
29  ),
30));
31
32$response = curl_exec($curl);
33
34curl_close($curl);
35echo $response;
Response Sample
The code snippet below shows an example request for generating a bearer token
1{
2 "status": "SUCCESS",
3 "data": {
4          "code": "00",
5          "payments": {
6                       "redirectLink": "http://checkout.seerbitapi.com/#/?mid=merchantpublickey&paymentReference=643108207792124616573324",
7                       "paymentStatus": "08"
8          },
9        "message": "Successful"
10    }
11}
1{
2    "message": "Transaction Exists",
3    "error": "PROCESSING"
4}

Dynamic Split Payment

Create split configurations on the go during payment initialization when split details aren't predetermined.
Parameter Description
Name
Type
Description
Required?
public Key
string
public key - this can be copied from the seerbit dashboard
Yes
currency
string
Payment Currency
Yes
tranref
string
Transaction Reference
Yes
amount
string
Amount to be paid
Yes
description
string
Decription of the transaction
Yes
Name
Type
Description
Required?
type
string
Value can be FLAT (fixed amounts) or PERCENTAGE (percentage-based)
Yes
transactionFee
string
Who pays transaction fees: all, all-proportional, account, or subaccount (ALL_ACCOUNTS, PROPORTIONATE, SUB_ACCOUNT, PARENT_ACCOUNT)
Yes
bearerSubAccountCode
string
Required if transactionFee is SUB_ACCOUNT then pass the sub account code
No
subAccountCode
string
Amount to be paid
Yes
value
string
Amount to be settled
Yes

Request Sample
The code snippet below shows an example request for generating a payment link to complete a payment with dynamic split settlement

1curl --location 'https://seerbitapi.com/api/v2/payments' \
2--header 'Content-Type: application/json' \
3--header 'Authorization: Bearer YOUR_ENCRYPTED_KEY' \
4--data-raw '{
5    "publicKey": "YOUR_PUBLIC_KEY",
6    "amount": "500",
7    "currency": "NGN",
8    "country": "NG",
9    "paymentReference": "payment_reference",
10    "email": "ts@emaildomain.com",
11    "fullName": "Halil TS",
12    "tokenize": "false",
13    "callbackUrl": "https://seerbit.com",
14    "splits": {
15        "type": "FLAT",
16        "transactionFee": "SUB_ACCOUNT",  //  ALL_ACCOUNTS, PROPORTIONATE, SUB_ACCOUNT, PARENT_ACCOUNT
17        "bearerSubAccountCode": "SUBACCT001",
18        "items": [
19            {
20                "subAccountCode": "SUBACCT001",
21                "value": "3.01"
22            },
23            {
24                "subAccountCode": "ops-costs-2sD4kA",
25                "value": "2.00"
26            }
27        ]
28    }
29}'
1var request = require('request');
2var options = {
3  'method': 'POST',
4  'url': 'https://seerbitapi.com/api/v2/payments',
5  'headers': {
6    'Content-Type': 'application/json',
7    'Authorization': 'Bearer YOUR_ENCRYPTED_KEY'
8  },
9  body: JSON.stringify({
10    "publicKey": "YOUR_PUBLIC_KEY",
11    "amount": "500",
12    "currency": "NGN",
13    "country": "NG",
14    "paymentReference": "payment_reference",
15    "email": "ts@emaildomain.com",
16    "fullName": "Halil TS",
17    "tokenize": "false",
18    "callbackUrl": "https://seerbit.com"
19  })
20
21};
22request(options, function (error, response) {
23  if (error) throw new Error(error);
24  console.log(response.body);
25});
1<?php
2
3$curl = curl_init();
4
5curl_setopt_array($curl, array(
6  CURLOPT_URL => 'https://seerbitapi.com/api/v2/payments',
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": "500",
17    "currency": "NGN",
18    "country": "NG",
19    "paymentReference": "payment_reference",
20    "email": "ts@emaildomain.com",
21    "fullName": "Halil TS",
22    "tokenize": "false",
23    "callbackUrl": "https://seerbit.com",
24    "splits": {
25        "type": "FLAT",
26        "transactionFee": "SUB_ACCOUNT",  //  ALL_ACCOUNTS, PROPORTIONATE, SUB_ACCOUNT, PARENT_ACCOUNT
27        "bearerSubAccountCode": "SUBACCT001",
28        "items": [
29            {
30                "subAccountCode": "SUBACCT001",
31                "value": "3.01"
32            },
33            {
34                "subAccountCode": "ops-costs-2sD4kA",
35                "value": "2.00"
36            }
37        ]
38    }
39}',
40  CURLOPT_HTTPHEADER => array(
41    'Content-Type: application/json',
42    'Authorization: Bearer YOUR_ENCRYPTED_KEY'
43  ),
44));
45
46$response = curl_exec($curl);
47
48curl_close($curl);
49echo $response;
Response Sample
The code snippet below shows an example request for generating a bearer token
1{
2 "status": "SUCCESS",
3 "data": {
4          "code": "00",
5          "payments": {
6                       "redirectLink": "http://checkout.seerbitapi.com/#/?mid=merchantpublickey&paymentReference=643108207792124616573324",
7                       "paymentStatus": "08"
8          },
9        "message": "Successful"
10    }
11}
1{
2    "message": "Transaction Exists",
3    "error": "PROCESSING"
4}

Notes

Note that in cases where you require your customers to bear the charge for a transaction, the agreed charge should be added to the transaction amount. This charge will be deducted after the transaction is completed and the merchant settled the transaction amount.
Merchant is expected to use the redirect link returned in the repsonse to navigate to the seerBit checkout modal to continue the transaction
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.