Accept Payment
Standard Checkout
The Transactions API allows you create and manage payments on your integration
Initialize Transaction (Redirect)
Initialize a transaction from your backend.
Endpoint: /transaction/initialize
Method: POST
Header
Param | Type | Required? | Decription |
---|---|---|---|
authorization | string | Yes | Set value to Bearer SECRET_KEY |
content-type | string | Yes | Set value to application/json |
Sample Post
curl https://api.budpay.com/api/v2/transaction/initialize
-H "Authorization: Bearer YOUR_SECRET_KEY"
-H "Content-Type: application/json"
-d '{ "email": "customer@email.com", "amount": "20000","callback":"youcallbackurl" }'
-X POST
Sample Response
{
"status": true,
"message": "Authorization URL created",
"data": {
"authorization_url": "https://www.budpay.com/checkout/wp5goiyvc1pt",
"access_code": "wp5goiyvc1pt",
"reference": "REF_61e469c330c2bc"
}
}
Parameters
Param | Type | Required? | Decription |
---|---|---|---|
string | Yes | Customer email address | |
amount | string | Yes | Amount you are debiting customer. Do not pass this if creating subscriptions. |
currency | string | no | Currency charge should be performed in. Allowed values are: NGN, USD or GBP It defaults to your integration currency. Default currency set to NGN when currency parameter is not set |
reference | string | No | Unique case sensitive transaction reference. Only -,_,., =and alphanumeric characters allowed. If you do not pass this parameter, Budpay will generate a unique reference for you. |
callback | string | No | Function that runs when payment is successful. This should ideally be a script that uses the verify endpoint on the Budpay API to check the status of the transaction. |