purchase_endpoint_credits_with_payment
Complete a public endpoint credit-pack purchase after you have obtained a valid signed x402 payment (v2 or v1) for the purchase challenge.
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>",
"paymentPayload": "<paymentPayload>"
},
"name": "purchase_endpoint_credits_with_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 | |
| paymentPayload | Yes | Signed x402 payment from the paying client (v2 relayed as PAYMENT-SIGNATURE, v1 as X-Payment), as JSON or base64 string | |
| clientReferenceId | No | Optional client reference ID forwarded to the purchase flow |