Like orders, you need to encrypt payment details before completing them. In this guide we cover what you need to encrypt your requests for the different payment methods.
All encryption should be done using the RSA Algorithm. We cover the basics in our encryption guide, but you can reach out to support if you encounter any encryption errors.
Card payments
Before encrypt requests for card payments, collect the customer's card number, expiry information and CVV. Here is a comprehensive list of items that should be encrypted
Parameter | Definition | Sample | Type | isRequired |
---|---|---|---|---|
reference | The unique identifier used when initiating the payment | SAMPLE-REF-01 | String | Yes |
payment_option | The flag indicates the payment method used in the transaction. For card transactions, the expected value is C . | C | String | Yes |
country | The country where the card was issued. | NG | String | Yes |
card | The card object containing the customer's card details. | Object | Yes | |
cvv | A 3 or 4 digit security code behind the card. | 304 | String | Yes |
card_number | The customer's card number. | 0000 0101 1111 2222 | String | Yes |
expiry_month | Two-digit number representing the card's expiration month. | 02 | String | Yes |
expiry_year | Two-digit number representing the card's expiration year. | 39 | String | Yes |
auth_option | The authentication model for the transaction. This is required for noauth transactions, Expected value: noauth | noauth | String | No |
After collecting the customer's card details, send the request in the following format:
//Unencrypted request
{
"reference":"Example-Reference-0020",
"payment_option":"C",
"country":"NG",
"card":{
"cvv":"012",
"card_number":"0000 0101 1111 2222",
"expiry_month":"02",
"expiry_year":"39"
}
}
Bank Transfers
Making Bank transfers are similar to collecting card payments. The bank code and reference is first encrypted before sending it to the pay order endpoint. Here is the full list of parameters to encrypt for Bank transfer payments:
Parameter | Definition | Sample | Type | isRequired? |
---|---|---|---|---|
reference | The unique identifier used when initiating the payment | SAMPLE-REF-01 | String | Yes |
payment_option | The flag indicates the payment method used in the transaction. For bank transfers, the expected value is BANK-TRANSFER . | BANK-TRANSFER | String | Yes |
bank_transfer | The payment object containing the bank code. | Object | Yes | |
bank_code | A 3 digit code that identifies the receiving bank. | 035 | String | Yes |
For successful payments, you need to send the bank code in the bank_transfer
object. Here is a sample request for context:
{
"reference": "Example-Reference-0010",
"payment_option": "BANK-TRANSFER",
"bank_transfer": {
"bank_code": "035"
}
}