Callback / Enquiry Response
Below is data response structure from Recurring Callback or Enquiry.
System will response the Callback / Enquiry to Merchant's via server-to-server approach, by using HTTP Post Method.
*Callback URL will need to kept in Payment System, system will using this URL to send the callback notification to merchant's server when the transaction status being completed.
Response
| Field Name | Data Type (Len) | M/O/C | Description |
|---|---|---|---|
| RecurringStatus | Integer | M | Recurring Status. (Refer to Appedix 4 - Recurring Status) |
| RecurringMessage | String (500) | C | Recurring Message. Response with recurring terminated details. |
| MerchantID | String (50) | M | Unique merchant's identification assigned to each merchant by Share Commerce. |
| MerchantOrderNo | String (50) | M | Unique identifier or order number generated by merchant, use it to track Recurring and subsequent cycle payment details. |
| RecurringAmount | Decimal (18,2) | M | Recurring amount. |
| NextPaymentDate | String | C | Recurring next occurrence date. Available if recurring still on-going. *Format in yyyy-MM-dd |
| MaskedPAN | String (20) | M | Masked Card Number if payment via Credit/Debit Card. |
| PaymentTransactionList | Array Object | Contains executed cycle payment details. | |
| PaymentTransactionList.RecurringDate | String (15) | M | Recurring cycle date. *Format in yyyy-MM-dd |
| PaymentTransactionList.TxnStatus | Integer | M | Transaction status referring on current cycle payment. (Refer to Appendix 5 - Transaction Status) |
| PaymentTransactionList.TxnRefNo | String (50) | C | Unique identifier generated by payment system, to identify the transaction status. |
| PaymentTransactionList.Cycle | Integer | M | Indicator of current cycle payment. |
| HTTP Header | Data Type (Len) | M/O | Description |
|---|---|---|---|
| SCSign | M | Message sign (Refer to below SCSign Calculation section) |
*Note, field SCSign will be exists in HTTP Header.
Response Sample
{
"RecurringStatus": 1,
"RecurringMessage": "Success",
"MerchantID": "MID0001",
"MerchantOrderNo": "RecurringPayment_001",
"RecurringAmount": 15.00,
"NextPaymentDate": "2023-04-26",
"MaskedPAN": "545301XXXXXX1234",
"PaymentTransactionList": [{
"RecurringDate": "2023-02-26",
"TxnStatus": 1,
"TxnRefNo": "ABCD1111",
"Cycle": 1
},{
"RecurringDate": "2023-03-26",
"TxnStatus": 1,
"TxnRefNo": "ABCD2222",
"Cycle": 2
}]
}
SCSign Calculation
SCSign signature calculation, will sign with whole json string, and calculate with HMACSHA256 algorithm.
Secret Key : mSuE3Ttn5B8vJhe5ncMutMLV
Response Sign String (Example)
{"RecurringStatus":1,"RecurringMessage":"Success","MerchantID":"MID0001","MerchantOrderNo":"RecurringPayment_001","RecurringAmount":15,"NextPaymentDate":"2023-04-26","MaskedPAN":"545301XXXXXX1234","PaymentTransactionList":[{"RecurringDate":"2023-02-26","TxnStatus":1,"TxnRefNo":"ABCD1111","Cycle":1},{"RecurringDate":"2023-03-26","TxnStatus":1,"TxnRefNo":"ABCD2222","Cycle":2}]}
SCSign (Calculated Value)
8828efaa7921e2f08c624f05d07470b8c6b5be641add9774b85f5b21452e9e31