API request logs

API request logs let you inspect recent public API traffic made with the current API key. Use them to debug auth failures, repeated retries, unexpected 4xx/5xx responses, which resource a request targeted, and whether a sandbox-bound test key is hitting the expected sandbox routes.

This surface is intentionally scoped to the calling key (it is not a merchant-wide audit log across every key). The list returns request summaries only: method, route, status, latency, resource, and error code. The detail endpoint adds redacted headers and, for eligible write requests, redacted request and response bodies, plus a ready-to-run reproduction; credentials, card data, and personal data are always replaced with [REDACTED] before storage. Listing requires the developer.request_logs.self.read scope and detail requires developer.request_logs.self.detail.read.

The Debugging guide walks through the full workflow, from a request_id to a diagnosis to a resource timeline. Pair it with the Error handling guide to map error codes to fixes, and the Testing guide for the sandbox testing loop.

Get the current authentication context#

GET/v1/developer/auth-contextRequires an API key or a bearer token

Returns non-secret metadata for an API key or CLI OAuth access token, including its merchant, environment, sandbox binding, and granted scopes. CLI OAuth sessions include auth_type=oauth and a stable oauth_grant_id instead of api_key_id. No additional API scope is required.

Response · 200
dataobjectrequired
metaobject
request_idstring

Error codes

AUTH_REQUIREDINVALID_API_KEYRATE_LIMIT_EXCEEDEDSERVICE_UNAVAILABLE
Bash
curl https://api.withflintpay.com/v1/developer/auth-context \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": {
    "api_key_id": "key_123",
    "auth_type": "api_key",
    "environment": "sandbox",
    "merchant_id": "mer_123",
    "name": "local-dev",
    "organization_id": "org_123",
    "sandbox_id": "test_123",
    "scopes": [
      "payments.payment_intents.read"
    ]
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

Get API request log detail for the current API key#

GET/v1/developer/request-logs/{api_request_log_id}Requires scope: developer.request_logs.self.detail.read

Returns redacted request log detail for a request generated by the authenticated API key. Detail responses remain current-key scoped and redact headers, query parameters, request bodies, and response bodies before returning them.

Path parameters
api_request_log_idstringrequired

Flint API request log ID.

Response · 200
dataobjectrequired
metaobject
request_idstring

Error codes

AUTH_REQUIREDINSUFFICIENT_SCOPEINVALID_API_KEYINVALID_REQUESTRATE_LIMIT_EXCEEDEDRESOURCE_NOT_FOUND
Bash
curl https://api.withflintpay.com/v1/developer/request-logs/rlog_123 \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": {
    "api_request_log_id": "rlog_123",
    "correlation_id": "rlog_123",
    "created_at": "2026-03-17T14:30:00Z",
    "error_category": "validation",
    "error_code": "VALIDATION_ERROR",
    "error_summary": "The request payload or query parameters did not pass validation.",
    "http_method": "POST",
    "latency_milliseconds": 42,
    "path": "/v1/payment-intents",
    "query_params": null,
    "recommended_action": "Fix the field identified by the error response, then retry with the same idempotency key if this was the same logical operation.",
    "reproduction": {
      "body": {
        "amount": 2500,
        "currency": "USD",
        "payment_source_token": "[REDACTED]"
      },
      "curl": "curl -X POST https://api.withflintpay.com/v1/payment-intents -H \"Authorization: Bearer <API_KEY>\" -H \"Idempotency-Key: <NEW_IDEMPOTENCY_KEY>\" --data '<REDACTED_OR_CAPTURED_BODY>'",
      "headers": {
        "Authorization": "Bearer <API_KEY>",
        "Idempotency-Key": "<NEW_IDEMPOTENCY_KEY>"
      },
      "http_method": "POST",
      "path": "/v1/payment-intents",
      "query_params": null,
      "recommended_environment": "test",
      "redactions_present": true,
      "reproduction_complete": false,
      "safe_to_reproduce": false,
      "warnings": [
        "This request may mutate live data; reproduce in test mode unless you have verified it is safe."
      ]
    },
    "request_body": {
      "amount": 2500,
      "currency": "USD",
      "payment_source_token": "[REDACTED]"
    },
    "request_headers": {
      "content-type": "application/json"
    },
    "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6",
    "resource_id": "pi_123",
    "resource_type": "payment_intent",
    "response_body": {
      "error": {
        "code": "VALIDATION_ERROR",
        "message": "payment_source_token is invalid."
      }
    },
    "response_content_type": "application/json",
    "retryable": false,
    "route_pattern": "POST /v1/payment-intents",
    "status_code": 400
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

Get a resource timeline#

GET/v1/developer/resource-timelines/{resource_id}Requires scope: developer.resource_timelines.read

Returns summary-only API request, webhook event, and webhook delivery attempt entries for a single public API resource. The caller must have developer.resource_timelines.read and the matching read scope for the requested resource type.

Path parameters
resource_idstringrequired

Flint public API resource ID.

Query parameters
resource_typestring

Optional resource type. Must match the resource_id prefix when present.

includearray of enum

Optional comma-separated timeline entry groups. Defaults to requests,webhooks,attempts.

requestswebhooksattempts
page_sizeinteger

Page size, default 20, max 100.

page_tokenstring

Cursor returned by the previous timeline response.

occurred_afterstring

RFC3339 lower bound for occurred_at.

occurred_beforestring

RFC3339 upper bound for occurred_at.

Response · 200
dataobjectrequired
metaobject
next_page_tokenstring
request_idstring

Error codes

AUTH_REQUIREDINSUFFICIENT_SCOPEINVALID_API_KEYINVALID_REQUESTRATE_LIMIT_EXCEEDEDRESOURCE_NOT_FOUND
Bash
curl https://api.withflintpay.com/v1/developer/resource-timelines/ord_123 \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": {
    "entries": [
      {
        "api_request_log_id": "rlog_123",
        "correlation_id": "rlog_123",
        "entry_type": "api_request",
        "http_method": "POST",
        "latency_milliseconds": 42,
        "occurred_at": "2026-03-17T14:30:00Z",
        "path": "/v1/payment-intents/pi_123/confirm",
        "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6",
        "resource_id": "pi_123",
        "resource_timeline_entry_id": "rlog_123",
        "resource_type": "payment_intent",
        "route_pattern": "POST /v1/payment-intents/{payment_intent_id}/confirm",
        "status_code": 200,
        "test": true
      },
      {
        "api_request_log_id": "rlog_123",
        "automatic_attempt_count": 1,
        "correlation_id": "rlog_123",
        "entry_type": "webhook_event",
        "event_source": "business_event",
        "event_type": "payment_intent.succeeded",
        "max_attempts": 9,
        "occurred_at": "2026-03-17T14:30:01Z",
        "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6",
        "resource_id": "pi_123",
        "resource_timeline_entry_id": "whev_123",
        "resource_type": "payment_intent",
        "status": "delivered",
        "test": true,
        "webhook_endpoint_id": "whep_123",
        "webhook_event_id": "whev_123"
      },
      {
        "api_request_log_id": "rlog_123",
        "attempt_number": 1,
        "correlation_id": "rlog_123",
        "delivery_trigger": "automatic_delivery",
        "duration_milliseconds": 98,
        "entry_type": "webhook_delivery_attempt",
        "occurred_at": "2026-03-17T14:30:02Z",
        "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6",
        "resource_id": "pi_123",
        "resource_timeline_entry_id": "watt_123",
        "resource_type": "payment_intent",
        "status": "delivered",
        "status_code": 200,
        "test": true,
        "webhook_delivery_attempt_id": "watt_123",
        "webhook_event_id": "whev_123"
      }
    ],
    "resource_id": "pi_123",
    "resource_type": "payment_intent",
    "test": true
  },
  "next_page_token": "Zm9yd2FyZC1vbmx5LW9wYXF1ZS1jdXJzb3I",
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}
Rate this doc