Sending the request
Method
POST
url
https://app.payplus.africa/pay/v01/straight/checkout-invoice/create
headers
Apikey
: contains the main key generated during the creation of your application
Authorization
: contains the word Bearer
followed by a space
then the token generated during the creation of your application
Accept
: application/json
Content-Type
: application/json
payload ( format json )
{
"commande": {
"invoice": {
"items": [
{
"name": "Item 1",
"description": "",
"quantity": 1,
"unit_price": 950,
"total_price": 950
},
{
"name": "Item 2",
"description": "",
"quantity": 1,
"unit_price": 1950,
"total_price": 1950
}
],
"total_amount": 1900,
"devise": "xof",
"description": Description of the content of the invoice",
"customer": "contains the customer's phone number (format : 22997761182)",
"otp": "contains the otp code of the transaction (only for orange money subscribers, otherwise leave blank.)"
},
"store": {
"name": "Name of your site or shop",
"website_url": "url of your site or shop"
},
"actions": {
"cancel_url": "request cancellation url",
"return_url": "return url after validation of the request",
"callback_url": "return url after validation of the request"
},
"custom_data": {
"rubrique 1": "rubrique_1_value",
"rubrique 2": "rubrique_2_value"
}
}
}
Response ( format json )
{
"response_code":"contains 00 if successful. if different from 00 then failure",
"token"=>"transaction token. you must keep it on your platform",
"response_text"=>"contains the url of the payment validation page (page to which you must redirect the customer for him to proceed to payment) ",
"description"=>"text message describing the result of the request",
"customdata"=>"contains the custom_data sent when sending the request"
}
Checking the status of the request
method
GET
url
https://app.payplus.africa/pay/v01/straight/checkout-invoice/confirm/?invoiceToken=
headers
Apikey
: contains the master key generated during the creation of your application
Authorization
: contains the word Bearer
followed by a space
then the token generated during the creation of your application
URL parameters
invoiceToken
: contains the token you received after sending the request
Response ( format json )
{
"response_code":"ontains 00 if successful. if different from 00 then failure",
"token"=>"invoice id. you must keep it on your platform",
"response_text"=>"text message describing the result of the request",
"status"=>"indicates the status of the request. possible values : pending (transaction awaiting validation), completed (validated transaction), notcompleted (canceled transaction). his field is empty if response_code is other than 00"
"customdata"=>"contains the custom_data sent when sending the request"
}