Skip to main content

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:

  1. Preliminary calculation and additional data request withdraw/try is sent;

  2. 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 from account_info_config);

  3. When receiving result == true, withdraw to the checked account request is sent (with additional data from account_info_config, if necessary). When receiving result==error, it is necessary to analyze an error message in message.

  4. 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.

  5. After creating a withdrawal, it is necessary to make a withdraw status request on the created withdrawal until the final status is received.

  6. 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,

ParameterDescriptionFormatExample
amountreceive 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_typedisplays amount type, possible options: ps_amount – amount to be received in payment system, shop_amount – amount to be deducted from the shop balanceString"ps_amount" or "shop_amount"
paywaywithdraw payway, can be checked in the personal profile or with the manager. Receiving currency depends on indicated payway.String"card_uah"
shop_currencywrite-off currency from the shopInteger980 — UA Hryvnia, 840 — US Dollar, 978 — Euro
shop_idshop ID from which the withdrawal is being doneInteger112
signsignatureString"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,

ParameterDescription
account_info_configinformation 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
titleaccount field title
regexregular expression for the account
ps_currencywithdraw payway currency, format: international currency codes, 980
payee_receiveamount to be received in the payment system in withdraw payway currency
shop_currencyshop balance currency from which the withdrawal is done
shop_write_offamount 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,

ParameterDescriptionFormatExample
amountplanned credit amount on the account in payway currencyNumber (no more than 2 characters after the dot)1, 1.0, 1.00 or "1.00"
accountmain account to check for top-up availabilityString"4111111111111111"
paywaywithdraw payway, can be checked in the personal profile or with the managerString"card_uah"
shop_idshop ID from which the withdrawal is being doneInteger112
signsignatureString"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,

ParameterDescription
resultresult of checking the possibility of crediting to the account
provider_statusprovider response status: 1 — available, check passed without errors; 2 — provider error, result unknown; 3 — processing error, result unknown
account_infoadditional 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"
}
ParameterDescriptionFormatExample
accountpayee account in the payment system, e.g. card numberString"4111111111111111"
amountreceive 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_typeindicates amount type: ps_amount – amount to be received in payment system, shop_amount – amount to be deducted from shop balanceString"ps_amount" or "shop_amount"
paywaywithdraw payway, can be checked in the personal profile or with the managerString"card_uah"
shop_currencywrite-off currency from the shopInteger980 — UA Hryvnia, 840 — US Dollar, 978 — Euro
shop_idshop ID from which the withdrawal is being doneInteger1
shop_payment_idunique payment ID on the shop's sideString"2e18aadc-cf87-4cdd-9a08-9a57f9ac4066"
callback_urlURL 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,

ParameterDescription
account_detailsadditional 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
descriptionwithdrawal description, saved in payment history and passed in the purpose field if the payment system supports this
emailadditional 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,

ParameterDescription
balanceshop balance after successful withdrawal creation
idunique payment ID in Qostiq system
payee_receiveamount to be received on the account in ps_currency
ps_currencyreceiving currency for payee_receive
shop_currencywrite-off currency from the shop for shop_write_off
shop_payment_idunique payment ID on the shop's side
shop_write_offwrite-off amount from the shop in shop_currency
statuswithdrawal 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,

ParameterDescriptionFormatExample
nowrequest timeString"2017-05-16 16:56:25.009469"
shop_idshop ID in Qostiq systemInteger112
withdraw_idunique withdrawal ID in Qostiq system (returned in id parameter on successful withdrawal creation)Integer11298076
signsignatureString"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,

ParameterDescription
statuscurrent withdrawal status (see Withdrawal statuses)
shop_payment_idwithdrawal ID on the shop's side
shop_currencyshop currency
ps_currencyreceiving currency in payment system
payee_receiveamount credited to the payee's balance in ps_currency
shop_write_offwrite-off amount from the shop in shop_currency
idunique withdrawal ID in Qostiq system
rejected_reasonreason 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,

ParameterDescriptionFormatExample
nowrequest timeString"2011-12-06 16:07:28.878200"
shop_idshop ID in Qostiq systemInteger112
shop_payment_idtransaction ID on the shop's sideString"63288d86-241c-418e-94b8-db4bbf5026f"
signsignatureString"e1dfc97b2c5430e21be08b1140f25259aa1865d56e166ee398c2368ad39712f7"

Response parameters:

ParameterDescription
statuscurrent withdrawal status (see Withdrawal statuses)
shop_payment_idwithdrawal ID on the shop's side
shop_currencyshop currency
ps_currencyreceiving currency in payment system
payee_receiveamount credited to the payee's balance in ps_currency
shop_write_offwrite-off amount from the shop in shop_currency
idunique 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,

ParameterDescription
callback_typeoperation type for which the notification came: withdraw for fiat withdrawal
createddate and time of withdrawal creation
descriptionwithdrawal description passed during creation
payee_receiveamount to be received on account in ps_currency
payment_idunique withdrawal ID in Qostiq system
paywaypayway in Qostiq system through which the withdrawal was created
processeddate and time of withdrawal status change
ps_currencyreceiving currency for payee_receive
shop_currencywrite-off currency from the shop for shop_write_off
shop_idunique shop ID that created the withdrawal
shop_payment_idunique payment ID of the shop that created the withdrawal
shop_write_offwrite-off amount from the shop in shop_currency
signsignature
statuswithdrawal status: success — withdrawal successful, rejected — withdrawal rejected
test_add_onany 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.

StatusValueDescriptionFinal?
1CreatedPayment created, awaiting processingNo, make status request
2WaitingManualConfirmationAwaiting manual operator confirmationNo, make status request
3PsProcessingSent to payment systemNo, make status request
4PsProcessingErrorError during withdrawal on the payment system sideNo, make status request or contact support
5SuccessSuccessfully completedYes, funds deducted from shop
6RejectedRejected by the payment systemYes, funds not deducted from shop
7ManualConfirmedConfirmed by operator and awaiting processingNo, make status request
9PsNetworkErrorNetwork error on the payment system sideNo, make status request
10CanceledManuallyWithdrawal manually cancelled by Qostiq systemYes, final status
11RefundedSuccessful withdrawal manually cancelled by Qostiq systemYes, 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:

ParameterDescriptionFormatExample
nowrequest timeString"30.06.2017 10:12:44"
shop_idshop ID in Qostiq systemInteger1
emailwallet registration emailString"example@email.com"
signsignatureString"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,

ParameterDescriptionFormatExample
nowrequest timeString"2017-05-17 10:48:45.509731"
shop_idshop ID in Qostiq systemInteger1
signsignatureString"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,

ParameterDescription
balancesshop balance by currency
currencybalance currency (format: 980, 840, 978)
availableavailable shop balance
frozenfrozen funds on balance, e.g. for a created withdrawal that is being processed
holdtemporarily held funds, e.g. during incoming payment verification
rolling_reservetemporary 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:

ParameterDescriptionFormatExample
nowrequest timeString"2018-06-15 09:58:01.01"
shop_idshop ID in Qostiq systemInteger3
signsignatureString"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,

ParameterDescription
idpayment method ID
namepayment method name
paywayspayways enabled for the shop
add_ons_configadditional information, if required for the payway
aliaspayway name
currencycurrency per payway (format: 980, 840, 978)
fee_configfee amount
fixfixed fee
percentpercentage fee
fee_part_configfee distribution settings between shop and payer
fix_partfixed fee distribution (0 — on payer, 1 — on shop)
percent_partpercentage fee distribution (0.0–1.0)
is_activeactivation status
max_amountmaximum payment amount per payway
min_amountminimum 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,

ParameterDescriptionFormatExample
nowrequest timeString"2018-06-15 09:58:01.01"
shop_idshop ID in Qostiq systemInteger3
signsignatureString"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,

ParameterDescription
idpayment method ID
namepayment method name
paywayspayways enabled for the shop
account_info_configadditional information, if required for the payway
aliaspayway name
currencycurrency per payway (format: 980, 840, 978)
fee_configfee amount
fixfixed fee
percentpercentage fee
fix_partfixed fee distribution (0 — on payer, 1 — on shop)
percent_partpercentage fee distribution (0.0–1.0)
is_activeactivation status
max_amountmaximum payment amount per payway
min_amountminimum payment amount per payway
is_transfer_configindicator 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
}