Adds the customer's name automatically. It's optional and can be edited.
email
Populates the customer's e-mail for them. Optional and can be modified.
phone
Inserts the customer's phone number. Optional and adjustable by the customer.
timeout (optional)
Sets the payment timeout in seconds
Example : 8 minutes = 480 seconds
If not completed within this time, the payment will expire and redirect to the return URL. Minimum is 60 seconds; any amount below this defaults to 60 seconds. No timeout if omitted.
Initiate a new payment with senangPay
post
/payment/{merchantID}
This endpoint creates a payment request to senangPay with the required details.
*The "Test it" option is available when using Firefox or Safari to test the API.
Handling 'Return' and 'Callback' from senangPay
1. The parameters will be send using the GET method.
2. The parameters are sent to URL as configured in the return URL. Refer above.
The table below lists the details of the elements:
Item
Detail
status_id
This is to indicate the status of the payment. It only has three values: 2 for pending authorisation, 1 for successful and 0 for failed.
order_id
This is the order that is sent to senangPay. This is to identify the shopping cart transaction.
msg
This 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 a space when displaying the message to your customers. Example: Payment_was_successful.
transaction_id
This is the transaction ID used by senangPay. You can use this ID to track the transaction in senangPay. The maximum length is 100 characters.
Example: 14363538840
hash
This is the data to ensure that data integrity has passed from senangPay to the merchant’s shopping cart. Refer to this section for more info.
3. Callback: The parameter will be sent via POST method.