request_endpoint_credit_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 credit pack from an endpoint that exposes /e/:slug?action=purchase.
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": {
"slug": "<slug>"
},
"name": "request_endpoint_credit_purchase_payment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | Endpoint slug for the credit-enabled endpoint | |
| metadata | No | Optional metadata object forwarded to the purchase flow | |
| walletAddress | No | Optional wallet address to receive the purchased credits when the underlying endpoint supports it | |
| clientReferenceId | No | Optional client reference ID forwarded to the purchase flow |