Buy Bundle

Buy a prepaid bundle of basic-score credits at a discount.

One x402 payment (SOL or USDC) buys the published number of credits, credited to the paying wallet. The response contains a SECRET bundle_token — store it; it is shown exactly once. Redeem credits by sending the X-BUNDLE-TOKEN header on POST /api/simulate (basic tier). Check remaining credits at GET /api/bundle/balance.

Default x402 v2 payment flow

  1. Quote — POST {"plan":"bundle"} to /api/bundle with no payment header. The HTTP 402 is the expected live quote: it does not charge or record a purchase, and no wallet_address is needed. Most agents should use the EQBuilder SDK instead; its score method handles this x402 exchange automatically without buying a bundle. Human card buyers can use GET /api/card/packs and POST /api/card/checkout. Fleet buyers continue by selecting the first accepts entry: Base USDC (network: eip155:8453).
  2. Sign — sign that entry's exact EIP-3009 TransferWithAuthorization fields. The wallet needs Base USDC but no ETH; the facilitator submits the authorization.
  3. Build — create the canonical x402 v2 payload using the full response's resource, the selected entry as accepted, the signed payload, and extensions when present:
{"x402Version":2,
 "resource":{"url":"https://eqbuilder.dev/api/bundle"},
 "accepted":{"scheme":"exact","network":"eip155:8453","amount":"<live amount>","payTo":"<live address>","asset":"<Base USDC contract>"},
 "payload":{"signature":"0x...65-byte EIP-712 signature...","authorization":{"from":"0xYourAddress","to":"0xPayToAddress","value":"<live amount>","validAfter":"0","validBefore":"<future unix>","nonce":"0x...32 random bytes..."}},
 "extensions":{}}
  1. Retry once — base64-encode the compact JSON and send it in PAYMENT-SIGNATURE. Success is HTTP 200 with the bundle and a PAYMENT-RESPONSE settlement receipt.

If the paid request times out, preserve the error and any receipt. Confirm payment status before creating or replaying an authorization.

Legacy compatibility

Existing Solana and X-PAYMENT clients remain accepted. A legacy Solana proof still has this shape:

{"x402Version":2,"scheme":"exact","network":"solana","payload":{"signature":"5KtP...your tx signature...","payer":"9xQe...your wallet..."}}
post/api/bundle

Request

  • Base URL: https://eqbuilder.dev (the document declares no server; this is the origin it was published from)
  • URL: https://eqbuilder.dev/api/bundle
  • Auth: none declared

Headers

X-PAYMENTstring nullable

x402 payment proof (same format as /api/simulate).

Request body

tx_hashstring
wallet_addressstring
referral_codestring
planstring

Response

Bundle purchased; response contains the SECRET bundle_token.

unknown required

Changes

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