1. 6. Repayment
Starpay Merchant Disbursement API
  • 1. Revision History
  • 2. Signature
    • 2.1 API connection check
    • 2.2 Signing a message
    • 2.3 Use the SHA256WithRSA algorithm to calculate the To-Be-Signed String
    • 2.4 Sample
    • 2.5 Method of Signature
  • 3. Procedure Diagram
  • 4. API List
  • 5. Disbursement
    • 5.1 Fund Disbursement List
      POST
    • 5.2 Fund Disbursement
      POST
    • 5.3 Fund Disbursement (Starpay to Starpay Fund Transfer)
      POST
    • 5.4 Fund Disbursement Query
      POST
    • 5.5 Disbursement State Notification
      POST
    • 5.6 Disbursement Balance Query
      POST
    • 5.7 Scan QR
      POST
    • 5.8 Fund Disbursement (Pay P2M QR)
      POST
    • 5.9 Fund Disbursement (Pay P2P QR)
      POST
  • 6. Repayment
    • 6.1 Repayment
      POST
    • 6.2 Repayment State Query
      POST
    • 6.3 Repayment State Notification
      POST
    • 6.4 Repayment Static Qr Generate
      POST
    • 6.5 Repayment Static Qr Order Notify
      POST
    • 6.6 Repayment Balance Query
      POST
    • 6.7 Edit Repayment Static QR Status
      POST
    • 6.8 Repayment transaction Query through RefNo
      POST
    • 6.9 Repayment Cancel
      POST
  • 7. Error code list
  • 8. 3rd Party Error Code List
  • 9.Instapay Error Code List
  • 10. Appendix
    • 10.1 Test demo
  1. 6. Repayment

6.3 Repayment State Notification

POST
http://localhost:8080/notify
When the payment QR code has been paid and the transaction changes to a final status (such as failure or success), the system will send an order result notification to the URL provided at the time of transaction creation.
Description: When the order in the payment is reversed to success, Starpay will actively call back the final state result. The notification URL is the parameter notifyUrl submitted in the authorization card repayment interface. The callback message is in the form of an array, and each callback contains only one transaction.
Note: Due to the repeated sending of background notifications, the same notification may be sent to the merchant system multiple times, and the merchant system must be able to correctly handle the repeated notifications.
The recommended approach is to first check the state of the corresponding business data to determine whether it has been processed when the notification is received for processing, if it has not been processed, then proceed with the processing, and if it has been processed, return the result directly. Before the state check and processing of the business data, the concurrency control of the data should be used to avoid data confusion caused by function reentry.

Request

Body Params application/json

Example
{
    "request": {
        "code": "200",
        "message": "success",
        "trxDate": "2024-01-26T11:35:05+08:00",
        "trxAmount": 100,
        "displayName": "Test merchant",
        "trxState": "SUCCESS",
        "originalMsgId": "1704679497442",
        "orderNo": "202401081744178350932496384",
        "payAcctBank": "GCash",
        "payAcctName": "Luke Lee",
        "payAcctNo": "639488881964",
        "mchId": "103500000001"
    },
    "signature": "RaIJ6+7UR+0JBco4cDVid+iNalD2RsZ+rFkL1WORf3xt4sFGFIFxQKqOhzPuMKlbjR3mQUmolzjI3zHr0W5hh2bLuOo4WDDp2XWobTrDN7TYQjmt9M7miSlVNOS5EMnN48XAa1RQ/LxHymzKd2LFpdnlxrYHGY//beEz23w+yABdoDlMCyeRG59qPGCDBREqCbNHZubUIupqujRJMMl5WqxM5C+T7p8f5kgnNkLxU+4/RWPj33IwXmN1fyL5PFsHBjU+jEP1UluBoc8zE+RMUJ3j+V+Rbv3uoTqTjmcdit3aWjL2oO9DNrzQblvNigVLVFbR1oXRHHy4zRLM1ztF9g=="
}

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 --request POST 'http://localhost:8080/notify' \
--header 'Content-Type: application/json' \
--data-raw '{
    "request": {
        "code": "200",
        "message": "success",
        "trxDate": "2024-01-26T11:35:05+08:00",
        "trxAmount": 100,
        "displayName": "Test merchant",
        "trxState": "SUCCESS",
        "originalMsgId": "1704679497442",
        "orderNo": "202401081744178350932496384",
        "payAcctBank": "GCash",
        "payAcctName": "Luke Lee",
        "payAcctNo": "639488881964",
        "mchId": "103500000001"
    },
    "signature": "RaIJ6+7UR+0JBco4cDVid+iNalD2RsZ+rFkL1WORf3xt4sFGFIFxQKqOhzPuMKlbjR3mQUmolzjI3zHr0W5hh2bLuOo4WDDp2XWobTrDN7TYQjmt9M7miSlVNOS5EMnN48XAa1RQ/LxHymzKd2LFpdnlxrYHGY//beEz23w+yABdoDlMCyeRG59qPGCDBREqCbNHZubUIupqujRJMMl5WqxM5C+T7p8f5kgnNkLxU+4/RWPj33IwXmN1fyL5PFsHBjU+jEP1UluBoc8zE+RMUJ3j+V+Rbv3uoTqTjmcdit3aWjL2oO9DNrzQblvNigVLVFbR1oXRHHy4zRLM1ztF9g=="
}'

Responses

🟢200Success
application/json
Body

Example
{
    "code": "200",
    "message": "success"
}
Previous
6.2 Repayment State Query
Next
6.4 Repayment Static Qr Generate
Built with