{"openapi":"3.1.0","info":{"title":"Gift by Crypto - Agent Edition (TESTNET / MOCK)","version":"0.1.0","description":"Pay USDC on Base Sepolia via x402 and receive a MOCK Amazon.co.jp eGift code. TESTNET / MOCK: Base Sepolia test USDC only. Codes are mocks, not real Amazon gift cards."},"servers":[{"url":"https://gift-by-crypto-agent.kitano787.workers.dev"}],"paths":{"/v1/products":{"get":{"operationId":"listProducts","summary":"List SKUs with JPY face value, USDC price, purchase URL and network (free)","responses":{"200":{"description":"Product catalog","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/v1/egift/amazon-jp/1000":{"post":{"operationId":"buyAmazonJp1000","summary":"Buy a MOCK Amazon.co.jp eGift card, JPY 1,000 (6.67 USDC, testnet)","description":"TESTNET / MOCK. Amazon.co.jp eGift card, JPY 1,000 face value, for 6.67 USDC on Base Sepolia (demo rate 1 USDC = JPY 150). POST with no body; the 402 is the quote. Returns a MOCK code that is not a real gift card.","tags":["egift"],"x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"6.67"},"scheme":"exact","network":"eip155:84532","asset":"0x036CbD53842c5426634e7929541eC2318f3dCF7e","amount":"6670000","payTo":"0x8aC20aB2AF691b85c0eff1D39bb4ebFEF164aE28"},"responses":{"200":{"description":"Paid: MOCK gift code and the settlement tx hash (`tx`, also in the PAYMENT-RESPONSE header).","headers":{"PAYMENT-RESPONSE":{"description":"Base64 JSON x402 settlement response","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EgiftResponse"}}}},"402":{"description":"Payment required. The PAYMENT-REQUIRED header (base64 JSON, x402 v2) carries amount, asset, payTo and network.","headers":{"PAYMENT-REQUIRED":{"description":"Base64 JSON x402 PaymentRequired","schema":{"type":"string"}}}}}}},"/v1/egift/amazon-jp/5000":{"post":{"operationId":"buyAmazonJp5000","summary":"Buy a MOCK Amazon.co.jp eGift card, JPY 5,000 (33.34 USDC, testnet)","description":"TESTNET / MOCK. Amazon.co.jp eGift card, JPY 5,000 face value, for 33.34 USDC on Base Sepolia (demo rate 1 USDC = JPY 150). POST with no body; the 402 is the quote. Returns a MOCK code that is not a real gift card.","tags":["egift"],"x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"33.34"},"scheme":"exact","network":"eip155:84532","asset":"0x036CbD53842c5426634e7929541eC2318f3dCF7e","amount":"33340000","payTo":"0x8aC20aB2AF691b85c0eff1D39bb4ebFEF164aE28"},"responses":{"200":{"description":"Paid: MOCK gift code and the settlement tx hash (`tx`, also in the PAYMENT-RESPONSE header).","headers":{"PAYMENT-RESPONSE":{"description":"Base64 JSON x402 settlement response","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EgiftResponse"}}}},"402":{"description":"Payment required. The PAYMENT-REQUIRED header (base64 JSON, x402 v2) carries amount, asset, payTo and network.","headers":{"PAYMENT-REQUIRED":{"description":"Base64 JSON x402 PaymentRequired","schema":{"type":"string"}}}}}}},"/v1/egift/amazon-jp/10000":{"post":{"operationId":"buyAmazonJp10000","summary":"Buy a MOCK Amazon.co.jp eGift card, JPY 10,000 (66.67 USDC, testnet)","description":"TESTNET / MOCK. Amazon.co.jp eGift card, JPY 10,000 face value, for 66.67 USDC on Base Sepolia (demo rate 1 USDC = JPY 150). POST with no body; the 402 is the quote. Returns a MOCK code that is not a real gift card.","tags":["egift"],"x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"66.67"},"scheme":"exact","network":"eip155:84532","asset":"0x036CbD53842c5426634e7929541eC2318f3dCF7e","amount":"66670000","payTo":"0x8aC20aB2AF691b85c0eff1D39bb4ebFEF164aE28"},"responses":{"200":{"description":"Paid: MOCK gift code and the settlement tx hash (`tx`, also in the PAYMENT-RESPONSE header).","headers":{"PAYMENT-RESPONSE":{"description":"Base64 JSON x402 settlement response","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EgiftResponse"}}}},"402":{"description":"Payment required. The PAYMENT-REQUIRED header (base64 JSON, x402 v2) carries amount, asset, payTo and network.","headers":{"PAYMENT-REQUIRED":{"description":"Base64 JSON x402 PaymentRequired","schema":{"type":"string"}}}}}}}},"components":{"schemas":{"EgiftResponse":{"type":"object","required":["testnet","mock","sku","code"],"properties":{"testnet":{"type":"boolean","const":true},"mock":{"type":"boolean","const":true},"notice":{"type":"string"},"sku":{"type":"string"},"product":{"type":"string"},"faceValue":{"type":"object","properties":{"amount":{"type":"integer"},"currency":{"type":"string"}}},"price":{"type":"object","properties":{"amount":{"type":"string"},"asset":{"type":"string"},"network":{"type":"string"}}},"payer":{"type":"string","description":"EIP-3009 signer address"},"code":{"type":"string","pattern":"^MOCK-[0-9a-f]{16}$","description":"Mock gift code (not redeemable)"},"tx":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$","description":"Settlement tx hash (the order ID); also in PAYMENT-RESPONSE"},"explorer":{"type":"string","format":"uri","description":"Settlement tx on Sepolia Basescan"}}}}}}