curl --request POST \
--url https://api.flarepayments.com/v1/charges \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"amount": 1000,
"payment_method": "pix",
"description": "Pedido #1234"
}'
curl --request POST \
--url https://api.flarepayments.com/v1/charges \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"amount": 1000,
"payment_method": "boleto",
"description": "Pedido #1234",
"customer": {
"name": "João Silva",
"email": "joao@email.com",
"document": "52998224725",
"phone": "11999999999"
},
"billing_address": {
"zip": "01001000",
"state": "SP",
"city": "São Paulo",
"street": "Praça da Sé",
"neighborhood": "Sé",
"number": "100",
"complement": "Apto 10"
}
}'
{
"success": true,
"uuid": "54e2b712-aca0-4230-b69a-d6dd8542c925",
"amount": 1000,
"expires_at": "2026-09-13T23:59:59Z",
"pix_copy_paste": "00020101021226..."
}
{
"uuid": "54e2b712-aca0-4230-b69a-d6dd8542c925",
"success": true,
"boleto_url": "https://...",
"barcode": "001905009...",
"amount": 1000,
"expires_at": "2026-09-16T23:59:59Z"
}
Cobranças
Criar cobrança Pix
Cria uma nova cobrança PIX ou boleto
POST
/
charges
curl --request POST \
--url https://api.flarepayments.com/v1/charges \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"amount": 1000,
"payment_method": "pix",
"description": "Pedido #1234"
}'
curl --request POST \
--url https://api.flarepayments.com/v1/charges \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"amount": 1000,
"payment_method": "boleto",
"description": "Pedido #1234",
"customer": {
"name": "João Silva",
"email": "joao@email.com",
"document": "52998224725",
"phone": "11999999999"
},
"billing_address": {
"zip": "01001000",
"state": "SP",
"city": "São Paulo",
"street": "Praça da Sé",
"neighborhood": "Sé",
"number": "100",
"complement": "Apto 10"
}
}'
{
"success": true,
"uuid": "54e2b712-aca0-4230-b69a-d6dd8542c925",
"amount": 1000,
"expires_at": "2026-09-13T23:59:59Z",
"pix_copy_paste": "00020101021226..."
}
{
"uuid": "54e2b712-aca0-4230-b69a-d6dd8542c925",
"success": true,
"boleto_url": "https://...",
"barcode": "001905009...",
"amount": 1000,
"expires_at": "2026-09-16T23:59:59Z"
}
curl --request POST \
--url https://api.flarepayments.com/v1/charges \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"amount": 1000,
"payment_method": "pix",
"description": "Pedido #1234"
}'
curl --request POST \
--url https://api.flarepayments.com/v1/charges \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"amount": 1000,
"payment_method": "boleto",
"description": "Pedido #1234",
"customer": {
"name": "João Silva",
"email": "joao@email.com",
"document": "52998224725",
"phone": "11999999999"
},
"billing_address": {
"zip": "01001000",
"state": "SP",
"city": "São Paulo",
"street": "Praça da Sé",
"neighborhood": "Sé",
"number": "100",
"complement": "Apto 10"
}
}'
{
"success": true,
"uuid": "54e2b712-aca0-4230-b69a-d6dd8542c925",
"amount": 1000,
"expires_at": "2026-09-13T23:59:59Z",
"pix_copy_paste": "00020101021226..."
}
{
"uuid": "54e2b712-aca0-4230-b69a-d6dd8542c925",
"success": true,
"boleto_url": "https://...",
"barcode": "001905009...",
"amount": 1000,
"expires_at": "2026-09-16T23:59:59Z"
}
Descrição
Escolha a aba do método de pagamento. Os campos de PIX e boleto são documentados separadamente.O campo
amount é enviado e devolvido em centavos. Por exemplo, 1000 = R$ 10,00.Headers
string
required
Bearer token de autenticação. Formato:
Bearer YOUR_API_KEYstring
required
Deve ser
application/json.Pix Boleto
Body Pix
integer
required
Valor em centavos. O mínimo é
500 (R$ 5,00).string
required
Deve ser
pix.string
Descrição da cobrança.
object
Requisição Pix
curl --request POST \
--url https://api.flarepayments.com/v1/charges \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"amount": 1000,
"payment_method": "pix",
"description": "Pedido #1234"
}'
Resposta Pix — 201 Created
boolean
Confirma que a cobrança foi criada.
string
UUID da cobrança.
integer
Valor em centavos.
string | null
Expiração em ISO 8601, ou
null quando não informada.string
Código PIX copia e cola.
Body Boleto
integer
required
Valor em centavos. O mínimo é
500 (R$ 5,00).string
required
Deve ser
boleto.string
Descrição da cobrança.
object
required
object
required
Requisição Boleto
curl --request POST \
--url https://api.flarepayments.com/v1/charges \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"amount": 1000,
"payment_method": "boleto",
"description": "Pedido #1234",
"customer": {
"name": "João Silva",
"email": "joao@email.com",
"document": "52998224725",
"phone": "11999999999"
},
"billing_address": {
"zip": "01001000",
"state": "SP",
"city": "São Paulo",
"street": "Praça da Sé",
"neighborhood": "Sé",
"number": "100",
"complement": "Apto 10"
}
}'
Resposta Boleto — 201 Created
string
UUID da cobrança.
boolean
Confirma que a cobrança foi criada.
string
URL do boleto.
string
Linha digitável.
integer
Valor em centavos.
string
Vencimento em ISO 8601.
Erros
| Status | Código | Descrição |
|---|---|---|
| 400 | invalid_amount | amount deve ser um inteiro positivo em centavos |
| 400 | invalid_boleto_customer | Cliente do boleto ausente ou inválido |
| 400 | invalid_billing_address | Endereço de cobrança do boleto ausente ou inválido |
| 401 | unauthorized | Header Authorization ausente |
| 401 | invalid_api_key | Chave de API inválida |
| 422 | amount_below_minimum | Valor abaixo de R$ 5,00 |
| 429 | rate_limit_exceeded | Limite de 60 requisições/minuto excedido |
| 502 | provider_error | O PSP não criou uma cobrança válida |
