Payment statuses
This method returns the current status of a SberPay payment 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 payment via form or GATE, and when callback delivery fails.
How it works
- Identification — pass
order_id(from theinit_form/init_paymentresponse) oruser_data(order ID on your side). - Request — the server sends a signed request to the
status_paymentendpoint. - Response — the API returns JSON with the current
status, amounts, timestamps, and if neededredirect_url,token, or other fields.
See Transaction statuses for status and status_description codes.
Technical details
| Endpoint | https://api.1payment.com/status_payment |
| Methods | GET, POST |
| Response format | JSON |
| Payment type in response | For SberPay, payment_type is sberpay |
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). |
Payment identification
Pass one of the following parameters:
| Parameter | Type | Description |
|---|---|---|
order_id | String | Payment ID in 1Payment (from the initiation response). |
user_data | String | Your order ID; used when order_id is not specified. |
Signature (sign)
Signature: MD5, lowercase (hex). General rules — API request format.
Formula:
MD5(status_payment + <params_excluding_sign_in_alphabetical_order_joined_with_&> + <API_KEY>)Example string before hashing (lookup by order_id):
status_paymentorder_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_paymentorder_id=8p3brmb19gfg0sg8gcwhws8kgc748s87&partner_id=1234&project_id=5678Expected signature:
a33a3e5a9bd5dedd4a397513abd74094Signature does not match
Request examples
const crypto = require('crypto');
const axios = require('axios');
async function getSberpayPaymentStatus(apiKey, params) {
// 1. Сортируем параметры по алфавиту
const sortedKeys = Object.keys(params).sort();
const queryString = sortedKeys.map((key) => `${key}=${params[key]}`).join('&');
// 2. Подпись с префиксом status_payment
const baseString = `status_payment${queryString}${apiKey}`;
params.sign = crypto.createHash('md5').update(baseString).digest('hex');
// 3. GET-запрос
const response = await axios.get('https://api.1payment.com/status_payment', { params });
return response.data;
}
const apiKey = process.env.ONEPAYMENT_API_KEY;
const data = {
partner_id: 1234,
project_id: 5678,
order_id: '8p3brmb19gfg0sg8gcwhws8kgc748s87',
};
getSberpayPaymentStatus(apiKey, data).then(console.log);API response
Successful response (200):
{
"payment_type": "sberpay",
"project_id": 5678,
"order_id": "8p3brmb19gfg0sg8gcwhws8kgc748s87",
"user_data": "order_777",
"status": 3,
"status_description": "SUCCESS",
"init_time": "2026-05-05T18:23:11Z",
"status_time": "2026-05-05T18:23:42Z",
"merchant_price": 50,
"user_price": 48.5,
"currency": "RUB",
"account": "sberpay"
}| Field | Description |
|---|---|
payment_type | Payment type; for SberPay — sberpay. |
project_id | Your project ID. |
order_id | Payment ID in the 1Payment system. |
user_data | Identifier passed when creating the payment. |
status | Numeric code: 2 — pending, 3 — success, 4 — declined. |
status_description | PENDING, SUCCESS, or FAILURE. |
init_time | Payment creation time (UTC). |
status_time | Time the current status was received (UTC). |
merchant_price | Payment amount. |
user_price | Partner payout amount. |
currency | Payment currency (ISO 4217). |
account | Technical marker (sberpay). |
status_code | Decline reason code (when status = 4). |
token | Subscription token for recurring payments (if enabled). |
redirect_url | Payment link if the payment is pending and the payer must be redirected. |
test | 1 for test transactions. |
Request error (400):
{
"error_code": 2
}