API Overview
Charge a Customer
The chief premise of this endpoint is to provide a single endpoint that allows you to charge your customers mobile money wallet or credit card. Charges are identified by a unique, random ID called reference.
All payments are instantly deposited into your Epay wallet. The amount taken from your customer is deposited with zero percent (0%) charge. This is a protected route hence you need to pass your access token through the Authorization header, that is, Authorization : Bearer {access_token}
We process all transactions asynchronously. Hence you would have to set your callback/webhook url on your dashboard under the settings section to receive the status of every posted transaction or call out the retrieve a transaction endpoint to verify status of the transaction.
Enpoint Details
Request Headers
Request Body Parameters
//Example Request Body ( Mobile money)
{
"reference" : "EP-2JBH23JJBJBJ",
"amount" : 1.00,
"payment_method" : "momo",
"customer_name": "Akosua Manu",
"customer_email" : "akosuamanu@gmail.com",
"customer_telephone" : "054**********",
"mobile_wallet_number" : "054**********",
"mobile_wallet_network":"mtn",
"payment_description": "A test payment"
}
//Example Success Response (Mobile money)
{
"success": true,
"message": "A payment request has been sent to the mobile wallet.
Please Approve Payment.",
"data": {
"customer": {
"id": 37,
"name": "Akosua Manu",
"email": "akosuamanu@gmail.com",
"telephone": "054**********",
"created_at": "2019-01-22 16:15:32",
"updated_at": "2019-01-22 16:15:32"
},
"transaction": {
"reference": "EP-2JBH23JJBJBJ",
"payment_method": "momo",
"description": "A test payment",
"amount": 1.00,
"mobile_wallet_number": "054**********",
"mobile_wallet_network": "mtn"
}
}
}
//Example Request Body (Credit Card)
{
"reference" : "EP-HBSABSDKKAS",
"amount" : 1.00,
"payment_method" : "card",
"customer_name": "Akosua Manu",
"customer_email" : "akosuamanu@gmail.com",
"customer_telephone" : "054**********",
"payment_description": "A sample payment"
}
//Example Success Response (Credit Card)
{
"success": true,
"message": "Redirect to url provided to complete payment",
"data": {
"customer": {
"id": 37,
"name": "Akosua Manu",
"email": "akosua manu@gmail.com",
"telephone": "054**********",
"created_at": "2019-01-22 16:15:32",
"updated_at": "2019-01-22 16:15:32"
},
"transaction": {
"reference": "EP-HBSABSDKKAS",
"payment_method": "card",
"description": "A sample payment",
"amount": 1.00
},
"redirect_url": "https://migs.mastercard.com.au/vpcpay"
}
}
Next, learn more about how to Know your customers on Epay.