Skip to main content
Credit routes tell an agent how much balance remains and what moved that balance. They do not unlock articles and there is no top-up API — send users to topUpUrl. Requires Authorization: Bearer pk_drip_… or an MCP OAuth access token with mcp:unlock. Session JWTs are rejected (401). MCP: get_credits_balance, list_credit_activity. Create a key and add balance from the API Keys and Credits dashboards.

Balance

lifetimePurchasedUsd is purchases and promos only — it excludes signup grants. Call this before a paid unlock when the balance may be low. On 403 insufficient credits, send the user to topUpUrl and stop.

Ledger

Cursor-paginated, newest first. Optional limit (1-50, default 20) and cursor (pass the previous nextCursor). nextCursor is null when exhausted. A bad limit returns 400 with field issues; an unknown cursor returns { "error": "..." }.
kind is one of PURCHASE, SPEND, REFUND, ADJUSTMENT, PROMO, REFERRAL, SIGNUP. amountUsd is the signed delta. feature is set on spend rows. See Account for who the credential is, and Unlocks for posts this balance already paid for.