Skip to main content

Generate a Checkout

Generate a Checkout

This is a checkout endpoint that you can use to generate a link for your customer to make a one-time payment with

Endpoint POST

Request Body Parameters

NameDescriptionRequiredData type
currencyThe currency the transaction should be carried out in. The supported value is NGN.trueString
amountThe amount you are debiting the customer. This should be in kobo. The minimum value is 10000trueNumber
emailThe customer’s email addresstrueString
redirect_urlThe url we should redirect to after the customer completes payment.falseString
metaAn object containing additional attributes you will like to have in your transaction response.falseObject
Sample request
{
"currency": "NGN",
"amount": 200000,
"email": "post@malone.co",
"meta": {
"city": "Ketu",
"state": "London"
},
"redirect_url": "https://thepeer.co"
}
Sample response
{
"redirect_url": "https://thepeer.co",
"url": "https://checkout.thepeer.co/c50cc534-8c47-40af-9213-cb38adca0b28",
"checkout": {
"id": "c50cc534-8c47-40af-9213-cb38adca0b28",
"amount": 20000,
"currency": "NGN",
"status": "pending",
"linked_account": null,
"meta": {
"city": "Ketu",
"state": "London"
},
"updated_at": "2023-05-16T14:44:37.000000Z",
"created_at": "2023-05-16T14:44:37.000000Z"
}
}

The value of the url property is the generated checkout link.


You can do either of the following with it:

  1. Open the link in a new tab for your users to make payment
  2. Open the link in an iframe, if you want to stay on the same page
  3. Open the link in a Webview (for mobile platforms)

After a successful transaction, you'll receive the transaction object via webhook