{"openapi":"3.0.3","info":{"title":"MaplePass AI Commerce & Wholesale API","version":"1.0.0","description":"High-performance, pure USDT wholesale fulfillment and diagnostics API for ChatGPT Plus (15.80 USDT), ChatGPT Pro 200, Claude, and AI developer services. Supports automated settlement, Dujiaoka webhook integrations, and real-time CDK/activation delivery.","contact":{"name":"MaplePass Developer Support","url":"https://maple1189ai.com/api-cooperation","email":"support@maple1189ai.com"}},"servers":[{"url":"https://maple1189ai.com","description":"Production Server"}],"tags":[{"name":"Public & Diagnostics","description":"Open endpoints for catalog discovery, real-time pricing, and ChatGPT connectivity testing."},{"name":"Wholesale Fulfillment","description":"B2B wholesale endpoints for programmatic ordering, balance management, and delivery."},{"name":"Faka & Webhook Integrations","description":"Turnkey webhooks for Dujiaoka and third-party automated sales platforms."}],"paths":{"/api/store/catalog":{"get":{"tags":["Public & Diagnostics"],"summary":"Query Live Product Catalog and USDT Prices","description":"Returns all active subscriptions, current retail and promotional USDT prices, and real-time stock availability.","operationId":"getStoreCatalog","responses":{"200":{"description":"Catalog successfully retrieved.","content":{"application/json":{"schema":{"type":"object","properties":{"products":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","example":"gptplus_google"},"brand":{"type":"string","example":"ChatGPT"},"title":{"type":"string","example":"ChatGPT Plus · 谷歌官方通道 (免密秒充 · 质保订阅)"},"titleEn":{"type":"string","example":"ChatGPT Plus · US Google Channel (Official Warranty)"},"priceUsdt":{"type":"number","example":15.8},"delivery":{"type":"string","example":"自动交付"},"manualDelivery":{"type":"boolean","example":false}}}}}}}}}}}},"/api/account/gpt-status":{"get":{"tags":["Public & Diagnostics"],"summary":"ChatGPT Connectivity and Node Latency Diagnosis","description":"Diagnoses real-time ChatGPT connectivity, latency, and whether client IP / ISP is blocked or flagged by Cloudflare.","operationId":"getGptStatus","responses":{"200":{"description":"Diagnostic report returned.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"operational"},"latency_ms":{"type":"number","example":128},"ip_blocked":{"type":"boolean","example":false}}}}}}}}},"/api/v1/wholesale/products":{"get":{"tags":["Wholesale Fulfillment"],"summary":"Get Wholesale Product List and Tier Pricing","description":"Returns all products available for wholesale ordering with authorized merchant prices in USDT and stock status.","operationId":"getWholesaleProducts","security":[{"BearerHmac":[]}],"responses":{"200":{"description":"Wholesale product list.","content":{"application/json":{"schema":{"type":"object","properties":{"currency":{"type":"string","example":"USDT"},"products":{"type":"array","items":{"type":"object","properties":{"product":{"type":"string","example":"gptplus_google"},"title":{"type":"string","example":"ChatGPT Plus 谷歌官方免密秒充"},"title_en":{"type":"string","example":"ChatGPT Plus Google Channel"},"unit_price_usdt":{"type":"string","example":"15.80"},"max_quantity":{"type":"integer","example":100},"in_stock":{"type":"boolean","example":true}}}}}}}}},"401":{"description":"Authentication failed or signature invalid."}}}},"/api/v1/wholesale/balance":{"get":{"tags":["Wholesale Fulfillment"],"summary":"Check Merchant Store Wallet Balance","description":"Retrieves the current available USDT balance from the unified store wallet.","operationId":"getWholesaleBalance","security":[{"BearerHmac":[]}],"responses":{"200":{"description":"Wallet balance retrieved.","content":{"application/json":{"schema":{"type":"object","properties":{"available":{"type":"string","example":"158.00"},"currency":{"type":"string","example":"USDT"}}}}}}}}},"/api/v1/wholesale/orders":{"post":{"tags":["Wholesale Fulfillment"],"summary":"Create Wholesale Order and Instant Fulfillment","description":"Submits a wholesale order with idempotency protection. Debits the merchant USDT wallet and instantly returns CDK or activation links.","operationId":"createWholesaleOrder","security":[{"BearerHmac":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["product","quantity","idempotency_key"],"properties":{"product":{"type":"string","example":"gptplus_google","description":"Product legacy key"},"quantity":{"type":"integer","minimum":1,"maximum":100,"example":1},"idempotency_key":{"type":"string","example":"ord_20261028_001","description":"Unique client order identifier"}}}}}},"responses":{"201":{"description":"Order placed and fulfilled successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"order_number":{"type":"string","example":"ORD-20261028-1234"},"status":{"type":"string","example":"DELIVERED"},"product":{"type":"string","example":"gptplus_google"},"quantity":{"type":"integer","example":1},"unit_price_usdt":{"type":"string","example":"15.80"},"total_usdt":{"type":"string","example":"15.80"},"deliveries":{"type":"array","items":{"type":"object","properties":{"position":{"type":"integer","example":1},"cdk":{"type":"string","example":"GPT-PLUS-XXXXX-YYYYY"},"redemption_url":{"type":"string","example":"https://chatgpt.com/redeem/..."},"content":{"type":"string"}}}}}}}}},"409":{"description":"Insufficient balance or stock temporarily reserved."}}}},"/api/v1/integrations/dujiaoka/webhook":{"post":{"tags":["Faka & Webhook Integrations"],"summary":"Dujiaoka Turnkey Webhook Hook","description":"Zero-code webhook endpoint for Dujiaoka 2.x and automated faka platforms. Auto-processes order upon payment, pulls inventory from MaplePass, and sends delivery emails.","operationId":"dujiaokaWebhook","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string"},"description":"Merchant MaplePass API Key (format: mp_live_...)"},{"name":"product","in":"query","required":false,"schema":{"type":"string","default":"gptplus_google"},"description":"Target product code (e.g. gptplus_google, gptplus, chatgpt_pro20_ph)"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["order_sn"],"properties":{"order_sn":{"type":"string","example":"D2026102812345678"},"buy_amount":{"type":"integer","default":1,"example":1},"email":{"type":"string","format":"email","example":"customer@example.com"},"title":{"type":"string","example":"ChatGPT Plus"}}}}}},"responses":{"200":{"description":"Dujiaoka order processed and cards delivered.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","example":200},"msg":{"type":"string","example":"success"},"order_sn":{"type":"string","example":"D2026102812345678"},"status":{"type":"string","example":"DELIVERED"},"deliveries":{"type":"array","items":{"type":"object"}}}}}}}}}}},"components":{"securitySchemes":{"BearerHmac":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"Provide API Key in Authorization header (`Bearer mp_live_...`), along with `x-maple-timestamp` (UNIX epoch seconds) and `x-maple-signature` (HMAC-SHA256 signature)."}}}}