Cobrança com Boleto

Informando os dados essenciais para efetivação de uma cobrança, este recurso permite a criação de uma cobrança de pagamento em boleto.

Métodos de pagamento disponíveis:

  • Boleto Bancário (payment_method.type = BOLETO)

📘

VALOR MINIMO

O valor mínimo para transacionar com boleto é de R$0,20.

curl --location --request POST 'https://sandbox.api.pagseguro.com/charges' \
--header 'Authorization: {{token}}' \
--header 'Content-Type: application/json' \
--header 'x-idempotency-key;' \
--data-raw '{
  "reference_id": "ex-00001",
  "description": "Motivo do pagamento",
  "amount": {
    "value": 1000,
    "currency": "BRL"
  },
  "payment_method": {
    "type": "BOLETO",
    "boleto": {
      "due_date": "2024-12-31",
      "instruction_lines": {
        "line_1": "Pagamento processado para DESC Fatura",
        "line_2": "Via PagSeguro"
      },
      "holder": {
        "name": "Jose da Silva",
        "tax_id": "22222222222",
        "email": "[email protected]",
        "address": {
          "street": "Avenida Brigadeiro Faria Lima",
          "number": "1384",
          "locality": "Pinheiros",
          "city": "Sao Paulo",
          "region": "Sao Paulo",
          "region_code": "SP",
          "country": "Brasil",
          "postal_code": "01452002"
        }
      }
    }
  },
  "notification_urls": [
    "https://yourserver.com/nas_ecommerce/277be731-3b7c-4dac-8c4e-4c3f4a1fdc46/"
  ]
}'
{
  "id": "CHAR_D32A01A9-92A6-4755-B21D-7B6A1291F7AD",
  "reference_id": "ex-00001",
  "status": "WAITING",
  "created_at": "2019-04-17T20:07:07.002-02",
  "paid_at": "2019-04-17T20:07:07.002-02",
  "description": "This is the payment transaction description",
  "amount": {
    "value": 100,
    "currency": "BRL",
    "summary": {
      "total": 100,
      "paid": 0,
      "refunded": 0
    }
  },
  "payment_response": {
    "code": 20000,
    "message": "SUCESSO"
  },
  "payment_method": {
    "type": "BOLETO",
    "boleto": {
      "id": "6EA2EB96-CD24-4956-84AB-F4558B6C2097",
      "barcode": "03399853012970000000200726101017777550000005100",
      "formatted_barcode": "03399.85301 29700.000002 00726.101017 7 77550000005100",
      "due_date": "2024-12-31",
      "instruction_lines": {
        "line_1": "Pagamento processado para DESC Fatura",
        "line_2": "Via PagSeguro"
      },
      "holder": {
        "name": "Jose da Silva",
        "tax_id": "22222222222",
        "email": "[email protected]",
        "address": {
          "street": "Avenida Brigadeiro Faria Lima",
          "number": "1384",
          "locality": "Pinheiros",
          "city": "Sao Paulo",
          "region": "Sao Paulo",
          "region_code": "SP",
          "country": "Brasil",
          "postal_code": "01452002"
        }
      }
    }
  },
  "links": [
    {
      "rel": "self",
      "href": "https://boleto.sandbox.pagseguro.com.br/6ea2eb96-cd24-4956-84ab-f4558b6c2097.pdf",
      "media": "application/pdf",
      "type": "GET"
    },
    {
      "rel": "SELF",
      "href": "https://boleto.sandbox.pagseguro.com.br/6ea2eb96-cd24-4956-84ab-f4558b6c2097.png",
      "media": "image/png",
      "type": "GET"
    },
    {
      "rel": "SELF",
      "href": "https://sandbox.api.pagseguro.com/charges/CHAR_D32A01A9-92A6-4755-B21D-7B6A1291F7AD",
      "media": "application/json",
      "type": "GET"
    }
  ],
  "notification_url": [
    "https://yourserver.com/nas_ecommerce/277be731-3b7c-4dac-8c4e-4c3f4a1fdc46/"
  ]
}