API Overview

Checkout

The chief premise of this endpoint is to provide a single endpoint and a user interface that allows you to charge your customers mobile money wallet or credit card.

Charges are identified by a unique, random but unique ID's called reference. Kindly take note that this is a protected resource.

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.

Note: After calling this endpoint, you are to redirect the user to https://epaygh.com/checkout/{token} where the {token} is the token in this api Response.


Enpoint Details

Endpoint Url https://epaygh.com/api/v1/charge/token
Method POST


Request Headers

Content-Type application/json
Accept application/json
Authorization Bearer {access_token}


Request Body Parameters

Parameter Field Type Required Description
reference String Yes This is a unique ID that represents
the transaction.
amount Float Yes The amount you wish to charge the customer.

Amount must be of type float.
Eg; 1.00 or 50.00
customer_name String Yes This is the name of the customer
you are charging.
customer_email String Yes This is the email
of the customer
you are charging.
customer_telephone String Yes This is the telephone
number of the customer
you are charging.
payment_description String No This is the description of
the payment.


Charging a Wallet


//Example Request Body
{
"reference" : "EP-2JBH23JBBJBC",
"amount" : 1,
"customer_name": "Akosua Manu",
"customer_email" : "akosuamanu@gmail.com",
"customer_telephone" : "0541718326",
"payment_description": "A test payment"
}

//Example Success Response
{
"success": true,
"token": "SU7UI6FqRCY2eRdLqJ8tVxI4k6TmLDs5",
"message": "Charge created successfully"
}