Setup and Integration
Direct API
This feature is only available for Special Package
What is Direct API (direct payment) ?
The Direct API is an advanced payment integration that allows you to streamline the checkout process by skipping the traditional payment form. With Direct API, customers can initiate payments directly from their preferred payment method without the need to fill out lengthy forms or provide additional information.
Discover the remarkable benefits of our enhanced direct payments:
A. How to apply?
You may email us at [email protected] or call our support team.
B. How to enable this feature?
You can simply upgrade your package to Special Package, on your dashboard setting. Click here to upgrade your package
C. Features supported by payment method
1. FPX
2. Boost
3. Touch ‘n Go
4. GrabPay
5. ShopeePay
D. Features currently unavailable
1) ShopBack PayLater
2) myIOU
3) Visa/Master card
E. Payment API
Please take note that :
- This API is restricted to authorized merchants.
- Please request to whitelist your server outgoing IP Address to [email protected]
- Please take note that for the new features only applicable manual integration
- Process of verification is up to 3 working days
1. Production : https://api.senangpay.my/payment POST
2. Staging : https://api.sandbox.senangpay.my/payment POST (currently not available)
3. Request Authorization Header(Basic Auth):
Item | Detail |
---|---|
username | Merchant Id (from senangPay Dashboard) |
password | {leave blank} |
4. Request parameters (All mandatory):
Item | Detail |
---|---|
payment_method | For FPX online banking => fpx For BOOST ewallet payment => boost For Touch N Go ewallet payment => tng For GrabPay ewallet payment => grabpay For shopeePay ewallet payment => shopeepay |
fpx_bank_code *compulsory if payment_method = ‘fpx’ | Refer to appendix A for fpx_bank_code |
customer_name | Customer’s name |
customer_email | Customer’s email address |
customer_phone | Customer’s phone number |
order_id | Unique ID for this transaction for your reference |
amount | Payment price multiply by 100 e.g: RM 2.50 => 250 *minimum payment is RM 2.00 |
detail | Description of payment e.g: Payment for Order ID 1001 |
hash | Sha256 hash with the below string: {secret key}{customer_name}{customer_email} {customer_phone}{order_id}{amount}{detail} {payment_method} |
5. Response Parameters :
Item | Detail |
---|---|
result | 0 – failed 1 – successful create product |
msg | Error message description |
payment_url | Url to proceed with payment *use this url to access from your client side to proceed with payment* *this url is valid only for 60 seconds* |
F. FPX Bank List API
1. Production : https://api.senangpay.my/fpx_bank_list GET
2. Staging : https://api.sandbox.senangpay.my/fpx_bank_list GET
3. Request Authorization Header(Basic Auth):
Item | Detail |
---|---|
username | Merchant Id (from senangPay Dashboard) |
password | {leave blank} |
4. Request parameters :
Item | Detail |
---|---|
fpx_bank_list | Array with these properties: 1) fpx_bank_code(to be used in payment API) 2) name (Name of the bank) 3) status (active/inactive) *inactive means bank is offline* 4) type (b2b/b2c) 5) logo (logo of the bank) |
Sample output:
"fpx_bank_list": [
{
"fpx_bank_code": "22",
"name": "Affin Bank",
"status": "active",
"logo": "https://app.senangpay.my/public/images/bank/logo_affin.png", "type": "b2c"
},
{
"fpx_bank_code": "27",
"name": "Alliance Bank Malaysia Berhad",
"status": "active",
"logo": "https://app.senangpay.my/public/images/bank/logo_alliance.png", "type": "b2c"
}
]
Appendix A
1. B2C FPX Payment
Bank | fpx_bank_code |
---|---|
CIMB Bank Berhad | 2 |
Bank Islam Malaysia Berhad | 3 |
Hong Leong Bank Berhad | 4 |
HSBC Bank Berhad | 6 |
Malayan Banking Berhad (M2U) | 7 |
Public Bank Berhad | 9 |
RHB Bank Berhad | 10 |
Ambank Berhad | 13 |
United Overseas Bank Berhad | 14 |
Kuwait Finance House | 15 |
Bank Kerjasama Rakyat Malaysia | 21 |
Affin Bank | 22 |
OCBC Bank | 23 |
Standard Chartered Bank | 24 |
Bank Muamalat | 25 |
Bank Simpanan Nasional | 26 |
Alliance Bank Malaysia Berhad | 27 |
Malayan Banking Berhad (M2E) | 29 |
2. B2B FPX Payment
Bank | fpx_bank_code |
---|---|
CIMB Bank Berhad | 34 |
Bank Islam Malaysia Berhad | 36 |
Hong Leong Bank Berhad | 38 |
HSBC Bank Berhad | 40 |
Public Bank Berhad | 44 |
RHB Bank Berhad | 46 |
Kuwait Finance House | 52 |
Bank Kerjasama Rakyat Malaysia | 54 |
OCBC Bank | 58 |
Bank Simpanan Nasional | 64 |
Malayan Banking Berhad (M2E) | 68 |