request_product_purchase_payment
Return the x402 payment challenge (v1 JSON body plus, when the server sends it, the decoded v2 PAYMENT-REQUIRED header as paymentRequired) for purchasing a public product. This wraps the existing public /p/:id-or-slug flow and does not require owner credentials.
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": {
"productIdOrSlug": "<productIdOrSlug>"
},
"name": "request_product_purchase_payment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| metadata | No | Optional metadata object forwarded to the purchase flow | |
| productIdOrSlug | Yes | Product slug or product ID used in the public /p/:id-or-slug purchase route | |
| clientReferenceId | No | Optional client reference ID forwarded to the purchase flow |