fbpx
← back

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:
 Forget about the tedious form-filling dance. With this feature, your customer can zoom past the payment form and dive straight into completing purchases. No more wasted time.
 
 They initiate FPX bank transfers smoothly and swiftly and embrace a straightforward payment process that aligns with their preferred bank account.
 
 They can simply use their preferred digital wallet (as listed below) and enjoy a swift and frictionless checkout experience.
 
 
 

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):

ItemDetail
usernameMerchant Id (from senangPay Dashboard)
password{leave blank}

4. Request parameters (All mandatory):

ItemDetail
payment_methodFor 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_nameCustomer’s name
customer_emailCustomer’s email address
customer_phoneCustomer’s phone number
order_idUnique ID for this transaction for your reference
amountPayment 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

hashSha256 hash with the below string:
{secret key}{customer_name}{customer_email}
{customer_phone}{order_id}{amount}{detail} {payment_method}

5. Response Parameters :

ItemDetail
result0 – failed
1 – successful create product
msgError 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):

ItemDetail
usernameMerchant Id (from senangPay Dashboard)
password{leave blank}

4. Request parameters :

ItemDetail
fpx_bank_listArray 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
Bankfpx_bank_code
CIMB Bank Berhad34
Bank Islam Malaysia Berhad36
Hong Leong Bank Berhad38
HSBC Bank Berhad40
Public Bank Berhad44
RHB Bank Berhad46
Kuwait Finance House52
Bank Kerjasama Rakyat Malaysia54
OCBC Bank58
Bank Simpanan Nasional64
Malayan Banking Berhad (M2E)68