Neofin V1
english
  • latest
  • english
  1. Webhooks
Neofin V1
english
  • latest
  • english
  • Start your Neofin journey
  • Setup your environment
  • NeofinV1
    • Billing API
      • Upsert a billing
        • How to upsert a billing
        • Upsert a billing
          POST
      • Retrieve a billing
        • How to retrieve a single billing
        • Get billing by Integration Identifier
          GET
        • Get billing by Billing Number
          GET
      • Mark a billing as paid
        • How to mark a billing as paid
        • Mark a billing as paid
          PUT
      • Cancel a billing
        • How to cancel a billing
        • Cancel a billing
          PUT
      • Listing billings
        • How to list your billings
        • Billing by status
          GET
        • Billing by customer
          GET
        • Billing updated date
          GET
        • Billing Events
          GET
        • Billing Events by Integration Identifier
          GET
      • Upload attachments
        • How to upload attachments
        • Upload a Billing NF by Integration Identifier
          PUT
        • Upload a Billing Boleto by Integration Identifier
          PUT
    • Customer API
      • Upserting a customer
        • How to upsert a customer
        • Upsert a customer
          POST
      • Retrieve a customer
        • Get a customer by Integration Identifier
          GET
        • Get a customer by their document
          GET
    • Webhooks
      • How to setup your webhooks
  • Comece aqui
    • Introdução
  1. Webhooks

How to setup your webhooks

Payments Webhooks Neofin - Version 2023-07

Receiving Webhooks Endpoint#

Your endpoint must be a HTTPS URL with a valid SSL certificate able to receive a HTTP POST request containing a JSON payload and custom headers.
It will be considered a "success" for any response with status code >= 200 and < 300.
If the request doesn't receive any response within 10 seconds, it will be considered a failure and the request will be resend following the Retry Policy.
There's the option to register only one url for all the topics available or one url for each topic.
After registering the endpoint, Neofin sends an HTTP POST request to the specified URL each time an event occurs.
Neofin verifies SSL Certificates on delivering loads to HTTPS Webhook Addresses. Please, ensure your server has the correct settings and support HTTPS with a valid SSL Certificate.

Retry Policy#

Neofin will try to do 3 requests to the configured URL.
The first will be immediately after reaching the required state for the topic/event.
If the request doesn't receive any response within 10 seconds or the status code is > 200 or < 300, the second try will be made 5 minutes after the first try.
If there's no success conditions again after the second try, the third and last request will be sent 20 minutes after the first try.

Webhooks Registration#

API
Method: POST
{
  "URL": "https://api.sandbox.neofin.services/webhook",
  "Headers": {
    "api-key": "1A2B3C4D5E1A2B3C4D5E",
    "secret-key": "Aa1Bb2Aa1Bb2Aa1Bb2Aa1Bb2Aa1Bb2Aa1Bb2"
  },
  "Payload": {
    "topic": "payments/created",
    "destination": "https://url-do-webhook"
  }
}
topic: payments/created | payments/registered | payments/overdue | payments/paid | payments/cancelled

Topics/events available#

payments/created
payments/registered
payments/overdue
payments/paid
payments/cancelled

payment_status returned by topic#

payments/created:
pending (Em aberto) payments/registered:
pending (Em aberto) payments/overdue:
overdue (Vencido)
processing_protest (Protestado (em andamento))
protested (Protestado)
pending_derrogatory (Negativação (solicitada))
processing_derrogatory (Negativação (em andamento))
derrogatory (Negativado)
derrogatory_cancelled (Negativação cancelada)
protest_cancelled (Protestado baixado) payments/paid:
paid (Recebido)
paid_after_protested (Protestado recebido)
paid_after_derrogatory (Negativação paga) payments/cancelled:
cancelled (Cancelado)
Payload/JSON exemples
payments/created#
{
   "id": "d2b836f9-659f-4c2f-96c0-9cb2b57919c9",
   "customer_name": "Customer Name LTDA",
   "customer_document": "11112222000199",
   "customer_mail": "customer@email.com",
   "customer_phone": "+5511977773333",
   "address_street": "Rua Teste",
   "address_number": "123",
   "address_complement": "CJ 1",
   "address_neighborhood": "Centro",
   "address_zip_code": "01005000",
   "address_city": "São Paulo",
   "address_state": "SP",
   "billing_amount": "15000",
   "payment_number": "11111999999999-1",
   "payment_method": "bolepix",
   "payment_status": "pending",
   "payment_amount": "15000",
   "description": "Cobrança 1111100000 - parcela 001/001",
   "installment": "1/1",
   "fine": 0.0,
   "fees": 0.0,
   "discount_before_payment_due_date": 1681757667,
   "discount_before_payment": 0.0,
   "due_date": 1681959600,
   "issued_at": 1681781894,
   "external_identifier": "1234",
   "os_code": "8888888888",
   "os_identifier": "5678",
   "nf_url": "https://nf.co/123098",
   "danfe": [
      {
         "number": "1234",
         "url": "http://nfe.pref.sp.gov.br/con/nota.aspx?ccm=87654321&nf=1234&cod=K1ABCD2E"
      }
   ],
   "rps": "https://neofin-nf.co/1234567-abcd-1234-efgh-ijklmnopqrst/rps9876543210.pdf"
}
payments/registered#
{
   "id": "d2b836f9-659f-4c2f-96c0-9cb2b57919c9",
   "customer_name": "Customer Name LTDA",
   "customer_document": "11112222000199",
   "customer_mail": "customer@email.com",
   "customer_phone": "+5511977773333",
   "address_street": "Rua Teste",
   "address_number": "123",
   "address_complement": "CJ 1",
   "address_neighborhood": "Centro",
   "address_zip_code": "01005000",
   "address_city": "São Paulo",
   "address_state": "SP",
   "billing_amount": "15000",
   "payment_number": "11111999999999-1",
   "payment_method": "bolepix",
   "payment_status": "pending",
   "payment_amount": "15000",
   "description": "Cobrança 1111100000 - parcela 001/001",
   "installment": "1/1",
   "fine": 0.0,
   "fees": 0.0,
   "discount_before_payment_due_date": 1681757667,
   "discount_before_payment": 0.0,
   "due_date": 1681959600,
   "issued_at": 1681781894,
   "external_identifier": "1234",
   "os_code": "8888888888",
   "os_identifier": "5678",
   "nf_url": "https://nf.co/123098",
   "danfe": [
      {
         "number": "1234",
         "url": "http://nfe.pref.sp.gov.br/con/nota.aspx?ccm=87654321&nf=1234&cod=K1ABCD2E"
      }
   ],
   "rps": "https://neofin-nf.co/1234567-abcd-1234-efgh-ijklmnopqrst/rps9876543210.pdf",
   "barcode_b64": "iVBORw0KGgoAAAANSUhEUgAAA+oAAADICAIAAADwcIwlAAAE1UlEQVR4nO3YyW6jUBRAQdPq///l17soMuGZIbRzoqodNsMFAT7yMsZ4AAAABX/ePQAAALCXfAcAgAz5DgAAGfIdAAAy5DsAAGTIdwAAyJDvAACQId8BACBDvgMAQIZ8BwCAjL/vHuB2y7I8Ho8xxp7F+VYfttb/+Opp/fXnnxcne1sf8aZJ1nvYudrWnr+8wi/P69ClmA983yG2jvhygOsnNbnCh454+rbZcxZ7pj2xt5eTYHyo5wMfGuDLz0/fmUcfpafN5+d13027tfgth/g5JzVfbb3noy/kK78sk709bf7yiN/4Ft0a/j/cNtffQhef8cmQp9/AV35qT9wPWwPc1zZ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GfAcAgAz5DgAAGfIdAAAy5DsAAGTIdwAAyJDvAACQId8BACBDvgMAQIZ8BwCADPkOAAAZ8h0AADLkOwAAZMh3AADIkO8AAJAh3wEAIEO+AwBAhnwHAIAM+Q4AABnyHQAAMuQ7AABkyHcAAMiQ7wAAkCHfAQAgQ74DAECGfAcAgAz5DgAAGfIdAAAy5DsAAGTIdwAAyJDvAACQId8BACBDvgMAQIZ8BwCADPkOAAAZ8h0AADLkOwAAZMh3AADIkO8AAJAh3wEAIEO+AwBAhnwHAIAM+Q4AABnyHQAAMuQ7AABkyHcAAMiQ7wAAkCHfAQAgQ74DAECGfAcAgIzljPHuGQAAgF38+w4AABnyHQAAMuQ7AABkyHcAAMiQ7wAAkCHfAQAgQ74DAECGfAcAgBz5DgAAGfIdAAAy/gH5LV2aysUGjwAAAABJRU5ErkJggg==",
   "boleto_url": "https://boletos.fitbank.com.br/pdf/2023-04-18/4044kt2s.pdf",
   "code": "45090.13781 00000.127805 00255.550032 1 94790000001295",
   "hash": "00030101021226780025br.gov.bcb.pix2556qrcode.fitbank.com.br/QR/cobv/598D2EAA37098C4916EBD16CAA5204 000053039865802BR5922NEOFIN TECNOLOGIA LTDA6009Sao Paulo51080660600361070503***6304144C"
}
}
payments/overdue#
{
  "id": "d2b836f9-659f-4c2f-96c0-9cb2b57919c9",
  "customer_name": "Customer Name LTDA",
  "customer_document": "11112222000199",
  "customer_mail": "customer@email.com",
  "customer_phone": "+5511977773333",
  "address_street": "Rua Teste",
  "address_number": "123",
  "address_complement": "CJ 1",
  "address_neighborhood": "Centro",
  "address_zip_code": "01005000",
  "address_city": "São Paulo",
  "address_state": "SP",
  "billing_amount": "15000",
  "payment_number": "11111999999999-1",
  "payment_method": "bolepix",
  "payment_status": "overdue",
  "payment_amount": "15000",
  "description": "Cobrança 1111100000 - parcela 001/001",
  "installment": "1/1",
  "fine": 0.0,
  "fees": 0.0,
  "discount_before_payment_due_date": 1681757667,
  "discount_before_payment": 0.0,
  "due_date": 1681959600,
  "issued_at": 1681781894,
  "external_identifier": "1234",
  "os_code": "8888888888",
  "os_identifier": "5678",
  "nf_url": "https://nf.co/123098",
  "danfe": [
    {
      "number": "1234",
      "url": [
        "http://nfe.pref.sp.gov.br/con/nota.aspx?ccm=87654321&nf=1234&cod=K1ABCD2E"
      ]
    }
  ],
  "rps": "https://neofin-nf.co/1234567-abcd-1234-efgh-ijklmnopqrst/rps9876543210.pdf",
  "barcode_b64": "iVBORw0KGgoAAAANSUhEUgAAA+oAAADICAIAAADwcIwlAAAE1UlEQVR4nO3YyW6jUBRAQdPq///l17soMuGZIbRzoqodNsMFAT7yMsZ4AAAABX/ePQAAALCXfAcAgAz5DgAAGfIdAAAy5DsAAGTIdwAAyJDvAACQId8BACBDvgMAQIZ8BwCAjL/vHuB2y7I8Ho8xxp7F+VYfttb/+Opp/fXnnxcne1sf8aZJ1nvYudrWnr+8wi/P69ClmA983yG2jvhygOsnNbnCh454+rbZcxZ7pj2xt5eTYHyo5wMfGuDLz0/fmUcfpafN5+d13027tfgth/g5JzVfbb3noy/kK78sk709bf7yiN/4Ft0a/j/cNtffQhef8cmQp9/AV35qT9wPWwPc1zZXfjLWW/0m/n0HAIAM+Q4AABnyHQAAMuQ7AABkyHcAAMiQ7wAAkCHfAQAgQ74DAECGfAcAgAz5DgAAGfIdAAAy5DsAAGTIdwAAyJDvAACQId8BACBDvgMAQIZ8BwCADPkOAAAZ8h0AADLkOwAAZMh3AADIkO8AAJAh3wEAIEO+AwBAhnwHAIAM+Q4AABnyHQAAMuQ7AABkyHcAAMiQ7wAAkCHfAQAgQ74DAECGfAcAgAz5DgAAGfIdAAAy5DsAAGTIdwAAyJDvAACQId8BACBDvgMAQIZ8BwCADPkOAAAZ8h0AADLkOwAAZMh3AADIkO8AAJAh3wEAIEO+AwBAhnwHAIAM+Q4AABnyHQAAMuQ7AABkyHcAAMiQ7wAAkCHfAQAgQ74DAECGfAcAgAz5DgAAGfIdAAAy5DsAAGTIdwAAyJDvAACQId8BACBDvgMAQIZ8BwCADPkOAAAZ8h0AADLkOwAAZMh3AADIkO8AAJAh3wEAIEO+AwBAhnwHAIAM+Q4AABnyHQAAMuQ7AABkyHcAAMiQ7wAAkCHfAQAgQ74DAECGfAcAgAz5DgAAGfIdAAAy5DsAAGTIdwAAyJDvAACQId8BACBDvgMAQIZ8BwCADPkOAAAZ8h0AADLkOwAAZMh3AADIkO8AAJAh3wEAIEO+AwBAhnwHAIAM+Q4AABnyHQAAMuQ7AABkyHcAAMiQ7wAAkCHfAQAgQ74DAECGfAcAgIxljPHuGQAAgF38+w4AABnyHQAAMuQ7AABkyHcAAMiQ7wAAkCHfAQAgQ74DAECGfAcAgBz5DgAAGfIdAAAy/gH5LV2aysUGjwAAAABJRU5ErkJggg==",
  "boleto_url": "https://boletos.fitbank.com.br/pdf/2023-04-18/4044kt2s.pdf",
  "code": "45090.13781 00000.127805 00255.550032 1 94790000001295",
  "hash": "00030101021226780025br.gov.bcb.pix2556qrcode.fitbank.com.br/QR/cobv/598D2EAA37098C4916EBD16CAA5204000053039865802BR5922NEOFIN TECNOLOGIA LTDA6009Sao Paulo51080660600361070503***6304144C"
}
payments/paid#
{
  "id": "d2b836f9-659f-4c2f-96c0-9cb2b57919c9",
  "customer_name": "Customer Name LTDA",
  "customer_document": "11112222000199",
  "customer_mail": "customer@email.com",
  "customer_phone": "+5511977773333",
  "address_street": "Rua Teste",
  "address_number": "123",
  "address_complement": "CJ 1",
  "address_neighborhood": "Centro",
  "address_zip_code": "01005000",
  "address_city": "São Paulo",
  "address_state": "SP",
  "billing_amount": "15000",
  "payment_number": "11111999999999-1",
  "payment_method": "bolepix",
  "payment_status": "paid",
  "payment_amount": "15000",
  "description": "Cobrança 1111100000 - parcela 001/001",
  "installment": "1/1",
  "fine": 0.0,
  "fees": 0.0,
  "discount_before_payment_due_date": 1681757667,
  "discount_before_payment": 0.0,
  "due_date": 1681959600,
  "issued_at": 1681781894,
  "external_identifier": "1234",
  "os_code": "8888888888",
  "os_identifier": "5678",
  "nf_url": "https://nf.co/123098",
  "danfe": [
    {
      "number": "1234",
      "url": "http://nfe.pref.sp.gov.br/con/nota.aspx?ccm=87654321&nf=1234&cod=K1ABCD2E"
    }
  ],
  "rps": "https://neofin-nf.co/1234567-abcd-1234-efgh-ijklmnopqrst/rps9876543210.pdf",
  "barcode_b64": "iVBORw0KGgoAAAANSUhEUgAAA+oAAADICAIAAADwcIwlAAAE1UlEQVR4nO3YyW6jUBRAQdPq///l17soMuGZIbRzoqodNsMFAT7yMsZ4AAAABX/ePQAAALCXfAcAgAz5DgAAGfIdAAAy5DsAAGTIdwAAyJDvAACQId8BACBDvgMAQIZ8BwCAjL/vHuB2y7I8Ho8xxp7F+VYfttb/+Opp/fXnnxcne1sf8aZJ1nvYudrWnr+8wi/P69ClmA983yG2jvhygOsnNbnCh454+rbZcxZ7pj2xt5eTYHyo5wMfGuDLz0/fmUcfpafN5+d13027tfgth/g5JzVfbb3noy/kK78sk709bf7yiN/4Ft0a/j/cNtffQhef8cmQp9/AV35qT9wPWwPc1zZXfjLWW/0m/n0HAIAM+Q4AABnyHQAAMuQ7AABkyHcAAMiQ7wAAkCHfAQAgQ74DAECGfAcAgAz5DgAAGfIdAAAy5DsAAGTIdwAAyJDvAACQId8BACBDvgMAQIZ8BwCADPkOAAAZ8h0AADLkOwAAZMh3AADIkO8AAJAh3wEAIEO+AwBAhnwHAIAM+Q4AABnyHQAAMuQ7AABkyHcAAMiQ7wAAkCHfAQAgQ74DAECGfAcAgAz5DgAAGfIdAAAy5DsAAGTIdwAAyJDvAACQId8BACBDvgMAQIZ8BwCADPkOAAAZ8h0AADLkOwAAZMh3AADIkO8AAJAh3wEAIEO+AwBAhnwHAIAM+Q4AABnyHQAAMuQ7AABkyHcAAMiQ7wAAkCHfAQAgQ74DAECGfAcAgAz5DgAAGfIdAAAy5DsAAGTIdwAAyJDvAACQId8BACBDvgMAQIZ8BwCADPkOAAAZ8h0AADLkOwAAZMh3AADIkO8AAJAh3wEAIEO+A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AADLkOwAAZMh3AADIkO8AAJAh3wEAIEO+AwBAhnwHAIAM+Q4AABnyHQAAMuQ7AABkyHcAAMiQ7wAAkCHfAQAgQ74DAECGfAcAgAz5DgAAGfIdAAAy5DsAAGTIdwAAyJDvAACQId8BACBDvgMAQIZ8BwCADPkOAAAZ8h0AADLkOwAAZMh3AADIkO8AAJAh3wEAIEO+AwBAhnwHAIAM+Q4AABnyHQAAMuQ7AABkyHcAAMiQ7wAAkCHfAQAgQ74DAECGfAcAgAz5DgAAGfIdAAAy5DsAAGTIdwAAyJDvAACQId8BACBDvgMAQIZ8BwCADPkOAAAZ8h0AADLkOwAAZMh3AADIkO8AAJAh3wEAIEO+AwBAhnwHAIAM+Q4AABnyHQAAMuQ7AABkyHcAAMiQ7wAAkCHfAQAgQ74DAECGfAcAgAz5DgAAGfIdAAAy5DsAAGTIdwAAyJDvAACQId8BACBDvgMAQIZ8BwCADPkOAAAZ8h0AADLkOwAAZMh3AADIkO8AAJAh3wEAIEO+AwBAhnwHAIAM+Q4AABnyHQAAMuQ7AABkyHcAAMiQ7wAAkCHfAQAgQ74DAECGfAcAgAz5DgAAGfIdAAAy5DsAAGTIdwAAyJDvAACQId8BACBDvgMAQIZ8BwCADPkOAAAZ8h0AADLkOwAAZMh3AADIkO8AAJAh3wEAIEO+AwBAhnwHAIAM+Q4AABnyHQAAMuQ7AABkyHcAAMiQ7wAAkCHfAQAgQ74DAECGfAcAgAz5DgAAGfIdAAAy5DsAAGTIdwAAyJDvAACQId8z5DgAAGfIdAAAy/gH5LV2aysUGjwAAAABJRU5ErkJggg==",
  "boleto_url": "https://boletos.fitbank.com.br/pdf/2023-04-18/4044kt2s.pdf", 
  "code": "45090.13781 00000.127805 00255.550032 1 94790000001295",
  "hash": "00030101021226780025br.gov.bcb.pix2556qrcode.fitbank.com.br/QR/cobv/598D2EAA37098C4916EBD16CAA5204 000053039865802BR5922NEOFIN TECNOLOGIA LTDA6009Sao Paulo51080660600361070503\*\*\*6304144C",
  "paid_amount":"15000", 
  "paid_at":1681845201, 
  "paid_method: "pix"
}
payments/cancelled#
{
   "id":"d2b836f9-659f-4c2f-96c0-9cb2b57919c9",
   "customer_name":"Customer Name LTDA",
   "customer_document":"11112222000199",
   "customer_mail":"customer@email.com",
   "customer_phone":"+5511977773333",
   "address_street":"Rua Teste",
   "address_number":"123",
   "address_complement":"CJ 1",
   "address_neighborhood":"Centro",
   "address_zip_code":"01005000",
   "address_city":"São Paulo",
   "address_state":"SP",
   "billing_amount":"15000",
   "payment_number":"11111999999999-1",
   "payment_method":"bolepix",
   "payment_status":"canceled",
   "payment_amount":"15000",
   "description":"Cobrança 1111100000 - parcela 001/001",
   "installment":"1/1",
   "fine":0.0,
   "fees":0.0,
   "discount_before_payment_due_date":1681757667,
   "discount_before_payment":0.0,
   "due_date":1681959600,
   "issued_at":1681781894,
   "external_identifier":"1234",
   "os_code":"8888888888",
   "os_identifier":"5678",
   "nf_url":"<https://nf.co/123098>",
   "danfe":[
      {
         "number":"1234",
         "url":"http://nfe.pref.sp.gov.br/con/nota.aspx?ccm=87654321&nf=1234&cod=K1ABCD2E"
      }
   ],
   "rps":"https://neofin-nf.co/1234567-abcd-1234-efgh-ijklmnopqrst/rps9876543210.pdf",
   "barcode_b64":"iVBORw0KGgoAAAANSUhEUgAAA+oAAADICAIAAADwcIwlAAAE1UlEQVR4nO3YyW6jUBRAQdPq///l17soMuGZIbRzoqodNsMFAT7yMsZ4AAAABX/ePQAAALCXfAcAgAz5DgAAGfIdAAAy5DsAAGTIdwAAyJDvAACQId8BACBDvgMAQIZ8BwCAjL/vHuB2y7I8Ho8xxp7F+VYfttb/+Opp/fXnnxcne1sf8aZJ1nvYudrWnr+8wi/P69ClmA983yG2jvhygOsnNbnCh454+rbZcxZ7pj2xt5eTYHyo5wMfGuDLz0/fmUcfpafN5+d13027tfgth/g5JzVfbb3noy/kK78sk709bf7yiN/4Ft0a/j/cNtffQhef8cmQp9/AV35qT9wPWwPc1zZXfjLWW/0m/n0HAI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AAAy5DsAAGTIdwAAyJDvAACQId8BACBDvgMAQIZ8BwCADPkOAAAZ8h0AADLkOwAAZMh3AADIkO8AAJAh3wEAIEO+AwBAhnwHAIAM+Q4AABnyHQAAMuQ7AABkyHcAAMiQ7wAAkCHfAQAgQ74DAECGfAcAgIxljPHuGQAAgF38+w4AABnyHQAAMuQ7AABkyHcAAMiQ7wAAkCHfAQAgQ74DAECGfAcAgBz5DgAAGfIdAAAy/gH5LV2aysUGjwAAAABJRU5ErkJggg==",
   "boleto_url":"https://boletos.fitbank.com.br/pdf/2023-04-18/4044kt2s.pdf",
   "code":"45090.13781 00000.127805 00255.550032 1 94790000001295",
   "hash":"00030101021226780025br.gov.bcb.pix2556qrcode.fitbank.com.br/QR/cobv/598D2EAA37098C4916EBD16CAA5204000053039865802BR5922NEOFIN TECNOLOGIA LTDA6009Sao Paulo510806606003610705036304144C",
   "paid_amount":"15000",
   "paid_at":1681845201,
   "paid_method":"pix"
}

Rules#

barcode_b64: available only for payments paid_method = boleto, on topics/events = payments/registered, payments/overdue, payments/paid or payments/cancelled.
boleto_url: available only for payments paid_method = boleto, on topics/events = payments/registered, payments/overdue, payments/paid ou payments/cancelled.
code:available only for payments paid_method = boleto, on topics/events = payments/registered, payments/overdue, payments/paid ou payments/cancelled.
hash: available only for payments paid_method = pix, on topics/events = payments/registered, payments/overdue, payments/paid ou payments/cancelled.
paid_amount: available on topic/event = payments/paid.
paid_at: available on topic/event = payments/paid.
paid_method: available only for payments paid_method = bolepix, no tópico/evento = payments/paid.
danfe: the field will be retrieved only if the payment was created by ERP integration.
rps: the field will be retrieved only if the payment was created by ERP integration.

Types#

due_date: timestamp in seconds (int).
issued_at: timestamp in seconds (int). discount_before_payment_due_date:timestamp in seconds (int). paid_at: timestamp in seconds (int).
billing_amount: value in cents of Brazilian Real (string). payment_amount: value in cents of Brazilian Real (string). paid_amount: value in cents of Brazilian Real (string).

Possible Values#

payment_status: pending | paid | overdue | cancelled | paid_after_protested | paid_after_derrogatory | processing_protest | protested | derrogatory | pending_derrogatory | processing_derrogatory | derrogatory_cancelled | protest_cancelled
payment_method: pix | boleto | bolepix | tedin | pixin | generic | credit_card
paid_method: pix | boleto

Headers exemple#

X-Neofin-Topic: payments/created | payments/registered | payments/overdue | payments/paid | payments/cancelled
X-Neofin-Hmac-SHA256: Validating the webhook
X-Neofin-Webhook-ID: compare the X-Neofin-Webhook-ID header with previous events in order to identify duplicated webhooks.
X-Neofin-Datetime: date in ISO 8601 DateTime Format.
X-Neofin-API-Version: Neofin APi Version. Current: 01-2023.
User-Agent: always 'neofin-webhook'.

Validating the webhook#

Each webhook request includes a X-Neofin-Hmac-SHA256 base64 encoded header, generated using the API Secret Key and the Data sent by the request#
Request Validation Example using Python and Flask Framework:
Previous
Get a customer by their document
Next
Introdução
Built with