6 - Webhook

TopUp Webhook

Overview

The TopUp webhook allows clients to receive real-time notifications regarding the status of TopUp transactions. This webhook is designed to streamline communication between the Fitbank platform and its partners, providing critical updates about the transaction process. The webhook will send a JSON payload containing detailed transaction information whenever a significant event occurs.

Webhook URL

The webhook will send an HTTP POST request to the URL specified by the partner during the integration setup.

JSON Payload Structure

Here is an example of the JSON payload that will be sent by the webhook:


{
    "Method": "PurchaseTopUpNote",
    "BusinessUnitId": 66,
    "Partner": 66,
    "Status": "Canceled",
    "DocumentNumber": "588",
    "Identifier": "0000000000",
    "EntryId": 8385725,
    "TotalValue": 0.0,
    "PaymentDate": "2024-08-26T15:08:23.48",
    "FineInterest": 0.0,
    "DiscountValue": 0.0,
    "IofValue": 0.0,
    "PaidValue": 30.00,
    "OtherValues": 0.0,
    "CreditDate": "2024-08-26T15:08:23.48",
    "OccurrenceDate": null,
    "BankCode": null,
    "BankBranch": null,
    "BankAccount": null,
    "BankAccountDigit": null,
    "ReturnCode": "7",
    "ReturnMessage": null,
    "ProductKey": "CLARO11-3000-187000000060",
    "ProductSubType": "11",
    "ProductType": "Phone",
    "URL": "2024-08-26/jxzoth3c.pdf",
    "ErrorMessage": null
}

Parameters Description

PARAMETERTYPEDESCRIPTION
MethodstringMandatory. Name of the method being invoked.
BusinessUnitIdlongMandatory. Business Unit ID provided by Fitbank.
PartnerlongMandatory. Identifier assigned by Fitbank.
StatusenumMandatory. Status of the transaction.
DocumentNumberlongMandatory. Unique identifier for the recharge.
IdentifierstringMandatory. Unique identifier for the transaction.
EntryIdlongMandatory. Unique identifier for the entry.
TotalValuedecimalMandatory. Total amount of the transaction.
PaymentDatedatetimeMandatory. Date and time when payment was made.
FineInterestdecimalMandatory. Penalty for late payment.
DiscountValuedecimalMandatory. Applied discount value.
IofValuedecimalMandatory. IOF (Tax on Financial Operations) value.
PaidValuedecimalMandatory. Amount paid by the user.
OtherValuesdecimalMandatory. Additional values related to the transaction.
CreditDatedatetimeMandatory. Date when the credit was applied.
OccurrenceDatedatetimeMandatory. Date of the occurrence, if applicable.
BankCodestringCode of the bank involved in the transaction.
BankBranchstringNumber of the bank branch.
BankAccountstringAccount number associated with the transaction.
BankAccountDigitstringVerifying digit of the bank account.
ReturnCodestringCode indicating the return status.
ReturnMessagestringMessage providing additional information on the return status.
ProductKeystringKey identifying the specific product for recharge.
ProductSubTypestringSub-type identifier, such as the area code for the region.
ProductTypestringType of product (e.g., Phone).
URLstringURL pointing to the proof of transaction.
ErrorMessagestringMessage detailing any error that occurred.

Transaction Status Codes

Status CodeDescription
CanBeRegister = 1Transaction can be registered.
Registered = 3Transaction has been registered.
Settlement = 5Transaction has been settled.
Canceled = 7Transaction has been canceled.
Error = 8An error occurred in the transaction.