Tarspay_IDR
  1. CallBack
Tarspay_IDR
  • Interface Description
  • Core business process description
  • Error coding table
  • Collection
    • Create Collection order
      POST
    • Collection order inquiry
      POST
  • Payment
    • Create Payment Order
      POST
    • Payment order inquiry
      POST
  • MERCHANT BALANCE INFOMATION
    • MERCHANT BALANCE INFOMATION QUERY
      POST
  • CallBack
    • Callback notification( Customized by merchant)
      POST
  1. CallBack

Callback notification( Customized by merchant)

POST
notifyUrl

Submission method: POST#

When receiving point-to-point communication from the server, the interface returns "OK" (without double quotes, OK is in capital letters), otherwise point-to-point notifications will be sent repeatedly (default 16 times).
OK

Content-Type#

application/json

Verify signature#

Use the TarsPay public key to verify the signature of [return data](#return description).

Request parameters#

NameTypeRequiredDescription
bizTypenumberYBusiness type: 1-Collection 2-Payment
payOrderIdstringYpayment order number
mchNostringYmerchant number
mchOrderNostringYMerchant order number (customized by merchant, cannot be repeated)
orderAmountstringYoriginal transaction amount of bill
payAmountstringYpayment amount
currencystringYthree-digit currency code
statenumberYpayment status: 2-payment successful, 3-payment failed, 9-partial payment (collection)
feestringYmerchant fee
failReasonstringNFailure reason
Callback signature verification description: X-RESP-SIGNATURE request header carries signature
Signature rules: After JSONizing the request parameters, put the obtained signature in the header, and obtain the signature directly from the response header. To verify the signature, use verifyEcdsaSignature() in the ECSDAKit tool class below.
Example:
OrderNotifyDTO.class

Request

Header Params

Body Params application/json

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

Example
OK
Modified at 2024-01-15 08:32:54
Previous
MERCHANT BALANCE INFOMATION QUERY
Built with