{"openapi":"3.1.0","info":{"title":"Merchant Connect","version":"0.2.3","contact":{"email":"em69420@icloud.com"},"description":"Paid generation of an x402 digital-service integration kit. No automatic website installation."},"servers":[{"url":"https://liam-tools-merchant-connect.evangrant69420.workers.dev"}],"components":{"securitySchemes":{"receiptBearer":{"type":"http","scheme":"bearer"}}},"paths":{"/v1/merchant-connect":{"get":{"security":[],"summary":"Get an x402 quote","responses":{"402":{"description":"Payment terms, invoice ID and private receipt token"}}},"post":{"operationId":"generate_merchant_connect_kit","summary":"Buy a business-specific agent commerce integration kit","x-payment-info":{"protocols":["x402"],"networks":["xrpl:0","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","eip155:8453"],"price":{"currency":"USDC","amount":"2","mode":"fixed"},"alternatives":[{"network":"xrpl:0","currency":"XRP","amount":"1"},{"network":"xrpl:0","currency":"RLUSD","amount":"2"}]},"parameters":[{"in":"header","name":"PAYMENT-SIGNATURE","required":false,"schema":{"type":"string"}},{"in":"header","name":"X-Liam-Invoice","required":false,"schema":{"type":"string"}},{"in":"header","name":"X-Merchant-Receipt","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["business_name","website","pay_to","products"],"properties":{"business_name":{"type":"string","minLength":1,"maxLength":100},"website":{"type":"string","format":"uri"},"pay_to":{"type":"string","description":"Merchant XRP receiving address"},"products":{"type":"array","minItems":1,"maxItems":20,"items":{"type":"object","additionalProperties":false,"required":["id","name","description","price_xrp","fulfillment_url"],"properties":{"id":{"type":"string","pattern":"^[a-z0-9-]{1,40}$"},"name":{"type":"string","maxLength":100},"description":{"type":"string","maxLength":1000},"price_xrp":{"type":"string"},"fulfillment_url":{"type":"string","format":"uri"}}}}}},"example":{"business_name":"Example Reports","website":"https://reports.example.com","pay_to":"r9KZhKgRwVEVMemHjCXSYemSJs9ourb5NY","products":[{"id":"market-report","name":"Market report","description":"Download the current market report as JSON or PDF.","price_xrp":"1","fulfillment_url":"https://reports.example.com/private/current-report"}]}}}},"responses":{"200":{"description":"Integration kit and confirmed payment receipt"},"402":{"description":"Payment challenge"},"422":{"description":"Invalid input; no settlement"},"503":{"description":"Check authenticated receipt status; do not pay again"}}}},"/api/preview":{"post":{"security":[],"summary":"Free input validation and package preview","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["business_name","website","pay_to","products"],"properties":{"business_name":{"type":"string","minLength":1,"maxLength":100},"website":{"type":"string","format":"uri"},"pay_to":{"type":"string","description":"Merchant XRP receiving address"},"products":{"type":"array","minItems":1,"maxItems":20,"items":{"type":"object","additionalProperties":false,"required":["id","name","description","price_xrp","fulfillment_url"],"properties":{"id":{"type":"string","pattern":"^[a-z0-9-]{1,40}$"},"name":{"type":"string","maxLength":100},"description":{"type":"string","maxLength":1000},"price_xrp":{"type":"string"},"fulfillment_url":{"type":"string","format":"uri"}}}}}}}}},"responses":{"200":{"description":"Preview; contains no purchased code"},"422":{"description":"Input rejected"}}}},"/api/orders/{id}":{"get":{"security":[{"receiptBearer":[]}],"summary":"Recover a purchased kit or check payment","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"header","name":"Authorization","required":true,"schema":{"type":"string","description":"Bearer receipt_token"}}],"responses":{"200":{"description":"Paid kit"},"202":{"description":"Payment pending"},"401":{"description":"Receipt token invalid"}}}}}}