12.6 Disparo de webhook de cobrança criada ou alterada
Abaixo estão alguns exemplos de webhooks enviados caso uma cobrança seja criada ou alterada.
Evento BILLING_CREATED
disparado na criação de cobranças
Response BILLING_CREATED
{
"body": {
"EnvironmentType": null,
"Status": 0,
"BillingRefId": null,
"BillingToken": null,
"BillingId": 0,
"PaidAmount": null,
"PaidAt": null,
"ReissueData": null,
"CreationData": {
"PaymentPlanRefId": "00000000-0000-0000-0000-000000000000",
"FinancialOwnerRefId": "00000000-0000-0000-0000-000000000000",
"DependentRefId": "00000000-0000-0000-0000-000000000000",
"CostCenter": "Mensalidades",
"BankAgency": "0001",
"BankAccount": "99999-9",
"BankWallet": "09",
"BankOtherWallet": null,
"Environment": 1,
"Billings": [
{
"BillingRefId": "00000000-0000-0000-0000-000000000000",
"DueDate": "2025-03-20T03:00:00Z",
"Value": 410.0000,
"NN": "628666",
"Barcode": "0000000000000000000000000000000000000000000",
"DigitableLine": "0000000000000000000000000000000000000000000",
"PixCode": "XXXXXXbr.gov.bcb.pix2561qrcode.qitech.app/bacen/cobv/XXXX",
"DiscountValue": 41.0000,
"DiscountLimitDate": "2025-03-20T00:00:00",
"BillingStatus": 5
},
{
"BillingRefId": "00000000-0000-0000-0000-000000000000",
"DueDate": "2025-04-20T03:00:00Z",
"Value": 410.0000,
"NN": "628667",
"Barcode": "0000000000000000000000000000000000000000000",
"DigitableLine": "0000000000000000000000000000000000000000000",
"PixCode": "XXXXXXbr.gov.bcb.pix2561qrcode.qitech.app/bacen/cobv/XXXX2",
"DiscountValue": 41.0000,
"DiscountLimitDate": "2025-04-20T00:00:00",
"BillingStatus": 5
},
]
},
"ManualPaymentData": null
}
}
Evento BILLING_STATUS_CHANGED
disparado quando status da cobrança é alterado
Response BILLING_STATUS_CHANGED
{
"body": {
"EnvironmentType": null,
"Status": 4,
"BillingRefId": "00000000-0000-0000-0000-000000000000",
"BillingToken": "00000000-0000-0000-0000-000000000000",
"BillingId": 0,
"PaidAmount": null,
"PaidAt": null,
"ReissueData": null,
"CreationData": null,
"ManualPaymentData": null
}
}
Evento BILLING_PAYMENT
disparado quando cobrança é paga
Response BILLING_PAYMENT
{
"body": {
"EnvironmentType": null,
"Status": 1,
"BillingRefId": "00000000-0000-0000-0000-000000000000",
"BillingToken": "00000000-0000-0000-0000-000000000000",
"BillingId": 0,
"PaidAmount": 295,
"PaidAt": "2025-02-13T00:00:00",
"ReissueData": null,
"CreationData": null,
"ManualPaymentData": null
}
}
Evento BILLING_MANUAL_PAYMENT
disparado quando ocorre baixa manual da cobrança
Response BILLING_MANUAL_PAYMENT
{
"body": {
"EnvironmentType": null,
"Status": 1,
"BillingRefId": "00000000-0000-0000-0000-000000000000",
"BillingToken": "00000000-0000-0000-0000-000000000000",
"BillingId": 0,
"PaidAmount": null,
"PaidAt": null,
"ReissueData": null,
"CreationData": null,
"ManualPaymentData": {
"PaymentDate": "2025-01-24T03:00:00Z",
"AmountPaid": 310.00,
"PaymentType": 17,
"DiscountValue": 0,
"IsUndo": false,
"IsUpdate": false
}
}
}
Evento BILLING_REISSUE
disparado quando é gerado 2ª via da cobrança
Response BILLING_REISSUE
{
"body": {
"EnvironmentType": null,
"Status": 0,
"BillingRefId": "00000000-0000-0000-0000-000000000000",
"BillingToken": "00000000-0000-0000-0000-000000000000",
"BillingId": 0,
"PaidAmount": null,
"PaidAt": null,
"ReissueData": {
"BillingRefId": "00000000-0000-0000-0000-000000000000",
"DueDate": "2025-02-20T03:00:00Z",
"Value": 305.0000,
"NN": "9999999",
"Barcode": "000000000000000000000000000000000000000000000000",
"DigitableLine": "000000000000000000000000000000000000000000000000000",
"PixCode": "XXXXXXXXbr.gov.bcb.pix2561qrcode.qitech.app/bacen/cobv/XXXXXXXX",
"DiscountValue": 30.0000,
"DiscountLimitDate": "2025-02-20T03:00:00Z",
"BillingStatus": 5
},
"CreationData": null,
"ManualPaymentData": null
}
}
Evento BILLING_CANCEL
disparado quando cobrança é cancelada
Response BILLING_CANCEL
{
"body": {
"EnvironmentType": null,
"Status": 2,
"BillingRefId": "00000000-0000-0000-0000-000000000000",
"BillingToken": "00000000-0000-0000-0000-000000000000",
"BillingId": 0,
"PaidAmount": null,
"PaidAt": null,
"ReissueData": null,
"CreationData": null,
"ManualPaymentData": null
}
}
Objeto BillingQueueMessageData (body)
Campo | Tipo | Descrição |
---|---|---|
EnvironmentType | EnvironmentType? | Tipo do ambiente |
Status | BillingStatus | Status da cobrança |
BillingRefId | string | Referência da cobrança |
BillingToken | string | Token da cobrança |
BillingId | int | Id da cobrança |
PaidAmount | decimal? | Valor pago |
PaidAt | DateTime? | Data do pagamento |
ReissueData | BillingReissueQueueMessageData? | Dados de reemissão da cobrança |
CreationData | BillingCreationQueueMessageData? | Dados de criação da cobrança |
manualpaymentdata | BillingManualPaymentQueueMessageData? | Dados de pagamento manual |
Objeto BillingCreationQueueMessageData
Campo | Tipo | Descrição |
---|---|---|
PaymentPlanRefId | string | Referência do plano de pagamento |
FinancialOwnerRefId | string | Referência do responsável financeiro |
DependentRefId | string | Referência do dependente |
CostCenter | string | Centro de custo |
BankAgency | string | Agência bancária |
BankAccount | string | Conta bancária |
BankWallet | string | Carteira bancária |
BankOtherWallet | string? | Outra carteira bancária |
Environment | EnvironmentType | Tipo do ambiente |
Billings | BillingCreationBillingQueueMessageData[] | Lista de cobranças |
Objeto BillingReissueQueueMessageData
Campo | Tipo | Descrição |
---|---|---|
PaymentPlanRefId | string | Referência do plano de pagamento |
FinancialOwnerRefId | string | Referência do responsável financeiro |
DependentRefId | string | Referência do dependente |
CostCenter | string | Centro de custo |
BankAgency | string | Agência bancária |
BankAccount | string | Conta bancária |
BankWallet | string | Carteira bancária |
BankOtherWallet | string? | Outra carteira bancária |
Environment | EnvironmentType | Tipo do ambiente |
Billings | BillingCreationBillingQueueMessageData[] | Lista de cobranças |
Objeto BillingCreationBillingQueueMessageData
Campo | Tipo | Descrição |
---|---|---|
BillingRefId | string | Referência da cobrança |
DueDate | DateTime | Data de vencimento |
Value | decimal | Valor da cobrança |
NN | string? | Número do documento |
Barcode | string? | Código de barras |
DigitableLine | string? | Linha digitável |
PixCode | string? | Código Pix |
DiscountValue | decimal? | Valor do desconto |
DiscountLimitDate | DateTime? | Data limite para desconto |
BillingStatus | BillingStatus | Status da cobrança |
Objeto BillingManualPaymentQueueMessageData
Campo | Tipo | Descrição |
---|---|---|
PaymentDate | DateTime? | Data do pagamento |
AmountPaid | decimal? | Valor pago |
PaymentType | PaymentType? | Tipo de pagamento |
DiscountValue | decimal? | Valor do desconto |
IsUndo | bool | Indica se é uma reversão |
IsUpdate | bool | Indica se é uma atualização |