Generate a checkout URL
Generate a one-time checkout url for your customer.
The checkout URL is only valid for one-time use only
URI
POST
Parameters
Header
Authorization
string
set value to Bearer SECRET_KEY
Body Param
business_id
string
required
Merchant Business ID
customer_firstname
string
required
Customer's first name
customer_lastname
string
required
Customer's last name
customer_phone_number
string
required
Customer's phone number
customer_email
string
required
Customer's email address
fee_bearer
string
required
Specifies who would bear the transaction fee can only be a customer or business.
prefered_payment_method
string
required
Specifies the payment method for the checkout, this is set to pay-with-transfer
by default. Available options include pay-with-transfer
or bnpl
shipping_fee
number
required
Shipping fee, set value to zero (0) if this is not applicaple.
amount
number
Specifies the exact amount a virtual account should receive
line_items
array
required
A list of objects that specifies the item(s) the customer is about to pay for e.g:
discount
object
required
An object that specify the discount(s) on the item(s) the customer is about to pay for, the value should be set to zero (0) if discount no is applied e.g:
tax
object
required
Tax objects specify the tax on the item(s) the customer is about to pay for, the value should be set to zero (0) if tax no is applied e.g:
customer_ref
string
A customer reference. Refers to the customer that made the checkout.
metadata.customer
list
Holds customer when customer details is different from the previously saved info. e.g
The customer will only be allowed to pay the exact amount, any other amount will be rejected.
Sample request
Duplo Response
Once the request is done abstract the checkout_url gotten from the response and append the following
type = payment/bnpl (note this is dependent on the type of transaction that was initiated)
callback_url
cancel_url
Sample URL:
You would have to redirect the customer to the constructed URL in order for the customer to complete the transaction. When the customer transaction status is confirmed the customer will be redirected to your site or to the redirect URL you specified when generating the checkout URL.
Last updated