Quote a product over x402 using query params

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.

get/api/v1/buy

Request

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

Query parameters

emailstring email required
product_type'giftcard' | 'topup' | 'esim' | 'phone_rental' required
product_idinteger
item_idinteger
x402_version'1' | '2'

Protocol version to quote in. Defaults to 2.

Headers

PAYMENT-SIGNATUREstring
X-PAYMENTstring

Response

Paid and fulfilled

idstring
statusstring
access_tokenstring
status_urlstring uri

Poll this while status is not completed

pricenumber

Order total in the brand currency (USD)

currencystring
productobject
deliveryobject

Gift card code(s) once completed

esimobject

ICCID + QR payload for eSIM orders

phoneobject

Rented number for phone_rental orders

fulfilled_atstring date-time
retry_after_secondsinteger

Present on 202 — how long to wait before polling status_url

errorstring

Present on 502

Changes

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