Page History
Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Deposit of funds (API)
Доступ к общему API реализован по белому листу IP-адресов и секретному ключу. Перед началом работы с API на ввод, необходимо передать ТП Paykassma IP-адрес с которого будут отправляться запросы.
PLUGINAPI_SECRET - строка секретного ключа. Ее необходимо будет добавлять ко всем запросам в виде get-параметра secret.
Например: https://api.{URL_сервера_Paykassma}/api/v1/deposit-info?secret=pluginapi_secret
Warning | ||
---|---|---|
| ||
This integration method is NOT recommended if you have not previously integrated similar payment solutions that require activation. Recommended integration method When choosing integration via API, we recommend that you additionally make the following improvements:
|
Access to the shared API is implemented using a secret key. PLUGINAPI_SECRET - secret key string. It will need to be added to all requests in the form of the secret get parameter.
For example: https://api.{URL_server_Paykassma}/api/v1/transaction/create/paytm?secret=pluginapi_secret
When you send a request without using these parameters, the error 404 'Not found' will be displayed.При отправки запроса без использования данных параметров, будет выдаваться ошибка 404 'Не найдено'
Attention: Before starting to work with the API for deposit, it is necessary to send the IP address from which requests will be sent to the Paykassma TS.
Saving the client’s ID transaction
Request for sending your transaction ID (custom_transaction_id) to Paykassma. In the future, this ID is assigned to the transaction performed by the user and is transmitted in the postback.
Obtaining available PSs
Code Block | ||||
---|---|---|---|---|
| ||||
Code Block | ||||
| ||||
https://api.{URL_сервераPaykassma_PaykassmaServer}/api/v1/payment/save-transaction-custom-id-systems/available |
Request method: POSTGET
Format: JSON
Parameters:
Parameter | Type | Required | Description |
currency_code | string[] (3) | YES | An array consisting of currency codes. PS that work with the specified currencies will be displayed |
Параметр
Тип
Обязательность
label | string (190) | YES | Unique identifier (ID) of the user making the payment |
transaction_custom_id
string (190)
YES
Transaction ID in the Client’s system
Code Blockcode | ||||
---|---|---|---|---|
| ||||
{ "currency_code": [ "labelUSD":, "55INR" ], "transaction_custom_idlabel": "12346547789755" } |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{ "status": "ok" } | ||||||
Code Block | ||||||
| ||||||
{ "status "params": "fail" "message": "MESSAGE" } |
Obtaining available PSs
Code Block | ||||
---|---|---|---|---|
| ||||
https://api.{URL_сервера_Paykassma}/api/v1/payment-systems/available |
Request method: GET
Format: JSON
Parameters:
Параметр | Тип | Обязательность | Описание |
currency_code | string[] (3) | YES | An array consisting of currency codes. PS that work with the specified currencies will be displayed |
label | string (190) | YES | Unique identifier (ID) of the user making the payment |
Code Block | ||||
---|---|---|---|---|
| ||||
{
"currency_code": [ "USD", "INR" ],
"label": "55"
} |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{ "status": "ok", "params": { "gif_guide": { "upi": "http:\/\/api.pay.test\/storage\/guide-image\/upi.mp4?cache=1587635151", "phonePe": "http:\/\/api.pay.test\/storage\/guide-image\/phonePe.gif?cache=1589958899", { "currency_data": [ { "code": "USD", "symbol": "$" }, { "code": "INR", "symbol": "INR" } ], "wallets": [ { "bkashtype": "http:\/\/api.pay.test\/storage\/guide-image\/bkash.mpg?cache=1611553163" }, "currency_data": [ staging_b_ml", { "currency_code": "INR", "symbol "order": "₹" 6, } ], "walletslogo": [ "https://api.staging.client-paykassma.com/storage/payment_system/logos/staging_b_ml.png", { "typename": "paytmstaging B ml", "currencyis_codemanual": "INR"true, "order": 5, "logo": "http:\/\/api.pay.test\/storage\/payment_system\/logos\/paytm_default.svg", uploading_payment_bill": true "name": "PayTM" }, }, { "type": "paytmnagad", "currency_code": "INRUSD", "order": 517, "logo": "httphttps:\/\/api.pay.test\staging.client-paykassma.com/storage\/payment_system\/logos\/paytmnagad_34default.svg", "name": "paytm", "hintsname": [ "Nagad", { "typeis_manual": "requisites_hint"false, "textuploading_payment_bill": nullfalse }, {] } } |
Code Block | ||||
---|---|---|---|---|
| ||||
{ "typestatus": "payment_hintfail", "text": null }, true "message": "MESSAGE" } |
Getting mediahints
To receive mediahints on how to make a deposit using the payment system, you need to send a request:
Code Block | ||||
---|---|---|---|---|
| ||||
https://api.{URL_server_Paykassma}/wallet-type/images/ |
Request method: GET
Format: JSON
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
"status": "success", "message": "", "code": 20000, "data], "show_limits": true } ], "imps": { "INR": { "min"imps": "8000", { "maxid": "560000"486, } "url": }, "https://api.staging.client-paykassma.com/storage/guide-image/bkash.mp4" "bkash": { }, "BDTpaytm": { "minid": "100"500, "maxurl": "1000000" } https://api.staging.client-paykassma.com/storage/guide-image/Ghjkfre22.gif" }, "upi": { "INR": { "minid": "20000"506, "maxurl": "50000https://api.staging.client-paykassma.com/storage/guide-image/upi_in.mp4" } }, "paytm": { "INR": { "min": "100000", "max": "20000000" } }, "phone_pe": { "INR": { "min": "100", "max": "800000" } } } } }} } |
Code Block | ||||
---|---|---|---|---|
| ||||
{
"status": "fail"
"message": "MESSAGE"
} |
Creating a payment
Currently, there are two types of requests for creating a payment, depending on the PS.
Info |
---|
Attention! To get a complete list of available PSs, you need to contact Paykassma TS. TS will provide complete examples of requests for currently available PSs. They will also determine the correct request, depending on the selected PS. |
For PS that require payment activation
1. Payment creation request:
Code Block | ||||
---|---|---|---|---|
| ||||
https://api.{URL_Paykassma_Server}/api/v1/transaction/create/{wallet_type} |
Example of request for PS PayTM
Code Block | ||||
---|---|---|---|---|
| ||||
https://api.{URL_Paykassma_Server}/api/v1/transaction/create/paytm |
Request method: POST
Format: JSON
Parameters:
Parameter | Type | Required | Description |
currency | string (3) | YES | Currency code |
label | string (190) | YES | Unique identifier of the user making the payment |
Code Block | ||||
---|---|---|---|---|
| ||||
{ "statuscurrency": "failINR", "messagelabel": "MESSAGEeligendi" } |
Creating a payment
Currently, there are two types of requests for creating a payment, depending on the PS.
Info |
---|
Attention! To get a complete list of available PSs, you need to contact Paykassma TS. TS will provide complete examples of requests for currently available PSs. They will also determine the correct request, depending on the selected PS. |
Code Block | ||||
---|---|---|---|---|
| ||||
https://api.{URL_сервера_Paykassma}/api/v1/transaction/create/{wallet_type} |
| |
{
"status": "ok",
"params": {
"identifier": "6234234234"
}
} |
Code Block | |||||
---|---|---|---|---|---|
| |||||
{
"status": "fail"
"message": "MESSAGE"
} |
2. Activation request
Depending on the value of the is_manual parameter, there are two types of requests for payment activation:
1) if is_manual = false
Code Block | ||||
---|---|---|---|---|
| ||||
https://api.{URL_сервераPaykassma_PaykassmaServer}/api/v1/transaction/create/paytm |
In this case, first we accept a request for deposit via PayTM, then in response we will provide details of the wallet to which the user should transfer the payment, and after payment you need to send a request to activate the transaction
Request method: POST
activate |
Request method: POST
Format: Format: JSON
Parameters:
Parameter |
Type |
Required |
Description | |||
currency_code | string (3) | YES | Currency code |
wallet_type | string (190) | YES | Value from the list of available PSs. |
label | string (190) | YES | Unique identifier of the user making the payment |
key1 | string (190) | YES | A code on which activation is performed (Transiction_ID), received from the user |
amount | float | *required if | Transaction amount |
custom_transaction_id | string (64) | YES | Unique transaction identifier in the Client's system It is necessary to pass a non-repeating parameter value |
Code Block | ||||
---|---|---|---|---|
| ||||
Code Block | ||||
| ||||
{ "currency_code": "INRUSD", "wallet_type": "paytm", "label": "eligendi55", "key1": "123-ABC-456-DEF" "custom_transaction_id": "123465477897" } |
Code Block | ||||
---|---|---|---|---|
| ||||
{ "status": "ok", "params": { "identifier": "6234234234" } } } |
Code Block | ||||
---|---|---|---|---|
| ||||
{ "status": "fail" "message": "MESSAGE" } |
2
Activation request:) if is_manual = true
Code Block | ||||
---|---|---|---|---|
| ||||
https://api.{URL_сервераserver_Paykassma}/api/v1/possible-transaction/activate |
Request method: POST
Format: JSON
Parameters:
multipart/form-data
Parameters:
Name | Type | Required | Description |
secret | string | yes | Ключ доступа |
Body:
Parameter | Type | Required | Description |
Параметр
Тип
Обязательность
currency_code | string (3) | YES | Currency code |
wallet_type | string (190) | YES | Value from the list of available PSs. |
label | string (190) | YES | Unique identifier of the user making the payment |
key1 | string (190) | YES | A code on which activation is performed (Transiction_ID), received from the user |
amount | float | YES | Transaction amount |
screenshot | string (190) | NO | Upload payment screenshot |
custom_transaction_id | string (190) | YES | Transaction ID in the Client’s system |
Code Block | ||||
---|---|---|---|---|
| ||||
{ "currency_code "status": "USDsuccess", "wallet_typemessage": "paytm", "labelcode": 20000, "55data": [], "key1paginate": "123-ABC-456-DEF" } | ||||
Code Block | ||||
| ||||
{ "status": "ok" { "offset": 0, "total": 1, "limit": 1 } } |
Code Block | ||||
---|---|---|---|---|
| ||||
{ "status": "fail", "message": "MESSAGE" } |
Type of request №2:
2.1": {
"key1": [
"Transaction field has wrong length"
]
}
} |
Code Block | ||||
---|---|---|---|---|
| ||||
https://api.{URL_сервера_Paykassma}/api/v1/payment/create/{payment_system} |
Request method: POST
Format: JSON
Parameters:
Параметр | Тип | Обязательность | Описание |
language | string (2) | YES | Interface language |
currency | string (3) | YES | Currency code |
bank | string (3) | YES | The bank via which the payment is performed |
amount | numeric (ограничена max. | YES | Payment amount |
label | string (190) | YES | Unique identifier of the user making the payment |
redirect_url | url | YES | URL of the page for redirecting after payment |
Code Block | ||||
---|---|---|---|---|
| ||||
{
"language": "en",
"currency": "USD",
"bank": "MBB",
"amount": "1000",
"label": "55",
"redirect_url": "https:\/\/google.com"
} |
Code Block | ||||
---|---|---|---|---|
| ||||
{
"status": "ok"
} |
Code Block | ||||
---|---|---|---|---|
| ||||
{
"status": "fail"
"message": "MESSAGE"
} |
Information about savings
Request to provide information about savings of a certain user
Для сохранения информации о транзакциях, сумма которых не превышает размер минимального депозита для конкретной платёжной системы, был реализован функционал накоплений. Транзакции пользователя (выборка по параметру label) копятся в системе и не зачисляются на счёт пользователя до тех пор, пока их сумма не достигнет минимального депозита этой платёжной системы. Постбек на сервер клиента отправится только после достижения суммы минимального депозита. До момента отправки postback транзакция не считается зачисленной на счёт.
Code Block | ||||
---|---|---|---|---|
| ||||
https://api.{URL_сервера_Paykassma}/api/v1/deposit-info |
Request method: GET
Format: JSON
Parameters:
| |
{
"status": "possible_transaction_created",
"message": "Transaction not found. Possible transaction created"
} |
**For some PS, it is also necessary to send the amount field in the request:
Payment system | currency_code | wallet_type | label | key1 | amount | custom_transaction_id |
---|---|---|---|---|---|---|
UPI P2P | required | required | required | required | required | required |
PhonePe | required | required | required | required | required | required |
bKash | required | required | required | required | - | required |
Nagad | required | required | required | required | - | required |
***If you try to activate a suspicious transaction, you will see error 400 'Check of deposit status started. The operation may take longer than expected. Once checked the funds will credit to you account'.
For PS that do not require payment activation
Payment creation request:
Code Block | ||||
---|---|---|---|---|
| ||||
https://api.{URL_Paykassma_Server}/api/v1/payment/create/{payment_system} |
Request method: POST
Format: JSON
Parameters:
Parameter | Type | Required | Description |
language | string (2) | YES | Interface language |
currency | string (3) | YES | Currency code |
bank | string (3) | YES | The bank via which the payment is performed |
amount | float | YES | Payment amount |
label | string (190) |
Параметр
Тип
Обязательность
Описание
label
YES | Unique identifier of the user making the payment |
redirect_ |
url | url | YES |
Value from the list of available PSs.
Attention: To get a complete available list, contact Paykassma TS.
URL of the page for redirecting after payment | |||
custom_transaction_id | string (64) | YES | Unique transaction identifier in the Client's system It is necessary to pass a non-repeating parameter value |
currency
string (3)
YES
Currency code
code
string (190)
или “null”
NO
It’s filled in when wallet_type = manual
Code Block | ||||
---|---|---|---|---|
| ||||
{ "labellanguage": "55en", "wallet_typecurrency": "paytmUSD", "currencybank": "UDS" } | ||||
Code Block | ||||
| ||||
{MBB", "statusamount": "ok"1000.00, "stockpiling_sumlabel": 0"55", "lacks_sum": 0, "minimum_deposit": 148 }"redirect_url": "https:\/\/google.com" "custom_transaction_id": "123465477897" } |
Code Block | ||||
---|---|---|---|---|
| ||||
{
"status": "ok"
} |
Code Block | ||||
---|---|---|---|---|
| ||||
{ "status": "fail" "message": "MESSAGE" } |
Withdrawal of funds (API)
To withdraw funds by the user via payment systems available to the Client, it is necessary to:
Redirect addresses hashing
The widget code contains parameters for specifying redirect addresses. Addresses must be specified in hashed form. To hash addresses send the request ( access to the API is implemented using a secret key)
:
Code Block | ||||
---|---|---|---|---|
| ||||
https://api.{ |
URL_server_Paykassma}/ |
Warning |
---|
Attention: When transmitting data, there should be no spaces at the beginning and end |
Each withdrawal request is signed by signature, it is formed as follows:
Code Block | ||||
---|---|---|---|---|
| ||||
$data = [
...
];
$data['signature'] = generateSignature($data); // return fa0ee1e2acf7f898635ec417491381c0a4f9d35c
//send $data like json ...
function generateSignature(array $data) {
$privateKey = 'yourprivatekey';
ksort($data);
$implode = implode(':', $data);
return sha1($privateKey . md5($implode));
} |
Required parameters for transmission in POST request:
Наименование | Тип | Обязательность | Описание |
withdrawal_id | string(1-7) | optional | Withdrawal ID, if the parameter is not passed, then the system generates withdrawal _id |
payment_system | string | required | Payment system |
amount | numeric | required | Withrawal amount |
currency_code | string(3) | required | Currency code |
label | string | required | Unique identifier of the user making the payment |
comment | string(4-64) | optional | Comment |
account_number | string | *required_if | Number of the bank account |
account_name | string | *required_if PS = imps, upi,.... | Name of the bank account holder |
account_email | string | *required_if PS = bkash,... | Email of the person who is being paid |
receiver_name | string(190) | required_if PS = imps | Name of the person who is being paid |
payments_details.payments_method | string | *required_if | Payment method |
payments_details.payments_provider | string | optional | Supplier who makes electronic payment using the selected payment method |
bank_details.bank_code | string | *required_if | Unique ID assigned by the country's central bank |
bank_details.branch_code | string | *required_if | Bank branch code |
bank_details.bank_code_in_payments_system | string | *required_if | Bank code in payments system, with which data is exchanged |
account_type | string | *required_if | Account type |
document_type | string | *required_if | Document type |
document_id | string | *required_if | Recipient document ID |
account_digit | string | *required_if | Account digit |
iban | string | *required_if | IBAN |
Info |
---|
*The withdrawal request contains fields that are required only for some payment systems (required_if), to get a complete list of required fields for a specific payment system, you need to contact Paykassma technical support. |
Required fields for PS Bkash, PayTm, IMPS/UPI:
Bkash
payment-plugin/hash-url?secret=pluginapi_secret |
Request method: POST
Format: JSON
Parameters:
Parameter | Type | Required | Description | |
success_urls | array | YES | The list of redirect addresses when the payment is successful. | |
order | integer | *YES | The redirect address number in the list. | |
url | string | *YES | The redirect address when the payment is successful. | |
fail_urls | array | YES | The list of redirect addresses when the payment is failed. | |
order | integer | *YES | The redirect address number in the list. | |
url | string | *YES | The redirect address when the payment is failed. | |
pending_urls | array | YES | The list of redirect addresses while waiting for payment confirmation. | |
order | integer | If one of the properties is specified, then the second is required. | The redirect address number in the list. | |
url | string | The redirect addresses while waiting for payment confirmation. |
*One of the success_urls or fail_urls arrays can be empty.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"success_urls": [
{
"order": 2,
"url": "https://test.com/success2.jpg"
},
{
"order": 1,
"url": "https://test.com/success1.jpg"
}
],
"fail_urls": [
{
"order": 1,
"url": "https://test.com/fail1.jpg"
},
{
"order": 2,
"url": "https://test.com/fail2.jpg"
}
],
"pending_urls": [
{
"order": 3,
"url": "https://test.com/pending1.jpg"
},
{
"order": 4,
"url": "https://test.com/pending2.jpg"
}
]
} |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"status": "ok",
"urls": {
"success_url": [
{
"order": 1,
"url": "a93558ba9e4f04eef3b1f759ae4281305776559ce86ae2af5f6e6498d84b99be"
},
{
"order": 2,
"url": "7c51f9d6b35a80a8fcce9cf3f4f0ae56b818c2e375a8b3297cb3fafb41a921eb"
}
],
"fail_url": [
|
Request:
Code Block | ||||
---|---|---|---|---|
| ||||
{ 'withdrawal_id': '1234567', 'payment_system': 'paytm', 'amount' : '1000', 'type': '0', 'currency_code': 'IDR', 'label': '55', 'comment': 'withdrawal', 'account_number': '11111111', 'account_name' : '', 'account_email' : '', 'payments_details': { 'payments_method'"order": ''1, 'payments_provider': '' "url": "8b99db57e0bda63400b0e852d7fe73d8c6da52b8e32894987a8bd00bcadf8c66" }, 'bank_details': { { "order": 2, 'bank_code': '', "url": "e72ed31e2f3814563a3bc446f6a59f43c946c3a4339c7b2f5c29d12e8066b37c" } ], 'branch_code'"pending_url": '', [ { 'bank_code_in_payments_system': ''"order": 1, }, 'account_type': '', 'document_type': '', 'document_id': '', 'account_digit': '', 'iban': '' } |
Code Block | ||||
---|---|---|---|---|
| ||||
{
'status': 'ok'
} |
"url": "8b99db57e0bda63400b0e852d7fe73d8c6da52b8e32894987a8bd00bcadf9v69"
},
{
"order": 2,
"url": "e72ed31e2f3814563a3bc446f6a59f43c946c3a4339c7b2f5c29d12e8066b37f"
}
]
}
} |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
Code Block | ||||||
| ||||||
{ '"status'": '"fail'" '"message'": '"MESSAGE'" } |
After processing the withdrawal, Paykassma will send a postback about the result of the withdrawal with a status, signed with a signature.
Withdrawal status
In processing
Unsuccessful
Uccessful
The received address hashes must be specified in the parameters of the widget code.
Info | ||
---|---|---|
| ||
The hash lifetime is 1 day. After the expiration date resend the request to get hash for the address if necessary. |
Withdrawal of funds
To withdraw funds by the user via payment systems available to the Client, it is necessary to:
- Once send Paykassma TS the URL of the server where postbacks with the withdrawal status will be sent.
Send withdrawal requests (POST) to the URL, without using "secret = pluginapi_secret":
Code Block theme RDark title API url
The old withdrawal request is also available for work.
API url:
https://api.{URL_
Paykassma_
Server}/v2/withdrawal
/create
Required parameters for transmission in POST request:
Параметр
Тип данных
Описание
wallet_type
text(191)
Selection from the available list
Type of the payment system
wallet_recipient
string(191)
The recipient's wallet, to whose account the payment will be made
Attention! wallet_recipient (For the Paytm method) must contain the Paytm wallet number without the international code +91
wallet_sender
string(191)
The sender's wallet, from whose account money will be withdrawn. The final choice of the sender is left to Paykassma.
Attention: it is necessary to fill in the field with arbitrary four digits
account_name
string(191)
Name of the bank account holder
account_number
string(191)
Number of the bank account
string(191)
Email of the person who is being paid
amount
Double
Withdrawal amount
withdrawal_id
Integer
Client side withdrawal ID (returned in postback).
Request:
Code Block | ||
---|---|---|
| ||
{
"wallet_type":"paytm",
"wallet_recipient":"123123232",
"wallet_sender":1111,
"email":"[email protected]",
"amount":1000,
"withdrawal_id":"13",
"signature":"fae51673a8a9c85f724317214bd0bcc665ebc799"
} |
When sending a withdrawal request to Paykassma, the first response received the generated data on the request, without a signature:
Example first response:
Code Block | ||
---|---|---|
| ||
{
"id":1,
"wallet_type":"paytm",
"wallet_recipient":"123123232",
"wallet_sender":"1111",
"email":"[email protected]",
"amount":1000,
"status":1,
"created_at":"2020-07-08 07:06:06",
"updated_at":"2020-07-08 09:40:39"
} |
The second response will already come a postback about the withdrawal, signed by the signature.
Warning |
---|
Attention: When transmitting data, there should be no spaces at the beginning and end |
Each withdrawal request is signed by signature, it is formed as follows:
Signature generation algorithm
- Your private key is initialized.
- An array with data that will be hashed is formed. The array can be multidimensional.
Array elements are sorted by key using the ksort() function
- The array elements are recursively concatenated with each other via ":" string.
- Then md5 hash of the resulting string is allocated.
- The private key is concatenated with a hash string.
- Then sha1 hash is allocated from the resulting string.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
$data = [
...
];
$data['signature'] = generateSignature($data); // return fa0ee1e2acf7f898635ec417491381c0a4f9d35c
//send $data like json ...
function generateSignature(array $data) {
$privateKey = 'yourprivatekey';
ksort($data);
$implode = self::multiImplode( ':', $data);
return sha1($privateKey . md5($implode));
}
function multiImplode($glue, $array): string
{
$finArray = [];
foreach ($array as $val) {
$finArray[] = is_array($val) ? self::multiImplode($glue, $val) : $val;
}
return implode($glue, $finArray);
} |
Required parameters for transmission in POST request:
Parameter | Type | Required | Description | |||||
withdrawal_id | string(1-36) | optional | Withdrawal ID, if the parameter is not passed, then the system generates withdrawal _id | |||||
payment_system | string | required | Payment system | |||||
amount | int | required | Additional requirements:
| |||||
currency_code | string(3) | required | Currency code | |||||
label | string | required | Unique identifier of the user making the payment | |||||
is_test | boolean | required | The is_test parameter possible values: true - if Withdrawal is test | |||||
account_number | string | *required_if | Number of the bank account
| |||||
account_name | string | *required_if PS = imps_ib, upi_ib,.... | Name of the bank account holder | |||||
account_email | string | *required_if PS = bkash,... | Email of the person who is being paid | |||||
payments_details.payments_method | string | *required_if | Payment method | |||||
payments_details.payments_provider | string | optional | Supplier who makes electronic payment using the selected payment method | |||||
bank_details.bank_code | string | *required_if | Unique ID assigned by the country's central bank
| |||||
bank_details.branch_code | string | *required_if | Bank branch code | |||||
bank_details.bank_code_in_payments_system | string | *required_if | Bank code in payments system, with which data is exchanged | |||||
iban | string | *required_if | IBAN |
Info | ||
---|---|---|
| ||
You can see the mandatory fields for PS in the "Integration" section. |
Request:
Code Block | ||||
---|---|---|---|---|
| ||||
{
"withdrawal_id": "1234567",
"payment_system": "paytm",
"amount" : 1000,
"currency_code": "INR",
"label": "55",
"is_test": false,
"comment: "withdrawal",
"account_number": "11111111",
"payments_details": {
"payments_provider": "56",
"payments_method": "MOBILE_MONEY"
},
"bank_details": {
"bank_code": "MAHB0001821",
"branch_code": "000254",
"bank_code_in_payments_system": "9393"
},
"signature":"fae51673a8a9c85f724317214bd0bcc665ebc799"
} |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"status": "ok"
} |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"status": "fail"
"message": "MESSAGE"
} |
*If, when trying to create a withdrawal request, the amount of account balances in the currency of the request is less than the total amount of new and still incomplete applications, the error message"Insufficient balance" will be displayed (to configure this functionality, contact the TP Paykassma).
Code Block | ||||
---|---|---|---|---|
| ||||
{
"status": "fail",
"message": {
"withdrawals_sum_amount": [
"Insufficient balance"
]
}
} |
After processing the withdrawal, Paykassma will send a postback about the result of the withdrawal with a status, signed with a signature.
Withdrawal status
Status | Description |
---|---|
PROCESSED (1) | Uccessful |
REJECTED (5) | Unsuccessful |
Information about the postback that was sent earlier
Request to provide information about the postback that was sent earlier.
PLUGINAPI_SECRET - secret key string. It will need to be added to all requests in the form of the secret get parameter.
For example: https://api.{URL_сервера_Paykassma}/api/v1/postback?secret=pluginapi_secret
Code Block | ||||
---|---|---|---|---|
| ||||
https://api.{URL_server_Paykassma}/api/v1/postback
|
Request method: GET
Format: JSON
Parameters:
Parameter | Type | Required | Description | |
type | string | required | Type of postback. Possible values:
| |
transaction_id | string | One of the parameters is required if type = deposit | Transaction number | |
custom_id | string | Order ID
| ||
withdrawal_id | string | Is required if type = withdrawal | Withdrawal ID |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"status": "ok",
"postback": {
"wallet_type": "paytm_api",
"amount": 13629,
"currency_code": "INR",
"label":"6424468",
"converted_amount":
{
"USD":40.43,"INR":3327,"EUR":40.98,"IDR":625650.25,"MYR":190.71,"VND":988191.07,"SGD":57.43,
"THB":1539,"NGN":17640.29,"TRY":751.48,"AED":148.51,"CAD":55.52,"AUD":64,"BDT":4276.41,"AFN":3531.25,
"ALL":4807.24,"AMD":16333.46,"AOA":18109.34,"ARS":6179.09,"AWG":72.88,"AZN":68.73,"BAM":80.49,"BBD":80.86,
"BGN":80.2,"BHD":15.24,"BIF":83303.64,"BMD":40.43,"BND":57.44,"BOB":279.23,"BRL":211.91,"BSD":40.43,"BTC":0.00209234
},
"direction":"ingoing",
"created_datetime":"2023-06-30 10:59:24",
"additional_data":
[
{
"activated_datetime":"2023-06-30 13:59:24",
"exchanger_identifier":"97489343",
"comment":"",
"amount":"13628.5",
"currency_code":"INR",
"wallet_type":"paytm_api",
"stockpiling_id":262402,
"transaction_id":"160028076535305",
"transaction_type":0,
"plugin_custom_order_id":"6424468",
"withdrawal_id":null,
"withdrawal_status":null,
"account_number":"",
"account_name":"",
"account_email":"",
"bank_details":
{
"bank_code":"",
"branch_code":""
}
}
{...}
]
}
} |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"status": "ok",
"postback": {
"wallet_type":"nagad_api",
"amount":820,
"currency_code":"BDT",
"label":"autotest898404792700response_500",
"converted_amount":
{
"USD":7.56,"INR":620,"IDR":113212.08,"MYR":34.39,"VND":178667.64,"SGD":10,
"THB":257.14,"NGN":5947.67,"TRY":203.5,"AED":27.75,"CAD":9.93,"AUD":11.07,"BDT":820,"AFN":647.27,
"ALL":681.27,"AMD":2946.58,"AOA":6231.79,"ARS":2025.9,"AWG":13.62,"AZN":12.84,"BAM":13.17,"BBD":15.11,
"BGN":13.17,"BHD":2.85,"BIF":21376.13,"BMD":7.56,"BND":10.02,"BOB":52.24,"BRL":36.2,"BSD":7.56,"BTC":0.00025009
},
"direction":"outgoing",
"created_datetime":"2023-07-20 08:09:01",
"additional_data":
[
{
"activated_datetime":"",
"exchanger_identifier":"",
"comment":"autotest approve by file",
"amount":"820",
"currency_code":"BDT",
"wallet_type":"nagad_api",
"stockpiling_id":null,
"transaction_id":"",
"transaction_type":null,
"plugin_custom_order_id":"",
"withdrawal_id":"autotest984047927037",
"withdrawal_status":1,
"account_number":"5632221204",
"account_name":"autotest983948600573",
"account_email":"",
"bank_details":
{
"bank_code":null,
"branch_code":null
}
}
]
}
} |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"status": "fail"
"message": "MESSAGE"
} |
Accounts' balance
A request to provide the information about the balance of the Client's accounts (except for the Settlement balance) is formed as follows:
Code Block | ||||
---|---|---|---|---|
| ||||
https://api.{URL_server_Paykassma}/api/v1/accounts-balance?secret={{pluginapi.secret}} |
Request method: GET
Format: JSON
Parameters:
Name | Type | Required | Description |
secret | string | yes | Access key |
Code Block | ||||
---|---|---|---|---|
| ||||
{
"status": "success",
"message": "",
"code": 20000,
"data": {
"balances": [
{
"wallet_type": "paytm",
"currency_code": "IDR",
"amount": -324324.00
},
{
"wallet_type": "paytm",
"currency_code": "USD",
"amount": -10800.00
},
{
"wallet_type": "bkash",
"currency_code": "VND",
"amount": 155.00
},
{
"wallet_type": "bkash",
"currency_code": "BRL",
"amount": 187239.195
},
{
"wallet_type": "bkash",
"currency_code": "EUR",
"amount": 23.9375
},
{
"wallet_type": "nagad",
"currency_code": "CUC",
"amount": 471.00
},
{
"wallet_type": "upi_ib",
"currency_code": "SAR",
"amount": 499.00
}
]
} |
Code Block | ||||
---|---|---|---|---|
| ||||
{
"status": "error",
"code": 30228,
"errors": {
"target": "secret",
"code": 36205,
"message": "Wrong secret"
},
"error_message": "Data validation error"
} |
Order statuses
A request to provide the information about the statuses of the Client's orders is formed as follows:
Code Block | ||||
---|---|---|---|---|
| ||||
https://api.{URL_server_Paykassma}/api/v1/pullpostbacks?secret={{pluginapi.secret}} |
Request method: GET
Format: JSON
Parameters:
Name | Type | Required | Description |
secret | string | YES | Access key |
Name | Type | Required | Description |
---|---|---|---|
type | string | YES | Possible values:
|
plugin_custom_order_id | array | YES if type = withdrawal | User transaction ID/Order ID |
withdrawal_id | array | YES if type = plugin_custom_order_id | Withdrawal ID |
Response body:
Name | Type | Required | Description | |||||
---|---|---|---|---|---|---|---|---|
status | string | YES | Request status. | |||||
message | string | YES | Failure response message. If the response is successful, the message is empty. | |||||
code | int | NO | Successful response code. | |||||
data | array/object | To be filled in if the response is successful | ||||||
transactions | array | YES if type = deposit | Deposit information. | |||||
plugin_custom_order_id | string | YES | User transaction ID/Order ID. | |||||
message | string | NO | A message is about the transaction or postback has not been found. | |||||
postback | array | NO | Postback information, if the transaction or postback has been found. | |||||
withdrawals | array | YES if type = withdrawal | Withdrawal information | |||||
withdrawal_id | string | YES | Withdrawal ID | |||||
message | string | NO | A message is about the withdrawal or postback has not been found. | |||||
postback | array | NO | Postback information, if the withdrawal or postback has been found. | |||||
paginate | object | To be filled in if the response is successful | The block with pagination data. | |||||
offset | int | Offset from the beginning of the list. | ||||||
total | int | The total number of elements. | ||||||
limit | int | The number of elements per page. |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"status": "success",
"message": "",
"code": 20000,
"data": {
"transactions": [
{
"plugin_custom_order_id": "autotest51191116971521",
"message": "Postback not found"
},
{
"plugin_custom_order_id": "1923912939dd912ddpppdd99test",
"postback": {
"wallet_type": "phone_pe",
"amount": 100,
"currency_code": "INR",
"label": "1293912939kkee13",
"converted_amount": {
"USD": 1.16,
"INR": 100,
"EUR": 1.06,
...
},
"direction": "ingoing",
"created_datetime": "2025-03-19 12:49:49",
"additional_data": [
{
"activated_datetime": "2025-03-19 12:49:47",
"exchanger_identifier": "635*****8",
"comment": "95*****98",
"amount": "100",
"currency_code": "INR",
"wallet_type": "phone_pe",
"stockpiling_id": 2233,
"transaction_id": "3279********",
"transaction_type": 0,
"plugin_custom_order_id": "1923912939dd912ddpppdd99test",
"withdrawal_id": null,
"withdrawal_status": null,
"account_number": "",
"account_name": "",
"account_email": "",
"bank_details": {
"bank_code": "",
"branch_code": ""
}
}
]
}
}
]
},
"paginate": {
"offset": 0,
"total": 2,
"limit": 2
}
} |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"status": "success",
"message": "",
"code": 20000,
"data": {
"withdrawals": [
{
"withdrawal_id": "ID_05613331ret",
"message": "Withdrawal with this ID not found"
},
{
"withdrawal_id": "ID_03213331asd",
"postback": {
"wallet_type": "easypaisa_api",
"amount": 3000,
"currency_code": "PKR",
"label": "label",
"converted_amount": {
"USD": 10.72,
"INR": 926,
"EUR": 9.83,
...
},
"direction": "outgoing",
"created_datetime": "2025-03-19 12:38:01",
"additional_data": [
{
"activated_datetime": "",
"exchanger_identifier": "",
"comment": "test",
"amount": "3000",
"currency_code": "PKR",
"wallet_type": "easypaisa_api",
"stockpiling_id": null,
"transaction_id": "",
"transaction_type": null,
"plugin_custom_order_id": "",
"withdrawal_id": "87be1f94-04ba-11f0-bf20-0243a4aa6442",
"withdrawal_status": 5,
"account_number": "03*********",
"account_name": "Muhammad",
"account_email": "",
"bank_details": {
"bank_code": null,
"branch_code": null
}
}
]
}
}
]
},
"paginate": {
"offset": 0,
"total": 1,
"limit": 1
}
} |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"status": "fail",
"message": {
"plugin_custom_order_id": [
"The plugin custom order id field is required when type is deposit."
]
}
} |
Table of Contents |
---|
Table of Contents | minLevel | 2