How does it work?

Merchant will user preauth id obtained from preauth transaction call this API to capture previous preauth transaction.

Creating CAPTURE API

Item Detail
LIVE API Endpoint(POST) https://app.senangpay.my/apiv1/preauth_capture
SANDBOC API Endpoint(POST) https://sandbox.senangpay.my/apiv1/preauth_capture

Authorization header

Item Detail
Username < your-merchant-id >
As listed in the profile settings page.
Password None, leave empty.

Request Paramaters (all is mandatory)

Item Detail
preauth_id Preauth id obtained from previous preauth transaction.
hash 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 >< preauth_id >

*without the <  > character

Response Parameter

Item Detail
status Your transaction status. 1 if success. 0 if failed.
transaction_id Your transaction ID number.
amount_paid 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.
order_id Merchant Reference id of the transaction submitted in previous preauth transaction
hash 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 >< transaction_id >< amount_paid >< msg >
*without the <  > character

Leave a Reply