Close the account and refund the balance
close_accountCloses the account and refunds what is left of the balance to the card(s) that paid, newest top-up first, less Stripe's processing fee on each payment refunded (Stripe keeps it; the account owner bears it). Call it WITHOUT confirm first: that only previews the refund per card and moves nothing. Then, only if the account owner has agreed, call again with confirm: true. Every campaign must be closed first. A refund the card refuses stays as credit, and the key keeps working while any credit remains. Once the balance is zero the key is revoked for good. Sandbox accounts: the key is revoked and nothing is refunded (the credit is notional). If Stripe does not answer, call again to finish.
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": {
"apiKey": "<apiKey>"
},
"name": "close_account"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| apiKey | Yes | Your Clearvoyance API key (cv_live_… or cv_test_…), from create_account | |
| confirm | No | true to actually close and refund. Omit or false to preview only. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes |