purchase_credits
Create a Stripe checkout session to purchase credits or subscribe to a plan. Returns a checkout URL for a person to open. An agent paying on its own (an MPP wallet) buys a credit pack with POST https://api.neume.io/v1/agents/credits/{productId} instead, its API key in X-API-Key.
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": {
"productId": "<productId>",
"successUrl": "<successUrl>",
"cancelUrl": "<cancelUrl>"
},
"name": "purchase_credits"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cancelUrl | Yes | URL to redirect to if payment is cancelled | |
| productId | Yes | Product ID to purchase | |
| successUrl | Yes | URL to redirect to after successful payment |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| checkoutUrl | Yes |