Introducing the Chargebee CLI

List gateway webhook logs

Retrieves the webhooks that payment gateways sent to Chargebee for the site, newest first.

Use this operation to confirm that gateway notifications reached Chargebee and to trace them to a customer, invoice, or transaction. Filter by received_at to limit the results to a time range.

Implementation Notes

  • Results are sorted by received_at in descending order. Pass sort_by[asc] as received_at to list the oldest logs first.
  • Pagination can reach at most the first 10,000 matching logs: offset plus limit can't exceed 10,000. Once the next page would go past 10,000 logs, next_offset isn't returned, even if more logs match. To page further back, narrow the time range with the received_at filter.
  • Only the filters listed on this page are supported. Any other filter parameter returns an error instead of being ignored.
  • When Multi Business Entity is enabled and a business entity is in context, only logs for that business entity are returned.

Sample Request

Sample Result[JSON]

URL Format

GET https://[site].chargebee.com/api/v2/gateway_webhook_logs

Input Parameters

limit
optional, integer, default=10, min=1, max=100

The number of resources to be returned.

Constraints

  • offset plus limit can't exceed 10,000.
offset
optional, string, max chars=1000

Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set offset to the value of next_offset obtained in the previous iteration of the API call.

Constraints

  • offset plus limit can't exceed 10,000. To page further back, narrow the time range with the received_at filter.
sort_by[<sort-order>]
optional, object

optional, string filter

Sorts based on the specified attribute. Supported attributes : received_at

Supported sort-orders : asc, desc

Example → sort_by[asc] = "received_at"

This will sort the result based on the 'received_at' attribute in ascending(earliest first) order.

Default behavior

  • Results are sorted by received_at in descending order.

Filter Params

For operator usages, see the Pagination and Filtering section.
webhook_id[<operator>]

optional, string filter

Filter by the unique identifier of the gateway webhook log. Supported operators : is, is_not, in, not_in

Example → webhook_id[is] = "aBcD1234eFgH"

Supported operators: is_not, in, not_in, is
gateway[<operator>]

optional, string filter

Filter by the payment gateway that sent the webhook. Supported operators : is, is_not, in, not_in

Example → gateway[is] = "adyen"

Supported operators: is_not, in, not_in, is
status_code[<operator>]

optional, string filter

Filter by the HTTP status code that Chargebee returned to the gateway. Supported operators : is, is_not, in, not_in

Example → status_code[is] = "200"

Supported operators: is_not, in, not_in, is
method[<operator>]

optional, string filter

Filter by the HTTP method of the webhook request. Supported operators : is, is_not, in, not_in

Example → method[is] = "POST"

Supported operators: is_not, in, not_in, is
url[<operator>]

optional, string filter

Filter by the Chargebee URL at which the webhook was received. Supported operators : is, is_not, in, not_in

Example → url[is] = "https://acme-test.chargebee.com/adyen/webhook"

Supported operators: is_not, in, not_in, is
id_at_gateway[<operator>]

optional, string filter

Filter by the gateway's reference for the transaction that the webhook is about. Supported operators : is, is_not, in, not_in

Example → id_at_gateway[is] = "8835511210681327"

Supported operators: is_not, in, not_in, is
customer_handle[<operator>]

optional, string filter

Filter by the ID of the customer associated with the request. Supported operators : is, is_not, in, not_in

Example → customer_handle[is] = "16BjoNSh3G0Tc1hk"

Supported operators: is_not, in, not_in, is
invoice_handle[<operator>]

optional, string filter

Filter by the ID of the invoice associated with the request. Supported operators : is, is_not, in, not_in

Example → invoice_handle[is] = "INV-123"

Supported operators: is_not, in, not_in, is
transaction_handle[<operator>]

optional, string filter

Filter by the ID of the transaction that the webhook matched. Supported operators : is, is_not, in, not_in

Example → transaction_handle[is] = "txn_16BjoNSh3G0Tc1hk"

Supported operators: is_not, in, not_in, is
payment_method_handle[<operator>]

optional, string filter

Filter by the ID of the payment source associated with the webhook. Supported operators : is, is_not, in, not_in

Example → payment_method_handle[is] = "pm_16BjoNSh3G0Tc1hk"

Supported operators: is_not, in, not_in, is
gateway_credential_handle[<operator>]

optional, string filter

Filter by the ID of the gateway account associated with the webhook. Supported operators : is, is_not, in, not_in

Example → gateway_credential_handle[is] = "gw_16BjoNSh3G0Tc1hk"

Supported operators: is_not, in, not_in, is
payment_attempt_handle[<operator>]

optional, string filter

Filter by the ID of the payment attempt associated with the request. Supported operators : is, is_not, in, not_in

Example → payment_attempt_handle[is] = "payment_attempt_id"

Supported operators: is_not, in, not_in, is
payment_intent_handle[<operator>]

optional, string filter

Filter by the ID of the payment intent associated with the request. Supported operators : is, is_not, in, not_in

Example → payment_intent_handle[is] = "pi_16BjoNSh3G0Tc1hk"

Supported operators: is_not, in, not_in, is
received_at[<operator>]

optional, timestamp(UTC) in seconds filter

Filter by when Chargebee received the webhook. Supported operators : after, before, between, on

Example → received_at[after] = "1435054328"

Supported operators: after, before, on, between

Returns

next_offset
optional, string, max chars=1000

Returned only when more resources are present and the next page stays within the first 10,000 matching logs. To fetch the next set of resources, use this value for the input parameter offset.

Gateway webhook log object

Resource object representing gateway_webhook_log