PIX
This method initiates a payout via PIX (Brazil). Send a request to the init_payout endpoint with payout_type=pix. The final status is sent to notify_url configured in the project payout settings; you can also poll status via Payout status.
Request and signature format — see API request format.
How it works
- Request — your server sends a signed request to
init_payoutwith the recipient Tax ID / CPF and payout amount. - Response — the API returns
order_idand initialstatus(2,PENDING). - Processing — the system processes the payout.
- Notification (callback) — the final status is sent as POST JSON to your
notify_url.
See Transaction statuses for status and status_description codes.
Technical details
| Endpoint | https://api.1payment.com/init_payout |
| Methods | GET, POST |
| Response format | JSON |
| Payout type | The request must include payout_type=pix (see Payout types) |
Request parameters
Required
| Parameter | Type | Description |
|---|---|---|
payout_type | String | Always pix. |
partner_id | Integer | Your unique ID in the 1Payment system. |
project_id | Integer | Your project identifier. |
amount | Number | Payout amount: strictly from 10 to 15000 (in the project currency). |
destination | String | Recipient Tax ID / CPF. |
user_data | String | Your internal payout ID (unique on the partner side). |
sign | String | Request signature (see the Signature section). |
Signature (sign)
Signature: MD5, lowercase (hex). General rules — API request format.
Formula:
MD5(init_payout + <params_excluding_sign_in_alphabetical_order_joined_with_&> + <API_KEY>)Example string before hashing:
init_payoutamount=50&destination=12345&partner_id=1234&payout_type=pix&project_id=5678&user_data=1secret_keyVerify signature in the documentation
Signature check for {{method}}
Paste the request parameters (JSON), API key, and signature. The widget verifies them automatically.
amount=50&destination=12345&partner_id=1234&payout_type=pix&project_id=5678&user_data=1init_payoutamount=50&destination=12345&partner_id=1234&payout_type=pix&project_id=5678&user_data=1cc0d9eb739b1d8c181a9f369fad39dc2Request examples
const crypto = require('crypto');
const axios = require('axios');
async function createPixPayout(apiKey, params) {
// 1. Сортируем параметры по алфавиту
const sortedKeys = Object.keys(params).sort();
const queryString = sortedKeys.map((key) => `${key}=${params[key]}`).join('&');
// 2. Подпись с префиксом init_payout
const baseString = `init_payout${queryString}${apiKey}`;
params.sign = crypto.createHash('md5').update(baseString).digest('hex');
// 3. GET-запрос
const response = await axios.get('https://api.1payment.com/init_payout', { params });
return response.data;
}
const apiKey = process.env.ONEPAYMENT_API_KEY;
const data = {
payout_type: 'pix',
partner_id: 1234,
project_id: 5678,
amount: 50,
destination: '12345',
user_data: '1',
};
createPixPayout(apiKey, data).then(console.log);API response
Successful response (200):
{
"order_id": "8p3brmb19gfg0sg8gcwhws8kgc748s87",
"status": 2,
"status_description": "PENDING",
"status_code": 0
}| Field | Description |
|---|---|
order_id | Payout ID in the 1Payment system; use for status requests. |
status | Numeric status code: 2 — pending, 3 — success, 4 — declined. |
status_description | PENDING, SUCCESS, or FAILURE. |
status_code | Decline reason code (when status = 4); see Error codes (declines). |
Request error (400):
{
"error_code": 2
}Status notifications (callbacks)
After the payout reaches a final status, a POST notification in JSON format is sent to your notify_url (from project payout settings). Structure is the same as for other payouts; payout_type is pix.
Important: your server must return HTTP 200 OK. Otherwise the system retries the callback once per minute for 10 minutes.
Callback signature verification: MD5 of all parameters in alphabetical order joined with & + API_KEY (without the init_payout prefix). See API request format for details.