TarsPay_EN
  1. CallBack
TarsPay_EN
Pakistan🇵🇰
  • 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 JSONifying the request parameters (parameters are ordered), the obtained signature is placed in the header. The signature can be directly obtained from the response header, and the verification method uses the verifyEcdsaSignature() method in the utility class.

Tips#

The interface is implemented by the merchant themselves. After receiving our callback, regardless of the business status, as soon as you receive our notification, please return the string OK and no need to return JSON formatted data. The merchant is responsible for ensuring the idempotence of the business, and the notification is processed only once regardless of the number of times it is received.

Request

Header Params
X-RESP-SIGNATURE
string 
optional
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-Collection 2-Payment
currency
string 
Currency
required
PKR
failReasonn
string 
Failure reason
optional
Payment has this field Collection does not have this field
fee
string 
Handling fee
required
mchNo
string 
Merchant number
required
mchOrderNo
string 
Merchant order number
required
orderAmount
string 
Order amount
required
payAmount
string 
Actual payment amount
required
payOrderId
string 
Payment platform order number
required
state
number 
Status
required
2-Success 3-Failure 5-Refund 8-Rejection (only payment includes this status, equivalent to failure) 9-Partial success (only collection includes this status)
Example
{
    "bizType": 2,
    "currency": "PKR",
    "failReason": "payment failed",
    "fee": "2",
    "mchNo": "M1688443982",
    "mchOrderNo": "YN7220230300929",
    "orderAmount": "100",
    "payAmount": "100",
    "payOrderId": "P1681112064487976961",
    "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": "PKR",
    "failReason": "payment failed",
    "fee": "2",
    "mchNo": "M1688443982",
    "mchOrderNo": "YN7220230300929",
    "orderAmount": "100",
    "payAmount": "100",
    "payOrderId": "P1681112064487976961",
    "state": 3
}'

Responses

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