Pular para o conteúdo principal

Authentication

Overview​

Authentication in the Lulipay API is performed using required headers on every request. There is no JWT login step in this version.

Required headers​

Send the following headers in all API calls:

  • x-api-token: {API_TOKEN}
  • x-provider-id: {PROVIDER_ID}
  • x-provider: {PROVIDER_NAME}
  • x-country-code: {COUNTRY_CODE}

Header description​

HeaderRequiredDescription
x-api-tokenYesAuthentication token for your integration.
x-provider-idYesProvider/partner identifier assigned by Lulipay.
x-providerYesProvider name (for example, your company or partner name).
x-country-codeYesCountry code for the operation (for example, BR).

Usage examples​

curl --request POST "https://gateway.lulipay.com/v1/payin/payment/request" --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" --data '{
"value": 150.00,
"description": "Payment for invoice #1234",
"receiver_pix_key": "john.doe@email.com",
"receiver_name": "John Doe",
"reference_id": "PAY1234"
}'

Best practices​

  • Never expose x-api-token in frontend/mobile clients; use backend-to-backend integration.
  • Rotate credentials periodically and revoke unused credentials.
  • Add observability using reference_id in your logs.
  • Trigger operational alerts for recurrent 401 and 403 responses.

Error handling​

Error CodeDescriptionAction
401Invalid authentication headersValidate x-api-token, x-provider-id, x-provider, and x-country-code
403Insufficient permissionsVerify credential scope with support
429Too many requestsApply retries with exponential backoff

Support​

The following authentication values are provided by the Lulipay support team:

  • x-api-token
  • x-provider-id
  • x-provider
  • x-country-code

For authentication support: