Skip to content

Attach Stripe ids to a credit pack

PATCH
/billing/admin/packs/{key}/stripe
curl --request PATCH \
--url https://api.sloose.com/billing/admin/packs/pack_500/stripe \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "stripeProductId": "example", "stripePriceId": "example" }'

Backoffice route: a staff session, or ADMIN_TOKEN; never a customer’s session. A pack without a stripePriceId is listed but not purchasable.

key
required

The credit pack key.

string
Example
pack_500

The credit pack key.

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

The pack 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 credit pack.

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