---
title: "Quote a product over x402 using query params"
method: GET
path: "/api/v1/buy"
---

# Quote a product over x402 using query params

`GET /api/v1/buy`

## Request

- Base URL: `https://blinkcodes.com`
- URL: `https://blinkcodes.com/api/v1/buy`
- Auth: none declared

Same handler as x402Buy with the createOrder body supplied as query params (email, product_type, product_id, item_id, quantity, account_number, amount). Handy for a quick 402 quote from a plain GET. Add x402_version=1 for a legacy v1 quote. With no params at all it still answers 402, quoting the rail's floor with no order attached.

## Query parameters

- `email` string, email, required
- `product_type` 'giftcard' | 'topup' | 'esim' | 'phone_rental', required
- `product_id` integer
- `item_id` integer
- `x402_version` '1' | '2'

## Headers

- `PAYMENT-SIGNATURE` string
- `X-PAYMENT` string

## Response `200`

Paid and fulfilled

- X402OrderResult
  - `id` string
  - `status` string
  - `access_token` string
  - `status_url` string, uri: Poll this while status is not completed
  - `price` number: Order total in the brand currency (USD)
  - `currency` string
  - `product` object
  - `delivery` object: Gift card code(s) once completed
  - `esim` object: ICCID + QR payload for eSIM orders
  - `phone` object: Rented number for phone_rental orders
  - `fulfilled_at` string, date-time
  - `retry_after_seconds` integer: Present on 202 — how long to wait before polling status_url
  - `error` string: Present on 502

## Other responses

- `402`: Payment required — accepts[] is priced for this exact order

---

[API](https://skmtc.dev/blinkcodes/apis/blinkcodes-public-api.md) · [All operations](https://skmtc.dev/blinkcodes/apis/blinkcodes-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/blinkcodes/apis/blinkcodes-public-api/revisions/75fa0cacacc2?raw)
