1. CallBack
TarsPay_EN
  • General Access Guide
  • Indonesia🇮🇩
    • Access Guide
    • Core Business Process Description
    • Attachment Code Table
    • deposit
      • Create a deposit order
      • Query deposit order status
    • withdraw
      • Create withdraw order
      • Query withdraw order
    • account
      • Query balance
    • CallBack
      • Callback notification interface (customized by the merchant)
  • India🇮🇳
    • Access Guide
    • Core Business Process Description
    • Attachment Code Table
    • deposit
      • Create a deposit order
      • Query deposit order status
      • UTR query
      • Utr replenishment order
    • withdraw
      • Create withdraw order
      • Query withdraw order
    • account
      • Query balance
    • CallBack
      • Callback notification interface (customized by the merchant)
  • Thailand🇹🇭
    • Access Guide
    • Core Business Process Description
    • Attachment Code Table
    • deposit
      • Create a deposit order
      • Query deposit order status
    • withdraw
      • Create withdraw order
      • Query withdraw order
    • account
      • Query balance
    • CallBack
      • Callback notification interface (customized by the merchant)
  • Philippines🇵🇭
    • Access Guide
    • Attachment Code Table
    • Core Business Process Description
    • deposit
      • Create a deposit order
      • Query deposit order status
    • withdraw
      • Create withdraw order
      • Query withdraw order
    • account
      • Query balance
    • CallBack
      • Callback notification interface (customized by the merchant)
  • Malaysia🇲🇾
    • Access Guide
    • Core Business Process Description
    • Attachment Code Table
    • deposit
      • Create a deposit order
      • Query deposit order status
    • withdraw
      • Create withdraw order
      • Query withdraw order
    • account
      • Query balance
    • CallBack
      • Callback notification interface (customized by the merchant)
  • Vietnam🇻🇳
    • Access Guide
    • Core Business Process Description
    • Attachment Code Table
    • deposit
      • Create a deposit order
      • Query deposit order status
    • withdraw
      • Create withdraw order
      • Query withdraw order
    • account
      • Query balance
    • CallBack
      • Callback notification interface (customized by the merchant)
  • Egypt🇪🇬
    • Access Guide
    • Core Business Process Description
    • Attachment Code Table
    • deposit
      • Create a deposit order
      • Query deposit order status
    • withdraw
      • Create withdraw order
      • Query withdraw order
    • account
      • Query balance
    • CallBack
      • Callback notification interface (customized by the merchant)
  • Bangladesh🇧🇩
    • Access Guide
    • Core Business Process Description
    • Attachment Code Table
    • deposit
      • Create a deposit order
      • Query deposit order status
      • Query TrxId
      • Reprocess TrxId
      • Submit trxid (used by merchants who build their own POS systems)
    • withdraw
      • Create withdraw order
      • Query withdraw order
    • account
      • Query balance
    • CallBack
      • Callback notification interface (customized by the merchant)
  • Kenya🇰🇪
    • Access Guide
    • Core Business Process Description
    • Attachment Code Table
    • deposit
      • Create a deposit order
      • Query deposit order status
    • withdraw
      • Create withdraw order
      • Query withdraw order
    • account
      • Query balance
    • CallBack
      • Callback notification interface (customized by the merchant)
  • Pakistan🇵🇰
    • Access Guide
    • Core Business Process Description
    • Attachment Code Table
    • deposit
      • Create a deposit order
      • Query deposit order status
    • withdraw
      • Create withdraw order
      • Query withdraw order
    • account
      • Query balance
    • CallBack
      • Callback notification interface (customized by the merchant)
  • Brazil🇧🇷
    • Access Guide
    • Core Business Process Description
    • Attachment Code Table
    • deposit
      • Create a deposit order
      • Query deposit order status
      • Query TrxId
    • withdraw
      • Create withdraw order
      • Query withdraw order
      • withdraw query payment certificate
    • account
      • Query balance
    • CallBack
      • Callback notification interface (customized by the merchant)
  • Mexico🇲🇽
    • Access Guide
    • Core Business Process Description
    • Attachment Code Table
    • deposit
      • Create a deposit order
      • Query deposit order status
    • withdraw
      • Create withdraw order
      • Query withdraw order
    • account
      • Query balance
    • CallBack
      • Callback notification interface (customized by the merchant)
  • Korea🇰🇷
    • Access Guide
    • Core Business Process Description
    • Attachment Code Table
    • deposit
      • Create a deposit order
      • Query deposit order status
    • withdraw
      • Create withdraw order
      • Query withdraw order
    • account
      • Query balance
    • CallBack
      • Callback notification interface (customized by the merchant)
  • Türkiye🇹🇷
    • Access Guide
    • Core Business Process Description
    • Attachment Code Table
    • deposit
      • Create a deposit order
      • Query deposit order status
    • withdraw
      • Create withdraw order
      • Query withdraw order
    • account
      • Query balance
    • CallBack
      • Callback notification interface (customized by the merchant)
  • Argentina🇦🇷
    • Access Guide
    • Core Business Process Description
    • Attachment Code Table
    • deposit
      • Create a deposit order
      • Query deposit order status
    • withdraw
      • Create withdraw order
      • Query withdraw order
    • account
      • Query balance
    • CallBack
      • Order status callback
        POST
  • Schemas
    • ArgentinaPayInRequest
    • ErrorResponse
    • PayInOrderSuccessResponse
    • PayInOrderData
    • OrderState
    • OrderQueryRequest
    • PayInQuerySuccessResponse
    • PayInQueryData
    • ArgentinaPayOutRequest
    • PayOutOrderSuccessResponse
    • PayOutOrderData
    • PayOutQuerySuccessResponse
    • PayOutQueryData
    • BalanceQueryRequest
    • BalanceQuerySuccessResponse
    • BalanceQueryData
    • OrderNotify
    • NotifyState
  1. CallBack

Order status callback

POST
/merchant/orderNotify

⚠️ [Security Requirement · Mandatory] Query the order before crediting#

A callback only means "the order status may have changed". It must NOT be used on its own as the basis for crediting balances, delivering goods or releasing funds. After receiving a callback, the merchant MUST:
1.
IP allowlist: accept callbacks only from TarsPay's callback egress IPs and reject all other sources. The IP list is not published in this document — please obtain it from your TarsPay account manager.
2.
Verify the signature: verify the X-RESP-SIGNATURE header with the TarsPay public key; discard the callback if verification fails (see below).
3.
Query the order: call "Get deposit order status" /api/payInInfo or "Get withdraw order" /api/payOutInfo, and treat the query result as the source of truth.
4.
Reconcile: mchOrderNo, payOrderId, amount, currency and state in the query result must match your local order. If anything differs, do not credit and raise an alert.
5.
Idempotency: credit only when the query result is a final success state, and credit each order only once.
6.
Acknowledge: always reply with plain text OK once the callback is received. If the query fails (e.g. timeout), retry the query later — never credit based on the callback content alone.

Callback Signature & Verification#

ItemDescription
LocationHTTP header X-RESP-SIGNATURE
Signed contentThe raw UTF-8 bytes of the HTTP request body (JSON string)
AlgorithmCurve secp256k1; ECDSA signature over SHA256(SHA256(body))
FormatDER-encoded, as a hex string (usually 140–144 characters)
Public keyTarsPay public key (available in the merchant portal, field tarspayKey): a 66-character hex secp256k1 compressed public key starting with 02 or 03

Callback example#

Verification steps#

1.
Read the raw request body string. ⚠️ Do not parse it into an object and re-serialize it: any change in field order, whitespace or null fields will break verification.
2.
Compute digest = SHA256(SHA256(raw bytes)).
3.
Verify X-RESP-SIGNATURE (hex-decoded DER r, s) with the TarsPay public key on curve secp256k1.
4.
If verification fails, discard the callback. If it passes, still query the order as required above before crediting.

Sample code#

Java (requires BouncyCastle bcprov; works on JDK 8–21 — the built-in SunEC no longer supports secp256k1 since JDK 15)
Python (pip install cryptography)
Node.js (built-in crypto only)

Callback description#

This path is only used to show the callback message structure. The actual request URL is the notifyUrl passed in when the merchant places the order,
and TarsPay actively sends a POST application/json request to it.
TarsPay only sends notifications for orders in a final state. After verifying the signature and completing idempotent processing, the merchant must return plain text OK (case-insensitive).

Request

Header Params

Body Params application/json

Example
{
    "bizType": 1,
    "payOrderId": "P202608080000000001",
    "mchNo": "M1234567890",
    "mchOrderNo": "AR_IN_202608080001",
    "orderAmount": "1000",
    "payAmount": "1030",
    "currency": "ARS",
    "state": 2,
    "fee": "30"
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location '/merchant/orderNotify' \
--header 'X-RESP-SIGNATURE;' \
--header 'Content-Type: application/json' \
--data '{
    "bizType": 1,
    "payOrderId": "P202608080000000001",
    "mchNo": "M1234567890",
    "mchOrderNo": "AR_IN_202608080001",
    "orderAmount": "1000",
    "payAmount": "1030",
    "currency": "ARS",
    "state": 2,
    "fee": "30"
}'

Responses

🟢200
text/plain
Return OK to indicate the notification was processed successfully.
Bodytext/plain

Example
"OK"
Modified at 2026-11-05 09:24:31
Previous
Query balance
Next
ArgentinaPayInRequest
Built with