How does it work?
PREAUTH BY TOKEN API
|Production URL Endpoint (POST)||https://app.senangpay.my/apiv1/preauth_by_token|
|Sandbox URL Endpoint (POST)||https://sandbox.senangpay.my/apiv1/preauth_by_token|
|Username||< your-merchant-id >
As listed in the profile settings page.
|Password||None, leave empty.|
Request Paramaters (all is mandatory)
|token||Token obtained from 3D Token API.|
|amount||Exact amount to capture.
E.g. 200 (for RM 2.00)
**captured amount must be equal or less than preauth amount**
|status||Your transaction status. 1 if success. 0 if failed.|
|order_id||Merchant Reference ID|
|preauth_id||Preauth ID. Use this to capture transaction|
|amount_preauth||Amount transacted from the credit card in integer format.
Eg. if the amount transacted is RM 2.00, it will output 200.
|msg||Transaction status message. If it was successful you will receive ‘Payment was successful’. If the transaction failed, you will receive the error message in this parameter for further checking.|
A string hashed with your secret key (from your profile setting page) in HMAC hashing algorithm with SHA256 in the following format:
< your merchant id >< status_id >< order_id >< preauth_id >< amount_preauth >< msg >