Initialize Payment
To make this request, send an authenticated request to the initiatetrans endpoint.
Initialize a transaction
POST
https://api.oneappgo.com/v1/business/initiatetrans
Headers
authorization*
String
SECRET_KEY
Request Body
amount*
Transaction amount
lname*
String
Customer's last name
fname*
String
Customer's first name
customer_email*
String
Customer's email
reference*
String
Customer's transaction reference
currency*
String
NGN, GHS, ZAR or USD
redirecturl
String
Redirect URL
phone*
String
Customer phone number
meta_data
object
Addition field such as hascommission, subaccount, trackingid etc. See the sample metadata below
Your secret keys are to be kept secret and only stored on your servers. Do not pass your secret key to front end language where it can be exploited.
Take a look at how you might do this:
Sample response
Once the Authorization URL is successfully generated, redirect your users to the authorization_url so they can pay. After payment is completed, the users are redirected to your website using the redirect URL passed with the initialize endpoint.
Last updated
Was this helpful?