Pular para o conteúdo principal

Request PIX Payment

Create a PIX payout (withdrawal/payment) to a recipient.

Endpoint

POST /payouts

Headers

NameTypeDescription
x-api-token *stringAuthentication token for your integration.
x-provider-id *stringProvider/partner identifier assigned by Lulipay.
x-provider *stringProvider name (company/partner name).
x-country-code *stringCountry code for the operation (for example, BR).
x-idempotency-key *stringUnique key per logical operation attempt to prevent duplication.

How to use x-idempotency-key correctly

This header protects your integration from duplicate processing during retries (timeouts, network instability, etc.).

Recommended rules:

  1. Generate a unique key per business operation (for example, UUID v4).
  2. Reuse the same key only when retrying the same operation.
  3. Never reuse the same key for different operations.
  4. Persist the key in your system for traceability and reconciliation.

Example:

x-idempotency-key: 6f5d8f77-2f5c-4219-a5c8-4d7742fcb3c5

Request Body

FieldTypeRequiredDescription
valuenumberYesPIX payment amount
descriptionstringNoDescription (max 140 characters)
receiver_cpfstringYesRecipient CPF (11 digits)
receiver_namestringYesRecipient name
receiver_emailstringYesRecipient email
webhook_urlstringYesURL triggered when the payment is completed or canceled
pix_keystringYesPIX key
pix_key_typestringYesKey type: cpf, email, phone, or evp

Example (JSON)

{
"value": 1,
"description": "",
"receiver_cpf": "",
"receiver_name": "",
"receiver_email": "",
"webhook_url": "",
"pix_key": "",
"pix_key_type": "cpf"
}

pix_key validation rules

pix_key_typeValidation (pix_key field)ExampleSize
cpf11 numeric digits1478523698711
phone13 chars: + + country code + area code + 9-digit num+550099999999913
emailValid e-mail addressuser@domain.com
evp36-char UUID123e4567-e89b-12d3-a456-42661417400036

Success response (200)

{
"id": "1c389fa9-1cb5-40ac-a0ae-1e5bc1cdf3d8",
"status": "waiting"
}

Error response example

{
"message": "Validation error",
"code": "VALIDATION_ERROR",
"errors": [
{
"message": "Invalid PIX key.",
"code": "INVALID_VALUE",
"field": "pix_key"
}
]
}

Error Codes

CodeDescription
VALIDATION_ERRORValidation errors in payload
INVALID_VALUEInvalid field value
NOT_PROCESSABLEValid payload but cannot be processed
NO_ACTIVE_CREDENTIALNo active credential configured
EXTERNAL_ERRORError in partner system
DUPLICATED_VALUEResource with given value already exists
REQUIRED_VALUEA required field was not sent
EMPTY_VALUEField sent empty

Request examples

curl --request POST "https://gateway.lulipay.com/v1/payouts" --header "Content-Type: application/json" --header "x-api-token: YOUR_API_TOKEN" --header "x-provider-id: YOUR_PROVIDER_ID" --header "x-provider: YOUR_PROVIDER_NAME" --header "x-country-code: BR" --header "x-idempotency-key: 6f5d8f77-2f5c-4219-a5c8-4d7742fcb3c5" --data '{
"value": 1,
"description": "",
"receiver_cpf": "",
"receiver_name": "",
"receiver_email": "",
"webhook_url": "",
"pix_key": "",
"pix_key_type": "cpf",
}'

Notes

  • Only one withdrawal can be in progress per recipient; simultaneous requests may be canceled.
  • In the staging environment you can force the transaction status to completed or canceled (see test payment endpoint).