Direct API

Information about Direct API to set up direct payments.

This feature is only available for Enterprise package users.

What is Direct API?

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.

 

 

A. How to apply?

You may e-mail us at help@senangpay.my or call our support team.

B. How to enable this feature?

Please contact your Account Manager to enable this feature. 

C. Supported payment methods

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 authorised merchants.
  • Please request to whitelist your server outgoing IP address to help@senangpay.my.
  • Please take note that the new features are only applicable with manual integration.
  • Process of verification is up to three (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 Authorisation 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