Introducing the Chargebee CLI

List gateway request logs

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

Use this operation to investigate gateway activity, such as failed payment or refund calls, for a specific customer, invoice, transaction, or gateway. Filter by invocation_time to limit the results to a time range.

Implementation Notes

  • Results are sorted by invocation_time in descending order. Pass sort_by[asc] as invocation_time 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 invocation_time 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_request_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 invocation_time filter.
sort_by[<sort-order>]
optional, object

optional, string filter

Sorts based on the specified attribute. Supported attributes : invocation_time

Supported sort-orders : asc, desc

Example → sort_by[asc] = "invocation_time"

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

Default behavior

  • Results are sorted by invocation_time in descending order.

Filter Params

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

optional, string filter

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

Example → log_id[is] = "aBcD1234eFgH"

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

optional, string filter

Filter by the payment gateway that received the request. Supported operators : is, is_not, in, not_in

Example → gateway[is] = "stripe"

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

optional, string filter

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

Example → status_code[is] = "402"

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

optional, string filter

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

Example → method[is] = "POST"

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

optional, string filter

Filter by the gateway URL that Chargebee sent the request to. Supported operators : is, is_not, in, not_in

Example → url[is] = "https://api.stripe.com/v1/payment_intents"

Supported operators: not_in, is_not, is, in
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: not_in, is_not, is, in
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: not_in, is_not, is, in
transaction_handle[<operator>]

optional, string filter

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

Example → transaction_handle[is] = "txn_16BjoNSh3G0Tc1hk"

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

optional, string filter

Filter by the ID of the payment source used in the request. Supported operators : is, is_not, in, not_in

Example → payment_method_handle[is] = "pm_16BjoNSh3G0Tc1hk"

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

optional, string filter

Filter by the ID of the gateway account used for the request. Supported operators : is, is_not, in, not_in

Example → gateway_credential_handle[is] = "gw_16BjoNSh3G0Tc1hk"

Supported operators: not_in, is_not, is, in
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: not_in, is_not, is, in
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: not_in, is_not, is, in
operation_name[<operator>]

optional, string filter

Filter by the name of the gateway operation performed in the request. Supported operators : is, is_not, in, not_in

Example → operation_name[is] = "PAYMENT"

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

optional, string filter

Filter by the type of the gateway operation performed in the request. Supported operators : is, is_not, in, not_in

Example → operation_type[is] = "REFUND"

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

optional, string filter

Filter by the origin of the Chargebee request that triggered the gateway call. Supported operators : is, is_not, in, not_in

Example → source[is] = "API"

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

optional, timestamp(UTC) in seconds filter

Filter by when Chargebee sent the request to the gateway. Supported operators : after, before, between, on

Example → invocation_time[after] = "1435054328"

Supported operators: after, before, on, between
response_received_at[<operator>]

optional, timestamp(UTC) in seconds filter

Filter by when Chargebee received the response from the gateway. Supported operators : after, before, between, on

Example → response_received_at[before] = "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 request log object

Resource object representing gateway_request_log