Skip to content

Sync bank terminals

View as Markdown

Creates or updates up to 1,000 of your bank terminals in one call. Send INACTIVE for a terminal you removed, because TapPay does not delete missing ones.

Changes in 2026-09-27

PUT /api/pos/v1/bank-terminals

Authentication

Secret key (Bearer)

Headers

NameTypeRequiredValuesDescription
X-TapPay-Request-Timestampstringyes
X-TapPay-Request-Signaturestringyes

Request body

NameTypeRequiredValuesDescription
terminalsarray<object>yes
terminals[].tidstringyes
terminals[].midstringyes
terminals[].register_nostringyes
terminals[].namestring | nullno
terminals[].addressstring | nullno
terminals[].statusstringyesACTIVE, INACTIVE

Response 200

NameTypeRequiredValuesDescription
run_idstringyes
rowsarray<object>yes
rows[].tidstringyes
rows[].matchstringyesINACTIVE, BOUND, MATCHED, UNMATCHED
matchedintegeryes
errorsarray<object>yes
errors[].indexintegeryes
errors[].tidstring | nullyes
errors[].reasonstringyes

Errors

CodeStatusMessage
POS-002401The POS access token is missing, invalid or expired.
POS-003401The POS API key is invalid or revoked.
POS-004401The request timestamp is outside the allowed time window.
POS-005401The request signature is invalid.
POS-006401This request signature was already used.
AUTH-055403The caller's scope does not allow this operation.
POS-007401A client certificate is required for this request.
POS-091403The terminal push flow is not enabled for this POS client.
POS-090422Too many terminals in one sync request (at most 1,000).
TOKEN=$(curl -sS -X POST "https://sandbox-api.tappay.mn/api/pos/v1/auth/token" -H "Content-Type: application/json" -d '{"grant_type":"client_credentials","client_id":"YOUR_POS_CLIENT_ID","client_secret":"YOUR_POS_CLIENT_SECRET"}' | sed -E 's/.*"access_token":"([^"]+)".*/\1/')
BODY='{"terminals":[{"tid":"TID00001","mid":"MID000123","register_no":"5123456","name":"Sandbox Cafe counter","status":"ACTIVE"}]}'
TS=$(date -u +%Y-%m-%dT%H:%M:%SZ)
SIG=$(printf '%s\n%s\n%s\n%s' 'PUT' '/api/pos/v1/bank-terminals' "$TS" "$BODY" | openssl dgst -sha256 -hmac 'YOUR_POS_SIGNING_SECRET' | sed 's/^.* //')
curl -sS -X PUT "https://sandbox-api.tappay.mn/api/pos/v1/bank-terminals" \
  -H "Authorization: Bearer $TOKEN" \
  -H "X-API-Key: YOUR_POS_API_KEY" \
  -H "X-TapPay-Request-Timestamp: $TS" \
  -H "X-TapPay-Request-Signature: sha256=$SIG" \
  -H "Content-Type: application/json" \
  -d "$BODY"
import { PosClient } from '@tappay-mn/node';

const pos = new PosClient({
  clientId: 'YOUR_POS_CLIENT_ID',
  clientSecret: 'YOUR_POS_CLIENT_SECRET',
  apiKey: 'YOUR_POS_API_KEY',
  signingSecret: 'YOUR_POS_SIGNING_SECRET',
  environment: 'sandbox',
  baseUrl: 'https://sandbox-api.tappay.mn',
});
const bankTerminal = await pos.bankTerminals.sync({
  body: {
    terminals: [
      {
        tid: 'TID00001',
        mid: 'MID000123',
        register_no: '5123456',
        name: 'Sandbox Cafe counter',
        status: 'ACTIVE',
      },
    ],
  },
});
console.log(JSON.stringify(bankTerminal));
<?php
require 'vendor/autoload.php';

use TapPay\Pos\PosClient;

$pos = new PosClient([
    'clientId' => 'YOUR_POS_CLIENT_ID',
    'clientSecret' => 'YOUR_POS_CLIENT_SECRET',
    'apiKey' => 'YOUR_POS_API_KEY',
    'signingSecret' => 'YOUR_POS_SIGNING_SECRET',
    'environment' => 'sandbox',
    'baseUrl' => 'https://sandbox-api.tappay.mn',
]);
$bankTerminal = $pos->bankTerminals->sync([
    'body' => [
        'terminals' => [
            [
                'tid' => 'TID00001',
                'mid' => 'MID000123',
                'register_no' => '5123456',
                'name' => 'Sandbox Cafe counter',
                'status' => 'ACTIVE',
            ],
        ],
    ],
]);
echo json_encode($bankTerminal);
import json
import tappay

pos = tappay.PosClient(
    client_id="YOUR_POS_CLIENT_ID",
    client_secret="YOUR_POS_CLIENT_SECRET",
    api_key="YOUR_POS_API_KEY",
    signing_secret="YOUR_POS_SIGNING_SECRET",
    environment="sandbox",
    base_url="https://sandbox-api.tappay.mn",
)
bank_terminal = pos.bank_terminals.sync({
    "body": {
        "terminals": [
            {
                "tid": "TID00001",
                "mid": "MID000123",
                "register_no": "5123456",
                "name": "Sandbox Cafe counter",
                "status": "ACTIVE",
            },
        ],
    },
})
print(json.dumps(bank_terminal))
{
  "run_id": "0192f8a4-1b2c-7d3e-8f40-5a6b7c8d9f0e",
  "rows": [
    {
      "tid": "TID00001",
      "match": "MATCHED"
    }
  ],
  "matched": 1,
  "errors": []
}

For the full flow, read the POS guide.