Skip to main content
Some Recoup endpoints are billed in credits — primarily endpoints that hit external data providers, run AI inference, or generate content. The rest of the API is free at the API layer.

What’s billed

Failed calls (4xx / 5xx) do not deduct credits. Deduction happens only after the upstream call succeeds.

Check your balance

Response shape:
total_credits is your plan-derived monthly allotment. remaining_credits can exceed total_credits after a manual or automatic top-up — used_credits clamps to 0 in that case. Full schema at Get Account Credits.

Subscription

Recoup has two tiers. Both refill on a monthly cycle.

Upgrade to Pro

  1. Sign in at sandbox.recoupable.com
  2. Open Settings → Billing → Start Free Trial
  3. Stripe checkout creates a subscription tied to the account your API key authenticates against. New subscriptions include a 30-day trial

Check your tier

Get $ACCOUNT_ID from GET /api/accounts/id if you don’t already have it. Response includes isPro (boolean), status, plan, and source (whether the subscription comes from the account itself or an organization the account belongs to). Full schema at Get Subscription.

One-time top-ups

You can purchase credits any time via POST /api/credits/sessions. The endpoint adapts to what’s on the account:
  • Card on file → silent auto-charge. Recoup charges your saved Stripe card off-session and returns paymentIntentId, creditsPurchased, and totalCents. Credits land within seconds.
  • No card, or Stripe declines the saved card → Stripe Checkout fallback. The response contains a Checkout url you open in the browser. When Stripe specifically declined a saved card, the response also includes a declineReason (e.g. insufficient_funds, expired_card) so you can explain why before sending the customer to update billing.
Full request/response schema at Create Credits Top-Up Session.

Check which card will be charged

Before triggering a silent off-session charge, inspect the default payment method on file:
Response shape:
card is null when no payment method has been saved yet — the next top-up call will route through a checkout session to collect one. Expired cards are still returned (with their original exp_month / exp_year); callers should compare against the current date and warn the customer, since an off-session charge against an expired card will decline. Full schema at Get Default Payment Method.

Automatic top-up

Every billed API request runs a credit gate before it executes. If remaining_credits doesn’t cover the request’s cost and the account has a saved Stripe card, Recoup silently charges $5 (500 credits) off-session and lets the request proceed. Most accounts with a working card never see an “insufficient credits” failure — the top-up is invisible. The decision tree:
  1. Enough credits? → Request proceeds, credits deducted on success.
  2. Short, but a saved card succeeds at $5 off-session charge? → Balance increments by 500, request proceeds.
  3. No card on file, or Stripe declined the card, or request needs more than 500 credits? → Request returns HTTP 402 with a recovery URL (see below).

When auto top-up doesn’t trigger

  • The account has no saved Stripe card → 402 with checkoutUrl, no declineReason.
  • Stripe declines the saved card (insufficient funds, expired, fraud, 3-D Secure required, etc.) → 402 with checkoutUrl + declineReason.
  • A single request needs more than 500 credits (rare — only POST /api/research/deep at 25 and oversized extract calls come close) → request fails even though the top-up succeeded.

Tuning

The auto top-up amount is currently a constant at $5 / 500 credits. Per-account thresholds are not yet exposed — reach out to support if you need a different default.

402 Payment Required

When the gate can’t get the account credited in time, billed endpoints return HTTP 402 with a unified body:
The shape closely matches the Checkout-fallback response from POST /api/credits/sessions, but this 402 payload uses checkoutUrl for the recovery link (versus url on the top-up response). The declineReason field is identical in both places. How to react:
  • Browser-driven UI (e.g., the Recoup chat app): if declineReason is present, show its message; otherwise open checkoutUrl in a new tab to collect a card.
  • Programmatic / LLM-driven client: relay declineReason.message if present, and surface checkoutUrl as a link the human needs to visit to update billing.

Cost per endpoint

Current as of this revision of the page. The authoritative source is the per-endpoint reference docs and the required_credits field on any 402 response.