Skip to content

Debug API requests

When a call to Flint fails or a resource ends up in a state you didn't expect, you can find out what happened from the API itself. Every response carries a request ID. Every authenticated request is recorded in your request logs, with a diagnosis on failures and a replayable copy of the request. Every resource keeps a timeline that orders the API calls and webhook deliveries that touched it.

A typical investigation runs in four steps:

  1. Get the request ID from the response, or look the request up by your own ID.
  2. Find the request in your logs and confirm what came back.
  3. Open its log to see what Flint received, why it failed, and how to replay it.
  4. Read the resource's timeline to see what happened before and after.

To handle failures in code as they happen (the error envelope, error types, and retries), see Error handling.

Every response carries a request ID#

Flint mints a request ID for every request and returns it on every response, success or failure. It is req_ followed by 26 characters, such as req_01KWM608MR7CAZFETWS1RA3XPG, and identifies that one request. The X-Request-Id response header carries it, and the body repeats it: as a top-level request_id next to data on success, and as error.request_id on failure.

Say an order create fails because the body misspells line_items:

HTTP
HTTP/1.1 400 Bad Request
Content-Type: application/json
X-Request-Id: req_01KWM608MR7CAZFETWS1RA3XPG
Flint-Mode: test
Flint-Sandbox-Id: test_01KNB061AGD0CYYF16M5QAQE3N
Flint-Version: 2026-09-07
JSON
{
  "error": {
    "type": "validation_error",
    "code": "INVALID_REQUEST",
    "message": "Unknown request field: line_itemz.",
    "param": "line_itemz",
    "error_source": "caller",
    "request_id": "req_01KWM608MR7CAZFETWS1RA3XPG",
    "request_log_url": "/v1/api-request-logs/rlog_01KWM6WAHJAXHCHE87C0KBBY7G",
    "doc_url": "https://developers.withflintpay.com/docs/errors#invalid_request",
    "remediation": {
      "retry": "none",
      "next_steps": "Correct each input named by details[].param as its message says, then send the request again."
    },
    "details": [
      {
        "code": "UNKNOWN_FIELD",
        "param": "line_itemz",
        "message": "Unknown request field: line_itemz."
      }
    ]
  }
}

Log the request_id with your own application logs on every call, and quote it when you contact Flint support. request_log_url is a shortcut to the request's log, described in Jump from an error to its log.

Send your own request ID#

If you already have an ID for the request, such as a log or trace ID from your system, send it in the X-Request-Id request header. Flint stores it on the request log as client_request_id and doesn't echo it: the response header and body always carry Flint's request_id, so there is one value to quote.

cURL
curl https://api.withflintpay.com/v1/orders \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "X-Request-Id: checkout-7f3a91" \
  -H "traceparent: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"

Send the header once, with 1 to 128 visible ASCII characters and no spaces. Flint treats the value as opaque and stores it exactly as sent. A repeated or invalid header returns 400 INVALID_REQUEST with detail code INVALID_VALUE and param set to X-Request-Id.

The value is for correlation only. It isn't an idempotency key, it doesn't need to be unique, and it doesn't change how Flint handles the request. Like an idempotency key, it must not contain secrets or personal data.

Send a trace ID#

If you use W3C Trace Context, Flint also reads a valid traceparent header and stores its trace ID as client_trace_id. A missing, repeated, or malformed traceparent is ignored without an error. Flint starts its own trace for every request rather than joining yours, so use client_trace_id to find every Flint request that belongs to one of your traces.

The identifiers you'll see#

IdentifierLooks likeWhat it names
request_idreq_01KWM608MR7CAZFETWS1RA3XPGOne HTTP request, minted by Flint. Returned in the X-Request-Id header and the response body.
api_request_log_idrlog_01KWM6WAHJAXHCHE87C0KBBY7GThe stored log of that request. Open it with the detail endpoint. Webhook events and delivery attempts carry it too, so you can join an event back to the call that caused it.
client_request_idcheckout-7f3a91The X-Request-Id you sent. Absent when you sent none. Not unique, so one value can match several logs.
client_trace_id4bf92f3577b34da6a3ce929d0e0e4736The trace ID from your traceparent: 32 lowercase hexadecimal characters. One trace can span several requests.

Logs recorded before Flint minted request IDs keep the request_id they had then, which can be a UUID or a value you sent.

Find the request#

GET/v1/api-request-logsRequired API key scopes: developer.request_logs.read or developer.request_logs.self.readReference for GET /v1/api-request-logs

List request summaries, newest first.

With a request_id in hand, filter on it to get that one request. Without one, start from what failed:

cURL
curl "https://api.withflintpay.com/v1/api-request-logs?status_bucket=client_error&page_size=2" \
  -H "Authorization: Bearer YOUR_API_KEY"
Response
{
  "data": [
    {
      "api_request_log_id": "rlog_01KWM6WAHJAXHCHE87C0KBBY7G",
      "request_id": "req_01KWM608MR7CAZFETWS1RA3XPG",
      "client_request_id": "checkout-7f3a91",
      "client_trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
      "caller": {
        "resource_type": "api_key",
        "resource_id": "key_01KWJ93G11C7MF8REX91MDS0CD"
      },
      "http_method": "POST",
      "path": "/v1/orders",
      "route_pattern": "POST /v1/orders",
      "requested_api_version": "2026-09-07",
      "requested_api_version_source": "merchant",
      "served_api_version": "2026-09-07",
      "status_code": 400,
      "latency_milliseconds": 6,
      "resource_type": "order",
      "error_code": "INVALID_REQUEST",
      "error_type": "validation_error",
      "error_summary": "One or more request inputs are invalid.",
      "retry": "none",
      "recommended_action": "Correct each input named by details[].param as its message says, then send the request again.",
      "created_at": "2026-07-03T14:42:16Z"
    },
    {
      "api_request_log_id": "rlog_01KWM6VKT2RCSYCW7FAQEP1TAV",
      "request_id": "req_01KWM663ZV0XRMYBR1Q5480ZVV",
      "caller": {
        "resource_type": "api_key",
        "resource_id": "key_01KWJ93G11C7MF8REX91MDS0CD"
      },
      "http_method": "GET",
      "path": "/v1/orders/ord_00000000000000000000000000",
      "route_pattern": "GET /v1/orders/{order_id}",
      "requested_api_version": "2026-09-07",
      "requested_api_version_source": "merchant",
      "served_api_version": "2026-09-07",
      "status_code": 404,
      "latency_milliseconds": 11,
      "resource_type": "order",
      "resource_id": "ord_00000000000000000000000000",
      "error_code": "RESOURCE_NOT_FOUND",
      "error_type": "not_found_error",
      "error_summary": "The requested resource could not be found for the authenticated merchant and environment.",
      "retry": "none",
      "recommended_action": "Check the resource ID, mode, and merchant context, then retry.",
      "created_at": "2026-07-03T14:41:52Z"
    }
  ],
  "next_page_token": "eyJzb3J0X2ZpZWxkIjoiY3JlYXRlZF9hdCIs...",
  "request_id": "req_01KWM6CNFPWADA6RV8N4E4W26V"
}

Each summary says who called, what was called, what came back, and how long it took. Read these fields first:

  • caller is the resource that made the request: an api_key, a user, a workload_identity, a partner_app_install, a partner_app, or a buyer's checkout_session, customer_session, or invoice. Each credential records one caller:

    • An API key records the api_key.

    • A Dashboard write, a CLI login, and an onboarding session record the user.

    • A workload access token records its workload_identity, so requests across token exchanges share one caller.

    • A partner app token records the partner_app_install. On your own app's routes, such as reading your app or revoking its installs, it records the partner_app, logged under your account as the app owner.

    • A checkout session or launch token records the checkout_session.

    • A buyer account request records the customer_session. An invoice access request records the invoice. Session refreshes (POST /v1/customer-sessions/refresh) are logged with a customer_session caller, including a refresh that revokes a session because its refresh token was reused.

    caller is absent when Flint can't attribute the request.

  • resource_type and resource_id name the one resource the request is attributed to: the resource in its path, or the resource a create returned. A failed create, like the first entry, has a type and no ID.

  • The version fields requested_api_version, requested_api_version_source, and served_api_version show which API version you asked for, where that came from (header, partner_app, merchant, or current), and which version Flint used to encode the response.

  • expand lists the normalized expand paths Flint applied, when the request used expand.

  • Your IDs, client_request_id and client_trace_id, appear only when the request sent a valid X-Request-Id or traceparent. The second entry sent neither.

On a failure, Flint adds a diagnosis from its error catalog:

FieldWhat it tells you
error_codeThe code the error response carried.
error_typeThe error's type, so you can filter and branch on it the same way.
error_summaryWhat kind of failure it was, in plain language.
retrysame_request: send the identical request again with the same Idempotency-Key. after_refresh: read the resource again and rebuild the request, then follow the key instruction in next_steps. none: correct the request first.
recommended_actionThe next step to resolve it.
reference_urlA Flint guide that explains the failure, when one applies.

Which requests you see#

The scope on your credential decides:

  • developer.request_logs.read covers every caller in the credential's environment: your other keys, Dashboard and onboarding users, the CLI, workload identities, partner app installations, buyer checkout and account sessions, and invoice access.
  • developer.request_logs.self.read covers only requests made with the credential you are calling with.

Either way, the list stays inside the credential's merchant and environment. A live key sees live traffic; a test key sees only its sandbox. Partner app tokens can't call these endpoints, but their requests to your account appear in your logs with a partner_app_install caller. Your own app's token on your app's routes appears in yours with a partner_app caller.

If the list comes back empty, nothing matches yet. Drop status_bucket to see every request, or run any example on this site first.

Filters#

ParameterWhat it matches
request_idA Flint request ID, such as req_01KWM608MR7CAZFETWS1RA3XPG. Returns at most one log. Any other format returns 400 INVALID_REQUEST; to find the X-Request-Id you sent, use client_request_id.
client_request_idThe exact, case-sensitive X-Request-Id you sent, 1 to 128 visible ASCII characters. Returns every match, newest first.
client_trace_idA trace ID from traceparent: 32 lowercase hexadecimal characters, not all zeros. Returns every request in that trace.
customer_idRequests made with this customer's sessions, across every session. Requires developer.request_logs.read.
caller_typeOne or more of api_key, user, workload_identity, partner_app_install, partner_app, checkout_session, customer_session, and invoice. Requires developer.request_logs.read.
caller_idThe exact public ID of the caller, such as key_... or wid_.... Requires developer.request_logs.read.
status_bucketOne or more of success (200 to 299), client_error (400 to 499), and server_error (500 to 599). Omit it to match every status, including 1xx and 3xx.
http_methodOne or more of GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS, CONNECT, and TRACE, in uppercase.
queryA substring of path, such as /v1/orders.
resource_type, resource_idThe resource the request is attributed to, such as order and ord_.... resource_type takes one or more values.
created_after, created_beforeRFC 3339 bounds, such as 2026-07-03T00:00:00Z. created_after is inclusive and created_before is exclusive.
page_size, page_tokenCursor pagination: 1 to 100 per page, 20 by default.

caller_type, status_bucket, http_method, and resource_type accept repeated keys, comma-separated values, or both. Values within one filter are ORed and separate filters are ANDed, so status_bucket=success,server_error matches 2xx and 5xx responses and excludes 3xx and 4xx. Values are trimmed and deduplicated; an empty or unknown value rejects the request. So does an unknown parameter, so a typo can't silently widen your query.

Filtering caller_id by an API key ID matches that key's requests across the full 90-day summary retention. Other caller IDs, and caller_type, match only requests recorded since Flint began storing the caller on 2026-10-22. Older logs can still show caller, derived from the credential, except older CLI requests, where Flint didn't record the user.

Inspect one request#

GET/v1/api-request-logs/{api_request_log_id}Required API key scopes: developer.request_logs.read or developer.request_logs.self.readReference for GET /v1/api-request-logs/{api_request_log_id}

Read one request in full. The same scopes as the list apply.

The list tells you a request failed. The detail shows why. Pass the api_request_log_id from the list:

cURL
curl "https://api.withflintpay.com/v1/api-request-logs/rlog_1kmn0aExample" \
  -H "Authorization: Bearer YOUR_API_KEY"
Response
{
  "data": {
    "api_request_log_id": "rlog_01KWM6WAHJAXHCHE87C0KBBY7G",
    "request_id": "req_01KWM608MR7CAZFETWS1RA3XPG",
    "client_request_id": "checkout-7f3a91",
    "client_trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
    "caller": {
      "resource_type": "api_key",
      "resource_id": "key_01KWJ93G11C7MF8REX91MDS0CD"
    },
    "http_method": "POST",
    "path": "/v1/orders",
    "query_params": [],
    "route_pattern": "POST /v1/orders",
    "requested_api_version": "2026-09-07",
    "requested_api_version_source": "merchant",
    "served_api_version": "2026-09-07",
    "status_code": 400,
    "latency_milliseconds": 6,
    "request_headers": {
      "Accept": "*/*",
      "Authorization": "[REDACTED]",
      "Content-Type": "application/json",
      "Traceparent": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01",
      "User-Agent": "curl/8.7.1",
      "X-Request-Id": "checkout-7f3a91"
    },
    "request_body": {
      "line_itemz": []
    },
    "response_body": {
      "error": {
        "type": "validation_error",
        "code": "INVALID_REQUEST",
        "message": "Unknown request field: line_itemz.",
        "param": "line_itemz",
        "error_source": "caller",
        "request_id": "req_01KWM608MR7CAZFETWS1RA3XPG",
        "request_log_url": "/v1/api-request-logs/rlog_01KWM6WAHJAXHCHE87C0KBBY7G",
        "doc_url": "https://developers.withflintpay.com/docs/errors#invalid_request",
        "remediation": {
          "retry": "none",
          "next_steps": "Correct each input named by details[].param as its message says, then send the request again."
        },
        "details": [
          {
            "code": "UNKNOWN_FIELD",
            "param": "line_itemz",
            "message": "Unknown request field: line_itemz."
          }
        ]
      }
    },
    "response_content_type": "application/json",
    "ip_address": "203.0.113.24",
    "user_agent": "curl/8.7.1",
    "resource_type": "order",
    "error_code": "INVALID_REQUEST",
    "error_type": "validation_error",
    "error_summary": "One or more request inputs are invalid.",
    "retry": "none",
    "recommended_action": "Correct each input named by details[].param as its message says, then send the request again.",
    "created_at": "2026-07-03T14:42:16Z",
    "reproduction": {
      "http_method": "POST",
      "path": "/v1/orders",
      "query_params": [],
      "headers": {
        "Accept": "*/*",
        "Authorization": "Bearer <API_KEY>",
        "Content-Type": "application/json",
        "Flint-Version": "2026-09-07",
        "Idempotency-Key": "<NEW_IDEMPOTENCY_KEY>"
      },
      "body": {
        "line_itemz": []
      },
      "curl": "curl -X 'POST' 'https://api.withflintpay.com/v1/orders' -H 'Accept: */*' -H 'Authorization: Bearer <API_KEY>' -H 'Content-Type: application/json' -H 'Flint-Version: 2026-09-07' -H 'Idempotency-Key: <NEW_IDEMPOTENCY_KEY>' --data-raw '{\"line_itemz\":[]}'",
      "has_redactions": false
    }
  },
  "request_id": "req_01KWM6H8536WHFTP944DA7HFRM"
}

request_body is the payload as Flint received it, after redaction, so the line_itemz typo is in front of you. response_body is the error your code got back, with the param that names the problem. The detail repeats the summary's diagnosis, using the remediation the stored error carried.

What the detail captures:

  • Headers, keyed by name. Buyer-side requests keep only content metadata, API version, idempotency, request ID, and trace headers; other headers, including authorization and client forwarding headers, are omitted. For other callers, Authorization, cookies, and headers that name a token, secret, or signature read [REDACTED].
  • Query parameters for every request, with sensitive values redacted.
  • Bodies for POST, PUT, and PATCH requests, up to 64 KB each, after redaction. A JSON object or array comes back as JSON; any other body comes back as a string. Reads and DELETE requests store no bodies. Neither do sensitive writes, such as creating an API key, creating a webhook endpoint, or rotating its secret, or delivery preview, quote, and selection requests. Requests under /v1/me and session refreshes never store request or response bodies.
  • ip_address and user_agent whenever stored, for every caller. For buyer-side callers (checkout_session, customer_session, and invoice), Flint keeps them for 30 days and removes them when the customer is deleted. When your server relays a buyer's request, the address is your server's address. Flint-hosted checkout and account pages use the buyer's forwarded client details when available.

Headers and bodies are kept for 14 days. After that, the detail still opens, without request_headers, request_body, or response_body.

Jump from an error to its log#

An error response can carry request_log_url, the path of that request's log, such as /v1/api-request-logs/rlog_01KWM6WAHJAXHCHE87C0KBBY7G. It appears when you call with an API key or a CLI sign-in that holds developer.request_logs.read or developer.request_logs.self.read. Send a GET to it with the same credential to open the detail without searching.

The detail endpoint waits up to three seconds for a recent request log to become available.

Reproduce it safely#

The reproduction object rebuilds the request so you can send it again:

  • headers keeps Accept and Content-Type, sets Flint-Version to the version Flint served, and uses the matching bearer placeholder: <CUSTOMER_SESSION_SECRET> for a customer session, <INVOICE_ACCESS_TOKEN> for invoice access, <CHECKOUT_CREDENTIAL> for checkout, or <API_KEY> for every other caller. Substitute the matching credential. Other headers, including the X-Request-Id you sent, are left out. Routes that accept an idempotency key include it according to the retry guidance.
  • body is the captured request body, and query_params the captured query. For POST /v1/customer-sessions/refresh, the reproduction omits Authorization and sends {"refresh_token":"<CUSTOMER_SESSION_REFRESH_TOKEN>"} as JSON instead; substitute the session's refresh token.
  • curl includes the captured body when it is complete and has no redacted values. Use the matching credential for a sandbox. If the body was redacted or truncated, replace <REDACTED_OR_CAPTURED_BODY> with the complete request body before running it.
  • has_redactions is true when redaction replaced values in the captured body or query. Fill those back in before you replay. A value of false does not guarantee a complete reproduction: body capture may have been omitted or expired.

For retry: same_request, the reproduction keeps the original Idempotency-Key. If it is unavailable, replace <ORIGINAL_IDEMPOTENCY_KEY> with the key you originally sent. Reuse it only with the identical request. A sandbox replay can't recover a live request's result, because live mode and each sandbox keep separate keys. For after_refresh or none, the reproduction uses <NEW_IDEMPOTENCY_KEY>; follow the remediation before sending a new request with a fresh key. Routes that do not accept idempotency keys omit the header. See idempotency for replay and recovery rules.

Warning: Replay writes in a sandbox

Replaying any request other than a GET changes data. Replay with a credential for a sandbox, even when the original request was live.

Rebuild what happened to a resource#

Shops and their listings support resource timelines and request log filters with resource_type=shop and resource_type=shop_listing. Delivery options support resource timelines with resource_type=delivery_method. Product, variant, delivery option, and return events can include initiator identifying the teammate, API key, or app that made the change. Flint uses the caller's request-log permissions to choose which initiators to show. Product and delivery attribution requires a retained request log. Their changes array includes the field path and its before and after values for selected fields. A null value means the field was unset. A product timeline can include variant events, and a return timeline can include resolution events. On those events, attributed_resource identifies the record that changed.

GET/v1/resource-timelines/{resource_id}Required API key scope: developer.resource_timelines.readReference for GET /v1/resource-timelines/{resource_id}

Subscription and return webhook entries include actor, using the return actor model (actor_type and, when available, actor_id). Actor types are buyer, merchant, integration, and system. The value is captured with the event; delivery retries preserve it. Older events, redacted payloads, events for other resource types, and unavailable attribution return actor: null. A return's existing initiated_by identifies who created it.

One history of API requests, webhook events, delivery attempts, and image changes for a single resource.

Request logs answer "what did this request do?". A timeline answers "what happened to this order?". Pass a resource ID and Flint merges the API requests attributed to that resource with the webhook events it produced and every delivery attempt for them, newest first.

A customer says they paid, but your system never marked the order paid. Pull the order's timeline:

cURL
curl "https://api.withflintpay.com/v1/resource-timelines/ord_1kmn0aExample?include=requests,webhooks,attempts" \
  -H "Authorization: Bearer YOUR_API_KEY"
Response
{
  "data": {
    "resource_id": "ord_01KWJZ8ZD3EDT7F78T82TZ6JXD",
    "resource_type": "order",
    "test": true,
    "entries": [
      {
        "entry_type": "webhook_delivery_attempt",
        "resource_timeline_entry_id": "watt_01KWJZA8R2M5Q7T9V1X3Z5B7D9",
        "occurred_at": "2026-07-03T03:10:16Z",
        "webhook_delivery_attempt_id": "watt_01KWJZA8R2M5Q7T9V1X3Z5B7D9",
        "webhook_delivery_id": "wdel_01KWJZ98ZH4Y7T3N6Q2V8D5B1C",
        "webhook_event_id": "whev_01KWJZ98YB7GXQ0S6E29Z4K3VD",
        "webhook_endpoint_id": "whep_01KWJ8Q0V2N4X7B1D9F3H5J6KM",
        "api_request_log_id": "rlog_01KWJZ988BAEK5R5RZ025PX0S5",
        "request_id": "req_01KWM6QY2WWAXEPRF8CQV3NVPN",
        "attempt_number": 2,
        "status": "delivered",
        "delivery_trigger": "automatic_retry",
        "status_code": 200,
        "duration_milliseconds": 88
      },
      {
        "entry_type": "webhook_delivery_attempt",
        "resource_timeline_entry_id": "watt_01KWJZ9910Q6H1M3F0Z34B0K1R",
        "occurred_at": "2026-07-03T03:09:44Z",
        "webhook_delivery_attempt_id": "watt_01KWJZ9910Q6H1M3F0Z34B0K1R",
        "webhook_delivery_id": "wdel_01KWJZ98ZH4Y7T3N6Q2V8D5B1C",
        "webhook_event_id": "whev_01KWJZ98YB7GXQ0S6E29Z4K3VD",
        "webhook_endpoint_id": "whep_01KWJ8Q0V2N4X7B1D9F3H5J6KM",
        "api_request_log_id": "rlog_01KWJZ988BAEK5R5RZ025PX0S5",
        "request_id": "req_01KWM6QY2WWAXEPRF8CQV3NVPN",
        "attempt_number": 1,
        "status": "failed",
        "delivery_trigger": "automatic_delivery",
        "status_code": 500,
        "duration_milliseconds": 412,
        "error_category": "webhook_http_5xx",
        "error_summary": "The webhook endpoint returned a server error.",
        "retryable": true,
        "recommended_action": "Inspect the endpoint logs for this delivery, fix the handler, then resend the webhook event."
      },
      {
        "entry_type": "webhook_event",
        "resource_timeline_entry_id": "whev_01KWJZ98YB7GXQ0S6E29Z4K3VD",
        "occurred_at": "2026-07-03T03:09:43Z",
        "webhook_event_id": "whev_01KWJZ98YB7GXQ0S6E29Z4K3VD",
        "event_type": "order.paid",
        "api_request_log_id": "rlog_01KWJZ988BAEK5R5RZ025PX0S5",
        "request_id": "req_01KWM6QY2WWAXEPRF8CQV3NVPN"
      },
      {
        "entry_type": "api_request",
        "attributed_resource": {
          "resource_type": "order",
          "resource_id": "ord_01KWJZ8ZD3EDT7F78T82TZ6JXD"
        },
        "resource_timeline_entry_id": "rlog_01KWJZ988BAEK5R5RZ025PX0S5",
        "occurred_at": "2026-07-03T03:09:42Z",
        "api_request_log_id": "rlog_01KWJZ988BAEK5R5RZ025PX0S5",
        "request_id": "req_01KWM6QY2WWAXEPRF8CQV3NVPN",
        "client_request_id": "pay-7f3a91",
        "caller": {
          "resource_type": "api_key",
          "resource_id": "key_01KWJ93G11C7MF8REX91MDS0CD"
        },
        "http_method": "POST",
        "path": "/v1/orders/ord_01KWJZ8ZD3EDT7F78T82TZ6JXD/pay",
        "route_pattern": "POST /v1/orders/{order_id}/pay",
        "status_code": 200,
        "latency_milliseconds": 1390
      },
      {
        "entry_type": "api_request",
        "attributed_resource": {
          "resource_type": "order",
          "resource_id": "ord_01KWJZ8ZD3EDT7F78T82TZ6JXD"
        },
        "resource_timeline_entry_id": "rlog_01KWJZ8ZCJHCAZK2XBKGRQXB4A",
        "occurred_at": "2026-07-03T03:09:20Z",
        "api_request_log_id": "rlog_01KWJZ8ZCJHCAZK2XBKGRQXB4A",
        "request_id": "req_01KWM6WE144165JJ876RG18EHV",
        "caller": {
          "resource_type": "api_key",
          "resource_id": "key_01KWJ93G11C7MF8REX91MDS0CD"
        },
        "http_method": "POST",
        "path": "/v1/orders",
        "route_pattern": "POST /v1/orders",
        "status_code": 201,
        "latency_milliseconds": 84
      }
    ]
  },
  "request_id": "req_01KWM63YCNHGNAMV6YCZ3AW61B"
}

Read it from the bottom up. The order was created, then paid. The payment produced an order.paid event. The first delivery reached your endpoint, which answered 500, and Flint's retry 32 seconds later got a 200. So the payment happened and the event fired: the gap is in your handler's first run, and the api_request_log_id on the event leads back to the pay request if you need its detail.

If the newest attempt had failed instead, fix the handler and resend the delivery. Automatic retries continue on the retry schedule either way.

Entry types#

Every entry has an entry_type, a resource_timeline_entry_id, and an occurred_at. Each API request entry has an attributed_resource reference with resource_type and resource_id, naming the resource the request log is attributed to. For direct entries it names the timeline resource; for included entries it names the owned resource. The timeline's test applies to every entry.

entry_typeWhat it recordsFields to read
api_requestA request attributed to this resource.http_method, path, status_code, caller, client_request_id, and on failure the same error_code, error_summary, retry, and recommended_action as the request log.
webhook_eventAn event Flint created for this resource.event_type, and api_request_log_id and request_id when an API request caused it.
webhook_delivery_attemptOne attempt to deliver one of those events to one endpoint.attempt_number, status, delivery_trigger, status_code, duration_milliseconds, and on failure error_category, error_summary, retryable, and recommended_action.
image_mutationA change to the resource's images.mutation_kind and image_version, the image version after the change.

Product webhook entries can include initiator with resource_type, resource_id, and label when your credential can read the API request that caused the event. The label reflects the identity's current name.

delivery_trigger says why the attempt ran: automatic_delivery (the first scheduled attempt), automatic_retry, manual_resend (you resent an existing delivery), or manual_delivery (the first attempt of a delivery you created for an existing event). retryable says whether sending the delivery again without changing your endpoint is likely to succeed. Webhook delivery lists every error_category.

api_request entries follow your credential's request log scope. With developer.request_logs.read, or from the dashboard, they cover every caller. Otherwise they cover only requests made with the calling credential, and opening another caller's log from an event's api_request_log_id returns 403 INSUFFICIENT_SCOPE. Webhook entries aren't filtered by caller.

Request entries include the timeline resource and one level of directly owned resources from this closed list:

Timeline resourceIncluded requests attributed to
OrderIts payment intents, public refunds, fulfillments, returns, invoices, and disputes, linked by order_id.
Payment intentIts public refunds and disputes, linked by payment_intent_id.
License keyIts device activations, linked by license_key_id.
Other resource typesThe timeline resource itself only.

Included requests follow your read access to each owned resource type. For example, an order timeline includes refund requests only when your credential can read refunds. Flint excludes types you cannot read before applying the page limit. Without read access to any owned types, you see only direct requests.

Flint resolves these relationships when you read the timeline. It does not follow further relationships or include internal payment-refund children. License key timelines also include webhook events and delivery attempts for their device activations. Those entries name the activation in attributed_resource.

License key restriction changes and pool authorizations appear in data.license_key_restriction_changes and data.license_key_pool_attestations, respectively. These collections share the page size, time bounds, and cursor with data.entries. When restriction changes are selected for a key, the collection is empty on pages with no matching changes.

Shaping the timeline#

ParameterWhat it does
includeSelect from requests, webhooks, attempts, image_mutations, license_key_restriction_changes, and license_key_pool_attestations. Defaults to all applicable groups. attempts requires webhooks.
resource_typeOptional. Checks that the ID is the type you expect; a type that doesn't match the ID returns 400 INVALID_REQUEST.
occurred_after, occurred_beforeRFC 3339 bounds on occurred_at. occurred_after is inclusive and occurred_before is exclusive. Timelines use occurred_*, not created_*.
page_size, page_tokenCursor pagination: 1 to 100 per page, 20 by default.

Timelines cover the resources you work with most, including orders, payment intents, payment methods, refunds, disputes, invoices, credit notes, subscriptions and plans, checkout sessions, payment links, products, variants, bundles, categories, modifiers, promotions and promotion codes, customers, balances and balance transactions, payouts, returns, inventory, risk rules and lists, payment reviews, test clocks, license keys, device activations, and license key pools. The endpoint's resource_type parameter in the reference lists every supported type. An ID that isn't a supported resource returns 400 INVALID_REQUEST with param set to resource_id.

A timeline reads only the credential's environment. An ID that doesn't exist there, including one that exists in another mode or sandbox, returns 404 RESOURCE_NOT_FOUND. When your credential can read the resource in the other environment, the error includes details[0].reason: resource_in_different_environment, mode, and sandbox_id for a sandbox. Retry with credentials or headers for that environment. Otherwise the response is a plain 404. Check the Flint-Mode and Flint-Sandbox-Id headers on your responses to confirm which environment a key reaches; see Sandboxes & test mode.

What is captured, and what never is#

Request logs are built so you can debug production without your logs becoming a liability:

  • Requests are logged once Flint identifies the credential. A request rejected before that, because the key is missing, malformed, unknown, revoked, or expired, leaves no log; debug it from the error body and the authentication errors. After that point, scope failures and validation errors are logged. Rate-limited buyer account and invoice access requests (429) leave no log.
  • Dashboard reads aren't logged. They are page views, not your integration's traffic. Writes made from the dashboard, including creating, updating, and revoking API keys, are logged with a user caller. Onboarding session requests, reads and writes, are logged with a user caller too.
  • Buyer account and invoice requests are logged. Reads and writes under /v1/me record the customer session or invoice as the caller. They never store request or response bodies.
  • Reading logs doesn't create logs. The request log and resource timeline endpoints aren't recorded, and neither are demo sessions or sign-in and token exchanges under /v1/oauth/, apart from workload identity token exchanges.
  • Sensitive values never reach storage. Credentials, tokens, signatures, card and bank account numbers, tax IDs, and personal data such as emails, phone numbers, address lines, and free-text notes are replaced with [REDACTED] before the log is written. You can't recover a customer's card number from your own logs.
  • Bodies are bounded. Captured bodies stop at 64 KB and end with a [TRUNCATED] marker. A JSON body cut off this way can't be redacted field by field, so Flint stores [REDACTED] in its place. Binary bodies are stored as [binary payload omitted].
  • Retention is tiered. Headers and bodies are kept for 14 days. Buyer-side IP addresses and user agents are kept for 30 days. Summaries and the rest of the detail stay queryable for 90 days.
  • Visibility stays inside one environment. Other merchants' and other environments' logs are never visible, and their IDs return 404.

Scopes and errors#

ScopeGrants
developer.request_logs.readThe list and detail of every caller's requests in the credential's environment, and the caller_type, caller_id, and customer_id filters.
developer.request_logs.self.readThe list and detail of requests made with the calling credential.
developer.resource_timelines.readResource timelines, together with the resource's own read scope, such as commerce.orders.read for an order.

A key needs one of the two request log scopes, not both. Keys that held the retired developer.request_logs.self.detail.read scope keep reading their own requests. See the scope catalog for how these fit a key's other grants.

  • HTTP 400
    A filter or parameter is malformed or unknown, and param names it. Common causes: a request_id that isn't a req_ ID (use client_request_id for your own IDs), include=attempts without webhooks, a timeline resource_type that doesn't match the ID, an ID that isn't a supported timeline resource, a timestamp that isn't RFC 3339, or an invalid page_token. Correct the value and send the request again.
  • HTTP 403
    The credential lacks a scope the request needs, and the error names it. A developer.request_logs.self.read key that sends caller_type, caller_id, or customer_id, or opens another caller's log, gets this error naming developer.request_logs.read. A timeline also needs the resource's read scope. Grant the scope or use another key.
  • HTTP 404
    The log or resource doesn't exist in the credential's merchant and environment, or the log is past its 90-day retention. A log opened the instant its request finished may not be written yet; wait a second and try again.

Where to look first#

SymptomStart here
401Not in your logs, because Flint never identified the key. Read the error body and the authentication errors.
403The error and the log name the missing scope. Grant it or use a different key.
400 validation errorerror.param names the field. The log's request_body shows what you sent.
409 conflictThe error's code says which conflict. For IDEMPOTENCY_KEY_REUSED and IDEMPOTENCY_KEY_IN_PROGRESS, see Idempotency. For a state conflict such as ACTION_NOT_ALLOWED, the resource timeline shows what changed the resource first.
429Honor Retry-After. Filter your logs by caller_id or query to find the hot loop; see Rate limits.
5xxFilter by status_bucket=server_error, retry with the same Idempotency-Key as retry says, and quote the request_id to support if it persists.
A webhook never arrivedThe resource timeline's webhook_delivery_attempt entries show each attempt's status code and failure. See Webhooks.
404 for an ID you know existsUsually a mode or sandbox mismatch. Compare Flint-Mode and Flint-Sandbox-Id on the response with where you created the resource.
A missing or duplicate state changePull the resource timeline for every request and event that touched it, in order.

Debug from the dashboard#

Under Developers in the dashboard, you can filter request logs, open a request's detail, inspect webhook delivery attempts, and resend events. The Logs page shows every caller in the selected environment, like a key with developer.request_logs.read. The dashboard and the API read the same data.

Debug from the terminal#

The Flint CLI wraps the same three endpoints:

Shell
flint api-request-logs list --request-id req_01KWM608MR7CAZFETWS1RA3XPG
flint api-request-logs list --client-request-id checkout-7f3a91
flint api-request-logs list --status-bucket server_error
flint api-request-logs get rlog_01KWM6WAHJAXHCHE87C0KBBY7G
flint resource-timelines get ord_01KWJZ8ZD3EDT7F78T82TZ6JXD --include webhooks,attempts

When Flint returns an API error, the CLI prints its request_id. Add --debug to any command to print the API version and trace ID too.

Next steps#

Error handlingThe error envelope, error types, remediation hints, and retries.WebhooksEndpoints, signatures, delivery retries, and resending events.IdempotencySafe retries and what a replay returns.API request logs referenceEvery field on request logs and resource timelines.

Was this helpful?