{"uid":"cap_kvTgB-Of340F7k264eUQw","slug":"x402-giftcard-api-bb56191e","name":"x402-giftcard-api","description":"Buy a gift card code at the listed price. Price is returned in the payment challenge before you sign.","url":"https://x402.freeq.one/tools/giftcard/api/buy","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"email":{"type":"string","description":"Delivery email (optional, for some retailers)"},"value":{"type":"number","description":"Face value in USD for ranged products (fixed-price products embed the value in the ID)"},"product_id":{"type":"string","description":"Gift card product ID or fixed-price package ID (e.g. amazon.com-usa, foot-locker-usa<&>25)"}}},"responseSchema":{"type":"json","example":{"result":{}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ArCPnoit40N7oVVI3XKPb","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Purchase a digital gift card code for a specified product and face value, paid via x402 micropayment protocol.","exampleAgentPrompt":"Buy me a $25 Foot Locker USA gift card — the product ID is foot-locker-usa — and send the code to myemail@example.com.","exampleUseCases":[{"title":"Employee rewards gift card","prompt":"Purchase a $50 gift card for Foot Locker USA (product ID: foot-locker-usa) and send the redemption code to jsmith@company.com — we're sending it as a performance bonus."},{"title":"Automated customer incentive","prompt":"I need to buy a $10 gift card using product ID amazon-usa for a customer promotion — no email needed, just return the code so I can deliver it myself."},{"title":"Personal gift card top-up","prompt":"Can you buy me a $15 gift card for the product ID starbucks-usa and email the code to myfriend@gmail.com as a gift?"}],"resultDescription":"Returns a JSON object with a result field containing the gift card code and purchase details (exact fields depend on the product catalog); the code can be used directly to redeem at the retailer.","failureModes":["Invalid or unsupported product_id returns an error indicating the catalog item was not found","Face value not supported for the selected product results in a rejection","Payment challenge not signed or x402 payment not completed results in a 402 Payment Required response","Invalid email format may cause a validation error","Insufficient USDC balance or failed payment results in purchase not being fulfilled"],"whenToPreferThis":"Use this endpoint when you need to programmatically purchase a digital gift card code on demand, especially in agent workflows that reward users, automate gifting, or handle customer incentives — particularly when paying via USDC over the x402 protocol at very low overhead ($0.01 per call plus the gift card face value).","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:35:05.654Z","isFirstParty":false}