3D authentication provides a more secure way of authenticating the ownership of the card holders. When requesting a payment token, the card holder will need to enter the OTP (one-time password) to prove that they are the owner of the card. This will block any use of unauthorised cards for senangPay's tokenisation.
How does it work?
This is not a RESTful API. The flow of the new Get Token method consists of multiple web views. You can either have an HTML form that will send the required parameters or you can send it as query string parameters (GET). If you are implementing tokenisation on a mobile app, you need to implement it in a web view or iframe. Unfortunately, at the moment, we do not provide any SDKs.
Will senangPay charge card holders for card validation?
senangPay may make two separate transactions of RM1 each on the card to prove that the card is valid and can perform both 3D and 2D transactions. Both transactions will be refunded back to the card upon completion. It may take several days for the bank to reverse the funds back to the card.
Tokenisation Return URL and Callback URL
Before anything else, you need to provide the Tokenisation Return URL and Callback URL. Tokenisation Return URL is the URL where senangPay will redirect the card holders to after the payment (card validation) has been processed. This will the the page where the user will see or land on after card validation.
Tokenisation Callback URL is the URL to your backend, where senangPay will send notifications about the card validation status.
You need to provide the URLs at Your senangPay Dashboard > Settings > Profile > Shopping Cart Integration Link
Fill in the Tokenisation Return URL and Tokenisation Callback URL field.
Merchant unique order ID for each tokenization request.
namestringRequired
Customer's name. Max length 100.
emailstringRequired
Customer's email address.
phonestringRequired
Customer's phone number.
hashstringRequired
Hash generated using HMAC SHA256. Construct the hash as follows hash_hmac(‘SHA256’, {merchant_id}{order_id}, {merchant_secret_key})
Responses
302
Redirects to senangPay's payment page.
get
/tokenization/{merchantID}
302
Redirects to senangPay's payment page.
No content
*The "Test it" option is available when using Firefox or Safari to test the API.
4. Callback
The Callback URL is used as an alternative notification to merchant backend in case there is a breakdown in transaction flow. This is optional, so you can opt not to use this feature. However, this feature is recommended to ensure data integrity between a merchant’s system and senangPay.
The callback process will send the same parameters as what is being sent to the return URL. The callback URL must print out a simple ‘OK’ without any HTML tags. The OK response is needed in order for the callback function to know if it has successfully sent the callback data.
senangPay will fire the callback one minute after the validation is done.