Skip to content

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

  1. Request — your server sends a signed request to init_payout with the recipient Tax ID / CPF and payout amount.
  2. Response — the API returns order_id and initial status (2, PENDING).
  3. Processing — the system processes the payout.
  4. 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

Endpointhttps://api.1payment.com/init_payout
MethodsGET, POST
Response formatJSON
Payout typeThe request must include payout_type=pix (see Payout types)

Request parameters

Required

ParameterTypeDescription
payout_typeStringAlways pix.
partner_idIntegerYour unique ID in the 1Payment system.
project_idIntegerYour project identifier.
amountNumberPayout amount: strictly from 10 to 15000 (in the project currency).
destinationStringRecipient Tax ID / CPF.
user_dataStringYour internal payout ID (unique on the partner side).
signStringRequest 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_key

Verify signature in the documentation

Signature check for {{method}}

Paste the request parameters (JSON), API key, and signature. The widget verifies them automatically.

Parameter string: amount=50&destination=12345&partner_id=1234&payout_type=pix&project_id=5678&user_data=1
String for MD5: init_payoutamount=50&destination=12345&partner_id=1234&payout_type=pix&project_id=5678&user_data=1
Expected signature: cc0d9eb739b1d8c181a9f369fad39dc2
Signature does not match

Request 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
}
FieldDescription
order_idPayout ID in the 1Payment system; use for status requests.
statusNumeric status code: 2 — pending, 3 — success, 4 — declined.
status_descriptionPENDING, SUCCESS, or FAILURE.
status_codeDecline 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.

Was this article helpful?