fbpx
← back

Advance Recurring Callback

The advance Recurring Callback enables merchants to receive detailed recurring callback data in the JSON format. The normal callback setup will send a standard HTTP POST data to merchants.

 

A. How to enable the feature

1. Login into your senangPay dashboard

2. Go to Menu > Setting > Profile

3. Scroll down to the Shopping Cart Integration Link section.

4. Under the Recurring Callback URL input field, you will see a checkbox to enable the advance callback setting.

5. Tick the checkbox to allow senangPay to send the recurring callback data in the JSON format. Untick to receive the standard callback data format.

137x22xspace.png.pagespeed.ic.IoAxAisfVW
B. The JSON structure

Once you enable the advance callback feature, all your recurring callbacks will be sent in the JSON format with data as described below:

recurring_idThe ID of your recurring payment.
status_idThis is to indicate the status of the payment. It only has 2 values which are; 1 for successful and 0 for failed.
order_idThis is the order that is sent to senangPay. This is to identify the shopping cart transaction.
transaction_idThis is the transaction ID used by senangPay. You can use this ID to track the transaction in senangPay
msgThis is the message to describe the payment status. The maximum length is 100 characters. Take note that the message may contain underscores. You can replace the underscore as space when displaying the message to your customer. Example: Payment_was_successful.
hashThis is the data to ensure the data integrity has passed from senangPay to the merchant’s shopping cart.
next_payment_dateNext payment date in UNIX timestamp.
payment_detailsJSON array of payment schedule for recurring instalment, and payment history for recurring subscription.

 

C. What if I have set the Return URL parameters set?

1. If you have custom return URL parameters, the JSON will follow the key and value set in your return URL parameters.

2. For example, if you have set the custom parameters as below, the JSON object will become as below:

  • Return URL Parameters:
?order_id=[ORDER_ID]&message=”[MSG]&status=”[TXN_STATUS]&amount=[AMOUNT]&ref_id=[TXN_REF]&signature=[HASH]

137x22xspace.png.pagespeed.ic.IoAxAisfVW

D. Parameters to send and generating the hash

Nothing is changed with the steps mentioned in our recurring API here. Enabling the advance recurring callback feature will only reflect the way senangPay sends the callback to your system.