Skip to content

Attach Stripe ids to a plan version

PATCH
/billing/admin/plans/{id}/stripe
curl --request PATCH \
--url https://api.sloose.com/billing/admin/plans/pv_business_3/stripe \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "stripeProductId": "example", "stripePriceMonthlyId": "example", "stripePriceAnnualId": "example", "stripePriceOverageId": "example" }'

Backoffice route: a staff session, or ADMIN_TOKEN; never a customer’s session. Run after creating the products and prices in Stripe. Only the fields you send change.

id
required

The plan version id.

string
Example
pv_business_3

The plan version id.

Media typeapplication/json
object
stripeProductId
string | null
stripePriceMonthlyId
string | null
stripePriceAnnualId
string | null
stripePriceOverageId
string | null
key
additional properties
Examplegenerated
{
"stripeProductId": "example",
"stripePriceMonthlyId": "example",
"stripePriceAnnualId": "example",
"stripePriceOverageId": "example"
}

The plan version as it now stands.

Media typeapplication/json
object
key
additional properties
Examplegenerated
{
"additionalProperty": "example"
}

A bearer that is neither the token nor a live session (code: AUTH_REQUIRED).

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

A customer’s session, an API token, or no bearer at all — not staff, and not the ADMIN_TOKEN (code: ADMIN_REQUIRED).

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

No such plan version.

Media typeapplication/json
object
error
required
string
key
additional properties
Examplegenerated
{
"error": "example"
}