Initialize
Initiate a Bold Checkout transaction. Returns a transaction reference and checkout link.
Bold Checkout API
Easily collect payments via bank transfer, card, or Opay.
This guide shows you how to initialize a transaction and handle each payment method.
How It Works
-
Initialize Checkout:
Your backend creates a transaction and gets a unique reference and checkout link. -
Customer Selects Payment Method:
The customer chooses to pay by transfer, card, or Opay. -
Complete Payment:
The customer follows the flow for their chosen method.- Transfer: Pays to a unique account number.
- Opay: Scans a QR code in the Opay app.
- Card: Completes a secure card form and any required verification.
1. Initialize Checkout
Endpoint:
POST /payin/charge/requests
Request Headers:
| Key | Value |
|---|---|
| x-api-key | YOUR_API_KEY |
| x-api-secret | YOUR_API_SECRET |
| Content-Type | application/json |
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
| amount | string | Yes | Amount to be charged (in kobo) |
| accountName | string | Yes | Name of the merchant/account |
| paymentMethod | string[] | Yes | Allowed payment methods (e.g. card, pay-with-transfer, opay) |
| string | No | Customer’s email address | |
| callBackUrl | string | No | URL to receive webhook notifications about the transaction |
| metadata | object | No | Custom metadata to attach to the transaction |
Sample Request
Save the reference and link from the response. Redirect your customer to the link or embed it in your frontend.
2. Payment Method Flows
A. Pay with Transfer Customer sees unique account details. Customer transfers the payment to the provided account. B. Pay with Opay Customer sees a QR code. Customer scans the code using the Opay app to complete payment. C. Pay with Card Customer is prompted to enter card details. Card payment may require additional verification (see below).
3. Card Payment & Verification
Step 1: Charge Card Endpoint: POST /checkout//card-payment
Replace reference with the value from the initialization response.
Step 2: Card Verification (If Required)
Depending on the card and bank, you may need to provide additional information. The API will respond with the next required action, such as OTP, PIN, AVS, 3DS, birthday, phone number, or specific tags.
Sample Verification Request (for OTP):
Test Cards
For testing different verification scenarios, you can use these test card numbers:
| Test Card | Number | Purpose |
|---|---|---|
| None | 5061181664314440 | No additional verification required |
| PIN | 5061181664314441 | Requires PIN verification |
| OTP | 5061181664314442 | Requires OTP verification |
| AVS | 5061181664314443 | Requires Address Verification |
| 3DS | 5061181664314444 | Requires 3D Secure verification |
| Birthday | 5061181664314445 | Requires birthday verification |
| Phone Number | 5061181664314446 | Requires phone number verification |
Test Verification Values
- PIN: Use
5555for PIN verification - OTP: Use
555555for OTP verification
Step 3: Completion
Once all required verifications are completed successfully, the payment will be processed and the customer will receive confirmation.
Testing Tips
Authorizations
Body
Amount to be charged (in kobo)
Name of the merchant or account
Supported payment methods
card, pay-with-transfer, opay Customer's email address
URL to receive webhook notifications about the transaction