Finalize Payment (OTP/PIN)

Complete a payment that requires PIN or OTP verification

Post https://dashboard.mbiyo.africa/api/v1/merchant/transactions/{transaction_id}/finalize

When to use: Call this endpoint only when the payin response returns auth_mode: "pin". This applies to QMoney and APS networks in Gambia (GM).

Headers

Authorization* string

Pass your merchant API key as a bearer token in the request header

Content-Type* string

application/json

Path Parameters

transaction_id* string

The transaction_id returned from the payin endpoint

Request Body Parameters

otp* string

The PIN or OTP code provided by the customer (typically 4-6 digits)

Example Request


curl -X POST "https://dashboard.mbiyo.africa/api/v1/merchant/transactions/CI-6789ABCDEF12345/finalize" \
  -H "Authorization: Bearer YOUR_MERCHANT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "otp": "123456"
  }'

Success Response (200 OK)


{
  "status": "success",
  "message": "Transaction finalized successfully",
  "data": null
}

Error Response (400 Bad Request)


{
  "status": "failed",
  "message": "Invalid OTP",
  "data": null
}

Flow Overview

  1. Call the payin endpoint to create a payment
  2. Check the auth_mode field in the response
  3. If auth_mode is "pin", collect the PIN/OTP from the customer
  4. Call this finalize endpoint with the OTP
  5. Wait for the webhook notification to confirm the final payment status
Important: A successful finalize response does not mean the payment is complete. Always wait for the webhook notification with status "successful" before crediting the customer.

Networks Requiring Finalization

Country Network Auth Mode
Gambia (GM) QMoney pin
Gambia (GM) APS pin