Getting a list of payments
Getting a list of payments
URL | POST https://api-merchant.alikassa.com/v1/payment/history |
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.
Name | Type | Description |
date_from | format (YYYY-MM-DD) | 2024-11-01 |
date_to | format (YYYY-MM-DD) | 2024-11-30 |
page | int | 1 |
paginate | int | 12 |
Response
Name | Example |
data |
|
links |
|
meta |
|
An example of an unsuccessful HTTP CODE 400 response:
{
"message": "The given data was invalid.",
"errors": {
...
}
}