Skip to main content

Initialize a transaction

This endpoint initializes the transaction that would be used for card payments and dynamic transfers.

Endpoint

POST Payments/Initialize

Headers

Authorization: Bearer

To authorize this API request, you need to include your apiKey as a bearer token. This is done by setting the Authorization header in your request. The header should have the format:

Authorization: "Bearer your_api_key"

Note: Get your API key from Settings > API Keys in your dashboard.

Request Body

The following table describes the fields required in the request body:

FieldTypeDescription
isLivestringtrue if its a live transaction and false if its a test transaction.
amountstringThe amount of the payment.
currencystringThe currency of the payment. Only NGN is supported.
emailemailThe email address associated with the payment.
transactionIdstringThe unique identifier for the transaction.
callbackUrlstringThe URL where the user will be redirected after payment completion. Transaction details are passed as query parameters.
metadataarrayAdditional metadata for the payment. Each item contains: name (string) and value (string).
Request Body
{
"isLive": true,
"amount": "5000",
"currency": "NGN",
"email": "customer@example.com",
"phone": "08012345678",
"firstName": "John",
"lastName": "Doe",
"transactionId": "TXN123456789",
"callbackUrl": "https://example.com/payment/callback",
"metadata": [
{
"name": "CustomerName",
"value": "John Doe"
},
{
"name": "OrderId",
"value": "ORD987654321"
}
]
}
Response (200)
{
"responseCode": "00",
"responseMessage": "Authorization URL created",
"data": {
"paymentUrl": "https://checkout.paybridge.africa/2a11mganDV4u",
"accessCode": "2a11mganDV4u"
}
}