Authorization: Bearer ********************
{
"ref": "001",
"due_date": "01-12-2025",
"description": "Minha Fatura",
"discount_amount": 0,
"customer": {
"name": "Jorge Tadeu",
"email": "jtadeu@email.com",
"cellphone": "11999999999",
"cpfcnpj": "01234567890",
"address": {
"street": "Rua dos Jardins",
"number": "123",
"complement": "Sala 1",
"neighborhood": "Jardins",
"city": "São Paulo",
"state": "SP",
"zip_code": "01234000"
}
},
"items": [
{
"name": "Produto 1",
"description": "Meu produto",
"quantity": 5,
"price": 10025
},
{
"name": "Produto 2",
"description": "Meu produto 2",
"quantity": 2,
"price": 1144
}
],
"payable_with": {
"boleto": false,
"pix": true,
"credit_card": false,
"pixboleto": false,
"credit_card_installments_without_interest": 0,
"credit_card_installments_min": 1,
"credit_card_installments_max": 12,
"credit_card_fee_mdr_responsible": "merchant",
"credit_card_fee_antecipation_responsible": "merchant"
},
"notification_enabled": false,
"notification_url": "https://mywebhook.com"
}
curl --location -g --request POST 'http://{{app_url}}/api/v1/invoices/create' \
--header 'client-id: {{client-id}}' \
--header 'client-secret: {{client-secret}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"ref": "001",
"due_date": "01-12-2025",
"description": "Minha Fatura",
"discount_amount": 0,
"customer": {
"name": "Jorge Tadeu",
"email": "jtadeu@email.com",
"cellphone": "11999999999",
"cpfcnpj": "01234567890",
"address": {
"street": "Rua dos Jardins",
"number": "123",
"complement": "Sala 1",
"neighborhood": "Jardins",
"city": "São Paulo",
"state": "SP",
"zip_code": "01234000"
}
},
"items": [
{
"name": "Produto 1",
"description": "Meu produto",
"quantity": 5,
"price": 10025
},
{
"name": "Produto 2",
"description": "Meu produto 2",
"quantity": 2,
"price": 1144
}
],
"payable_with": {
"boleto": false,
"pix": true,
"credit_card": false,
"pixboleto": false,
"credit_card_installments_without_interest": 0,
"credit_card_installments_min": 1,
"credit_card_installments_max": 12,
"credit_card_fee_mdr_responsible": "merchant",
"credit_card_fee_antecipation_responsible": "merchant"
},
"notification_enabled": false,
"notification_url": "https://mywebhook.com"
}'
{
"id": "83a0843b-0a98-402e-bb5f-75fcc44e11b1",
"ref": "150",
"description": "Descrição da Fatura",
"status": "unpaid",
"subtotal_amount": "5924.13",
"total_amount": "5924.13",
"tax_amount": "0",
"discount_amount": "0",
"link_token": "BdvkH6j2icCfSpj1E0Zxp9pnwuSrPm",
"link": "http://localhost:5180/hapo-code/public/fatura/BdvkH6j2icCfSpj1E0Zxp9pnwuSrPm",
"customer": {
"id": "e00e6af0-7775-4a0e-8f36-6f5f4af2bf16",
"name": "João da Silva",
"email": "joao@testeste.com.br",
"description": null,
"cellphone": "11999999999",
"cpfcnpj": "07120188917",
"address": {
"street": "Rua de Teste",
"number": "123",
"complement": "Sala 1",
"neighborhood": "Bairro Teste",
"city": "São Paulo",
"state": "SP",
"zip_code": "01234000"
}
},
"items": [
{
"id": "a274156f-7aa7-4be2-a735-e5bb428c9124",
"product": {
"id": "b7567ebc-924b-4604-948f-00afd4b697ef",
"name": "Produto 1",
"description": "Meu produto",
"price": "900.25"
},
"quantity": 5
},
{
"id": "4feb80eb-f07c-4e78-9822-97a5b5b6da9a",
"product": {
"id": "86cf4814-62d0-4704-9e19-74319f5c2282",
"name": "Produto 2",
"description": "Meu produto 2",
"price": "711.44"
},
"quantity": 2
}
],
"payment": null,
"payable_with": {
"boleto": true,
"pix": true,
"credit_card": true
},
"shipping": null,
"due_date": "25/04/2023",
"paid_at": null,
"notification_url": null,
"created_at": "05/04/2023",
"notifications": []
}