Skip to main content
POST
/
v1
/
boleto
Criar cobrança via boleto
curl --request POST \
  --url https://api.ephra.io/v1/boleto \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "amountInCents": 10000,
  "customer": {
    "documentType": "cpf",
    "document": "12345678909",
    "name": "Maria Silva",
    "email": "maria@email.com",
    "phone": "+5511999998888",
    "billingAddress": {
      "street": "<string>",
      "number": "<string>",
      "neighborhood": "<string>",
      "city": "<string>",
      "state": "<string>",
      "zipCode": "<string>"
    }
  },
  "description": "Pedido #1234",
  "postbackUrl": "<string>",
  "items": [
    {
      "title": "Produto A",
      "tangible": false,
      "quantity": 1,
      "amountInCents": 10000,
      "shippingAddress": {
        "street": "<string>",
        "number": "<string>",
        "neighborhood": "<string>",
        "city": "<string>",
        "state": "<string>",
        "zipCode": "<string>"
      }
    }
  ]
}
'
{
  "success": true,
  "message": "Transação criada com sucesso",
  "data": {
    "id": "clxabc123def456",
    "boleto": {
      "url": "https://.../boleto/clxabc123def456",
      "barcode": "23793381286000782726337000963779410010000025000",
      "digitableLine": "23793.38128 60007.827263 37000.963779 4 10010000025000",
      "dueAt": "2026-06-10T03:00:00.000Z"
    },
    "status": "pending",
    "fees": 200
  }
}
Gera um boleto bancário. A resposta traz a linha digitável (digitableLine), o código de barras (barcode) e uma url para visualização e impressão. A cobrança nasce com status: "pending".
A compensação de boleto leva de 1 a 3 dias úteis. Aguarde o webhook transaction_paid antes de liberar o pedido.
Visão conceitual e prazos em Guias › Boleto.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
amountInCents
integer
required

Valor em centavos (> 0)

Example:

10000

customer
object
required
description
string
Example:

"Pedido #1234"

postbackUrl
string<uri>

Recebe webhooks só desta transação

seller
object
items
object[]

Response

Boleto criado

success
boolean
Example:

true

message
string
Example:

"Transação criada com sucesso"

data
object