Retrieve an invoice
Returns one invoice with its status and the amounts paid and reserved. Use expand to include related objects.
Changes in 2026-09-27This operation is not available in this version.
GET /api/v1/invoices/{id}Since 2026-09-27
Authentication
Secret key (Bearer)
Headers
| Name | Type | Required | Values | Description |
|---|---|---|---|---|
TapPay-Version | string | no | ||
TapPay-Timestamp | string | no | ||
TapPay-Nonce | string | no | ||
TapPay-Signature | string | no |
Path parameters
| Name | Type | Required | Values | Description |
|---|---|---|---|---|
id | string (uuid) | yes |
Query parameters
| Name | Type | Required | Values | Description |
|---|---|---|---|---|
terminalId | string (uuid) | no | ||
expand | array<string> | no |
Response 200
| Name | Type | Required | Values | Description |
|---|---|---|---|---|
success | boolean | yes | true | |
data | object | yes | ||
data.id | string | yes | ||
data.orderId | string | yes | ||
data.status | string | yes | OPEN, PARTIALLY_PAID, PAID, EXPIRED, CANCELLED | |
data.amount | number | yes | ||
data.amountPaid | number | yes | ||
data.amountReserved | number | yes | ||
data.partialMode | string | yes | NONE, AMOUNT, LINES | |
data.merchantServiceId | string | null | yes | ||
data.currency | string | yes | ||
data.description | string | null | yes | ||
data.allowedChannels | array | null | yes | ||
data.expiresAt | string | yes | ||
data.paidAt | string | null | yes | ||
data.createdAt | string | yes | ||
data.terminalId | string | yes | ||
data.customer | string | object | null | yes | ||
data.customer.id | string | yes | ||
data.customer.customerId | string | yes | ||
data.customer.name | string | null | yes | ||
data.customer.email | string | null | yes | ||
data.customer.phone | string | null | yes | ||
data.customer.source | string | yes | MERCHANT, PAYER_LINK, WALLET_MANDATE, SERVICE | |
data.customer.createdAt | string | yes | ||
data.intentIds | array<string> | yes | ||
data.lines | array<object> | yes | ||
data.lines[].seq | integer | yes | ||
data.lines[].name | string | yes | ||
data.lines[].quantity | string | yes | ||
data.lines[].unitPrice | string | yes | ||
data.lines[].totalAmount | string | yes | ||
data.lines[].quantityPaid | string | yes | ||
data.lines[].quantityReserved | string | yes | ||
data.intents | array<object> | yes | ||
data.intents[].id | string | yes | ||
data.intents[].amount | number | yes | ||
data.intents[].status | string | yes | OPEN, PROCESSING, SUCCEEDED, EXPIRED, CANCELLED | |
data.intents[].expiresAt | string | yes | ||
data.intents[].serviceFee | number | null | yes | ||
data.intents[].total | number | yes | ||
data.fulfillment | object | null | yes | ||
data.fulfillment.status | string | yes | PENDING, IN_PROGRESS, COMPLETED, FAILED, CANCELLED | |
data.fulfillment.stage | string | null | yes | ||
data.fulfillment.message | string | null | yes | ||
data.fulfillment.updatedAt | string (date-time) | yes | ||
data.ebarimtIssuer | string | null | yes | MERCHANT, NONE, NODE, null | |
data.intent | object | null | no | ||
data.intent.id | string | yes | ||
data.intent.invoiceId | string | null | yes | ||
data.intent.status | string | yes | OPEN, PROCESSING, SUCCEEDED, EXPIRED, CANCELLED | |
data.intent.amount | number | yes | ||
data.intent.serviceFee | number | null | yes | ||
data.intent.total | number | yes | ||
data.intent.currency | string | yes | ||
data.intent.expiresAt | string | yes | ||
data.intent.deeplink | string | yes | ||
data.intent.shortDeeplink | string | yes | ||
data.intent.walletLinks | array<object> | no | ||
data.intent.walletLinks[].appName | string | yes | ||
data.intent.walletLinks[].logoUrl | string | null | yes | ||
data.intent.walletLinks[].link | string | yes | ||
data.intent.succeededPaymentId | string | null | yes | ||
data.intent.channels | array<string> | yes | ||
data.intent.presentations | array<object> | yes | ||
data.intent.presentations[].channel | string | yes | QPAY, NODE_QR, WECHAT, CARD, R2P | |
data.intent.presentations[].qrText | string | null | yes | ||
data.intent.presentations[].urls | unknown | no | ||
data.intent.presentations[].expiresAt | string | yes | ||
data.intent.presentations[].status | string | yes | ACTIVE, CLOSED | |
data.intent.createdAt | string | yes | ||
data.intent.authorizationType | string | yes | FINAL, PREAUTH | |
data.intent.preauthFinalizeDays | integer | null | yes | ||
data.intent.qrRef | string | null | yes | ||
data.intent.qrCode | string | null | yes | ||
data.intent.qrStatus | string | null | yes | ACTIVE, USED, CLOSED, null | |
data.intent.paymentPointId | string | null | yes | ||
data.payments | array<object> | no | ||
data.payments[].id | string | yes | ||
data.payments[].intentId | string | yes | ||
data.payments[].invoiceId | string | null | yes | ||
data.payments[].status | string | yes | PROCESSING, SUCCEEDED, FAILED, OVERPAID, AUTHORIZED, CANCELLED | |
data.payments[].amount | number | yes | ||
data.payments[].currency | string | yes | ||
data.payments[].channel | string | yes | QPAY, NODE_QR, WECHAT, CARD, R2P | |
data.payments[].payerWallet | object | null | yes | ||
data.payments[].payerWallet.code | string | yes | ||
data.payments[].payerWallet.name | string | yes | ||
data.payments[].payerWallet.logoUrl | string | null | yes | ||
data.payments[].payerWallet.type | string | yes | APP, WEB, WECHAT | |
data.payments[].sticker | object | null | yes | ||
data.payments[].sticker.serialNo | string | null | yes | ||
data.payments[].sticker.sqrRef | string | yes | ||
data.payments[].sticker.name | string | null | yes | ||
data.payments[].feeAmount | number | null | yes | ||
data.payments[].merchantNet | number | null | yes | ||
data.payments[].serviceFeeMerchant | number | yes | ||
data.payments[].serviceFeeCustomer | number | yes | ||
data.payments[].succeededAt | string | null | yes | ||
data.payments[].createdAt | string | yes | ||
data.payments[].fulfillment | object | null | yes | ||
data.payments[].fulfillment.status | string | yes | PENDING, IN_PROGRESS, COMPLETED, FAILED, CANCELLED | |
data.payments[].fulfillment.stage | string | null | yes | ||
data.payments[].fulfillment.message | string | null | yes | ||
data.payments[].fulfillment.updatedAt | string (date-time) | yes | ||
data.payments[].receipt | object | null | yes | ||
data.payments[].receipt.receipt | object | yes | ||
data.payments[].receipt.receipt.id | string (uuid) | yes | ||
data.payments[].receipt.receipt.status | string | yes | PENDING, REGISTERED, FAILED, RETURNED | |
data.payments[].receipt.receipt.issuer | string | yes | MERCHANT, NODE | |
data.payments[].receipt.receipt.receiptType | string | null | yes | B2C, B2B, SALES, null | |
data.payments[].receipt.receipt.ddtd | string | null | yes | ||
data.payments[].receipt.receipt.lottery | string | null | yes | ||
data.payments[].receipt.receipt.qrData | string | null | yes | ||
data.payments[].receipt.receipt.url | string | null | yes | ||
data.payments[].receipt.receipt.merchantReceiptNo | string | null | yes | ||
data.payments[].receipt.receipt.amount | string | null | yes | ||
data.payments[].receipt.receipt.vat | string | null | yes | ||
data.payments[].receipt.receipt.cityTax | string | null | yes | ||
data.payments[].receipt.receipt.issuedAt | string | null | yes | ||
data.payments[].receipt.receipt.returnedAt | string | null | yes | ||
data.payments[].receipt.receipt.failureReason | string | null | yes | ||
data.payments[].receipt.receipt.lines | array | null | yes | ||
data.payments[].receipt.receipt.attempts | integer | yes | ||
data.payments[].receipt.receipt.nextAttemptAt | string | null | yes | ||
data.payments[].receipt.receipt.recipientFallback | boolean | yes | ||
data.payments[].receipt.receipt.parts | array | null | yes | ||
data.payments[].receipt.history | array<object> | yes | ||
data.payments[].receipt.history[].id | string (uuid) | yes | ||
data.payments[].receipt.history[].status | string | yes | PENDING, REGISTERED, FAILED, RETURNED | |
data.payments[].receipt.history[].issuer | string | yes | MERCHANT, NODE | |
data.payments[].receipt.history[].receiptType | string | null | yes | B2C, B2B, SALES, null | |
data.payments[].receipt.history[].ddtd | string | null | yes | ||
data.payments[].receipt.history[].lottery | string | null | yes | ||
data.payments[].receipt.history[].qrData | string | null | yes | ||
data.payments[].receipt.history[].url | string | null | yes | ||
data.payments[].receipt.history[].merchantReceiptNo | string | null | yes | ||
data.payments[].receipt.history[].amount | string | null | yes | ||
data.payments[].receipt.history[].vat | string | null | yes | ||
data.payments[].receipt.history[].cityTax | string | null | yes | ||
data.payments[].receipt.history[].issuedAt | string | null | yes | ||
data.payments[].receipt.history[].returnedAt | string | null | yes | ||
data.payments[].receipt.history[].failureReason | string | null | yes | ||
data.payments[].receipt.history[].lines | array | null | yes | ||
data.payments[].receipt.history[].attempts | integer | yes | ||
data.payments[].receipt.history[].nextAttemptAt | string | null | yes | ||
data.payments[].receipt.history[].recipientFallback | boolean | yes | ||
data.payments[].receipt.history[].parts | array | null | yes | ||
data.payments[].ebarimt | object | null | yes | ||
data.payments[].ebarimt.id | string (uuid) | yes | ||
data.payments[].ebarimt.status | string | yes | PENDING, REGISTERED, FAILED, RETURNED | |
data.payments[].ebarimt.issuer | string | yes | MERCHANT, NODE | |
data.payments[].ebarimt.receiptType | string | null | yes | B2C, B2B, SALES, null | |
data.payments[].ebarimt.ddtd | string | null | yes | ||
data.payments[].ebarimt.lottery | string | null | yes | ||
data.payments[].ebarimt.qrData | string | null | yes | ||
data.payments[].ebarimt.url | string | null | yes | ||
data.payments[].ebarimt.merchantReceiptNo | string | null | yes | ||
data.payments[].ebarimt.amount | string | null | yes | ||
data.payments[].ebarimt.vat | string | null | yes | ||
data.payments[].ebarimt.cityTax | string | null | yes | ||
data.payments[].ebarimt.issuedAt | string | null | yes | ||
data.payments[].ebarimt.returnedAt | string | null | yes | ||
data.payments[].ebarimt.failureReason | string | null | yes | ||
data.payments[].ebarimt.lines | array | null | yes | ||
data.payments[].ebarimt.attempts | integer | yes | ||
data.payments[].ebarimt.nextAttemptAt | string | null | yes | ||
data.payments[].ebarimt.recipientFallback | boolean | yes | ||
data.payments[].ebarimt.parts | array | null | yes | ||
data.payments[].authorizationType | string | yes | FINAL, PREAUTH | |
data.payments[].preauthMode | string | null | yes | CHARGE_REFUND, HOLD, null | |
data.payments[].preauthStatus | string | null | yes | OPEN, FINALIZED, AUTO_FINALIZED, null | |
data.payments[].finalAmount | string | null | yes | ||
data.payments[].finalizeDueAt | string | null | yes | ||
data.payments[].authorizedAt | string | null | yes | ||
data.payments[].preauthRefundId | string | null | yes | ||
data.payments[].paymentMethodId | string | no | ||
data.payments[].customer | string | no | ||
data.payments[].failureCode | string | null | no | ||
data.payments[].declineRetryable | boolean | no | ||
data.payments[].ebarimtRecipient | object | null | yes | ||
data.payments[].ebarimtRecipient.type | string | yes | CITIZEN, ORG, NONE | |
data.payments[].ebarimtRecipient.register | string | null | yes | ||
data.payments[].ebarimtRecipient.tin | string | null | yes | ||
data.payments[].ebarimtRecipient.email | string | null | yes | ||
data.payments[].settlement | object | null | yes | ||
data.payments[].settlement.cycleId | string (uuid) | yes | ||
data.payments[].settlement.businessDate | string | yes | ||
data.payments[].settlement.seq | integer | yes | ||
data.payments[].settlement.status | string | yes | OPEN, RUNNING, CLOSED, CARRIED | |
data.payments[].settlement.credited | boolean | yes | ||
data.payments[].promotions | array<object> | no | ||
data.payments[].promotions[].promotionId | string (uuid) | yes | ||
data.payments[].promotions[].kind | string | yes | ||
data.payments[].promotions[].amount | number | yes |
Errors
| Code | Status | Message |
|---|---|---|
AUTH-001 | 401 | The API key is missing, invalid or revoked. |
EVT-206 | 401 | Production keys are not accepted in the sandbox. Use a sandbox key (sk_test_/pk_test_). |
EVT-207 | 401 | Sandbox keys are not accepted in production. Use a production key (sk_live_/pk_live_). |
AUTH-018 | 403 | The request came from an IP address that is not on the key's allowlist. |
AUTH-058 | 403 | The API key does not have the scope this operation requires. |
SIG-002 | 401 | The request timestamp is outside the allowed time window. |
SIG-003 | 401 | The request signature is missing or does not match. |
SIG-005 | 409 | This request nonce was already used. |
VAL-014 | 400 | The TapPay-Version header is not a known API version. |
BIZ-004 | 403 | The terminal is not active. |
BIZ-005 | 403 | The merchant account is not in a state that allows this request. |
PAY-001 | 404 | The invoice was not found. |
curl -sS "https://api.tappay.mn/api/v1/invoices/INVOICE_ID" \
-H "Authorization: Bearer sk_test_YOUR_SECRET_KEY" \
-H "TapPay-Version: 2026-09-27"import { TapPay } from '@tappay-mn/node';
const tappay = new TapPay({ apiKey: 'sk_test_YOUR_SECRET_KEY' });
const invoice = await tappay.invoices.retrieve({ id: 'INVOICE_ID' });
console.log(JSON.stringify(invoice));<?php
require 'vendor/autoload.php';
use TapPay\TapPay;
$tappay = new TapPay(['apiKey' => 'sk_test_YOUR_SECRET_KEY']);
$invoice = $tappay->invoices->retrieve(['id' => 'INVOICE_ID']);
echo json_encode($invoice);import json
import tappay
client = tappay.TapPay("sk_test_YOUR_SECRET_KEY")
invoice = client.invoices.retrieve({"id": "INVOICE_ID"})
print(json.dumps(invoice)){
"success": true,
"data": {
"id": "0192f8a4-1b2c-7d3e-8f40-5a6b7c8d9e01",
"orderId": "order-1048",
"status": "OPEN",
"amount": 1000,
"amountPaid": 0,
"amountReserved": 1000,
"partialMode": "NONE",
"merchantServiceId": null,
"currency": "MNT",
"description": "Order 1",
"allowedChannels": null,
"expiresAt": "2026-10-03T08:45:00.000Z",
"paidAt": null,
"createdAt": "2026-10-03T08:15:00.000Z",
"terminalId": "0192f8a4-1b2c-7d3e-8f40-5a6b7c8d9e05",
"customer": null,
"intentIds": [
"0192f8a4-1b2c-7d3e-8f40-5a6b7c8d9e03"
],
"lines": [],
"intents": [
{
"id": "0192f8a4-1b2c-7d3e-8f40-5a6b7c8d9e03",
"amount": 1000,
"serviceFee": null,
"total": 1000,
"status": "OPEN",
"expiresAt": "2026-10-03T08:45:00.000Z"
}
],
"fulfillment": null,
"ebarimtIssuer": "MERCHANT"
}
}
For the full flow, read the guide.