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.gladepay.com/{method}

Live Accounts

To get your live credentials Register Here. Your API Credentials are in Merchant Credentials on the dashboard. Endpoint: https://api.gladepay.com/{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.gladepay.com/payment \
      --header 'content-type: application/json' \
      --header 'key: Your Merchant Key' \
      --header 'mid: Your Merchant ID' \
      --data '{}'
      
1
2
3
4
5
6
  $curl = curl_init();
      curl_setopt_array($curl, array(
        CURLOPT_URL => "https://demo.api.gladepay.com/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;
        }       
        
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

Payment Collections

Endpoint: https://demo.api.gladepay.com/payment

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",
}
1
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"}
1

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
}
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

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"
}
1
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"
  }
}
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

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"
}
1
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"
}
1
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"}
1

NOTE

There are two types of validation required

First Validation

when OTP validation is required:

{
  "status":202, 
  "txnRef":"GP983340165W",
  "fraudStatus":"ok"
}
1
2
3
4
5
validate action

This is used for OTP Validation

{
  "action":"validate",
  "txnRef":"GP1507382986",
  "otp":"123456"
}
1
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.gladepay.com/1g477sy",
  "fraudStatus":"ok"
}
1
2
3
4
5
6

Response

{"status":200,"message":"Validation Successful","cardToken":"6tj663dh"}
1

TIP

cardToken is the token code for saved card's.

verify action

Endpoint: https://demo.api.gladepay.com/payment This is used to requery a payment

{
  "action":"verify",
  "txnRef":"GP1507382986"
}
1
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"
}
1
2
3
4

Response is:

  {"status":200, "txnStatus":"successful", "chargedAmount":10000, "fraudStatus":"ok"}
1

NOTE

txnStatus determines the status of the transaction if it is successful, failed or pending

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"
}
1
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"
}
1
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"
}
1
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"
}
1
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"
}
1
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.

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"
}
1
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"
        }
    ]
}
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

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.gladepay.com/disburse

{
  "action":"transfer",
  "amount": "100",
  "bankcode":"058", 
  "accountnumber":"0040000008",
  "sender_name": "John Doe",
  "narration": "Upkeep",
  "orderRef":"TX00001"
}
1
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"
}
1
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"
    }    
  ]
}
1
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"
}
1
2
3
4

Response

{
  "status": 200,
  "txnStatus": "successful",
  "message": "Transfer Successful"
}
1
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.gladepay.com/bills

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"
}
1
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
      }
    ]
  }
}
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"
}
1
2
3
4

Filter bills by bills_id

Get the list of items in a bill

{
  "action": "pull",
  "bills_id": 6
}
1
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"
}
1
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"
}
1
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"
}
1
2
3
4

NOTE

txnStatus determines the status of the transaction if it is successful, failed or pending

ENROLLMENT

Endpoint:https://demo.api.gladepay.com/clients

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"
}
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

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": {
                
            }
        }
    }
}
1
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":""
}
1
2
3
4
5

View Details of a Profile

{
    "action": "view",
    "client_id": "3"
}
1
2
3
4

Cashcode

Endpoint: https://demo.api.gladepay.com/cashcode

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"
}
1
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"
}
1
2
3
4

LOANS

Endpoint: https://demo.api.gladepay.com/loans

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
}
1
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"
}
1
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": ""
}
1
2
3
4
5

View

View details of the loan.

{
    "action": "view",
    "loan_id": ""
}
1
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": ""
}
1
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"
}
1
2
3
4
5

INVESTMENTS

Endpoint:https://demo.api.gladepay.com/investments

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
}
1
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": ""
}
1
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"
}
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"
}
1
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"
}
1
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"
}
1
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"
}
1
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"
}
1
2
3
4
5

View Subscriptions

{
    "action": "subscriptions",
    "thrift_id": "2"
}
1
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"
}
1
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.gladepay.com/resources

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"}
1

Get The List of Banks

{"inquire": "banks"} 
1

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"}
1

Verify The Account Name

{"inquire": "accountname", "accountnumber": "0040000009", "bankcode": "058"}
1

Account Name Response

 {"status":"success","resolved":true,"data":{"account_name":"John Doe"}} 
1

Verify BVN

{"inquire": "bvn", "bvn": "12345678901"}
1

BVN Response

 {"status":"success","data":{"firstname":"John","lastname":"Doe","dob":"1914-01-01","bvn":"12345678901","phone":"08000000000"}} 
1

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"}
1

Get Charge

Get the charges for a card.

{"inquire": "charges", "card_no": "543889", "amount": "1000"}
1

Get the charges for an account.

{"inquire": "charges", "type": "account", "amount": "1000"}
1

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

PostMan Samples

Run in Postman

Questions

If you encounter any issues while trying to implement this, please reach out to support@gladepay.com