Payment statuses
This method returns the current status of a bank card payment by the identifier from the initialization 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 host2host (GATE), and when callback delivery fails.
How it works
- Identification — in the request, specify
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, masked card number, and if needed fields for 3-D Secure (redirect_url,3ds_url,pa_req,creq,md).
Interpretation of status and status_description codes — see Transaction statuses.
Technical information
| Endpoint | https://api.1payment.com/status_payment |
| Methods | GET, POST |
| Response format | JSON |
| Payment type in response | For cards, payment_type equals card |
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 initialization response). |
user_data | String | Your order ID; used if order_id is not specified. |
Signature generation (sign)
Signature: MD5, lowercase (hex). General rules — API request format.
Formula:
MD5(status_payment + <параметры_без_sign_в_алфавитном_порядке_через_&> + <API_KEY>)Example string before hashing (lookup by order_id):
status_paymentorder_id=8p3brmb19gfg0sg8gcwhws8kgc748s87&partner_id=1234&project_id=5678secret_keySignature verification in the documentation
Signature check for {{method}}
Paste the request parameters (JSON), API key, and signature. The widget verifies them automatically.
order_id=8p3brmb19gfg0sg8gcwhws8kgc748s87&partner_id=1234&project_id=5678status_paymentorder_id=8p3brmb19gfg0sg8gcwhws8kgc748s87&partner_id=1234&project_id=5678a33a3e5a9bd5dedd4a397513abd74094Request examples
const crypto = require('crypto');
const axios = require('axios');
async function getCardPaymentStatus(apiKey, params) {
const sortedKeys = Object.keys(params).sort();
const queryString = sortedKeys.map((key) => `${key}=${params[key]}`).join('&');
const baseString = `status_payment${queryString}${apiKey}`;
params.sign = crypto.createHash('md5').update(baseString).digest('hex');
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',
};
getCardPaymentStatus(apiKey, data).then(console.log);API response
Successful response (200):
{
"payment_type": "card",
"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,
"init_price": 50,
"user_price": 48.5,
"currency": "RUB",
"account": "411111******1111",
"token": "card_t_1a2b3c"
}| Field | Description |
|---|---|
payment_type | Payment type; for cards — card. |
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 for the payer. |
init_price | Amount at initialization. |
user_price | Partner payout amount. |
currency | Payment currency (ISO 4217). |
account | Masked card number. |
status_code | Decline reason code (when status = 4; see decline codes). |
token | Saved card identifier after successful payment (if enabled; see subscriptions). |
test | 1 for test transactions. |
3-D Secure fields
When status is pending and 3-D Secure is required, the response may include:
| Field | Description |
|---|---|
redirect_url | URL to redirect the payer to the bank ACS. |
3ds_url | Bank ACS URL for 3-D Secure. |
pa_req | Parameter for 3-D Secure v1.x. |
creq | Parameter for 3-D Secure v2.x. |
md | 3-D Secure service parameter. |
If the response contains redirect_url or 3ds_url, redirect the payer to complete payment (see also host2host (GATE)).
Request error (400):
{
"error_code": 2
}