Retrieve an embedded session receipt
Used by the TapPay checkout script to show the receipt after the customer has paid. It needs your publishable key and the X-Client-Secret header.
Changes in 2026-09-27This operation is not available in this version.
GET /api/checkout/embedded/sessions/{id}/receipt
Authentication
Publishable key + X-Client-Secret
Headers
| Name | Type | Required | Values | Description |
|---|---|---|---|---|
X-Client-Secret | string | yes |
Path parameters
| Name | Type | Required | Values | Description |
|---|---|---|---|---|
id | string (uuid) | yes |
Response 200
| Name | Type | Required | Values | Description |
|---|---|---|---|---|
success | boolean | yes | true | |
data | object | null | yes | ||
data.receipt | object | yes | ||
data.receipt.id | string (uuid) | yes | ||
data.receipt.status | string | yes | PENDING, REGISTERED, FAILED, RETURNED | |
data.receipt.issuer | string | yes | MERCHANT, NODE | |
data.receipt.receiptType | string | null | yes | B2C, B2B, SALES, null | |
data.receipt.ddtd | string | null | yes | ||
data.receipt.lottery | string | null | yes | ||
data.receipt.qrData | string | null | yes | ||
data.receipt.url | string | null | yes | ||
data.receipt.merchantReceiptNo | string | null | yes | ||
data.receipt.amount | string | null | yes | ||
data.receipt.vat | string | null | yes | ||
data.receipt.cityTax | string | null | yes | ||
data.receipt.issuedAt | string | null | yes | ||
data.receipt.returnedAt | string | null | yes | ||
data.receipt.failureReason | string | null | yes | ||
data.receipt.lines | array | null | yes | ||
data.receipt.attempts | integer | yes | ||
data.receipt.nextAttemptAt | string | null | yes | ||
data.receipt.recipientFallback | boolean | yes | ||
data.receipt.parts | array | null | yes | ||
data.history | array<object> | yes | ||
data.history[].id | string (uuid) | yes | ||
data.history[].status | string | yes | PENDING, REGISTERED, FAILED, RETURNED | |
data.history[].issuer | string | yes | MERCHANT, NODE | |
data.history[].receiptType | string | null | yes | B2C, B2B, SALES, null | |
data.history[].ddtd | string | null | yes | ||
data.history[].lottery | string | null | yes | ||
data.history[].qrData | string | null | yes | ||
data.history[].url | string | null | yes | ||
data.history[].merchantReceiptNo | string | null | yes | ||
data.history[].amount | string | null | yes | ||
data.history[].vat | string | null | yes | ||
data.history[].cityTax | string | null | yes | ||
data.history[].issuedAt | string | null | yes | ||
data.history[].returnedAt | string | null | yes | ||
data.history[].failureReason | string | null | yes | ||
data.history[].lines | array | null | yes | ||
data.history[].attempts | integer | yes | ||
data.history[].nextAttemptAt | string | null | yes | ||
data.history[].recipientFallback | boolean | yes | ||
data.history[].parts | array | null | yes |
Errors
| Code | Status | Message |
|---|---|---|
VAL-014 | 400 | The TapPay-Version header is not a known API version. |
AUTH-001 | 401 | The API key is missing, invalid or revoked. |
AUTH-058 | 403 | The API key does not have the scope this operation requires. |
PAY-034 | 404 | The checkout session was not found, or the client secret does not match. |
BIZ-004 | 403 | The terminal is not active. |
BIZ-005 | 403 | The merchant account is not in a state that allows this request. |
curl -sS "https://api.tappay.mn/api/checkout/embedded/sessions/SESSION_ID/receipt" \
-H "Authorization: Bearer pk_test_YOUR_PUBLISHABLE_KEY" \
-H "X-Client-Secret: CLIENT_SECRET" \
-H "TapPay-Version: 2026-09-27"The SDKs do not cover this API (browser checkout script) — the example calls HTTP directly.
const res = await fetch('https://api.tappay.mn/api/checkout/embedded/sessions/SESSION_ID/receipt', {
method: 'GET',
headers: {
Authorization: 'Bearer pk_test_YOUR_PUBLISHABLE_KEY',
'X-Client-Secret': 'CLIENT_SECRET',
'TapPay-Version': '2026-09-27',
},
});
console.log(await res.text());The SDKs do not cover this API (browser checkout script) — the example calls HTTP directly.
<?php
$ch = curl_init('https://api.tappay.mn/api/checkout/embedded/sessions/SESSION_ID/receipt');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer pk_test_YOUR_PUBLISHABLE_KEY',
'X-Client-Secret: CLIENT_SECRET',
'TapPay-Version: 2026-09-27',
],
]);
echo curl_exec($ch);The SDKs do not cover this API (browser checkout script) — the example calls HTTP directly.
import json, urllib.request, uuid
req = urllib.request.Request(
'https://api.tappay.mn/api/checkout/embedded/sessions/SESSION_ID/receipt',
method='GET',
headers={
'Authorization': 'Bearer pk_test_YOUR_PUBLISHABLE_KEY',
'X-Client-Secret': 'CLIENT_SECRET',
'TapPay-Version': '2026-09-27',
},
)
print(urllib.request.urlopen(req).read().decode()){
"success": true,
"data": {
"receipt": {
"id": "0192f8a4-1b2c-7d3e-8f40-5a6b7c8d9e0a",
"status": "PENDING",
"issuer": "NODE",
"receiptType": null,
"ddtd": null,
"lottery": null,
"qrData": null,
"url": null,
"merchantReceiptNo": null,
"amount": "900",
"vat": null,
"cityTax": null,
"issuedAt": null,
"returnedAt": null,
"failureReason": null,
"lines": null,
"attempts": 0,
"nextAttemptAt": null,
"recipientFallback": false,
"parts": null
},
"history": []
}
}
For the full flow, read the guide.