TarsPay_EN
  1. CallBack
TarsPay_EN
Indonesia🇮🇩
  • Indonesia🇮🇩
  • India🇮🇳
  • Thailand🇹🇭
  • Philippines🇵🇭
  • Malaysia🇲🇾
  • Vietnam🇻🇳
  • Egypt🇪🇬
  • Bangladesh🇧🇩
  • Kenya🇰🇪
  • Pakistan🇵🇰
  • Brazil🇧🇷
  • Mexico🇲🇽
  • Ban_TEST
  • Access Guide
  • Core Business Process Description
  • Attachment Code Table
  • deposit
    • Create a deposit order
      POST
    • Query deposit order status
      POST
  • withdraw
    • Create withdraw order
      POST
    • Query withdraw order
      POST
  • account
    • Query balance
      POST
  • CallBack
    • Callback notification interface (customized by the merchant)
      POST
  1. CallBack

Callback notification interface (customized by the merchant)

POST
notifyUrl
Signature rules: After converting the request parameters to JSON (parameters are ordered), the obtained signature is placed in the header, and the signature is obtained directly from the response header. The signature verification method uses verifyEcdsaSignature() in the tool class.
This interface is implemented by the merchant. After receiving our callback, it has nothing to do with the business status. Once you receive our notification, please return the string OK. There is no need to return JSON format data. The merchant guarantees the idempotence of the business. Multiple notifications are only processed once.

Request

Header Params
X-RESP-SIGNATURE
string 
required
Payment platform signature, the merchant uses the system public key to verify that the signature is issued by us
Example:
3046022100ae8634a9db66c069030483012e7d0e38ebca6d924b82d8bb2e240764dafeb4f3022100ba3e3bd90346652e681b4b1b25e55d983002d84160fb9c696fb20ea3e4742e76
Body Params application/json
bizType
number 
Business type
required
1-deposit 2-withdraw
currency
string 
Currency
required
IDR
failReason
string 
Reason for failure
optional
The payment field is present in the withdraw replacement, but the field is not present in the deposit.
fee
string 
handling fee
required
mchNo
string 
Merchant ID
required
mchOrderNo
string 
Merchant order number
required
orderAmount
string 
Order amount
required
payAmount
string 
Amount actually paid
required
payOrderId
string 
Payment platform order number
required
state
number 
Status
required
2-Success 3-Failure 5-Refund 8-Rejection (only for withdraw on behalf, equivalent to failure) 9-Partial Success (only for deposit on behalf)
Example
{
    "bizType": 2,
    "currency": "IDR",
    "failReason": "payment failed",
    "fee": "6973",
    "mchNo": "M1696154848",
    "mchOrderNo": "1184196902791413760",
    "orderAmount": "31500",
    "payAmount": "31500",
    "payOrderId": "P1734517376779485186",
    "state": 3
}

Request 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 --request POST 'notifyUrl' \
--header 'X-RESP-SIGNATURE: 3046022100ae8634a9db66c069030483012e7d0e38ebca6d924b82d8bb2e240764dafeb4f3022100ba3e3bd90346652e681b4b1b25e55d983002d84160fb9c696fb20ea3e4742e76' \
--header 'Content-Type: application/json' \
--data-raw '{
    "bizType": 2,
    "currency": "IDR",
    "failReason": "payment failed",
    "fee": "6973",
    "mchNo": "M1696154848",
    "mchOrderNo": "1184196902791413760",
    "orderAmount": "31500",
    "payAmount": "31500",
    "payOrderId": "P1734517376779485186",
    "state": 3
}'

Responses

🟢200成功
application/json
Body
object {0}
Example
OK
Previous
Query balance
Built with