Billing

Buy a prepaid credit pack

Creates a one-time Creem checkout for a credit pack. Returns checkout_url: surface it to your human, who completes payment in the browser. Credits land on the account balance automatically via webhook on payment — poll GET /v1/credits. Sandbox keys get 403 sandbox_not_billable. Packs whose Creem product is not configured yet return 503 billing_not_configured.

post/v1/credits/purchases

Request

  • Base URL: https://serp-agent.com
  • URL: https://serp-agent.com/v1/credits/purchases
  • Auth: HTTP bearer

Headers

Idempotency-Keystring

Any unique string (max 200 chars). Retrying a request with the same key replays the stored response verbatim (with header Idempotent-Replayed: true) instead of re-executing — including one-time secrets in the original body. Keys are scoped per account (per client IP on the unauthenticated signup) and pruned after 24h. Reusing a key on a different endpoint returns 409 idempotency_conflict.

Request body

pack_id'pack_500' | 'pack_2000' | 'pack_10000' required

Response

Checkout created — hand checkout_url to a human to complete payment.

status'pending_payment' required
checkout_urlstring uri required
pack_id'pack_500' | 'pack_2000' | 'pack_10000' required
usdnumber required
creditsinteger required
bonus_creditsinteger required
notestring

Changes

No recorded changes to this operation across all 1 revision of this API.