Checkout a product or subscription
Checkout a product to buy it one time or start a subscription plan on a billing account.
Path Parameters
org_id string required
billing_id string required
ID of the billing account to update the subscription for
application/json
Request Body required
success_url string
cancel_url string
subscription_body object
plan string
skip_trial boolean
cancel_after_trial boolean
provider_coupon_id provider_coupon_id is the coupon code that will be applied to the subscription
generated by the billing provider, this will be deprecated once coupons are
managed by the platform
product_body object
product string
setup_body object
payment_method boolean
Responses
- 200
- 400
- 401
- 403
- 404
- 500
- default
A successful response.
application/json
Schema
Example (from schema)
Schema
checkout_session object
id string
checkout_url string
success_url string
cancel_url string
state string
plan string
product string
metadata object
created_at date-time
updated_at date-time
expire_at date-time
{
"checkout_session": {
"id": "string",
"checkout_url": "string",
"success_url": "string",
"cancel_url": "string",
"state": "string",
"plan": "string",
"product": "string",
"metadata": {},
"created_at": "2024-04-10T06:49:01.431Z",
"updated_at": "2024-04-10T06:49:01.431Z",
"expire_at": "2024-04-10T06:49:01.431Z"
}
}
Bad Request - The request was malformed or contained invalid parameters.
application/json
Schema
Example (from schema)
Schema
- Array [
- ]
code int32
message string
details object[]
@type string
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Unauthorized - Authentication is required
application/json
Schema
Example (from schema)
Schema
- Array [
- ]
code int32
message string
details object[]
@type string
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Forbidden - User does not have permission to access the resource
application/json
Schema
Example (from schema)
Schema
- Array [
- ]
code int32
message string
details object[]
@type string
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Not Found - The requested resource was not found
application/json
Schema
Example (from schema)
Schema
- Array [
- ]
code int32
message string
details object[]
@type string
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Internal Server Error. Returned when theres is something wrong with Frontier server.
application/json
Schema
Example (from schema)
Schema
- Array [
- ]
code int32
message string
details object[]
@type string
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
An unexpected error response.
application/json
Schema
Example (from schema)
Schema
- Array [
- ]
code int32
message string
details object[]
@type string
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Loading...