Billing Credits Purchase

Buy a one-time credit top-up.

Charges the default payment method on file when one exists and returns {"status": "charged", "amount_usd": ..., "new_balance_usd": ...}. Otherwise returns {"status": "checkout_required", "checkout_url": ...} for a hosted checkout session so the purchase can complete interactively. Errors: billing_not_enabled when self-service billing is not configured, invalid_amount when the requested amount falls outside the allowed range.

post/billing/credits/purchase

Request

  • Base URL: https://api.goodeye.dev/v1
  • URL: https://api.goodeye.dev/v1/billing/credits/purchase
  • Auth: none declared

Request body

amount_usdinteger required

Amount of credits to buy, in whole US dollars.

idempotency_keystring nullable

Optional caller-supplied key that makes a retried purchase request safe to resend without buying credits twice.

Response

Successful Response

object required

Changes

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