Payment solution RM 1
Создание платежей
URL | POST https://api-merchant.alikassa.com/v1/payment |
HEADER | |
Content-Type | application/json |
Account | Your account uuid, you can find in Accounts https://merchant.alikassa.com/cabinet/resources/project-accounts |
Sign | Request signature |
Link https://merchant.alikassa.com/cabinet/form/setting-api-certs generate "API certificate for payment", save the archive, unpack
- password.txt
- private.pem
- public.pem
We keep only public.pem for signature verification.
Wrap all POST data in json (in the same order) and sign
$data = json_encode($data);
$privateKey = openssl_pkey_get_private(
file_get_contents('private.pem'),
file_get_contents('password.txt')
);
if ($privateKey===false) {
throw new \Exception('Error cert.');
}
openssl_sign($data, $sign, $privateKey);
$sign = base64_encode($sign);
Pass the received $sign in the Sign header. You can find a sample code at the end of the document.
* - Required fieldsName | Type | Description |
amount* | decimal (11.2) | Amount |
order_id* | string (128) | Your id must be unique |
service* | string (100) |
online_banking_myr_hpp qr_code_myr_hpp e_wallet_myr_hpp |
customer_ip* | ip | Payer's IP address |
customer_code* | string (100) | Deposit Bank Code |
customer_first_name* | string | Имя плательщика |
customer_last_name* | string | Фамилия плательщика |
success_redirect_id | int | Id of redirect upon successful payment |
fail_redirect_id | int | Id of redirect in case of unsuccessful payment |
notification_endpoint_id | int | Notification id |
success_redirect_url | string|max:255 | Link to redirect after successful payment |
fail_redirect_url | string|max:255 | Link to redirect after unsuccessful payment |
notification_endpoint_url | string|max:255 | Link to send a callback after the statuses are finalized |
Response
Name | Description |
url | Link to payment |
payment_status |
Payment status wait — in the process of payment |
id | AliKassa payment id |
uuid | AliKassa payment uuid |
success_redirect_url | Ссылка на вашу страницу, для редирека клиента после успешной оплаты |
When creating, always wait, check the payment status via the API or wait for a notification!
Example of a successful HTTP CODE 200 response:
{
"url" => "https://pay-merchant.alikassa.com/bd291fe1-5c19-4113-ae62-a2d3c4d01d20"
"payment_status" => "wait"
"id" => 108465371
"uuid" => "bd291fe1-5c19-4113-ae62-a2d3c4d01d20"
"success_redirect_url" => null
}
An example of an unsuccessful HTTP CODE 400 response:
{
"message": "The given data was invalid.",
"errors": {
...
}
}
After receiving the url, redirect the client to the link.
Possible values of payment_status, see the documentation "Payment status".
Если вы передали notification_endpoint_id или notification_endpoint_url, то вы получите уведомление о смене статуса оплаты
Deposit Bank Code
service | customer_code | bank name |
online_banking_myr_hpp | AFF | Affin Bank |
ALB | Alliance Bank Malaysia Berhad | |
AMB | AmBank Group | |
BIMB | Bank Islam Malaysia Berhad | |
BSN | Bank Simpanan Nasional | |
CIMB | CIMB Bank Berhad | |
HLB | Hong Leong Bank Berhad | |
HSBC | HSBC Bank (Malaysia) Berhad | |
MBB | Maybank Berhad | |
OCBC | OCBC Bank (Malaysia) Berhad | |
PBB | Public Bank Berhad | |
RHB | RHB Banking Group | |
UOB | United Overseas Bank (Malaysia) Bhd | |
FPX | FPX Bank Selection Page | |
AFFFPX | Affin Bank (FPX) | |
AGROBFPX | Agrobank (FPX) | |
ALBFPX | Alliance Bank (FPX) | |
AMBFPX | AmBank (FPX) | |
BIMBFPX | Bank Islam (FPX) | |
BKRFPX | Bank Rakyat (FPX) | |
BMMBFPX | Bank Muamalat (FPX) | |
BOCMFPX | Bank of China (FPX) | |
BSNFPX | BSN Bank (FPX) | |
CIMBFPX | CIMB Bank (FPX) | |
HLBFPX | Hong Leong Bank (FPX) | |
HSBCFPX | HSBC (FPX) | |
KFHFPX | Kuwait Finance House (FPX) | |
MBBFPX | Maybank (FPX) | |
OCBCFPX | OCBC (FPX) | |
PBBFPX | Public Bank (FPX) | |
RHBFPX | RHB Bank (FPX) | |
SCTBFPX | Standard Chartered Bank (FPX) | |
UOBFPX | UOB (FPX) | |
qr_code_myr_hpp | DUITNOW | Duitnow |
e_wallet_myr_hpp | TNGODUITNOW | Touch N Go |
GRABDUITNOW | GrabPay | |
MAEDUITNOW | MAE | |
BOOSTDUITNOW | BOOST |
Создание выплаты
URL | POST https://api-merchant.alikassa.com/v1/payout |
HEADER | |
Content-Type | application/json |
Account | Your account uuid, you can find in Accounts https://merchant.alikassa.com/cabinet/resources/project-accounts |
Sign | Request signature |
Name | Type | Description |
amount* | decimal (11.2) | Amount |
order_id* | string (128) | "1234" |
service* | string (100) | payment_card_myr |
number* | string (100) | Номер счета получателя |
customer_code* | string (100) | Payout Bank Code |
customer_first_name* | string (100) | Имя плательщика |
customer_last_name* | string (100) | Фамилия плательщика |
notification_endpoint_id | int | Notification id |
notification_endpoint_url | string|max:255 | Link to send a callback after the statuses are finalized |
Response
Name | Description |
id | AliKassa payment id |
payment_status |
Payment status wait — in the process of payment |
Payout Bank Code
service | customer_code | bank name |
payment_card_myr | BIMB | Bank Islam Malaysia Berhad |
AGROB | Agro Bank (Bank Pertanian Malaysia Berhad) | |
ARBM | Al-Rajhi Bank Malaysia | |
BKR | Bank Kerjasama Rakyat Malaysia Berhad | |
BMMB | Bank Muamalat Malaysia Berhad | |
BNPP | BNP Paribas Malaysia | |
BOFAM | Bank of America Malaysia Berhad | |
BOCM | Bank of China Malaysia | |
DBB | Deutsche Bank Malaysia Berhad | |
ICBCM | Industrial and Commercial Bank of China (Malaysia) | |
JPMC | J.P. Morgan Chase Bank Berhad | |
MCBMB | Mizuho Corporate Bank Malaysia Berhad | |
SMBC | Sumitomo Mitsui Banking Corporation Malaysia BHD | |
MBSB | MBSB Bank | |
GXB | GXBank | |
TNGO | Touch N Go e-wallet |