Home / Docs / API reference / buy_credits
buy_credits
Creates a checkout link for a top-up or a monthly plan. An agent can't pay, so it gives the link to the person it works for, who opens it and pays by card through Stripe. Free to call; nothing is charged until a person pays.
POST/v1/checkoutFree to call
Inputs
| Field | Type and limits | Notes |
|---|---|---|
| item | "topup", "starter", "growth", "pro" or "scale", required | A top-up is $15 per 1,000 credits and lasts 12 months. The plans are listed under credits and billing. |
| units | integer, 1 to 100, default 1 | Top-ups only: how many blocks of 1,000 credits. |
Request
curl -X POST "https://api.whichsitesuse.com/v1/checkout" \
-H "Authorization: Bearer $WSU_API_KEY" \
-H "Content-Type: application/json" \
-d '{"item": "topup", "units": 5}'
Over MCP, call the tool with these arguments:
{ "item": "topup", "units": 5 }
Response
{
"data": {
"checkout_url": "https://.../buy/...",
"item": "topup",
"label": "5,000 credits (top-up)",
"price": "$75",
"credits": 5000,
"next_step": "Give checkout_url to the person you're working for. It opens a secure Stripe checkout and stays valid for 7 days."
},
"meta": { "credits_used": 0, ... }
}
A checkout link only pays into the account it was made for and grants nothing else, so it's safe to pass to whoever holds the card. If the account already has a plan, a plan link sends the owner to sign in and change it from billing instead, so nobody pays for two plans. Top-up links always work.