Cobrança com Boleto

Esse recurso permite a criação de uma cobrança de pagamento em boleto. Informando os dados essências para efetivação de uma cobrança de acordo com o método de pagamento escolhido.

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": {
          "country": "Brasil",
          "regionCode": "SP",
          "city": "Sao Paulo",
          "postal_code": "01452002",
          "street": "Avenida Brigadeiro Faria Lima",
          "number": "1384",
          "locality": "Pinheiros"
        }
      }
    }
  },
  "notification_urls": [
    "https://yourserver.com/nas_ecommerce/277be731-3b7c-4dac-8c4e-4c3f4a1fdc46/"
  ]
}'
{
  "id": "CHAR_D32A01A9-92A6-4755-B21D-7B6A1291F7AD",
  "reference_id": "ex-00001",
  "status": "AUTHORIZED",
  "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": {
    "total": 100,
    "paid": 0,
    "refunded": 0,
    "currency": "BRL"
  },
  "payment_response": {
    "code": 20000,
    "message": "SUCESSO",
    "reference": "071200027526"
    },
  "payment_method": {
    "type": "BOLETO",
    "boleto": {
        "id": "BOLE_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": {
                  "country": "Brasil",
                  "regionCode": "SP",
                  "city": "Sao Paulo",
                  "postal_code": "01452002",
                  "street": "Avenida Brigadeiro Faria Lima",
                  "number": "1384",
                  "locality": "Pinheiros"
        }
      }
    }
  },
  "links": [
    {
      "rel": "self",
      "href": "https://sandbox.api.pagseguro.com/charges/CHAR_D32A01A9-92A6-4755-B21D-7B6A1291F7AD",
      "method": "GET"
    },
    {
      "rel": "charge.refund",
      "href": "https://sandbox.api.pagseguro.com/charges/CHAR_D32A01A9-92A6-4755-B21D-7B6A1291F7AD/refunds",
      "method": "POST"
    }
  ],
  "notification_url": [
        "https://yourserver.com/nas_ecommerce/277be731-3b7c-4dac-8c4e-4c3f4a1fdc46/"
    ]
}