Payout status
This method returns the current status of a payout by the identifier from the initiation response (order_id) or by your user_data if order_id was not saved. Use it to poll status after creating a payout, and when callback delivery fails.
Request and signature format — see API request format.
How it works
- Identification — pass
order_id(from the payout creation response) oruser_data(payout ID on your side). - Request — the server sends a signed request to the
status_payoutendpoint. - Response — the API returns JSON with the current
status, amounts, recipient details, and if needed additional fieldspaid_amountorinit_amount.
See Transaction statuses for status and status_description codes.
Technical details
| Endpoint | https://api.1payment.com/status_payout |
| Methods | GET, POST |
| Response format | JSON |
| Type in response | payout_type field — see Payout types |
Request parameters
Required
| Parameter | Type | Description |
|---|---|---|
partner_id | Integer | Your unique ID in the 1Payment system. |
project_id | Integer | Your project identifier. |
sign | String | Request signature (see the Signature section). |
Payout identification
Pass one of the following parameters:
| Parameter | Type | Description |
|---|---|---|
order_id | String | Payout ID in 1Payment (from the initiation response). |
user_data | String | Your payout ID; used when order_id is not specified. |
Signature (sign)
Signature: MD5, lowercase (hex). General rules — API request format.
Formula:
MD5(status_payout + <params_excluding_sign_in_alphabetical_order_joined_with_&> + <API_KEY>)Example string before hashing (lookup by order_id):
status_payoutorder_id=8p3brmb19gfg0sg8gcwhws8kgc748s87&partner_id=1234&project_id=5678secret_keyVerify signature in the documentation
Signature check for {{method}}
Paste the request parameters (JSON), API key, and signature. The widget verifies them automatically.
Parameter string:
order_id=8p3brmb19gfg0sg8gcwhws8kgc748s87&partner_id=1234&project_id=5678String for MD5:
status_payoutorder_id=8p3brmb19gfg0sg8gcwhws8kgc748s87&partner_id=1234&project_id=5678Expected signature:
63dab4a5c770f75266745dc10644dfaaSignature does not match
Request examples
const crypto = require('crypto');
const axios = require('axios');
async function getPayoutStatus(apiKey, params) {
// 1. Сортируем параметры по алфавиту
const sortedKeys = Object.keys(params).sort();
const queryString = sortedKeys.map((key) => `${key}=${params[key]}`).join('&');
// 2. Подпись с префиксом status_payout
const baseString = `status_payout${queryString}${apiKey}`;
params.sign = crypto.createHash('md5').update(baseString).digest('hex');
// 3. GET-запрос
const response = await axios.get('https://api.1payment.com/status_payout', { params });
return response.data;
}
const apiKey = process.env.ONEPAYMENT_API_KEY;
const data = {
partner_id: 1234,
project_id: 5678,
order_id: '8p3brmb19gfg0sg8gcwhws8kgc748s87',
};
getPayoutStatus(apiKey, data).then(console.log);API response
Successful response (200):
{
"payout_type": "card",
"project_id": 5678,
"order_id": "8p3brmb19gfg0sg8gcwhws8kgc748s87",
"user_data": "12345",
"status": 3,
"status_description": "SUCCESS",
"init_time": "2019-04-01 18:01:55",
"status_time": "2019-04-01 18:02:59",
"amount": "100",
"balance_amount": "102.5",
"destination": "411111******1111",
"status_code": 0
}| Field | Description |
|---|---|
payout_type | Payout type (see Payout types). |
project_id | Your project ID. |
order_id | Payout ID in the 1Payment system. |
user_data | Identifier passed when creating the payout. |
status | Numeric code: 2 — pending, 3 — success, 4 — declined. |
status_description | PENDING, SUCCESS, or FAILURE. |
init_time | Payout creation time. |
status_time | Time the current status was received. |
amount | Payout amount. |
balance_amount | Amount debited from balance. |
currency | Payout currency (ISO 4217). |
destination | Recipient; for card payouts — masked card number. |
status_code | Decline reason code (when status = 4). |
paid_amount | Only when status = 2 (PENDING) and partial payout: cumulative partial payout amount at the moment. |
init_amount | Only when status = 3 (SUCCESS) and initiation amount differs from payout amount: initiation amount; amount and balance_amount contain actual processed amounts. |
Request error (400):
{
"error_code": 2
}