4 - Webhooks

For communication between systems, webhooks are used, providing real-time updates on the status of the Future Posting.

In the 'status' field, the following values are possible:

  • Authorized
  • CanBeSettled
  • Created
  • Cancelled
  • PartiallyPaid
  • Paid

Webhook Authorized

{
  "FuturePosting": {
    "DocumentNumber": 451386,
    "FuturePostingStatus": "Authorized",
    "OriginalValue": 3,
    "CurrentValue": 0,
    "InitialDate": "29/08/2024 00:00:00",
    "DueDate": "07/09/2024 23:59:59",
    "DebitType": 0,
    "AutomaticType": 0,
    "Tags": [
      "Teste"
    ]
  },
  "AutomaticType": {
    "DocumentNumber": null,
    "Status": null,
    "TotalValue": null,
    "ExternalNumber": null
  },
  "Method": "StatusClientFuturePosting",
  "BusinessUnitId": 1465
}

Webhook CanBeSettled

{
  "FuturePosting": {
    "DocumentNumber": 451340,
    "FuturePostingStatus": "CanBeSettled",
    "OriginalValue": 13,
    "CurrentValue": 13,
    "InitialDate": "27/08/2024 00:00:00",
    "DueDate": "28/08/2024 23:59:59",
    "DebitType": 0,
    "AutomaticType": 0,
    "Tags": [
      "FuturePosting",
      "TesteparaPessoadeoutraBU"
    ]
  },
  "AutomaticType": {
    "DocumentNumber": null,
    "Status": null,
    "TotalValue": null,
    "ExternalNumber": null
  },
  "Method": "StatusClientFuturePosting",
  "BusinessUnitId": 2061
}

Webhook Created

{
  "FuturePosting": {
    "DocumentNumber": 451388,
    "FuturePostingStatus": "Created",
    "OriginalValue": 0.02,
    "CurrentValue": 0,
    "InitialDate": "30/08/2024 00:00:00",
    "DueDate": "31/08/2024 23:59:59",
    "DebitType": 0,
    "AutomaticType": 3,
    "Tags": [
      "boletofp"
    ]
  },
  "AutomaticType": {
    "DocumentNumber": null,
    "Status": null,
    "TotalValue": null,
    "ExternalNumber": null
  },
  "Method": "StatusClientFuturePosting",
  "BusinessUnitId": 1465
}

Webhook Cancelled

{
  "FuturePosting": {
    "DocumentNumber": 451387,
    "FuturePostingStatus": "Cancelled",
    "OriginalValue": 3,
    "CurrentValue": 0,
    "InitialDate": "29/08/2024 00:00:00",
    "DueDate": "07/09/2024 23:59:59",
    "DebitType": 0,
    "AutomaticType": 0,
    "Tags": [
      "Teste"
    ]
  },
  "AutomaticType": {
    "DocumentNumber": null,
    "Status": null,
    "TotalValue": null,
    "ExternalNumber": null
  },
  "Method": "StatusClientFuturePosting",
  "BusinessUnitId": 1465
}

Webhook PartiallyPaid

{
"FuturePosting": {
"DocumentNumber": 1254,
"FuturePostingStatus": "PartiallyPaid",
"OriginalValue": 100,
"CurrentValue": 50,
"InitialDate": "13/12/2023 00:00:00",
"DueDate": "13/12/2023 13:43:13",
"DebitType" : 1,
"AutomaticType": 0,
"Tags": [
"WebhookFP"
]
},
"AutomaticType": {
"DocumentNumber": null,
"Status" : null,
"TotalValue": null
},
"Method": "StatusClientFuturePosting",
"BusinessUnitId": 445
}

Webhook Paid

{
  "FuturePosting": {
    "DocumentNumber": 451389,
    "FuturePostingStatus": "Paid",
    "OriginalValue": 3,
    "CurrentValue": 3,
    "InitialDate": "29/08/2024 00:00:00",
    "DueDate": "07/09/2024 23:59:59",
    "DebitType": 1,
    "AutomaticType": 0,
    "Tags": [
      "Teste"
    ]
  },
  "AutomaticType": {
    "DocumentNumber": null,
    "Status": null,
    "TotalValue": null,
    "ExternalNumber": null
  },
  "Method": "StatusClientFuturePosting",
  "BusinessUnitId": 1465
}

Webhook Field Descriptions:

ParameterDescription
FuturePostingObject containing specific information about the Future Posting
DocumentNumberDocument number returned from the GenerateFuturePosting method
FuturePostingStatusStatus of the Future Posting
OriginalValueValue at the time of generating the Future Posting
CurrentValueValue already captured
InitialDateStart date of the Future Posting capture
DueDateDue date of the Future Posting
DebitTypeTotal or Partial Future Posting
AutomaticTypeIndicates whether only a Future Posting was generated or if it included a TED or Boleto
TagsTags provided by the client in the GenerateFuturePosting method
AutomaticTypeObject containing specific information about the Boleto or TED
DocumentNumberDocument number provided by FitBank when a Boleto or TED is generated
StatusStatus of the TED or boleto
TotalValueRefers to the amount to be paid for the boleto or transferred via TED
ExternalNumberClient's debt number, same ExternalNumber sent in the ReceiverBankingData object of the GenerateFuturePosting method
MethodStatusClientFuturePosting
BusinessUnitIdInternal number of FitBank