OPay as a Service

Create an OPay payment link

Authenticate with the standard public API bearer key. The business must have OPay checkout enabled, use NGN, and have an NGN wallet. Reuse source_reference with the same body to replay the saved request without another OPay order. The customer pays on OPay; OPay returns the browser to the supplied merchant redirect or cancel URL. A browser return is not proof of payment. Use the status endpoint or the signed OPAY_PAYMENT_SUCCESSFUL_EVENT merchant webhook to confirm payment.

POST
/api/v1/opaas

Authorization

BearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/opaas" \  -H "Content-Type: application/json" \  -d '{    "source_reference": "order-123",    "amount": 1000,    "phone_number": "08012345678",    "redirect_url": "https://merchant.example/payments/return",    "cancel_url": "https://merchant.example/payments/cancel"  }'
{
  "requestId": "string",
  "requestTimestamp": "string",
  "message": "string",
  "statusCode": 0,
  "data": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "businessState": "string",
    "reference": "OPA_A1B2C3D4",
    "sourceReference": "order-123",
    "status": "provisioning",
    "cashierUrl": "http://example.com",
    "merchantRedirectUrl": "http://example.com",
    "merchantCancelUrl": "http://example.com",
    "feeBearer": "MERCHANT",
    "opayOrderNo": "string",
    "amount": {
      "value": 1000,
      "currency": "NGN",
      "formatted": "NGN1000"
    },
    "fee": {
      "value": 1000,
      "currency": "NGN",
      "formatted": "NGN1000"
    },
    "total": {
      "value": 1000,
      "currency": "NGN",
      "formatted": "NGN1000"
    },
    "currency": "NGN",
    "expiresAt": "2019-08-24T14:15:22Z",
    "createdAt": "2019-08-24T14:15:22Z",
    "metadata": {},
    "customer": {},
    "transaction": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "type": "credit",
      "sourceReference": "string",
      "parentTransactionReference": "string",
      "reference": "TRN_123",
      "status": "successful",
      "amount": {
        "value": 1000,
        "currency": "NGN",
        "formatted": "NGN1000"
      },
      "balanceBefore": {
        "value": 1000,
        "currency": "NGN",
        "formatted": "NGN1000"
      },
      "balanceAfter": {
        "value": 1000,
        "currency": "NGN",
        "formatted": "NGN1000"
      },
      "createdAt": "22/10/2026 05:00pm",
      "fee": [
        {}
      ],
      "customer": {},
      "paymentLink": {}
    }
  }
}
Empty
Empty
Empty
Empty
Empty
Empty

How is this guide?

Last updated on