Create Checkout
This endpoint creates a checkout for the authenticated user based on the provided data. It supports promotional codes and can handle both one-time and recurring payments. The product can be configured in one of two mutually exclusive forms:
- Legacy flat form: a
product_codedirectly, or the traditional combination ofproduct_type,country_id, andproduct_protocol, with a top-levelquantity. - Multi-location form: a single
line_itemsentry carrying its own product type, billing cycle, quantity, and per-locationservice_fulfillment_filter.
Important considerations
- If
product_codeis provided alongsideproduct_type/country_id/product_protocol, their values must match the actual product attributes. - API checkouts are settled with your existing credit balance; a cart your credit cannot fully cover is rejected with 422. The returned invoice is already paid and
invoice_urlpoints at its hosted page.
Example: multi-location checkout (line_items form)
{
"line_items": [
{
"product_type": "isp",
"item_quantity": 5,
"cycle_interval": "month",
"cycle_interval_count": 1,
"service_fulfillment_filter": [
{"country_id": "us", "quantity": 2},
{"country_id": "gb", "quantity": 2}
]
}
],
"promotional_code": "PROMOCODEHERE"
}
Authorizations
Private API key for user-level authentication.
Public API key for user-level authentication.
Headers
Content type for the request body as application/json.
Body
The data needed to create the checkout.
An ISO country code used for region-specific datacenter or ISP products.
The billing interval for recurring purchases.
year, month, week, day The number of intervals for a recurring cycle (e.g. 1 month, 2 months, etc.).
Multi-location form: a list containing exactly one line item that carries its own product type, billing cycle, quantity, and optional per-location filter. Mutually exclusive with the top-level product_code, product_type, country_id, product_protocol, cycle_interval, cycle_interval_count, quantity, and service_fulfillment_filter fields (promotional_code remains top-level).
A direct product code (e.g. "datacenter_us"). If this is provided, you do not need product_type, country_id, or product_protocol.
The protocol of the product.
ipv4, ipv6, dual The type of product to purchase (if product_code is not used).
datacenter, isp, residential, mobile A promotional code to apply a discount to the checkout.
The quantity of the product to purchase. Required for the legacy flat form (the line_items form uses item_quantity instead).
Legacy single-object filter applied to the whole service (e.g. {"asn_id": 7018}), pinned to the product's country. For multi-location allocation use line_items instead. asn_id requires an account permission; insufficient stock matching the filter rejects with 422.
Response
Successfully created a checkout. Depending on the remaining invoice amount, it may already be paid by credit, or you may need to complete payment at the returned invoice URL.

