Skip to main content

Lease an IPv4 Subnet

This guide walks through the complete process of leasing an IPv4 subnet using the IPXO API — from discovering available subnets to successfully placing an order. By the end of this flow, you will have:
  • Selected an available IPv4 subnet
  • Added it to a cart
  • Completed checkout
  • Created an active order (and subscription)

Prerequisites

Before starting this flow, make sure you have:
  • A valid access token ({access_token})
  • Your tenant UUID ({tenant_uuid})
  • At least one:
    • billing address
    • payment method (card or credits)
If not, see Authentication and Portal setup first.

Flow overview

At a high level, leasing a subnet consists of these steps:
  1. Search for available subnets
  2. Add a subnet to cart
  3. Review cart and cart items
  4. Attach billing address
  5. Attach payment method (and optionally credits)
  6. Checkout cart
  7. Verify created order
Each step builds on identifiers returned by the previous one.

1) Search for available subnets

Try it
Start by searching the IP market for IPv4 subnets that match your requirements.

What this does

  • Queries the IPXO marketplace
  • Returns available subnets filtered by:
    • prefix length (/24)
    • country (US)
    • sorted by lowest price first

What to save from the response

From the selected subnet, store:
  • address{address}
  • prefix_length{cidr}
These values are required to add the subnet to your cart.

2) Add the selected subnet to cart

Try it
Once you choose a subnet, add it to the tenant’s cart.

What this does

  • Creates (or reuses) an active cart
  • Adds the IPv4 subnet as a recurring monthly product

Response

  • No response body
  • HTTP 204 No Content
The cart now exists and contains your subnet.

3) View cart summary

Try it
Retrieve the current cart to get totals and the cart identifier.

What to save from the response

  • uuid{cart_uuid}
This UUID is required for all remaining cart operations.

4) List cart items

Try it
Inspect what exactly has been added to the cart.

Why this is useful

  • Verify the correct subnet is in the cart
  • Confirm pricing and billing period
  • Retrieve cart line identifiers if needed later

5) List company billing addresses

Try it
A billing address is required before checkout.

What to save from the response

  • uuid{address_uuid}

6) Attach billing address to cart

Try it
Assign the selected billing address to the cart.

What this does

  • Associates the cart with a billing address
  • Enables checkout and invoice generation

7) List available payment methods

Try it
Retrieve saved payment methods for the tenant.

What to save from the response

  • uuid{payment_method_uuid}

8) Attach payment method to cart

Try it
Assign the selected payment method to the cart.

What this does

  • Sets the payment method used during checkout
  • Required even if credits cover part of the total
⚠️ Important: Currently, it is not possible to complete checkout (pay by card) due to 3DS card security. Please use Credit balance to pay for the cart.

9) (Optional) Check available credit balance

Try it
Before checkout, you can check if credits are available.

10) (Optional) Apply credits to cart

Try it
If credits are available, apply them to reduce the payable amount.

11) Checkout cart and create order

Try it
Finalize the cart and create an order.

What happens here

  • An order is created
  • Payment is initiated
  • A subscription for the subnet is created in the background

What to save from the response

  • order.uuid{order_uuid}

12) Retrieve order details

Try it
Verify the order status and totals.

Successful outcome

  • Order status moves to completed
  • Subnet becomes active
  • Recurring billing starts based on the billing cycle
ℹ️ If order status is processing, it’s most likely due to the attached payment method (as mentioned above, card payments via API will not be completed).

Variables created in this flow