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 data after 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

ParameterTypeRequiredDefaultDescription
headMerchantIdStringYes-Your OPay Business ID.
merchantIdStringYes-Your OPay Branch ID. The value must belong to the calling merchant organization.
snStringYes-POS serial number.
Request Demo
{
  "headMerchantId": "256622040884147",
  "merchantId": "256622040884148",
  "sn": "POS-SN-001"
}
1
2
3
4
5

Response Parameters

ParameterTypeDescription
headMerchantIdStringYour OPay Business ID.
merchantIdStringYour OPay Branch ID.
snStringPOS serial number.
tnStringOPay dedicated TN bound to the POS. The recommended format is 10 digits beginning with 6.
tnStatusStringTN status. If the provider does not return a status, the value is UNBOUND.
recipientNameStringRecipient name. May be null when the provider does not return this field.
receiptBankStringReceiving bank.
boundTimeStringBinding time in Nigeria time, format MMM dd,yyyy HH:mm:ss.
updatedTimeStringUpdate time in Nigeria time, format MMM dd,yyyy HH:mm:ss.
Response After Decryption
{
  "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"
}
1
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, pageNum and pageSize are required.
  • startTime and endTime use Nigeria date format yyyyMMdd, for example 20260902.
  • The date range is inclusive and must not exceed 7 calendar days. To query all transactions on September 2, 2026, pass both startTime and endTime as 20260902.
  • tn is an OPay dedicated TN. The recommended format is 10 digits beginning with 6, for example 6123456789.
  • status currently supports only SUCCESS; the gateway always queries successful transactions.
  • merchantId is queried exactly as provided. The endpoint does not query all authorized merchants under the group, which prevents cross-merchant data exposure.
  • If tn or sn is non-empty but does not match any transaction, the endpoint returns a successful response with an empty records list and total equal to 0.

Request Parameters

ParameterTypeRequiredDefaultDescription
headMerchantIdStringYes-Your OPay Business ID.
merchantIdStringYes-Your OPay Branch ID.
tnStringYes-OPay dedicated TN used to filter transactions. The recommended format is 10 digits beginning with 6.
snStringYes-POS serial number used to filter transactions.
startTimeStringYes-Start date in Nigeria time, format yyyyMMdd.
endTimeStringYes-End date in Nigeria time, format yyyyMMdd.
statusStringNoSUCCESSTransaction status. Only SUCCESS is supported.
payNoStringNo-OPay payment order number used as an additional filter.
pageNumIntegerYes1Page number, starting from 1.
pageSizeIntegerYes50Page size, from 1 to 100.
Request Demo
{
  "headMerchantId": "256622040884147",
  "merchantId": "256622040884148",
  "tn": "6123456789",
  "sn": "POS-SN-001",
  "startTime": "20260902",
  "endTime": "20260902",
  "status": "SUCCESS",
  "pageNum": 1,
  "pageSize": 50
}
1
2
3
4
5
6
7
8
9
10
11

Response Parameters

ParameterTypeDescription
recordsArrayTransaction records.
records[].payNoStringOPay payment order number.
records[].orderNoStringOriginal order number.
records[].outOrderNoStringMerchant order number.
records[].headMerchantIdStringYour OPay Business ID.
records[].merchantIdStringYour OPay Branch ID.
records[].snStringPOS serial number.
records[].tnStringOPay dedicated TN, recommended as 10 digits beginning with 6.
records[].statusStringTransaction status. The current query returns SUCCESS transactions.
records[].amountStringTransaction amount in Naira.
Show more parameters
Response After Decryption
{
  "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
}
1
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

ScenarioResponse CodeMessage
Missing merchantId in a TN request00004Invalid request parameter
merchantId is present but not in the calling merchant organizationC_1115not within same relationship
Missing required business parameter00004The corresponding parameter is required
Invalid date format or date range exceeds 7 calendar days00004time range must be valid and no more than 7 days
TN/SN is non-empty but has no matching transaction00000SUCCESS with an empty records list
POS, KYB or BigOrder service is unavailable00003Service not available, please try again.
Request timestamp is expiredA_1001request has expired
Signature verification failedC_1112signature verification failed.
Request IP is not in the whitelistC_1113Merchant not on whitelist.
Request IP is in the blacklistC_1119IP 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 CodeDescription
00000Response successful.
00003Downstream service unavailable or system error.
00004Invalid request parameters or business scope.
A_1001Request expired.
C_1112Signature verification failed.
C_1113Request IP is not within the whitelist.
C_1115The requested merchant is not in the calling merchant organization.
C_1119Request IP is in the blacklist.
Last Updated: 9/10/2026, 3:22:04 AM