Skip to main content
POST
Create Order
string
default:"purchase"
What the order is for. Possible values: purchase, renew, upgrade.
string
required
The plan name being purchased, renewed or upgraded to, such as starter-1 or pro-4. The names are in List Plans. A plan that is no longer sold returns PLAN_NOT_FOR_SALE.
integer
required
How many months to purchase: 1, 3, 6 or 12. Any other value returns INVALID_MONTHS. A 3-month order gets 10% off, a 6-month order 15% off and a 12-month order 25% off the monthly price; price and discount already include it. Quote Order returns the exact amount before you create the order.
string
An optional discount coupon code.
The order needs complete billing details: check complete in Get Billing Details.
A renew order requires the target plan to match the account’s current plan; an upgrade order requires it to be strictly larger. Use type: "purchase" when there’s no active plan of that kind yet.

Response

object

Error Responses

string
The error code indicating the reason for failure. Possible values:
  • AUTH_TOKEN_MISSING, API_KEY_INVALID, SESSION_REVOKED: The Authorization header is missing, the API key is invalid, or the dashboard session was revoked (401).
  • API_KEY_IP_DENIED, API_KEY_SCOPE_DENIED: The API key is used from an IP outside its allowlist, or it lacks the scope the route requires (403).
  • USER_NOT_FOUND: The authenticated user was not found.
  • INVALID_PAYLOAD: The request body failed validation.
  • BILLING_DETAILS_INCOMPLETE: The billing details are not complete (name, address and, in Brazil, CPF/CNPJ). Save them with Update Billing Details and try again.
  • MISSING_PLAN_OR_MONTHS: plan or months is missing.
  • INVALID_MONTHS: months is not 1, 3, 6 or 12.
  • INVALID_PLAN: The plan name does not exist.
  • PLAN_NOT_FOR_SALE: The plan is no longer sold (400).
  • NOT_AN_UPGRADE: For type: "upgrade", the target plan is not larger than the current one.
  • PLAN_MISMATCH_FOR_RENEWAL: For type: "renew", the target plan does not match the current one.
  • PENDING_ORDER_LIMIT_REACHED: Too many unpaid orders already open.
  • INTERNAL_SERVER_ERROR: An unexpected server error occurred.
Last modified on November 1, 2026