Our integration guide helps you connect your website easily to our payment system. To get started add the button shown below to your websites checkout page so your users can have the option to checkout with Menopays.
<style>
button {
color: #0CB569;
background-color: #C9F4E0;
border-radius: 20px;
outline: none;
padding: 15px 15px;
font-weight: 900;
font-family: 'Nunito';
font-size: 15px;
border: none;
cursor: pointer;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.top {
display: flex;
align-items: center;
margin-bottom: 5px;
}
.logo {
width: 35px;
height: 35px;
margin-right: 5px;
background-image: url('https://menopays.com/img/logo.svg');
background-position: center;
background-repeat: no-repeat;
background-size: contain;
}
p {
margin: 0px;
font-size: 15px;
}
</style>
<form method="POST" action="your_server_url">
<button>
<div class="top">
<img src="https://menopays.com/img/logo.svg" class="logo" />
Menopays
</div>
<p class="subtext">Buy NOW & Pay in 4 equal repayments</p>
</button>
</form>
When a user clicks the button, this should go to your back end which will then send a request to Menopays server to create a transaction. This request is a post request which will consist of your secret_key, amount of the transaction, description.
Transaction amount should be in NGN ₦
Click here to get api credentials.
***Note: this url is only accessible if you have a verified <strong>Store Manager</strong> account
curl -X POST
-F 'secret_key=your_key'
-F 'amount=1000'
-F 'description=Your Description'
https://menopays.com/api/v1/third-party/transaction/start
You will receive a status response from our servers either success or failed with a token.
{
status: "success",
message: 'Transaction Initiated',
token: 'unique_token',
}
If the status is success, do a 301 redirect back to
https://menopays.com/third-party/transaction/complete?client_id=your_client_id&token=token_received
with your client id and the returned token added to the parameter in the url.
Please make sure you have added your success redirection here.
Success Redirection Page
. If you dont have a redirection url added to your account, your customers will not be redirected back to your website after they complete their purchase.
The token will be included in the query parameters (e.g https://your-redirection-url.com?token={token}
)
After redirect, you can query transaction status by making a GET request to https://menopays.com/api/v1/third-party/transactions/{token}
.
x-secret-key
should be provided in the headers
Sample Request
curl --location --request GET 'https://menopays.com/api/v1/third-party/transactions/df651023-fwege-4146-dsfe-56afb7edeb47' \
--header 'x-secret-key: your_secret_key'
Sample 200 Response
{
"data": {
"transaction": {
"token": "df651023-fwege-4146-dsfe-56afb7edeb47",
"amount": 4000,
"currency": "NGN",
"description": "Some description",
"created_date": "2020-08-09T21:07:13.000000Z",
"updated_date": "2020-08-09T21:07:17.000000Z",
"status": "COMPLETE" // COMPLETE, PENDING, IN_PROGRESS, FAILED
}
}
}