API Quick Start

Simple guides on how to use API to create payments and subscriptions.

Make a one time payment

Also known as Intant Pay. This type of payment can be made via get request to /commit endpoint with parameters as shown below

https://app.paylah.com/api/v1/commit?api_key=test_key&title=Test Api&description=Ini hanya testing&amount=1&payment_cycle=once&collect_at=start&return_url=&name=Kamarul Ariffin&phone=0188888888&email=kamarul@gmail.com&payment_bank=3

Parameters available:

NAMEDESCRIPTION
api_keyrequired
titlerequired Title of the commitment as shown in reports and forms
descriptionrequired maximum 27 characters. Description of the commitment as shown in reports and forms
amountrequired in two decimal points without currency notation. Amount to pay/collect
payment_cyclerequired options: [once,daily,weekly,monthly,yearly]. Choose accordingly.
collect_atrequired options: [start,end]. Either at start of cycle or end of cycle.
return_urla url to receive the payment status updates immediately after payment
namerequired Customer name.
phonerequired Customer phone.
emailrequired Customer email.
payment_bankrequired Bank ID as chosen by customer to pay with. Refer Bank ID list api to retrieve full list of available banks
Make a subscription payment

Also known as Recurring payment. This type of payment can be made via get request to /commit endpoint with parameters as shown below

https://app.paylah.com/api/v1/commit?api_key=test_key;title=Test Api&description=Ini hanya testing&amount=1&payment_cycle=monthly&collect_at=start&return_url=&name=Kamarul Ariffin&phone=0188888888&email=kamarul@gmail.com&payment_bank=3

Each new subscription commitment will go through an authorization process which will deduct RM 1.00 from the customer respective bank account.

Recurring payment happened as soon as the next day after authorization, subject to payment_cycle provided

Bank ID list

You can retrieve the latest Bank ID available list at /banks endpoint such as below:

https://app.paylah.com/api/v1/banks?api_key=test_key

Check Payment Status

After succesful payment, user will be returned to the provided return_url with all the parameters (including payment_id) in get request where your system can process the fulfillment.

However, for edge cases where the status is not returned you can check the payment status as further verification as shown below:

http://app.paylah.local/api/v1/payment_status?api_key=test_key&payment_id=5