Creating a withdraw
General recommendations on working with withdraw API
Make sure that your shop is activated and set up for working with API: shop ID is received, interaction URL is entered, secret key is generated and whitelisted IP addresses are indicated. Payways for withdrawals, as well as their features, can be found in the personal profile (shop settings, section "Withdraw payways").
The withdrawing process goes as follows:
-
Preliminary calculation and additional data request
withdraw/tryis sent; -
If
result == ok, preliminary account existence and top-up options request is sent according to the specified payway (if necessary, additional data from the previous request is added fromaccount_info_config); -
When receiving
result == true, withdraw to the checked account request is sent (with additional data fromaccount_info_config, if necessary). When receivingresult==error, it is necessary to analyze an error message inmessage. -
The response returns data with the created withdraw request, with the amounts and withdraw ID. This freezes a part of funds on shop's balance from which the withdraw is made, until the final status of the withdraw is received.
-
After creating a withdrawal, it is necessary to make a withdraw status request on the created withdrawal until the final status is received.
-
After receiving a final status, a withdrawal is considered completed and funds are deducted from the shop's balance (or are returned to the balance if the withdrawal could not be completed).
Preliminary calculation of the withdrawal [/withdraw/try]
Withdraw/try. This method is not mandatory for creating a withdrawal request. It returns additional data to create a withdraw and preliminary fee calculation.
URL: https://core.qostiq.com/withdraw/try
Method: POST
Mandatory parameters: amount_type, shop_currency, payway, amount, shop_id, sign
Example of request:
{
"amount_type": "ps_amount",
"shop_currency": 980,
"sign": "f97c52fa8d273a9d3ad37e86e6dab314a592281654104ac9f348f386c29a2953",
"payway": "card_uah",
"amount": 0.5,
"shop_id": 112
}
Where,
| Parameter | Description | Format | Example |
|---|---|---|---|
amount | receive or write-off amount (depends on amount_type) | Number (no more than 2 characters after the dot) | 1, 1.0, 1.00 or "1.00" |
amount_type | displays amount type, possible options: ps_amount – amount to be received in payment system, shop_amount – amount to be deducted from the shop balance | String | "ps_amount" or "shop_amount" |
payway | withdraw payway, can be checked in the personal profile or with the manager. Receiving currency depends on indicated payway. | String | "card_uah" |
shop_currency | write-off currency from the shop | Integer | 980 — UA Hryvnia, 840 — US Dollar, 978 — Euro |
shop_id | shop ID from which the withdrawal is being done | Integer | 112 |
sign | signature | String | "f97c52fa8d273a9d3ad37e86e6dab314a592281654104ac9f348f386c29a2953" |
Example of response:
{
"data": {
"account_info_config": {
"account": {
"regex": "^((4|5|6)[0-9]{15,17}|[a-z0-9]{32})$",
"title": "Card number without spaces"
}
},
"info": {},
"payee_receive": 1,
"ps_currency": 980,
"shop_currency": 980,
"shop_write_off": 1.01
},
"error_code": 0,
"message": "Ok",
"result": true
}
Where,
| Parameter | Description |
|---|---|
account_info_config | information about the account, including a regular expression that the account must match. Information about additional parameters can also be returned to be sent via the payway |
title | account field title |
regex | regular expression for the account |
ps_currency | withdraw payway currency, format: international currency codes, 980 |
payee_receive | amount to be received in the payment system in withdraw payway currency |
shop_currency | shop balance currency from which the withdrawal is done |
shop_write_off | amount to be deducted from the shop balance, in balance currency |
Preliminary calculation request [POST]
To show the request, change Production to Mock Server in the right window
- Request (application/json)
{
"amount_type": "ps_amount",
"shop_currency": 980,
"sign": "f97c52fa8d273a9d3ad37e86e6dab314a592281654104ac9f348f386c29a2953",
"payway": "card_uah",
"amount": 1,
"shop_id": 112
}
- Response 200 ()
{
"data": {
"account_info_config": {
"account": {
"regex": "^((4|5|6)[0-9]{15,17}|[a-z0-9]{32})$",
"title": "Card number without spaces"
}
},
"payee_receive": 1,
"ps_currency": 980,
"shop_currency": 980,
"shop_write_off": 1.02
},
"error_code": 0,
"message": "Ok",
"result": true
}
Account check [/check_account]
Top-up option account check check_account. This method is not mandatory for creating a withdraw request, but is recommended to be processed before the withdraw/create request. It returns the info on the account on which the withdrawal request is created.
URL: https://core.qostiq.com/check_account
Method: POST
Mandatory parameters: shop_id, sign, payway, account, amount
If the response to withdraw/try has additional parameters in account_info_config, apart from account, they have to be passed in account_details (does not participate in signature formation).
Example of request:
{
"account": "test_acc",
"account_details": {
"contract": "C1234"
},
"sign": "faf7ee6db712752f2b107e05328bbd0d",
"payway": "card_uah",
"amount": 10.5,
"shop_id": 1
}
Where,
| Parameter | Description | Format | Example |
|---|---|---|---|
amount | planned credit amount on the account in payway currency | Number (no more than 2 characters after the dot) | 1, 1.0, 1.00 or "1.00" |
account | main account to check for top-up availability | String | "4111111111111111" |
payway | withdraw payway, can be checked in the personal profile or with the manager | String | "card_uah" |
shop_id | shop ID from which the withdrawal is being done | Integer | 112 |
sign | signature | String | "f97c52fa8d273a9d3ad37e86e6dab314a592281654104ac9f348f386c29a2953" |
account_details – additional mandatory information for account check, in this example contract – account contract number.
Example of response:
{
"data": {
"account_info": {
"verified": "true"
},
"provider_status": 1
},
"error_code": 0,
"message": "Ok",
"result": true
}
Where,
| Parameter | Description |
|---|---|
result | result of checking the possibility of crediting to the account |
provider_status | provider response status: 1 — available, check passed without errors; 2 — provider error, result unknown; 3 — processing error, result unknown |
account_info | additional information from the provider, e.g. account owner's full name |
Account check request [POST]
- Request (application/json)
{
"account": "4111111111111111",
"sign": "fcf9544776bb27ddd4b0b48482a4e0c35b0c54b7db5b7ea2553c2e2ac350d536",
"payway": "card_uah",
"amount": 1,
"shop_id": 112
}
- Response 200 ()
{
"data": {
"account_info": null,
"provider_status": 1,
"result": true
},
"error_code": 0,
"message": "Ok",
"result": true
}
Creating a withdrawal [/withdraw/create]
Withdraw. This method is used to create fund withdrawals in other currencies from the shop balance to other payment systems.
URL: https://core.qostiq.com/withdraw/create
Method: POST
Mandatory parameters: account, amount_type, amount, payway, shop_currency, shop_id, shop_payment_id, sign
Shop_payment_id must be unique for each new payment.
The request can pass additional parameters, for example, description – withdrawal description, or account_details – additional account information for the withdrawal (depends on the payway).
Example of request:
{
"account": "test acc",
"amount": 1,
"amount_type": "ps_amount",
"payway": "card_uah",
"shop_currency": 840,
"shop_id": 1,
"shop_payment_id": "2e18aadc-cf87-4cdd-9a08-9a57f9ac4066",
"sign": "9505e9fa97e8910a8b1d2797c348aae5d35f7846ad901cc5fc91d2afbdc978e3"
}
| Parameter | Description | Format | Example |
|---|---|---|---|
account | payee account in the payment system, e.g. card number | String | "4111111111111111" |
amount | receive or write-off amount (depends on amount_type) | Number (no more than 2 characters after the dot) | 1, 1.0, 1.00 or "1.00" |
amount_type | indicates amount type: ps_amount – amount to be received in payment system, shop_amount – amount to be deducted from shop balance | String | "ps_amount" or "shop_amount" |
payway | withdraw payway, can be checked in the personal profile or with the manager | String | "card_uah" |
shop_currency | write-off currency from the shop | Integer | 980 — UA Hryvnia, 840 — US Dollar, 978 — Euro |
shop_id | shop ID from which the withdrawal is being done | Integer | 1 |
shop_payment_id | unique payment ID on the shop's side | String | "2e18aadc-cf87-4cdd-9a08-9a57f9ac4066" |
callback_url | URL for receiving operation notification (optional parameter, details about withdrawal notifications) | String | "https://shop.com/withdraw/callback" |
Example of request with additional parameters:
{
"account": "test acc",
"account_details": {
"fname": "ksu",
"lname": "ksu"
},
"amount": 1,
"amount_type": "ps_amount",
"description": "Test desc",
"email": "test@email.com",
"payway": "card_uah",
"shop_currency": 840,
"shop_id": 1,
"shop_payment_id": "63288d86-241c-418e-94b8-db4bbf5026fe",
"sign": "2d9270de3c0ae94ff6571991cc2ea3a3e1c4c53265e2e76a74f1f76e4d465127"
}
Where,
| Parameter | Description |
|---|---|
account_details | additional parameter for detailing payee account information (depends on the chosen payway). The list of fields can be viewed in the personal profile for each payway |
description | withdrawal description, saved in payment history and passed in the purpose field if the payment system supports this |
email | additional parameter, does not participate in signature formation |
Example of response:
{
"data": {
"balance": 0.0,
"id": 1,
"payee_receive": 1,
"ps_currency": 840,
"shop_currency": 840,
"shop_payment_id": "63288d86-241c-418e-94b8-db4bbf5026fe",
"shop_write_off": 1.05,
"status": 5
},
"error_code": 0,
"message": "Ok",
"result": true
}
Where,
| Parameter | Description |
|---|---|
balance | shop balance after successful withdrawal creation |
id | unique payment ID in Qostiq system |
payee_receive | amount to be received on the account in ps_currency |
ps_currency | receiving currency for payee_receive |
shop_currency | write-off currency from the shop for shop_write_off |
shop_payment_id | unique payment ID on the shop's side |
shop_write_off | write-off amount from the shop in shop_currency |
status | withdrawal status |
Recommendations for sending withdrawal creation and status requests:
1. If a time-out was received on the withdrawal creation request, make a status request by shop payment number /withdraw/shop_payment_status and, if the response returns an error that such payment does not exist, the withdrawal creation request can be repeated. If the response returns the withdrawal status, it means it was created and you should use that status.
2. Recommended frequency for payment status checks — no more than 1 request per 60 seconds, as many payment systems also need time to process the payment.
3. The reason for withdrawal rejection can be seen in the "rejected_reason" parameter, which is returned in withdrawal creation requests and withdrawal status requests.
Withdraw funds from the shop [POST]
To show the request, change Production to Mock Server in the right window
- Request (application/json)
{
"account": "test_acc",
"amount": 1,
"amount_type": "ps_amount",
"payway": "card_uah",
"shop_currency": 980,
"shop_id": 112,
"shop_payment_id": "63288d86-241c-418e-94b8-db4bbf5026f",
"sign": "b4c3ca4b403bb065db1fe716b9cbf5138e3dabc7bc5d385750b3fa852ed97d46"
}
- Response 200 ()
{
"data": {
"balance": 0.0,
"id": 11298076,
"payee_receive": 1,
"ps_currency": 980,
"shop_currency": 980,
"shop_payment_id": "63288d86-241c-418e-94b8-db4bbf5026f",
"shop_write_off": 1.02,
"status": 3
},
"error_code": 0,
"message": "Ok",
"result": true
}
Status request by withdraw_id [/withdraw/status]
URL: https://core.qostiq.com/withdraw/status
Method: POST
Mandatory parameters: now, shop_id, withdraw_id
This request allows you to get the withdrawal status by the payment system transaction ID withdraw_id.
Example of request:
{
"now": "2017-05-16 16:56:25.009469",
"shop_id": 112,
"withdraw_id": 11298076,
"sign": "e1dfc97b2c5430e21be08b1140f25259aa1865d56e166ee398c2368ad39712f7"
}
Where,
| Parameter | Description | Format | Example |
|---|---|---|---|
now | request time | String | "2017-05-16 16:56:25.009469" |
shop_id | shop ID in Qostiq system | Integer | 112 |
withdraw_id | unique withdrawal ID in Qostiq system (returned in id parameter on successful withdrawal creation) | Integer | 11298076 |
sign | signature | String | "e1dfc97b2c5430e21be08b1140f25259aa1865d56e166ee398c2368ad39712f7" |
Example of response:
{
"data": {
"id": 11298076,
"payee_receive": 1,
"ps_currency": 980,
"rejected_reason": "Card number does not exist. Please check the number",
"shop_currency": 980,
"shop_payment_id": "63288d86-241c-418e-94b8-db4bbf5026f11",
"shop_write_off": 1.02,
"status": 6
},
"error_code": 0,
"message": "Ok",
"result": true
}
Where,
| Parameter | Description |
|---|---|
status | current withdrawal status (see Withdrawal statuses) |
shop_payment_id | withdrawal ID on the shop's side |
shop_currency | shop currency |
ps_currency | receiving currency in payment system |
payee_receive | amount credited to the payee's balance in ps_currency |
shop_write_off | write-off amount from the shop in shop_currency |
id | unique withdrawal ID in Qostiq system |
rejected_reason | reason for withdrawal rejection |
Example of error response:
{
"error_code": 2000,
"message": "Withdraw (id=3) wasn't found",
"data": null,
"result": false
}
Request withdrawal status [POST]
- Request (application/json)
{
"now": "2017-01-23 16:56:25.009469",
"shop_id": 112,
"withdraw_id": 11298076,
"sign": "e1dfc97b2c5430e21be08b1140f25259aa1865d56e166ee398c2368ad39712f7"
}
- Response 200 ()
{
"data": {
"id": 11298076,
"payee_receive": 1,
"ps_currency": 980,
"shop_currency": 980,
"shop_payment_id": "63288d86-241c-418e-94b8-db4bbf5026f",
"shop_write_off": 1.02,
"status": 5
},
"result": true,
"error_code": 0,
"message": "Ok"
}
Status request by shop_payment_id [/withdraw/shop_payment_status]
URL: https://core.qostiq.com/withdraw/shop_payment_status
Method: POST
Mandatory parameters: now, shop_payment_id, shop_id
This request allows you to get the withdrawal status by the shop transaction ID shop_payment_id.
Example of request:
{
"shop_id": 112,
"shop_payment_id": "63288d86-241c-418e-94b8-db4bbf5026f",
"now": "2011-12-06 16:07:28.878200",
"sign": "a1ab593500a4ab146abe33121ad9f08397beaef5f4ba9279ca6e1eee1c6b0bc1"
}
Where,
| Parameter | Description | Format | Example |
|---|---|---|---|
now | request time | String | "2011-12-06 16:07:28.878200" |
shop_id | shop ID in Qostiq system | Integer | 112 |
shop_payment_id | transaction ID on the shop's side | String | "63288d86-241c-418e-94b8-db4bbf5026f" |
sign | signature | String | "e1dfc97b2c5430e21be08b1140f25259aa1865d56e166ee398c2368ad39712f7" |
Response parameters:
| Parameter | Description |
|---|---|
status | current withdrawal status (see Withdrawal statuses) |
shop_payment_id | withdrawal ID on the shop's side |
shop_currency | shop currency |
ps_currency | receiving currency in payment system |
payee_receive | amount credited to the payee's balance in ps_currency |
shop_write_off | write-off amount from the shop in shop_currency |
id | unique withdrawal ID in Qostiq system |
Example of error response:
{
"error_code": 2000,
"message": "Withdraw (id=3) wasn't found",
"data": null,
"result": false
}
Request withdrawal status by transaction [POST]
- Request (application/json)
{
"shop_id": 112,
"shop_payment_id": "63288d86-241c-418e-94b8-db4bbf5026f",
"now": "2011-12-06 16:07:28.878200",
"sign": "a1ab593500a4ab146abe33121ad9f08397beaef5f4ba9279ca6e1eee1c6b0bc1"
}
- Response 200 ()
{
"data": {
"id": 11298076,
"payee_receive": 1,
"ps_currency": 980,
"shop_currency": 980,
"shop_payment_id": "63288d86-241c-418e-94b8-db4bbf5026f",
"shop_write_off": 1.02,
"status": 5
},
"result": true,
"error_code": 0,
"message": "Ok"
}
Withdrawal notification [/withdraw/callback]
After finalizing the withdrawal, the Qostiq system sends a notification to the shop's interaction URL specified in the settings.
The URL for receiving withdrawal notifications can also be passed in the additional parameter callback_url in the withdrawal creation request /withdraw/create.
Notifications are sent from IP addresses:
- 34.90.243.164
- 34.147.48.238
- 34.90.176.128
- 34.90.34.134
- 35.242.192.50
- 34.90.247.48
- 34.90.185.30
- 34.147.69.92
- 35.198.183.103
- 35.234.123.199
- 34.159.7.106
It is mandatory to verify values from the notification against the values in the created withdrawal and check the signature in the notification.
Important! Always verify operation amounts and operation numbers — shop_payment_id, shop_write_off, payee_receive upon receiving the notification.
Method: POST, Content-Type=application/json
Example of notification:
{
"account_details": {
"customer_id": "12345678"
},
"callback_type": "withdraw",
"created": "2024-11-18 13:41:57",
"description": "example",
"payee_receive": 10.5,
"payment_id": 64045,
"payway": "card_usd",
"processed": "2024-11-18 13:45:38",
"ps_currency": 840,
"shop_currency": 840,
"shop_id": 1,
"shop_payment_id": "12345678",
"shop_write_off": 11.5,
"sign": "e02baf7a7be1c591f2ad8f44dc25e7df8324bef1f109765659b3633839441584",
"status": "success"
}
Where,
| Parameter | Description |
|---|---|
callback_type | operation type for which the notification came: withdraw for fiat withdrawal |
created | date and time of withdrawal creation |
description | withdrawal description passed during creation |
payee_receive | amount to be received on account in ps_currency |
payment_id | unique withdrawal ID in Qostiq system |
payway | payway in Qostiq system through which the withdrawal was created |
processed | date and time of withdrawal status change |
ps_currency | receiving currency for payee_receive |
shop_currency | write-off currency from the shop for shop_write_off |
shop_id | unique shop ID that created the withdrawal |
shop_payment_id | unique payment ID of the shop that created the withdrawal |
shop_write_off | write-off amount from the shop in shop_currency |
sign | signature |
status | withdrawal status: success — withdrawal successful, rejected — withdrawal rejected |
test_add_on | any custom parameter passed by the shop during withdrawal creation |
The signature is formed by the same algorithm as when creating an invoice, but all parameters whose value is not null or empty string participate in the signature formation.
Upon correct receipt and processing of the notification, return http status 200 and message body OK. Otherwise notifications will be resent with increasing intervals, 25 attempts total, the last one after one day.
Example string for signature generation
{"customer_id":"12345678"}:withdraw:2024-11-18 13:41:57:example:10.5:64045:card_usd:2024-11-18 13:45:38:840:840:1:12345678:11.5:successTestkey1
Example of successful payment notification [POST]
- Request (application/json)
{
"account_details": {"customer_id": "12345678"},
"callback_type": "withdraw",
"created": "2024-11-18 13:41:57",
"description": "example",
"payee_receive": 10.5,
"payment_id": 64045,
"payway": "card_usd",
"processed": "2024-11-18 13:45:38",
"ps_currency": 840,
"shop_currency": 840,
"shop_id": 1,
"shop_payment_id": "12345678",
"shop_write_off": 11.5,
"sign": "e02baf7a7be1c591f2ad8f44dc25e7df8324bef1f109765659b3633839441584",
"status": "success"
}
-
Response 200 ()
OK
Example of unsuccessful payment notification [POST]
- Request (application/json)
{
"account_details": {"customer_id": "12345678"},
"callback_type": "withdraw",
"created": "2024-11-18 13:41:57",
"description": "example",
"payee_receive": 10.5,
"payment_id": 64045,
"payway": "card_usd",
"processed": "2024-11-18 13:45:38",
"ps_currency": 840,
"shop_currency": 840,
"shop_id": 1,
"shop_payment_id": "12345678",
"shop_write_off": 11.5,
"sign": "e02baf7a7be1c591f2ad8f44dc25e7df8324bef1f109765659b3633839441584",
"status": "rejected"
}
-
Response 200 ()
OK
Withdrawal statuses [/withdraw/allstatuses]
If the withdrawal is successfully created, the response will return a unique payment ID and its status. Status can be final or non-final; for non-final status, status requests must be made until the final status is received.
| Status | Value | Description | Final? |
|---|---|---|---|
| 1 | Created | Payment created, awaiting processing | No, make status request |
| 2 | WaitingManualConfirmation | Awaiting manual operator confirmation | No, make status request |
| 3 | PsProcessing | Sent to payment system | No, make status request |
| 4 | PsProcessingError | Error during withdrawal on the payment system side | No, make status request or contact support |
| 5 | Success | Successfully completed | Yes, funds deducted from shop |
| 6 | Rejected | Rejected by the payment system | Yes, funds not deducted from shop |
| 7 | ManualConfirmed | Confirmed by operator and awaiting processing | No, make status request |
| 9 | PsNetworkError | Network error on the payment system side | No, make status request |
| 10 | CanceledManually | Withdrawal manually cancelled by Qostiq system | Yes, final status |
| 11 | Refunded | Successful withdrawal manually cancelled by Qostiq system | Yes, final status |
Returning unsuccessful status on request [POST]
- Request (application/json)
{
"now": "2020-01-19 15:11:18.34",
"shop_id": "112",
"sign": "e007c7641984e74620de9ee0f151aca845f0e0be1a96743ea154db9f0a2853ab",
"withdraw_id": "25161103"
}
- Response 200 ()
{
"data": null,
"error_code": 7,
"message": "Withdraw (id=25161103) wasn't found",
"result": false
}
Other shop methods
Account registration request [/registration]
Request for shop activation
URL: https://core.qostiq.com/account/register
Method: POST
Mandatory parameters: now, shop_id, email
Date format - dd.mm.YYYY hh:mm:ss
Example of request:
{
"shop_id": 1,
"now": "30.06.2017 10:12:44",
"email": "example@email.com",
"sign": "32b2c32caa8adecf89c6dfa72ffca3a0506f33febfe3aaab090cdbfbd0e8b953"
}
Where mandatory parameters:
| Parameter | Description | Format | Example |
|---|---|---|---|
now | request time | String | "30.06.2017 10:12:44" |
shop_id | shop ID in Qostiq system | Integer | 1 |
email | wallet registration email | String | "example@email.com" |
sign | signature | String | "32b2c32caa8adecf89c6dfa72ffca3a0506f33febfe3aaab090cdbfbd0e8b953" |
Example of response:
{
"data": {
"account_number": "201499789419",
"email": "example@email.com"
},
"error_code": 0,
"message": "Ok",
"result": true
}
Send account registration request [POST]
- Request (application/json)
{
"now": "30.06.2017 10:12:44",
"email": "nevu77@carbtc.net",
"shop_id": 3,
"sign": "bd4889102893c7f764c95ae3ed30b1d4fcb4fc01ca2ccbe5344b50ffdb64fe73"
}
- Response 200 ()
{
"data": {
"account_number": "201499789419",
"email": "example@email.com"
},
"error_code": 0,
"message": "Ok",
"result": true
}
Balance request [/balance_request]
To get the current shop balance.
URL: https://core.qostiq.com/shop_balance
Method: POST
Mandatory parameters: now, shop_id
Example of request:
{
"now": "2017-05-17 10:48:45.509731",
"shop_id": 1,
"sign": "361f6310a04ef858df0847d1e2f6669ea61159a5c80d0ed6dcf17329751b4ef9"
}
Where,
| Parameter | Description | Format | Example |
|---|---|---|---|
now | request time | String | "2017-05-17 10:48:45.509731" |
shop_id | shop ID in Qostiq system | Integer | 1 |
sign | signature | String | "361f6310a04ef858df0847d1e2f6669ea61159a5c80d0ed6dcf17329751b4ef9" |
Example of response:
{
"data": {
"shop_id": 1,
"balances": [
{
"available": 28.1,
"currency": 980,
"hold": 0.0,
"frozen": 20.0,
"rolling_reserve": 15.0
},
{
"available": 0.0,
"currency": 978,
"hold": 0.0,
"frozen": 0.0,
"rolling_reserve": 15.0
},
{
"available": 0.0,
"currency": 840,
"hold": 0.0,
"frozen": 0.0,
"rolling_reserve": 15.0
}
]
},
"result": true,
"error_code": 0,
"message": "Ok"
}
Where,
| Parameter | Description |
|---|---|
balances | shop balance by currency |
currency | balance currency (format: 980, 840, 978) |
available | available shop balance |
frozen | frozen funds on balance, e.g. for a created withdrawal that is being processed |
hold | temporarily held funds, e.g. during incoming payment verification |
rolling_reserve | temporary holding of funds on the shop balance |
The total shop balance equals the sum of available, frozen and hold in the specified currency.
For withdrawals, available funds are available excluding rolling_reserve.
Request balance [POST]
- Request (application/json)
{
"now": "2017-12-06 12:31:19.500060",
"shop_id": 112,
"sign": "77c6cc948751ee5c13a68e5301c1f85f222e9e3333f4fefb987eb9632732c90b"
}
- Response 200 ()
{
"data": {
"shop_id": 112,
"balances": [
{
"available": 28.1,
"currency": 980,
"hold": 0.0,
"frozen": 20.0
},
{
"available": 0.0,
"currency": 978,
"hold": 0.0,
"frozen": 0.0
},
{
"available": 0.0,
"currency": 840,
"hold": 0.0,
"frozen": 0.0
}
]
},
"result": true,
"error_code": 0,
"message": "Ok"
}
Get available Invoice payment methods [/available_payment_methods_invoice]
URL: https://core.qostiq.com/shop_input_config/shop
Method: POST
Mandatory parameters: now, shop_id
Example of request:
{
"now": "03.09.2018 11:19:55",
"shop_id": 3,
"sign": "588485c9d7f0d7fb3445e620450ca303ae11e35e159002bc33d2174398f9134c"
}
Where:
| Parameter | Description | Format | Example |
|---|---|---|---|
now | request time | String | "2018-06-15 09:58:01.01" |
shop_id | shop ID in Qostiq system | Integer | 3 |
sign | signature | String | "588485c9d7f0d7fb3445e620450ca303ae11e35e159002bc33d2174398f9134c" |
Example of response:
{
"data": [
{
"id": 3,
"name": "Visa/MC",
"payways": [
{
"add_ons_config": null,
"alias": "card_uah",
"currency": 980,
"fee_config": {
"fix": 0.0,
"percent": 6.0
},
"fee_part_config": {
"fix_part": 0,
"percent_part": 1.0
},
"id": 154,
"is_active": true,
"max_amount": 100000.0,
"min_amount": 1.0
}
],
"rating": 2
}
],
"error_code": 0,
"message": "Ok",
"result": true
}
Where,
| Parameter | Description |
|---|---|
id | payment method ID |
name | payment method name |
payways | payways enabled for the shop |
add_ons_config | additional information, if required for the payway |
alias | payway name |
currency | currency per payway (format: 980, 840, 978) |
fee_config | fee amount |
fix | fixed fee |
percent | percentage fee |
fee_part_config | fee distribution settings between shop and payer |
fix_part | fixed fee distribution (0 — on payer, 1 — on shop) |
percent_part | percentage fee distribution (0.0–1.0) |
is_active | activation status |
max_amount | maximum payment amount per payway |
min_amount | minimum payment amount per payway |
Request Invoice payment methods available to the shop [POST]
- Request (application/json)
{
"now": "03.09.2018 11:19:55",
"shop_id": 3,
"sign": "588485c9d7f0d7fb3445e620450ca303ae11e35e159002bc33d2174398f9134c"
}
- Response 200 ()
{
"data": [
{
"id": 3,
"name": "Visa/MC",
"payways": [
{
"add_ons_config": null,
"alias": "card_uah",
"currency": 980,
"fee_config": {
"fix": 0.0,
"percent": 6.0
},
"fee_part_config": {
"fix_part": 0,
"percent_part": 1.0
},
"id": 154,
"is_active": true,
"max_amount": 100000.0,
"min_amount": 1.0
}
],
"rating": 2
}
],
"error_code": 0,
"message": "Ok",
"result": true
}
Get available Withdraw payment methods [/available_payment_methods_withdraw]
URL: https://core.qostiq.com/shop_output_config/shop
Method: POST
Mandatory parameters: now, shop_id
Example of request:
{
"now": "03.09.2018 11:19:55",
"shop_id": 3,
"sign": "588485c9d7f0d7fb3445e620450ca303ae11e35e159002bc33d2174398f9134c"
}
Where,
| Parameter | Description | Format | Example |
|---|---|---|---|
now | request time | String | "2018-06-15 09:58:01.01" |
shop_id | shop ID in Qostiq system | Integer | 3 |
sign | signature | String | "588485c9d7f0d7fb3445e620450ca303ae11e35e159002bc33d2174398f9134c" |
Example of response:
{
"data": [
{
"id": 1,
"name": "Visa/MC",
"payways": [
{
"account_info_config": {
"account": {
"regex": "^(4|5|6)[0-9]{15,17}$",
"title": "Card number"
}
},
"alias": "card_uah",
"currency": 980,
"fee_config": {
"fix": 10.0,
"percent": 1.5
},
"info_id": null,
"max_amount": 14999.0,
"min_amount": 1.0
}
],
"rating": 1
},
{
"id": 3,
"is_transfer_config": true,
"name": "Qostiq",
"payways": [
{
"account_info_config": {
"payee_account": {
"regex": "^20[\\d]{10}$|^([a-zA-Z0-9_-]+\\.)*[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)*\\.[a-zA-Z]{2,6}$",
"title": "Wallet number or email"
}
},
"alias": "qostiq_usd",
"currency": 980,
"fee_config": {
"fix": 0.0,
"percent": 0.0
},
"info_id": null,
"max_amount": 10000.0,
"min_amount": 0.5
}
],
"rating": 22
}
],
"error_code": 0,
"message": "Ok",
"result": true
}
Where,
| Parameter | Description |
|---|---|
id | payment method ID |
name | payment method name |
payways | payways enabled for the shop |
account_info_config | additional information, if required for the payway |
alias | payway name |
currency | currency per payway (format: 980, 840, 978) |
fee_config | fee amount |
fix | fixed fee |
percent | percentage fee |
fix_part | fixed fee distribution (0 — on payer, 1 — on shop) |
percent_part | percentage fee distribution (0.0–1.0) |
is_active | activation status |
max_amount | maximum payment amount per payway |
min_amount | minimum payment amount per payway |
is_transfer_config | indicator that this is a Transfer (transfer to Qostiq wallets) — for withdrawals use the transfer API method |
Request available Withdraw methods [POST]
- Request (application/json)
{
"now": "03.09.2018 11:19:55",
"shop_id": 3,
"sign": "588485c9d7f0d7fb3445e620450ca303ae11e35e159002bc33d2174398f9134c"
}
- Response 200 ()
{
"data": [
{
"id": 1,
"name": "Visa/MC",
"payways": [
{
"account_info_config": {
"account": {
"regex": "^(4|5|6)[0-9]{15,17}$",
"title": "Card number"
}
},
"alias": "card_uah",
"currency": 980,
"fee_config": {
"fix": 10.0,
"percent": 1.5
},
"info_id": null,
"max_amount": 14999.0,
"min_amount": 1.0
}
],
"rating": 1
},
{
"id": 3,
"is_transfer_config": true,
"name": "Qostiq",
"payways": [
{
"account_info_config": {
"payee_account": {
"regex": "^20[\\d]{10}$|^([a-zA-Z0-9_-]+\\.)*[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)*\\.[a-zA-Z]{2,6}$",
"title": "Wallet number or email"
}
},
"alias": "qostiq_usd",
"currency": 980,
"fee_config": {
"fix": 0.0,
"percent": 0.0
},
"info_id": null,
"max_amount": 10000.0,
"min_amount": 0.5
}
],
"rating": 22
}
],
"error_code": 0,
"message": "Ok",
"result": true
}