Skip to content

Start the Subscription ($100 a month): a Stripe Checkout link; the plan changes when Stripe confirms the payment

POST
/v1/billing/subscribe
curl --request POST \
--url https://api.supposing.app/v1/billing/subscribe \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "success_url": "example", "cancel_url": "example" }'
Idempotency-Key
Idempotency-Key

Any unique string, e.g. a UUID. Retrying with the same key returns the first response instead of creating a second one. Keys last 24 hours.

Any of:
string
<= 255 characters

Any unique string, e.g. a UUID. Retrying with the same key returns the first response instead of creating a second one. Keys last 24 hours.

Media typeapplication/json
Body
Any of:
SubscribeIn
object
success_url
Success Url

A page of the app; default /billing?subscribed=1.

Any of:
string
<= 2000 characters
cancel_url
Cancel Url

A page of the app; default /billing.

Any of:
string
<= 2000 characters

Example generated

{
"success_url": "example",
"cancel_url": "example"
}

Successful Response

Media typeapplication/json
SubscribeSession
object
url
required
Url

Stripe Checkout for the Subscription. The plan changes when Stripe confirms the payment (webhook), not when the browser comes back.

string

Example generated

{
"url": "example"
}

Client error. Branch on code; show message and hint.

Media typeapplication/json
Error

The body of every non-2xx response.

object
code
required
Code

Stable machine-readable code, e.g. dataset_not_found.

string
message
required
Message
string
hint
Hint

What to do next.

Any of:
string
details
Details

Per-field problems, for invalid_request.

Any of:
Array<object>
ErrorDetail
object
field
required
Field

Dotted path to the field, e.g. ranking.rubric.

string
message
required
Message
string
limit

For plan_limit_* codes: the limit, usage and upgrade.

Any of:
LimitInfo

Which plan limit a plan_limit_* error hit, and the way up.

object
name
required
Name

Datasets, items_per_dataset, chars_per_dataset or runs_per_month.

string
plan
required
Plan

The workspace’s plan: free (Pay as you go) or subscription.

string
limit
required
Limit
integer
used
required
Used

Current usage; for items_per_dataset and chars_per_dataset, the size the dataset would have.

integer
upgrade_url
required
Upgrade Url

The web page that starts the Subscription; null while it can’t be bought here (then the hint says whom to write to).

Any of:
string

Example generated

{
"code": "example",
"message": "example",
"hint": "example",
"details": [
{
"field": "example",
"message": "example"
}
],
"limit": {
"name": "example",
"plan": "example",
"limit": 1,
"used": 1,
"upgrade_url": "example"
}
}

Server error.

Media typeapplication/json
Error

The body of every non-2xx response.

object
code
required
Code

Stable machine-readable code, e.g. dataset_not_found.

string
message
required
Message
string
hint
Hint

What to do next.

Any of:
string
details
Details

Per-field problems, for invalid_request.

Any of:
Array<object>
ErrorDetail
object
field
required
Field

Dotted path to the field, e.g. ranking.rubric.

string
message
required
Message
string
limit

For plan_limit_* codes: the limit, usage and upgrade.

Any of:
LimitInfo

Which plan limit a plan_limit_* error hit, and the way up.

object
name
required
Name

Datasets, items_per_dataset, chars_per_dataset or runs_per_month.

string
plan
required
Plan

The workspace’s plan: free (Pay as you go) or subscription.

string
limit
required
Limit
integer
used
required
Used

Current usage; for items_per_dataset and chars_per_dataset, the size the dataset would have.

integer
upgrade_url
required
Upgrade Url

The web page that starts the Subscription; null while it can’t be bought here (then the hint says whom to write to).

Any of:
string

Example generated

{
"code": "example",
"message": "example",
"hint": "example",
"details": [
{
"field": "example",
"message": "example"
}
],
"limit": {
"name": "example",
"plan": "example",
"limit": 1,
"used": 1,
"upgrade_url": "example"
}
}