POST
/
payin
/
charge
/
requests

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

  1. Initialize Checkout:
    Your backend creates a transaction and gets a unique reference and checkout link.

  2. Customer Selects Payment Method:
    The customer chooses to pay by transfer, card, or Opay.

  3. 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:

KeyValue
x-api-keyYOUR_API_KEY
x-api-secretYOUR_API_SECRET
Content-Typeapplication/json

Request Body:

FieldTypeRequiredDescription
amountstringYesAmount to be charged (in kobo)
accountNamestringYesName of the merchant/account
paymentMethodstring[]YesAllowed payment methods (e.g. card, pay-with-transfer, opay)
emailstringNoCustomer’s email address
callBackUrlstringNoURL to receive webhook notifications about the transaction
metadataobjectNoCustom metadata to attach to the transaction

Sample Request

curl --location 'https://corebanking-staging.boldmfb.com/api/payin/charge/requests' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'x-api-secret: YOUR_API_SECRET' \
--header 'Content-Type: application/json' \
--data '{
  "amount": "1000",
  "accountName": "Festus Store",
  "paymentMethod": ["card", "pay-with-transfer"],
  "email": "[email protected]",
  "callBackUrl": "https://yourwebsite.com/webhooks/payment-callback"
    ,
    "metadata": {"keyOne": "valueOne"}
  }'

Sample Response

{
  "status": true,
  "statusCode": 200,
  "data": {
    "reference": "6268390418ECA77883088",
    "link": "http://checkout-staging.getkele.com/?checkoutReference=6268390418ECA77883088"
  },
  "message": "Action was Successful"
}

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

curl --location 'https://corebanking-staging.boldmfb.com/api/checkout/{reference}/card-payment' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'x-api-secret: YOUR_API_SECRET' \
--header 'Content-Type: application/json' \
--data '{
  "cardNumber": "5555555555554446",
  "expiryDate": "32/34",
  "cvv": "3232",
  "pin": "5555"
}'

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):

curl --location 'https://corebanking-staging.boldmfb.com/api/checkout/{reference}/card-authorization' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'x-api-secret: YOUR_API_SECRET' \
--header 'Content-Type: application/json' \
--data '{
  "otp": "555555"
}'

Test Cards

For testing different verification scenarios, you can use these test card numbers:

Test CardNumberPurpose
None5061181664314440No additional verification required
PIN5061181664314441Requires PIN verification
OTP5061181664314442Requires OTP verification
AVS5061181664314443Requires Address Verification
3DS5061181664314444Requires 3D Secure verification
Birthday5061181664314445Requires birthday verification
Phone Number5061181664314446Requires phone number verification

Test Verification Values

  • PIN: Use 5555 for PIN verification
  • OTP: Use 555555 for OTP verification
The API will indicate which verification is needed. Submit the required information to the /card-authorization endpoint as prompted.

Step 3: Completion

Once all required verifications are completed successfully, the payment will be processed and the customer will receive confirmation.

Testing Tips

  • Use the provided cURL commands to test each step.
  • Always use the reference returned from the initialization step.
  • Handle each verification step as indicated by the API response. Some cards may require multiple verifications.
  • Authorizations

    x-api-key
    string
    headerrequired
    x-api-secret
    string
    headerrequired

    Body

    application/json
    amount
    string
    required

    Amount to be charged (in kobo)

    accountName
    string
    required

    Name of the merchant or account

    paymentMethod
    enum<string>[]
    required

    Supported payment methods

    Available options:
    card,
    pay-with-transfer,
    opay
    email
    string

    Customer's email address

    callBackUrl
    string

    URL to receive webhook notifications about the transaction

    Response

    200 - application/json
    status
    boolean
    statusCode
    integer
    data
    object
    message
    string