# API Reference
# Getting Started
NOTE
You need a Merchant ID and Key to authenticate against the API, use the following credentials below for a demo account.
# Test Accounts
- Test API Credentials
Merchant ID: GP0000001
Merchant Key: 123456789
Endpoint: https://demo.api.glade.ng/{method}
# Live Accounts
To get your live credentials Register Here (opens new window).
Your API Credentials are in Merchant Credentials
on the dashboard.
Endpoint: https://api.glade.ng/{method}
# Making Requests
You can make PUT
requests to the API for both payments collections and funds disbursement, the methods to call are:
- Payments Collection:
payment
- Money Transfer:
disburse
- Resource:
resources
# Authenticating Request
Pass the following with the header request made to the
mid: 'Your Merchant Id'
key: 'Your Merchant Key'
Both mid
and key
can be gotten from the dashboard page under settings > apikeys
curl --request PUT \
--url https://demo.api.glade.ng/payment \
--header 'content-type: application/json' \
--header 'key: Your Merchant Key' \
--header 'mid: Your Merchant ID' \
--data '{}'
2
3
4
5
6
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://demo.api.glade.ng/payment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "{}",
CURLOPT_HTTPHEADER => array(
"key: Your Merchant Key",
"mid: Your Merchant ID"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Payment Collections
Endpoint: https://demo.api.glade.ng/payment
(opens new window)
Payments collection has action
property which is used to specify what API call is to be made.
payment action
# With Card Payment:
Card payment requires Two Steps the first is to call the charge URL to get the authentication suggestion after which the charge URL is called the second time with the auth_type
parameter to specify the suggested_auth
required by the payment gateway.
# Step 1
{
"action":"initiate",
"paymentType":"card",
"user": {
"firstname":"John",
"lastname":"Doe",
"email":"hello@example.com",
"ip":"192.168.33.10",
"fingerprint": "cccvxbxbxb"
},
"card":{
"card_no":"5438898014560229",
"expiry_month":"09",
"expiry_year":"19",
"ccv":"789",
"pin":"3310"
},
"amount":"10000",
"country": "NG",
"currency": "NGN",
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Parameter Description
Parameter | Required | Description |
---|---|---|
action | required | Instruct the API to determine the model of authorizing |
paymentType | required | Specifies the type of payment method as card |
user | optional | To gain insight and easily keep tracks of your users |
card | required | phone number that will be used to complete payment |
amount | required | this the amount that user will be charged |
country | optional | The country you wish to charge the user defaults to NG when not specified |
currency | optional | The currency you want to charge the user defaults to NGN when not specified |
customer_txnref | optional | You can pass your order reference to which you can use at a later time to query transactions |
redirect_url | optional | The redirect_url is required when |
The response from step 1 will contain information on what step is required for Step 2
Response
{"status":202,"txnRef":"GP8720656L","apply_auth":"PIN"}
# Recurrent Payments
The recurrent payment enables you to charge customers to account for subscription-based services or products.
Recurrent payment is only enabled on cards transactions.
{
"action":"initiate",
"paymentType":"card",
"user": {
"firstname":"John",
"lastname":"Doe",
"email":"hello@example.com",
"ip":"192.168.33.10",
"fingerprint": "cccvxbxbxb"
},
"card":{
"card_no":"5438898014560229",
"expiry_month":"09",
"expiry_year":"19",
"ccv":"789",
"pin":"3310"
},
"amount":"10000",
"country": "NG",
"currency": "NGN",
"recurrent": {
"frequency" : "daily | weekly | monthly",
"value" : "00 | 1 | 30"
},
"is_recurring": true
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Parameter Description
These parameters are only required when you want to provide recurrent based services to your customers. The recurrent parameter allows you to schedule how you want the transactions to be charged by the system.
When a transaction is completed a token is returned which can be used to charge the customers account subsequently.
Parameter | Required | Description |
---|---|---|
recurrent | optional | Array which holds the config of the recurrent setup |
frequency | optional | There are 3 types of frequency when you want the customer to be charged. They are daily , weekly , monthly |
value | optional | The value is to determine when the next charge should occur. When the frequency is set to daily values that can be used is 00 - 23 which stands for the each of the days. weekly frequency values are 1 - 7 representing the days of the week and monthly frequency values from 1 to 30 |
is_recurring | required | The is_recurring field default value is false , setting it to true will make the transaction recurrent and will generate a token which can charge the card at the required time. |
Response
{
"status": 202,
"txnRef": "GP65512582720190606E",
"apply_auth": "PIN"
}
2
3
4
5
When calling the charge action pass the value of apply_auth
to the auth_type
in your request. When apply_auth
value is as OTP
call the validation action next.
# Installmental Payments
{
"action":"initiate",
"paymentType":"card",
"user": {
"firstname":"John",
"lastname":"Doe",
"email":"hello@example.com",
"ip":"192.168.33.10",
"fingerprint": "cccvxbxbxb"
},
"card":{
"card_no":"5438898014560229",
"expiry_month":"09",
"expiry_year":"19",
"ccv":"789",
"pin":"3310"
},
"amount":"10000",
"country": "NG",
"currency": "NGN",
"installment": {
"payment_schedule" : {
"31-11-2017" : 20,
"31-12-2017" : 30,
"30-01-2017" : 50
},
"total":"100000"
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Step 2
{
"action":"charge",
"paymentType":"card",
"user": {
"firstname":"John",
"lastname":"Doe",
"email":"hello@example.com",
"ip":"192.168.33.10",
"fingerprint": "cccvxbxbxb"
},
"card":{
"card_no":"5438898014560229",
"expiry_month":"09",
"expiry_year":"19",
"ccv":"789",
"pin":"3310"
},
"amount":"10000",
"country": "NG",
"currency": "NGN",
"txnRef":"GP8720656L",
"auth_type":"PIN"
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Parameter Description
Parameter | Required | Description |
---|---|---|
action | required | Instruct the API to charge the customers card |
paymentType | required | Specifies the type of payment method as card |
user | optional | To gain insight and easily keep tracks of your users |
card | required | phone number that will be used to complete payment |
amount | required | this the amount that user will be charged |
country | optional | The country you wish to charge the user defaults to NG when not specified |
currency | optional | The currency you want to charge the user defaults to NGN when not specified |
customer_txnref | optional | You can pass your order reference to which you can use at a later time to query transactions |
redirect_url | optional | The redirect_url is required when apply_auth value received from the initiate action need to completed in a browser |
# Payment with Token
Payment with Token:
{
"action":"charge",
"paymentType":"token",
"token":"01fae68d805957cc24697c990961a130",
"user": {
"firstname":"John",
"lastname":"Doe",
"email":"hello@example.com",
"ip":"192.168.33.10",
"fingerprint": "cccvxbxbxb"
},
"amount":"10000"
}
2
3
4
5
6
7
8
9
10
11
12
13
The response is as follows: When Charge is completed.
{"status":200,"txnStatus":"successful","cardToken":"kfm4gxt4","bank_message":"Approved","fullname":"Gladepay Customer","email":"john@example.com","txnRef":"GPP80921142520190522Z","chargedAmount":"500.00","fraudStatus":"ok","card":{"hash":"654f22fb8ae1a5dec7efc3a39e237c38","mask":"546334XXXXXXXX3155","bin":"546334","brand":"MASTERCARD","type":"","issuer":"","country":"NG"},"currency":"NGN","payment_method":"card","message":"Successful Transaction"}
NOTE
There are two types of validation required
# First Validation
when OTP validation is required:
{
"status":202,
"txnRef":"GP983340165W",
"fraudStatus":"ok"
}
2
3
4
5
# validate action
This is used for OTP Validation
{
"action":"validate",
"txnRef":"GP1507382986",
"otp":"123456"
}
2
3
4
5
TIP
Use 123456 as OTP
# Second Validation Type
When 3DSECURE validation is required: an authURL is returned with the validation response, you can then load the authURL
directly into the browser or iframe to redirect the user to their bank for verifications
{
"status":202,
"txnRef":"GP983340165W",
"authURL":"https://link.glade.ng/1g477sy",
"fraudStatus":"ok"
}
2
3
4
5
6
Response
{"status":200,"message":"Validation Successful","cardToken":"6tj663dh"}
TIP
cardToken is the token code for saved card's.
# verify
action
Endpoint: https://demo.api.glade.ng/payment
(opens new window)
This is used to requery a payment
{
"action":"verify",
"txnRef":"GP1507382986"
}
2
3
4
You can also verify transactions using customer_txnref
if it was passed as a parameter in the configuration for initiating the payment.
{
"action":"verify",
"customer_txnref":"1508261817382986"
}
2
3
4
Response is:
{"status":200, "txnStatus":"successful", "chargedAmount":10000, "fraudStatus":"ok"}
NOTE
txnStatus determines the status of the transaction if it is successful, failed or pending
# refund
action
Endpoint: https://demo.api.glade.ng/payment
(opens new window)
This is used to refund a card payment
{
"action":"refund",
"txnRef":"GP699885018R",
"amount": 100,
"comment": "Reason for refund"
}
2
3
4
5
6
# Test Cards
Brand | PAN |
---|---|
Mastercard | 5221 8424 2698 7779 |
Visa | 4372 0744 0956 5881 |
American Express | 3456 7890 1234 564 |
Verve | 5000 0000 0000 0000 005 |
Expiry Date
- Use any date in the future
CVV | Authentication Type |
---|---|
000 | OTP |
100 | PIN |
200 | 3DSecure |
# With Account Payments
This is the sample payload to request for payment using a bank account
{
"action":"charge",
"paymentType":"account",
"user": {
"firstname":"John",
"lastname":"Doe",
"email":"hello@example.com",
"ip":"192.168.33.10",
"fingerprint": "ddsdschhdghgshghdgshghcx"
},
"account":{
"accountnumber":"0690000007",
"bankcode":"044"
},
"amount":"10000"
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
The list of bank codes can be gotten from the resource section
# Validate Account Payment
validate
action
This is used for OTP Validation
{
"action":"validate",
"txnRef":"GP547925318M",
"validate": "account",
"otp":"12345"
}
2
3
4
5
6
# USSD Payment
This payment option allows you to charge your customers using their bank USSD.
{
"action":"charge",
"paymentType":"ussd",
"bank": "zenith",
"phonenumber": "0902620185",
"accountnumber": "0691008392",
"user": {
"firstname":"John",
"lastname":"Doe",
"email":"hello@example.com",
"ip":"192.168.33.10",
"fingerprint": "ddsdschhdghgshghdgshghcx"
},
"amount":"10"
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Parameter Description
Parameter | Required | Description |
---|---|---|
action | required | Instruct the API to charge using USSD |
paymentType | required | Specifies the type of payment method as ussd |
user | optional | To gain insight and easily keep tracks of your users |
bank | required | This allow you to specify the bank you want to charge using their ussd service. Current active banks are gtb and zenith |
phonenumber | dependent | phone number that will be used to complete payment, only required by zenith bank. |
accountnumber | dependent | The customers account number to charge, only required by zenith bank. |
amount | required | This the amount that user will be charged |
# Pay with phone number
The pay with phone number payment option requires the customer to enrol for the service before the start making payment.
When the first payment is initiated, a prompt will appear on their phone to complete the enrollment process.
{
"action":"charge",
"paymentType":"phone",
"user": {
"firstname":"John",
"lastname":"Doe",
"email":"hello@example.com",
"ip":"192.168.33.10",
"fingerprint": "cccvxbxbxb"
},
"phonenumber":"08131",
"amount":"15"
}
2
3
4
5
6
7
8
9
10
11
12
13
Parameter Description
Parameter | Required | Description |
---|---|---|
action | required | Instruct the API to charge phone number |
paymentType | required | Specifies the type of payment method as phone |
user | optional | To gain insight and easily keep tracks of your users |
phonenumber | required | phone number that will be used to complete payment |
amount | required | This the amount that user will be charged |
# QR Pay
The QR Pay allows you to generate a QR Image your customer scans to make payment using their mobile bank app or any app that has a QR payment feature.
{
"action":"charge",
"paymentType":"qrpay",
"user": {
"firstname":"John",
"lastname":"Doe",
"email":"test@example.com",
"ip":"192.168.33.10",
"fingerprint": "ddsdschhdghgshghdgshghcx"
},
"business_name": "Gladepay",
"amount":"10"
}
2
3
4
5
6
7
8
9
10
11
12
13
Parameter Description
Parameter | Required | Description |
---|---|---|
action | required | Instruct the API to charge the customer using QR Code |
paymentType | required | Specifies the type of payment method as qrpay |
user | optional | To gain insight and easily keep tracks of your user making payment |
amount | required | This the amount that user will be charged |
business_name | optional | The name you want to appear on the QR generated for the customer. |
# Bank Transfer
The bank transfer payment option allows your customers to make payment by bank transfers.
{
"action":"charge",
"paymentType":"bank_transfer",
"user": {
"firstname":"John",
"lastname":"Doe",
"email":"johndoe@example.com",
"ip":"192.168.33.10",
"fingerprint": "cccvxbxbxb"
},
"amount":"1500",
"country": "NG",
"currency": "NGN",
"business_name": "Eva Empire"
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Parameter Description
Parameter | Required | Description |
---|---|---|
action | required | Instruct the API to charge the customer using Bank Transfer |
paymentType | required | Specifies the type of payment method as bank_transfer |
user | optional | To gain insight and easily keep tracks of your user making payment |
amount | required | This the amount that user will be charged |
business_name | optional | The name you want to assigned to the account number been generated. |
# Mobile Money
This payment option allows you to charge your customers using their mobile money platforms.
{
"action":"charge",
"paymentType":"mobile_money",
"type": "paga_connect",
"user": {
"firstname":"Abubakar",
"lastname":"Ango",
"email":"sadiq@testpayit.ng",
"ip":"192.168.33.10",
"fingerprint": "ddsdschhdghgshghdgshghcx"
},
"amount":"1000"
}
2
3
4
5
6
7
8
9
10
11
12
13
Parameter Description
Parameter | Required | Description |
---|---|---|
action | required | Instruct the API to charge the customer using Mobile Money |
paymentType | required | Specifies the type of payment method as mobile_money |
type | required | The type of mobile money you want to change the customer. Paga , Ghana Mobile Money , Mpesa |
user | optional | To gain insight and easily keep tracks of your user making payment |
amount | required | This the amount that user will be charged |
When you charging a customers paga account the type value should be set as paga
.
Paga required parameters
Parameter | Required | Description |
---|---|---|
redirect_url | required | The URL you want to redirect the customer to after a transaction completes. |
When you want to charge a customer using Ghana mobile money the type should be set as ghana
.
Ghana mobile money required parameters
Parameter | Required | Description |
---|---|---|
phonenumber | required | The number the user has with the mobile network platform. |
network | required | This is the mobile money network you want to charge the user in e.g mtn , tigo , airtel , vodaphone |
country | required | The country has to be set to GH |
currency | required | The currency the user will be charge is in Cedis GHS |
Mpesa required parameters
When charging a Mpesa mobile money the type shoukd be set to mpesa
.
Parameter | Required | Description |
---|---|---|
phonenumber | required | The number that the customer has with Mpesa |
country | required | The country has to be set to KE |
currency | required | The currency the user will be charge is in KES |
# Split Payment
This feature allows you to split settlements into multiple accounts, generate the split reference and setup from the dashboard area.
Pass an array of how the split payment should be handled as shown below for any payment type.
{
"action":"initiate",
"paymentType":"card",
"user": {
"firstname":"John",
"lastname":"Doe",
"email":"hello@example.com",
"ip":"192.168.33.10",
"fingerprint": "cccvxbxbxb"
},
"card":{
"card_no":"5438898014560229",
"expiry_month":"09",
"expiry_year":"19",
"ccv":"789"
},
"amount":"10000",
"country": "NG",
"currency": "NGN",
"split":[
{
"ref_code":"000",
"percentage": "40"
},{
"ref_code": "000",
"share": "100"
}
]
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Money Transfer
In order to transfer the money, you must have a funded wallet which funds will be deducted from to disburse to any account of your choice.
Endpoint: https://demo.api.glade.ng/disburse
(opens new window)
{
"action":"transfer",
"amount": "100",
"bankcode":"058",
"accountnumber":"0040000008",
"sender_name": "John Doe",
"narration": "Upkeep",
"orderRef":"TX00001"
}
2
3
4
5
6
7
8
9
Response
{
"action":"transfer",
"amount": "100",
"bankcode":"058",
"accountnumber":"0040000008",
"sender_name": "John Doe",
"narration": "Upkeep",
"orderRef":"TX00001"
}
2
3
4
5
6
7
8
9
# Bulk Transfer
Send multiple transfers to different accounts using a single API call.
{
"action":"transfer",
"type": "bulk",
"data": [
{
"amount": "100",
"bankcode":"058",
"accountnumber":"0040000008",
"sender_name": "John Doe",
"narration": "",
"orderRef": "TX00001"
},{
"amount": "100",
"bankcode":"058",
"accountnumber":"0040000009",
"sender_name": "John Doe",
"narration": "",
"orderRef": "TX00002"
}
]
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
NOTE
After bulk transfers you will need to re-query the order reference of each order to verify the status of the transaction.
The transaction can be verified by passing the payload with the order reference of the transfer
{
"action":"verify",
"txnRef":"TX00002"
}
2
3
4
Response
{
"status": 200,
"txnStatus": "successful",
"message": "Transfer Successful"
}
2
3
4
5
Note
txnStatus determines the status of the transaction if it is successful, failed or pending
# Airtime and Bills
Endpoint: https://demo.api.glade.ng/bills
(opens new window)
With this endpoint, you can purchase airtime and make bills payment.
# Get the List of bills
This method retrieves the list of category, billers, and payment items.
{
"action": "pull"
}
2
3
Sample Response:
{
"data": {
"categories": [
{
"name": "Airtime",
"code": "airtime"
},
{
"name": "Electricity Tokens",
"code": "electricity"
},
{
"name": "Internet Services",
"code": "internet"
}
],
"bills": [
{
"id": 1,
"name": "MTN Prepaid Topup",
"reference": "Phone Number",
"category": "airtime"
},
{
"id": 3,
"name": "Glo Prepaid Topup",
"reference": "Phone Number",
"category": "airtime"
},
{
"id": 4,
"name": "9Mobile Prepaid Topup",
"reference": "Phone Number",
"category": "airtime"
},
{
"id": 5,
"name": "Airtel Prepaid Topup",
"reference": "Phone Number",
"category": "airtime"
},
{
"id": 6,
"name": "AEDC",
"reference": "Meter Number",
"category": "electricity"
}
],
"items": [
{
"name": "TopUp",
"bills_id": 1,
"amount": "0",
"discount": 3,
"fee": 0,
"paycode": "cHwBhPniYesycir",
"require_name_query": 0
},
{
"name": "TopUp",
"bills_id": 3,
"amount": "0",
"discount": 3,
"fee": 0,
"paycode": "6rHQCyP0252mg0J",
"require_name_query": 0
},
{
"name": "TopUp",
"bills_id": 4,
"amount": "0",
"discount": 3,
"fee": 0,
"paycode": "jhMIV5j3K8SmPAy",
"require_name_query": 0
},
{
"name": "TopUp",
"bills_id": 5,
"amount": "0",
"discount": 3,
"fee": 0,
"paycode": "Alhdu86riyoyHg0",
"require_name_query": 0
},
{
"name": "AEDC Prepaid",
"bills_id": 6,
"amount": "0",
"discount": 0,
"fee": 70,
"paycode": "lAApm6OBmRmp3cQ",
"require_name_query": 1
}
]
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
The category is mapped to the biller and payment item. Category and Biller are linked by the category
field in biller and biller is linked to the items by the bills_id
field.
# Filter bills by category
Get the list of bills in a category
{
"action": "pull",
"category": "airtime"
}
2
3
4
# Filter bills by bills_id
Get the list of items in a bill
{
"action": "pull",
"bills_id": 6
}
2
3
4
NOTE
Paycode of bills could change pull the updated list of bills at least once a day.
# Resolve Bills Name
This method allows you to the name of a customers reference e.g SmartCard Number, Meter Number etc
{
"action": "resolve",
"paycode": "lAApm6OBmRmp3cQ",
"reference": "0000000001"
}
2
3
4
5
# Make Bills Payment
To make bills payment pass the paycode and reference that is required by the biller e.g SmartCard Number, Meter Number etc
paycode
must be retrieved from the items list when you retrieved the list of available bills
{
"action": "pay",
"paycode": "lAApm6OBmRmp3cQ",
"reference": "0000000001",
"amount": "100",
"orderRef": "xxcd"
}
2
3
4
5
6
7
# Verify Bills Payment
The transaction can be verified by passing the transaction reference and setting the action as verify.
{
"action": "verify",
"txnRef": "GP|BP|987555815|20190115N"
}
2
3
4
NOTE
txnStatus determines the status of the transaction if it is successful, failed or pending
# ENROLLMENT
Endpoint:https://demo.api.glade.ng/clients
(opens new window)
The enrollment endpoint will enable you to create a customer profile for your users to access loans & investment services.
# Create Profile
{
"action": "create",
"data": {
"firstname": "",
"lastname": "",
"middlename": "",
"email": "",
"gender": "",
"dob": "",
"phone": "",
"bvn": "",
"addresses":[
{
"line1":"8 Howling Lane",
"line2":"Hackney",
"city":"London",
"region":"London",
"postcode":"1234554321",
"country":"United Kingdom"
}
],
"bankAccount": {
"account_number": "",
"bank_code": ""
},
"meta": {
"id_card_no": ""
}
},
"verify_bvn": false,
"status": "pending_approval"
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
when a successful profile is created a unquie id
is generated and returned in the data object which will be used to identify the profile wherever client_id
is required.
# Update Profile Information
Profiles can be updated by passing their information in the data field.
{
"action": "update",
"client_id": "3",
"data": {
"meta": {
"phone": "",
"extra": {
}
}
}
}
2
3
4
5
6
7
8
9
10
11
12
# List Profiles
You can retrieve the list of all profiles created
{
"action": "list",
"offset": "",
"limit":""
}
2
3
4
5
# View Details of a Profile
{
"action": "view",
"client_id": "3"
}
2
3
4
# Cashcode
Endpoint: https://demo.api.glade.ng/cashcode
(opens new window)
Generate cashcodes to use on ATM's to withdraw cash with cards.
# Generate Cashcode
This method generates the cashcode
{
"action": "generate",
"amount": "1000",
"pin": "1234",
"channel": "ATM",
"orderRef": "asd1d",
"life_time": "60"
}
2
3
4
5
6
7
8
TIP
A 4 PIN digit is required for withdrawals.
Possible channels are ATM, WEB and POS
# Verify Cashcode
Get the status of a cashcode
{
"action": "verify",
"orderRef": "asd1d"
}
2
3
4
# LOANS
Endpoint: https://demo.api.glade.ng/loans
(opens new window)
# Request
Make a request for loans.
{
"action": "request",
"client_id": "12",
"interestSettings": {
"interestRate": "5",
"interestFrequency": "annualized|every_month|every_four_weeks|every_week|every_day"
},
"amount": 1000,
"tax_applied": true,
"tax_rate": 1.4,
"period": 30
}
2
3
4
5
6
7
8
9
10
11
12
# Process
Process the loan request by the client.
{
"action": "process",
"loan_id": "",
"status": "approve|reject|cancel"
}
2
3
4
5
NOTE
approve status will trigger a disbursement to the client's account.
# List
List the number of loans
{
"action": "list",
"offset": "",
"limit": ""
}
2
3
4
5
# View
View details of the loan.
{
"action": "view",
"loan_id": ""
}
2
3
4
# Repayment
Initiate a loan repayment, the process flow of each payment method is the same as the payment API.
{
"action": "repay",
"loan_id": "7",
"payment_method": "card",
"ip": "127.0.0.1",
"fingerprint": "zxsdcd",
"card":{
"card_no":"5061030000000000977",
"expiry_month":"01",
"expiry_year":"50",
"ccv":"000",
"pin": "1234"
},
"meta": ""
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Validate payment
{
"action":"validate",
"txnRef":"GP|LD|238639|20190406",
"otp":"123456"
}
2
3
4
5
# INVESTMENTS
Endpoint:https://demo.api.glade.ng/investments
(opens new window)
# Savings
The savings services will enable you to create a virtual savings account for your clients, the interest rate can be configured per account to be available to the client on the maturity date.
# Create
Create a saving for a client.
{
"action": "create_savings",
"name": "Main Account",
"client_id": "3",
"interestSettings": {
"interestRate": "5",
"interestFrequency": "annualized|every_month|every_four_weeks|every_week|every_day"
},
"tax_applied": true,
"tax_rate": 1.4,
"period": 30
}
2
3
4
5
6
7
8
9
10
11
12
# Lists
List all the savings a client has. The client_id
field is optional and when it is not included in the payload, it returns the list of all savings.
{
"action": "list_savings",
"client_id": "",
"offset": ""
}
2
3
4
5
# View
Get the details of a savings using the unique id returned at the point of creation.
{
"action": "view_savings",
"savings_id": "1"
}
2
3
4
# Cashout
Cashout funds from the savings using the different methods available.
{
"action": "cashout",
"saving_id": "",
"client_id": "",
"amount":"",
"method": "cash|transfer|cashcode"
}
2
3
4
5
6
7
# Deposit
Deposit funds to savings account using different payment methods available.
{
"action": "deposit",
"savings_id": "7",
"payment_method": "card",
"ip": "127.0.0.1",
"fingerprint": "zxsdcd",
"card":{
"card_no":"5061030000000000977",
"expiry_month":"01",
"expiry_year":"50",
"ccv":"000",
"pin": "1234"
},
"amount": "1000"
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Validate payment
Validate the deposit payment when the status response is validated.
{
"action":"validate",
"txnRef":"GP|LD|238639|20190406",
"otp":"123456"
}
2
3
4
5
# Thrift
# Create a Plan
{
"action": "create_plan",
"name": "Jones Thirft",
"amount": "1000",
"start_date": "1990-10-01",
"member_required": "2",
"frequency": "every_month"
}
2
3
4
5
6
7
8
# List Plans
Get a list of all thrift plans on your merchant account
{
"action": "list_plans",
"offset": "0",
"limits": "10"
}
2
3
4
5
# View Subscriptions
{
"action": "subscriptions",
"thrift_id": "2"
}
2
3
4
# Subscribe
To subscribe to a thrift plan, clients savings account are linked to the thrift. Funds will be deposit to the savings to charged on the cycle of the payout to the chosen clients account.
{
"action": "subscribe",
"savings_id": "7",
"thrift_id": "2"
}
2
3
4
5
# Cooperative Society Services
Cooperative society services is a combination of different API services. The following API can be used to achieve the Cooperative society service.
# Agent Banking Services
To start the agent banking services use the following API services.
# Resources
Endpoint:https://demo.api.glade.ng/resources
(opens new window)
WARNING
Pass the following payload to the server using the resources
method to pull resources for use.
# Get Supported Chargeable Banks
{"inquire": "supported_chargable_banks"}
# Get The List of Banks
{"inquire": "banks"}
Bank List Response
{"214":"FIRST CITY MONUMENT BANK PLC","215":"UNITY BANK PLC","221":"STANBIC IBTC BANK PLC","232":"STERLING BANK PLC","301":"JAIZ BANK","304":"Stanbic Mobile","305":"PAYCOM","307":"Ecobank Mobile","309":"FBN MOBILE","311":"Parkway","315":"GTBank Mobile Money","322":"ZENITH Mobile","323":"ACCESS MOBILE","401":"Aso Savings and Loans","044":"ACCESS BANK NIGERIA","014":"AFRIBANK NIGERIA PLC","063":"DIAMOND BANK PLC","050":"ECOBANK NIGERIA PLC","084":"ENTERPRISE BANK LIMITED","070":"FIDELITY BANK PLC","011":"FIRST BANK PLC","058":"GTBANK PLC","030":"HERITAGE BANK","082":"KEYSTONE BANK PLC","076":"SKYE BANK PLC","068":"STANDARD CHARTERED BANK NIGERIA LIMITED","032":"UNION BANK OF NIGERIA PLC","033":"UNITED BANK FOR AFRICA PLC","035":"WEMA BANK PLC","057":"ZENITH BANK PLC","090114":"Empire Trust Microfinance Bank"}
# Verify The Account Name
{"inquire": "accountname", "accountnumber": "0040000009", "bankcode": "058"}
Account Name Response
{"status":"success","resolved":true,"data":{"account_name":"John Doe"}}
# Verify BVN
{"inquire": "bvn", "bvn": "12345678901"}
BVN Response
{"status":"success","data":{"firstname":"John","lastname":"Doe","dob":"1914-01-01","bvn":"12345678901","phone":"08000000000"}}
# Get Card Details
The first six digits are all that is required to get the details of the such as issuer country, the brand, issuer.
{"inquire": "card", "card_no": "543889"}
# Get Charge
Get the charges for a card.
{"inquire": "charges", "card_no": "543889", "amount": "1000"}
Get the charges for an account.
{"inquire": "charges", "type": "account", "amount": "1000"}
# Personalized Account
This action will allow the merchant to personalized account number for their customers.
{
"request": "personalized-accounts",
"name": "John Doe",
"reference": "162329305158",
"email": "ade@gmail.com",
"bvn": "2221234567"
}
2
3
4
5
6
Parameter Description
Parameter | Required | Description |
---|---|---|
request | required | Instruct the API create a personalized account using information |
name | required | Name to appear on the account details |
reference | required | A reference number that will be used to track the account number generated and payments |
required | Email address that belongs to the customer |
# WebHooks
You can setup webhooks on your GladePay dashboard that lets us notify your application whenever a payment has been completed.
When a transaction is completed a POST HTTP request is sent to the URL that has been setup on the dashboard as a JSON
request.
Valid events are raised with a header gladepay-hash which is essentially an MD5 hash of the event payload and the merchant key. $hash = hash('sha512', $payload.$key); A sample response from the webhook
{
"status": 200,
"txnStatus": "successful",
"txnRef": "GPP99318721920190628Q",
"chargedAmount": "63.00",
"paymentMethod": "card",
"endpoint": "stage"
}
2
3
4
5
6
7
8
# Error Codes
Codes | Meaning |
---|---|
101 | Merchant Authentication Failed. |
102 | Invalid Method Call. |
103 | Invalid JSON Request. |
104 | Invalid Data Request. |
200 | Successful |
201 | Unrecognized Response From Gateway |
202 | OTP Validation required |
203 | Validation not successful |
204 | An error has occurred |
# Virtual Card API
Endpoint:https://api.glade.ng/virtualcard
(opens new window)
Method for all Virtual Card actions: PUT
# Create New Card
Request
{
"action":"create",
"billing" : {
"address" : "Near WAEC Office",
"name" : "Abubakar Siddiq Ango",
"city" : "Bauchi",
"state" : "Bauchi",
"postal_code": "74300"
},
"amount": "20",
"currency": "USD",
"country": "NG"
}
2
3
4
5
6
7
8
9
10
11
12
13
Response
{
"status": 200,
"message": "Created Successfully",
"card_data": {
"reference": "GVC_5f01a65588d3b9.69658422",
"balance": "20.00",
"currency": "USD",
"cardpan": "4056412345678938",
"maskedpan": "405640*******7838",
"city": "Bauchi",
"state": "Bauchi",
"address": "Near WAEC Office",
"postal_code": "74300",
"cvv": "123",
"expiration": "2023-07",
"card_type": "visa",
"name_on_card": "Abubakar Siddiq Ango",
"card_owner": "customer",
"status": "active"
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# List Cards
Get a list of all cards created by merchant.
Request
{
"action":"list"
}
2
3
Response
{
"status": 200,
"message": "success",
"data": [
{
"reference": "GVC_5f01813821aae1.69060540",
"currency": "USD",
"maskedpan": null,
"city": "Bauchi",
"state": "Bauchi",
"address": "Near WAEC Office",
"portal_code": "74300",
"cvv": "123",
"expiration": "2023-07",
"card_type": "visa",
"name_on_card": "Abubakar Siddiq Ango",
"card_owner": "customer",
"status": "terminated"
},
{
"reference": "GVC_5f0184a42733c4.56706447",
"currency": "USD",
"maskedpan": "405640*******4519",
"city": "Bauchi",
"state": "Bauchi",
"address": "Near WAEC Office",
"portal_code": "74300",
"cvv": "123",
"expiration": "2023-07",
"card_type": "visa",
"name_on_card": "Abubakar Siddiq Ango",
"card_owner": "customer",
"status": "terminated"
},
{
"reference": "GVC_5f019d64184ea4.67158218",
"currency": "USD",
"maskedpan": "405640*******2519",
"city": "Bauchi",
"state": "Bauchi",
"address": "Near WAEC Office",
"portal_code": "74300",
"cvv": "123",
"expiration": "2023-07",
"card_type": "visa",
"name_on_card": "Abubakar Siddiq Ango",
"card_owner": "customer",
"status": "terminated"
},
{
"reference": "GVC_5f01a65588d3b9.69658422",
"currency": "USD",
"maskedpan": "405640*******7838",
"city": "Bauchi",
"state": "Bauchi",
"address": "Near WAEC Office",
"portal_code": "74300",
"cvv": "123",
"expiration": "2023-07",
"card_type": "visa",
"name_on_card": "Abubakar Siddiq Ango",
"card_owner": "customer",
"status": "active"
}
]
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Get Cards
Retrieve the details of a card using it's reference number
Request
{
"action":"get",
"reference":"GPVC_lapc691587971764026"
}
2
3
4
Response
{
"status": 200,
"message": "success",
"card_data": {
"reference": "GPVC_lapc691587971764026",
"currency": "USD",
"balance": "40.32",
"cardpan": "4056412345678966",
"maskedpan": "405640*******8566",
"city": "Lagos",
"state": "Lagos",
"address": "Abuja, Nigeria",
"postal_code": "10026",
"cvv": "101",
"expiration": "2023-05",
"card_type": "visa",
"name_on_card": "Glade (Sadiq)",
"card_owner": "customer",
"status": "active"
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Card Transactions
Get the transactions performed on a card
Request
{
"reference":"GVC_5f01a65588d3b9.69658422",
"action":"transactions",
"from_date":"2020-01-01",
"to_date":"2020-07-05"
}
2
3
4
5
6
7
Response
{
"status": 200,
"reference": "GVC_5f01a65588d3b9.69658422",
"data": [
{
"id": 27462443,
"amount": 5,
"fee": 0,
"narration": "Card Funding",
"dateCreated": "2020-07-05T10:07:51.823Z",
"status": "Successful",
"description": "Card Funding",
"currency": "USD"
},
{
"id": 27462360,
"amount": 20,
"fee": 0,
"narration": "Card Funding",
"dateCreated": "2020-07-05T10:07:24.013Z",
"status": "Successful",
"description": "Card Funding",
"currency": "USD"
},
{
"id": 27462358,
"amount": 0.5,
"fee": 0,
"narration": "Card Issuance Fee",
"dateCreated": "2020-07-05T10:07:23.843Z",
"status": "Successful",
"description": "Card Issuance Fee",
"currency": "USD"
},
{
"id": 27462344,
"amount": 20,
"fee": 0,
"narration": null,
"dateCreated": "2020-07-05T10:07:19.217Z",
"status": "Successful",
"description": "Card Funding Debit",
"currency": "USD"
}
]
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Fund Card
Add funds to a card
Request
{
"action":"fund",
"reference":"GVC_5f01a65588d3b9.69658422",
"amount":"5"
}
2
3
4
5
Response
{
"status": 400,
"message": "Amount is less than required NGN 1000."
}
{
"status": 301,
"message": "Insufficient Balance"
}
{
"status": 400,
"message": "Unable to fund your card."
}
{
"status": 200,
"message": "Success"
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Withdraw Card
Withdraw funds from a card
Request
{
"action":"withdraw",
"reference":"GVC_5f01a65588d3b9.69658422",
"amount":"5"
}
2
3
4
5
6
7
Response
{
"status": 200,
"message": "Withdrawal Successful"
}
2
3
4
5
6
# Terminate Card
Cancel a card, remaining funds will be moved to the merchant's wallet.
Request
{
"action":"terminate",
"reference":"GPVC_lapc691587971764026"
}
2
3
4
5
Response
{
"status": 200,
"message": "Card terminated successfully"
}
2
3
4
# PostMan Samples
# Questions
If you encounter any issues while trying to implement this, please reach out to support@glade.ng