Authorize a Card Transaction

Authorizes a transaction using an OTP (One-Time Password).

Request Parameters

Body (JSON):

  • transactionReference: (string, required). The reference ID of the transaction being authorized.
  • otp: (string, required). The One-Time Password (OTP) provided to the user.
  • authorizationType: (string, required). Indicates the type of authentication required.

Headers:

  • Content-Type: application/json

Responses

  • 200 OK:
    • Body: JSON object containing the card transaction authorization response.
      • status (int): HTTP status code.
      • message (string): Authorization response message.
      • data (object): The authorization response data.
      • status (int): Transaction status code (e.g., 2 = AUTHORIZED).
      • errorMessage (string): Additional details about the transaction status..
      • transactionReference (string): Unique reference for the transaction (use for OTP auth).
      • authorizationType (string): Indicates the type of authentication required.
      • grossAmount (number): Total transaction amount in the base currency.
      • callbackURL (string): URL for callback notifications.
      • clientReference (string): Merchant-provided reference for the transaction..
      • paymentReference (string): Payment gateway's internal reference.
  • 400 Bad Request:
    • Description: Returned when the OTP or transactionReference is missing or invalid.

Endpoint:

POST /transaction/charge/authorize

Request Body:

{
    "transactionReference": "fK3AcK_Y7Hg1B_r9mfM7",// Use the reference from the Charge a Card response
    "otp": "123456",
    "authorizationType": "OTP"
}

Response (Success):

{
    "status": 200,
    "message": "Request successfully processed",
    "data": {
        "status": 2,
        "errorMessage": "Approved by Financial Institution",
        "transactionReference": "fK3AcK_Y7Hg1B_r9mfM7",
        "authorizationType": "OTP",
        "grossAmount": 100.00,
        "callbackUrl": "https://merchant.com/callback",
        "clientReference": "txn123456780",
        "paymentReference": "FBN|API|MX21696|12-03-2025|474797448|303637",
        "charge": true
    },
    "errors": []
}

Error Responses:

Status CodeMessageDescription
400Invalid OTPOTP is missing or incorrect.
404Transaction Not FoundThe resource or transaction does not exist.
500Server ErrorAn error occurred on the server.