Billing

Purchase prepaid credits via x402 USDC payment

Submit a verified Base mainnet USDC payment to add prepaid credits to a free-plan key (any other plan is refused with 409 CREDITS_NOT_APPLICABLE before payment). Credit tiers: 0.001 USDC = 1 credit, 0.09 USDC = 100 credits, 0.80 USDC = 1000 credits. Requires X-Payment header with verified tx.

post/v5/credits/purchase

Request

  • Base URL: https://headlessoracle.com
  • URL: https://headlessoracle.com/v5/credits/purchase
  • Auth: API key in header X-Oracle-Key

Response

Credits added

purchasedinteger required

Credits added by this payment (1, 100 or 1000, sized from the verified on-chain amount). The new total is at GET /v5/credits/balance.

messagestring required

Example response

{
  "message": "1000 credits added to your account"
}

Changes

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