Pay2GPT x402 checkout
API by Pay2GPT · rest
An agent that holds USDC on Base buys a plan with two requests and no account: 1. GET /api/x402/plans/{slug}?email=<buyer email> answers 402 Payment Required. The PAYMENT-REQUIRED header (and the body) carry the x402 PaymentRequired object: scheme exact, network eip155:8453, the USDC contract, the amount in USDC's atomic units (6 decimals) and the address to pay. 2. The same request, sent again with a PAYMENT-SIGNATURE header (base64 of an x402 PaymentPayload holding a signed EIP-3009 transferWithAuthorization), is verified and settled through Coinbase's CDP facilitator. The answer is 200 with the paid order and a PAYMENT-RESPONSE header naming the transaction. The buyer then opens order_url, confirms the purchase email with a one-time code and connects their own ChatGPT account there; the plan is activated on that account. Nothing is activated by the payment alone. The amount is always the one in the current 402; it equals method_cents.crypto in…
Endpoint: https://pay2gpt.com/
Verification: observed. Source: crawl.
Capabilities (2)
- List the plans that can be bought with x402
- Buy one plan (402 without a payment the paid order with one)