Documentation Index
Fetch the complete documentation index at: https://docs.m4psp.com/llms.txt
Use this file to discover all available pages before exploring further.
Process of shop payouts generation is as follows:

- Shop executes a request for a preliminary calculation and receiving additional parameters for further creation of the payout using the method withdraw/try;
- If
result: true, the shop sends request for a preliminary check of the existence and possibility of adding funds to the account check_account, to the specified payment way (if necessary, specify additional parameters obtained from the previous request from theaccount_info_configfield); - If
result: true, verify availability of additional information in theaccount_infofield, if available, it is necessary to pass additional parameters in the payout creation request. When gettingresult: false, analyse the error code in theerror_codefield (see description of error codes). If theerror codeis not fatal, then you need to start requesting the status of the transaction after a certain time (for 2 hours at 30-second intervals). If theerror codeis fatal the communication with our API is over. - Shop submits a request for payout creation withdraw/create, specifying the required parameters and additional information from
account_info(if it is required for the specified payment way); - The response returns information with the generated payout request and indicating the amounts and the payout ID. In this case, the part of the balance of the shop from which the payout is made is frozen until the final payout status.
- After payout creation, it is necessary to make a request to get the status of the created payout withdraw/status or withdraw/shop_payment_status, before receiving the final status.
Attention: Status requests are recommended to be made at 30-second intervals.
- After final status is received, the payout is considered completed, and the funds are debited from the shop’s balance (or returned to the balance if the payout was not completed).
Guidelines for creation and verification of payout requests
If you receivedresult: true after creating the payout, you should immediately check the data.status field, perhaps there will already be a final status, for example 6 (Rejected) and in this case, you do not need to make a request for the payout status.
If you receive the Read timeout error at the payout creation request, then you need to make a status request by the shop’s payout number withdraw/shop_payment_status and if the response returns an error stating the absence of such a payout, you can repeat the request to create a payout. If the payout status is returned in the response, then it means that it was created and you need to focus on this status.
Reason for payout rejection (getting status 6) can be clarified through the support service support@m4solutions.io.
Securing payouts idempotency
Warning: System has duplication protection for payouts, shop_payment_id must be unique within a single shop.
