ClockNext: subscribe customer to a plan
clocknext_create_purchaseSubscribe a customer to a plan to activate it, enabling usage-based billing for that customer.
Instructions
Subscribe a customer to a plan (a 'purchase') — this is what activates the plan for that customer. A usage signal only prices if the customer has an active plan whose components match the meter (credit / outcome / unit), so do this after clocknext_create_customer + clocknext_create_plan. Used to wire up a dummy customer before firing test signals.
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": {
"customerId": "<customerId>",
"planId": "<planId>"
},
"name": "clocknext_create_purchase"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | No | Internal notes for this purchase. | |
| planId | Yes | The plan id to subscribe them to (from clocknext_create_plan / _list_plans). | |
| customerId | Yes | The ClockNext customer id (from clocknext_create_customer / _list_customers). | |
| autoPayment | No | Charge automatically when the invoice is due. | |
| billingDate | No | YYYY-MM-DD. Defaults to today; must be a valid, non-past date. | |
| voidAfterMinutes | No | Auto-void the purchase if it stays unpaid after N minutes. |