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:
| Parameter | Description | 
|---|---|
| FuturePosting | Object containing specific information about the Future Posting | 
| DocumentNumber | Document number returned from the GenerateFuturePosting method | 
| FuturePostingStatus | Status of the Future Posting | 
| OriginalValue | Value at the time of generating the Future Posting | 
| CurrentValue | Value already captured | 
| InitialDate | Start date of the Future Posting capture | 
| DueDate | Due date of the Future Posting | 
| DebitType | Total or Partial Future Posting | 
| AutomaticType | Indicates whether only a Future Posting was generated or if it included a TED or Boleto | 
| Tags | Tags provided by the client in the GenerateFuturePosting method | 
| AutomaticType | Object containing specific information about the Boleto or TED | 
| DocumentNumber | Document number provided by FitBank when a Boleto or TED is generated | 
| Status | Status of the TED or boleto | 
| TotalValue | Refers to the amount to be paid for the boleto or transferred via TED | 
| ExternalNumber | Client's debt number, same ExternalNumber sent in the ReceiverBankingData object of the GenerateFuturePosting method | 
| Method | StatusClientFuturePosting | 
| BusinessUnitId | Internal number of FitBank | 
Updated about 1 year ago
