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
modestringThe mode of the payment.
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).
productIdstringThe ID of the product for which the payment is being made.
productDescriptionstringThe description of the product.
applyConviniencyChargebooleanIndicates whether a convenience charge should be applied.
Request Body
{
"amount": "5000",
"currency": "NGN",
"email": "customer@example.com",
"transactionId": "TXN123456789",
"callbackUrl": "https://example.com/payment/callback",
"metadata": [
{
"name": "CustomerName",
"value": "John Doe"
},
{
"name": "OrderId",
"value": "ORD987654321"
}
],
"productId": "PRD001",
"productDescription": "Premium Membership Registration",
"applyConviniencyCharge": false,
"mode": "Live"
}
Response (200)
{
"responseCode": "00",
"responseMessage": "Authorization URL created",
"data": {
"paymentUrl": "https://checkout.paybridge.africa/2a11mganDV4u",
"accessCode": "2a11mganDV4u"
}
}