Pay Order

Detailed documentation on how to complete payment of an order

Good to know: To complete payment using any of the payment methods, RSA encryption PKCS#1 v1.5 is used to encrypt the payload with any of the payment methods selected then the complete pay order API is called.

The payload for each of the encrypt steps can be done using the RSA Algorithm defined without calling the encrypt endpoint. The encrypt data api will be deprecated.

Pay with card

Encrypt card payment data

POST https://localhost/checkout/data/encrypt

Creates a new card payment order, and returns the encrypted data.

Headers

Name
Type
Description

api-key*

String

public api key

Request Body

Name
Type
Description

reference*

string

unique payment reference

payment_option*

string

for card payment pass C

country*

string

country of payment

card.cvv*

string

cvv for card being used for payment

card.expiry_year*

String

expiry year of card

card.expiry_month*

String

expiry month of card

card.card_number*

String

card number

Pay with bank transfer

Encrypt bank transfer data

POST https://localhost/checkout/data/encrypt

pay with bank transfer

Headers

Name
Type
Description

api-key*

String

public api key

Request Body

Name
Type
Description

payment_option*

String

pass BT for bank transfer

reference*

String

unique reference

Pay with Mobile Money

Pay with MOMO

POST https://localhost/checkout/data/encrypt

complete payment using Mobile money

Headers

Name
Type
Description

api-key*

String

public api key

Request Body

Name
Type
Description

reference*

String

unique reference for order

payment_option*

String

pass MOMO for mobile money payments

mobile_money.mobile_number*

String

mobile number to complete payment

Pay with bank account

Get banks

GET https://localhost/checkout/banks

Get banks available for bank account payment

Encrypt bank account payment data

POST https://localhost/checkout/data/encrypt

complete payment using a bank account

Headers

Name
Type
Description

api-key*

String

public api key

Request Body

Name
Type
Description

bank_account.account_name*

String

account name for payment

bank_account.account_number*

String

account number for payment

bank_account.bank_code*

String

bank code for bank account used for payment

payment_option*

String

pass BA for bank account payment

reference*

String

unique reference for payment

Pay with USSD

Encrypt USSD payment data

POST https://localhost/checkout/data/encrypt

complete USSD payment

Headers

Name
Type
Description

api-key*

String

public key for payment

Request Body

Name
Type
Description

payment_option*

String

pass USSD for USSD payment

reference*

String

unique reference for payment

Complete Pay Order

after encrypting data for any of the payment methods, the pay order API is called to complete the payment

Pay order

POST https://localhost/checkout/order/pay

Pay for the order using the encrypted data

Headers

Name
Type
Description

api-key*

String

public api key

Request Body

Name
Type
Description

data*

String

encrypted data returned from the encrypt data endpoint

Last updated