Bank Transfers

This API will allow you to accept bank transfer payments through your custom checkout process. In other words, it allows customers to send money from their bank accounts to yours instantly via NIP (NIBSS Instant Payment) transfer.

Note: When testing this endpoint, we will provide a mocked response meaning that you’ll get a successful response no matter what. So please note that this is only for testing purposes and will be different during production.


Step 1: Initialize a bank transfer transaction

Here you can commence a bank transfer transaction by making a POST request to the /transaction/bankTransfer/initialize endpoint.

HTTP Method

POST

Sandbox
http://sandbox-cashierapi.opayweb.com/api/v3
Production
https://cashierapi.opayweb.com/api/v3

Header Parameters

ParameterDescription
Content-typeapplication/JSON
MerchantIdOPay merchant ID is a unique 15-digit number assigned to all OPay merchants. To get your merchantID, login to your OPay Dashboard and click on Settings.
AuthorizationBearer + Signature (Signature is a combination of both the payload and your secret/private key)

API Endpoint

/transaction/bankTransfer/initialize

Sample Request

post/transaction/bankTransfer/initialize
curl -X POST --header 'Authorization: Bearer Signature' --header 'MerchantId:
256619092316009' --header 'content-type: application/json'
https://cashierapi.opayweb.com/api/v3/transaction/bankTransfer/initialize

Sample Request Body

post/transaction/bankTransfer/initialize
{
  "reference": "test_20210302114235",
  "productDesc": "The best wireless earphone in history",
  "userPhone": "+2349876543210",
  "userRequestIp": "123.123.123.123",
  "amount": "100",
  "currency": "NGN",
  "callbackUrl": "https://you.domain.com/callbackUrl",
  "expireAt": "10"
}

Sample response

{
    "code": "00000",
    "message": "SUCCESSFUL",
    "data": {
        "orderNo": "210323140538859499",
        "reference": "test_20210302114235",
        "status": "SUCCESS",
        "amount": "100",
        "currency": "NGN",
        "transferBank": "TEST",
        "transferAccount": "888888888"
    }
}
PROPERTYDESCRIPTION
referenceOrder number of merchant (unique order number from merchant platform)
orderNoOrder number from OPay payment
amountAmount in kobo
currencyCurrency charge should be performed in. Default is NGN
statusINITIAL
PENDING
SUCCESS
FAIL
CLOSE
transferBankWEMA Bank
transferAccount778 2811 9802

Step 2: Get status of bank transfer transaction

When you’ve initialized a transaction, you should wait 10 seconds or more, then proceed to check the status of the transaction. Keep requerying to get the final status of your transaction, which is either “FAILED” or “SUCCESSFUL”.

Please note that the Authorization header consists of “Bearer Signature” which is essentially a HMAC SHA512 signature of the whole payload signed using your Secret Key. The payload should be in alphabetical order. You can use our Signature calculator here.

HTTP Method

POST

Sandbox
http://sandbox-cashierapi.opayweb.com/api/v3
Production
https://cashierapi.opayweb.com/api/v3

Header Parameters

ParameterDescription
Content-typeapplication/JSON
MerchantIdOPay merchant ID is a unique 15-digit number assigned to all OPay merchants. To get your merchantID, login to your OPay Dashboard and click on Settings.
AuthorizationBearer + Signature (Signature is a combination of both the payload and your secret/private key)

API Endpoint

/transaction/bankTransfer/status

Sample Request

post/transaction/bankTransfer/status
curl -X POST --header 'Authorization: Bearer Signature' --header 'MerchantId:
256619092316009' --header 'content-type: application/json'
https://cashierapi.opayweb.com/api/transaction/bankTransfer/status

Sample Request Body

post/transaction/bankTransfer/status
{
"orderNo": "210323140538859499",
"reference": "test_20210302114235"
}

Sample Response

{
    "code": "00000",
    "message": "SUCCESSFUL",
    "data": {
        "orderNo": "210323140538859499",
        "reference": "test_20210302114235",
        "status": "PENDING",
        "amount": "100",
        "currency": "NGN",
        "supportRefundOriginal": null
    }
}
PROPERTYDESCRIPTION
orderNoOrder number of OPay payment
referenceOrder number of merchant (unique order number from merchant platform)

CONTENTS

  • Community

  • Official Website
  • Facebook
  • Linkedln
  • Twitter
Was this page helpful?
Yes
No