TN Integration API
This page provides the APIs for querying the TN bound to an OPay POS and querying successful TN transactions.
These endpoints use the common encrypted request and response envelope described in API Basics. The request parameters below are the plaintext JSON after decryption, and the response parameters are the plaintext JSON inside
dataafter decryption.
Query TN by POS SN
URL: https://payapi.opayweb.com/openApi/tn/queryBySn
This endpoint queries the TN bound to a specified POS serial number under the specified merchant.
Request Parameters
| Parameter | Type | Required | Default | Description |
| headMerchantId | String | Yes | - | Your OPay Business ID. |
| merchantId | String | Yes | - | Your OPay Branch ID. The value must belong to the calling merchant organization. |
| sn | String | Yes | - | POS serial number. |
{
"headMerchantId": "256622040884147",
"merchantId": "256622040884148",
"sn": "POS-SN-001"
}
2
3
4
5
Response Parameters
| Parameter | Type | Description |
| headMerchantId | String | Your OPay Business ID. |
| merchantId | String | Your OPay Branch ID. |
| sn | String | POS serial number. |
| tn | String | OPay dedicated TN bound to the POS. The recommended format is 10 digits beginning with 6. |
| tnStatus | String | TN status. If the provider does not return a status, the value is UNBOUND. |
| recipientName | String | Recipient name. May be null when the provider does not return this field. |
| receiptBank | String | Receiving bank. |
| boundTime | String | Binding time in Nigeria time, format MMM dd,yyyy HH:mm:ss. |
| updatedTime | String | Update time in Nigeria time, format MMM dd,yyyy HH:mm:ss. |
{
"headMerchantId": "256622040884147",
"merchantId": "256622040884148",
"sn": "POS-SN-001",
"tn": "6123456789",
"tnStatus": "ACTIVE",
"recipientName": null,
"receiptBank": "OPay",
"boundTime": "Aug 26,2026 11:00:00",
"updatedTime": "Aug 26,2026 11:01:00"
}
2
3
4
5
6
7
8
9
10
11
Query TN Transaction Records
URL: https://payapi.opayweb.com/openApi/tn/queryTransactionRecords
This endpoint queries successful inbound transactions for the specified merchant, TN, POS serial number and date range.
Special Notes
headMerchantId,merchantId,tn,sn,startTime,endTime,pageNumandpageSizeare required.startTimeandendTimeuse Nigeria date formatyyyyMMdd, for example20260902.- The date range is inclusive and must not exceed 7 calendar days. To query all transactions on September 2, 2026, pass both
startTimeandendTimeas20260902. tnis an OPay dedicated TN. The recommended format is 10 digits beginning with6, for example6123456789.statuscurrently supports onlySUCCESS; the gateway always queries successful transactions.merchantIdis queried exactly as provided. The endpoint does not query all authorized merchants under the group, which prevents cross-merchant data exposure.- If
tnorsnis non-empty but does not match any transaction, the endpoint returns a successful response with an emptyrecordslist andtotalequal to0.
Request Parameters
| Parameter | Type | Required | Default | Description |
| headMerchantId | String | Yes | - | Your OPay Business ID. |
| merchantId | String | Yes | - | Your OPay Branch ID. |
| tn | String | Yes | - | OPay dedicated TN used to filter transactions. The recommended format is 10 digits beginning with 6. |
| sn | String | Yes | - | POS serial number used to filter transactions. |
| startTime | String | Yes | - | Start date in Nigeria time, format yyyyMMdd. |
| endTime | String | Yes | - | End date in Nigeria time, format yyyyMMdd. |
| status | String | No | SUCCESS | Transaction status. Only SUCCESS is supported. |
| payNo | String | No | - | OPay payment order number used as an additional filter. |
| pageNum | Integer | Yes | 1 | Page number, starting from 1. |
| pageSize | Integer | Yes | 50 | Page size, from 1 to 100. |
{
"headMerchantId": "256622040884147",
"merchantId": "256622040884148",
"tn": "6123456789",
"sn": "POS-SN-001",
"startTime": "20260902",
"endTime": "20260902",
"status": "SUCCESS",
"pageNum": 1,
"pageSize": 50
}
2
3
4
5
6
7
8
9
10
11
Response Parameters
| Parameter | Type | Description |
| records | Array | Transaction records. |
| records[].payNo | String | OPay payment order number. |
| records[].orderNo | String | Original order number. |
| records[].outOrderNo | String | Merchant order number. |
| records[].headMerchantId | String | Your OPay Business ID. |
| records[].merchantId | String | Your OPay Branch ID. |
| records[].sn | String | POS serial number. |
| records[].tn | String | OPay dedicated TN, recommended as 10 digits beginning with 6. |
| records[].status | String | Transaction status. The current query returns SUCCESS transactions. |
| records[].amount | String | Transaction amount in Naira. |
{
"records": [
{
"payNo": "202609021234567890",
"orderNo": "202609021234567891",
"outOrderNo": "MERCHANT-ORDER-001",
"headMerchantId": "256622040884147",
"merchantId": "256622040884148",
"sn": "POS-SN-001",
"tn": "6123456789",
"status": "SUCCESS",
"amount": "100.00",
"currency": "NGN",
"senderName": "John",
"senderBank": "OPay",
"senderAccount": "********9012",
"recipientName": null,
"receiptBank": "OPay",
"receiptAccount": "6123456789",
"remark": null,
"transactionTime": "Sep 02,2026 14:30:00",
"completedTime": "Sep 02,2026 14:31:00",
"rrn": "RRN001"
}
],
"total": 1,
"pageNum": 1,
"pageSize": 50,
"hasMore": false
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Error Scenarios
| Scenario | Response Code | Message |
| Missing merchantId in a TN request | 00004 | Invalid request parameter |
| merchantId is present but not in the calling merchant organization | C_1115 | not within same relationship |
| Missing required business parameter | 00004 | The corresponding parameter is required |
| Invalid date format or date range exceeds 7 calendar days | 00004 | time range must be valid and no more than 7 days |
| TN/SN is non-empty but has no matching transaction | 00000 | SUCCESS with an empty records list |
| POS, KYB or BigOrder service is unavailable | 00003 | Service not available, please try again. |
| Request timestamp is expired | A_1001 | request has expired |
| Signature verification failed | C_1112 | signature verification failed. |
| Request IP is not in the whitelist | C_1113 | Merchant not on whitelist. |
| Request IP is in the blacklist | C_1119 | IP is in black list. |
Common Response Codes
For the encrypted response envelope, see API Basics. The TN endpoints use the following codes in addition to the common API codes:
| Response Code | Description |
| 00000 | Response successful. |
| 00003 | Downstream service unavailable or system error. |
| 00004 | Invalid request parameters or business scope. |
| A_1001 | Request expired. |
| C_1112 | Signature verification failed. |
| C_1113 | Request IP is not within the whitelist. |
| C_1115 | The requested merchant is not in the calling merchant organization. |
| C_1119 | Request IP is in the blacklist. |
