Skip to main content
POST
/
account
/
subscription
/
upgrade
Upgrade subscription
curl --request POST \
  --url https://api.veryfront.com/account/subscription/upgrade \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "pro",
  "cycle": "monthly",
  "quantity": 3,
  "server_quantity": 2,
  "sandbox_quantity": 2,
  "success_url": "<string>",
  "cancel_url": "<string>"
}
'
{
  "status": "<string>",
  "amount": "<string>",
  "checkout_url": "<string>",
  "error": "<string>"
}

Authorizations

Authorization
string
header
required

Use a JWT bearer token or a Veryfront API key in the Authorization header.

Body

application/json
type
enum<string>
required

Subscription tier to upgrade to.

Available options:
free,
pro,
enterprise
Example:

"pro"

cycle
enum<string>
required

Billing cycle

Available options:
monthly,
yearly
Example:

"monthly"

quantity
integer

Seat quantity for licensed subscriptions

Required range: x >= 1
Example:

3

server_quantity
integer | null

Recurring server add-on quantity

Required range: x >= 0
Example:

2

sandbox_quantity
integer | null

Recurring sandbox add-on quantity

Required range: x >= 0
Example:

2

success_url
string<uri>

URL to redirect to after successful payment

cancel_url
string<uri>

URL to redirect to if payment is cancelled

Response

Checkout session created

status
string
required

Upgrade status

amount
string | null

Formatted amount due, when available

checkout_url
string | null

Checkout URL, when payment is required

error
string | null

Error message when status is error