Get the x402 payment address of a plan
get_x402_checkoutFor an agent that holds USDC on Base: returns the HTTP address where one Pay2GPT plan is bought with the x402 payment protocol, with the current price in US cents and in USDC atomic units. This tool pays nothing. A GET to the returned url answers 402 with the payment requirements; the same GET with a PAYMENT-SIGNATURE header settles the payment and returns the order number and the order page, where the buyer connects their own ChatGPT account.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"plan": "<plan>",
"email": "<email>"
},
"name": "get_x402_checkout"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plan | Yes | Plan slug from list_plans, such as plus | |
| Yes | The buyer's email address; order updates go there |