Billing checkout
Get a Stripe link to buy or change a package with POST /v1/billing/checkout, from an API key or an OAuth token.
POST https://api.jobspipe.dev/v1/billing/checkoutReturns a Stripe link where the account holder buys a package, or confirms a move to a larger one. It is built for AI agents and scripts that run out of credits: they can hand the person who pays a direct checkout link instead of sending them to find the billing page.
The call itself charges nothing, changes nothing and costs no credits: every purchase is completed by the account holder on a Stripe page. Moving to a smaller package is not available here; it is made on the billing page. The new monthly allowance applies once the payment completes, usually within a minute. It accepts the same credentials as every other /v1 endpoint: an API key (Authorization: Bearer jp_live_... or x-api-key) or an OAuth access token. The MCP server's upgrade_plan tool calls it.
curl https://api.jobspipe.dev/v1/billing/checkout \
-H "Authorization: Bearer $JOBSPIPE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"package": "growth"}'Request body
All fields are optional.
| Field | Type | Description |
|---|---|---|
package | string | builder, growth, scale or business. Wins over credits when both are sent. |
credits | number | Monthly credits wanted. The smallest package that covers them is chosen: 30000 buys Growth. Above 500,000 is an Enterprise plan. |
With an empty body you are offered the package that covers 1.5x what the account used this month. An account that already holds a package is offered the next one up.
Response
{
"url": "https://checkout.stripe.com/c/pay/cs_live_a1B2c3",
"flow": "checkout",
"package": "growth",
"credits": 100000,
"price_usd": 149
}| Field | Type | Description |
|---|---|---|
url | string | Where the account holder pays or confirms. Open it in a browser. |
flow | string | checkout: Stripe Checkout for a new subscription. portal: a Stripe page where the account holder confirms the move to a larger package, prorated as on the billing page. |
package | string | The package chosen. |
credits | number | Credits a month on that package. |
price_usd | number | The package's monthly price in USD. |
After paying, the account holder lands on the billing page of the dashboard. Nothing has been bought until they complete the Stripe page: call GET /v1/account to confirm the new plan.
Errors
Error bodies carry error and message.
| Status | error | Meaning |
|---|---|---|
400 | bad_package | Not one of the four packages. |
400 | bad_credits | credits is not a positive whole number. |
400 | enterprise | More than the largest package (500,000 credits a month). contact_url is where to arrange an Enterprise plan. |
401 | - | No credential was sent, or it was not valid. |
409 | already_subscribed | The account already holds that package. Choose a larger one, or buy extra credits from the billing page. |
409 | downgrade_requires_dashboard | The account holds a larger package. Downgrades are made on the billing page, billing_url. |
502 | checkout_failed | Stripe could not start the checkout. Retry, or upgrade from the billing page. |