Skip to main content
POST
Create Checkout

Authorizations

X-API-Private-Key
string
header
required

Private API key for user-level authentication.

X-API-Public-Key
string
header
required

Public API key for user-level authentication.

Headers

Content-Type
string
default:application/json
required

Content type for the request body as application/json.

Body

application/json

The data needed to create the checkout.

country_id
string

An ISO country code used for region-specific datacenter or ISP products.

cycle_interval
enum<string>
default:month

The billing interval for recurring purchases.

Available options:
year,
month,
week,
day
cycle_interval_count
integer

The number of intervals for a recurring cycle (e.g. 1 month, 2 months, etc.).

line_items
object[]

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).

product_code
string

A direct product code (e.g. "datacenter_us"). If this is provided, you do not need product_type, country_id, or product_protocol.

product_protocol
enum<string>
default:ipv4

The protocol of the product.

Available options:
ipv4,
ipv6,
dual
product_type
enum<string>

The type of product to purchase (if product_code is not used).

Available options:
datacenter,
isp,
residential,
mobile
promotional_code
string

A promotional code to apply a discount to the checkout.

quantity
integer

The quantity of the product to purchase. Required for the legacy flat form (the line_items form uses item_quantity instead).

service_fulfillment_filter
object

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

201 - application/json

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.

data
object
message
string

Success message.

Example:

"Successfully created checkout and paid with credit. Your service will be provisioned shortly."