Skip to content

Generate invoice from cart items

POST
/cart/checkout/invoice

Creates an invoice from the items in the cart, validates product availability, and applies coupon codes if provided.

Request Body required

object
products
required
Array<object>
object
id
required

Product ID

integer
domain

Domain name when ordering a Domain

string
cycle
required

Billing cycle for the product

string
Allowed values: monthly quarterly semiannually annually biennially triennially
options

Optional configuration options for the product (Currently only required for VPS services)

object
option1

Memory (RAM) in GB

number
<= 128
option2

Storage in GB

number
<= 1000
option3

CPU cores

number
<= 16
option4

Number of IPv4 addresses

number
option5

Number of IPv6 addresses

number
option6

Operating system

string
Allowed values: ubuntu debian centos fedora almalinux rocky windows server
option7

Network speed

string
Allowed values: 1gbit 5gbit 10gbit
option8

Server location

string
Allowed values: AMS NYC
domain

Domain name for the service

string
password

Service password (must meet security requirements)

string
type

Type of product

string
Allowed values: Hosting Domain
couponcode

Optional coupon code to apply to the order

string

Responses

200

Invoice successfully generated

object
success
boolean
true
data
object
invoice_id

The ID of the generated invoice

integer

400

Invalid request (missing fields, invalid product configuration, out of stock)

object
success
boolean
message
string

401

User is not authenticated

object
success
boolean
message
string

404

Product not found

object
success
boolean
message
string