---
title: "Order and get a payment link"
method: POST
path: "/api/v1/orders"
---

# Order and get a payment link

`POST /api/v1/orders`

## Request

- Base URL: `https://ipmusk.com`
- URL: `https://ipmusk.com/api/v1/orders`
- Auth: HTTP bearer

Creates an unpaid order and returns the provider's payment link (checkout_url) for the customer to open and pay themselves; nothing is charged by this call. Show the price (POST /quotes) and get the customer's confirmation first. rotating_residential takes a plan_id and is one-time only (subscriptions are started in the dashboard); static_isp takes allocations [{ plan_id, quantity }] and resource_days (30 or 90). Poll GET /orders/{orderId} for payment and delivery. The Idempotency-Key header makes a retry return the same order and link. 422 checkout_unavailable when ordering is switched off.

## Headers

- `Idempotency-Key` string, required

## Request body

- union
  - object
    - `product` 'rotating_residential', required
    - `plan_id` string, required: A residential plan_id from GET /plans.
    - `promo_code` string: Optional promo code, checked exactly as at the dashboard checkout.
    - `provider` 'stripe' | 'paypal' | 'infini': Payment provider for the link. Default: the first one this deployment offers.
  - object
    - `product` 'static_isp', required
    - `allocations` object[], required: One entry per location; at most 100 IPs in total.
      - `plan_id` string, required: A static plan_id from GET /plans.
      - `quantity` integer, required
    - `resource_days` union, required: Term in days: 30 or 90.
      - 30
      - 90
    - `promo_code` string: Optional promo code, checked exactly as at the dashboard checkout.
    - `provider` 'stripe' | 'paypal' | 'infini': Payment provider for the link. Default: the first one this deployment offers.

## Response `201`

Order and get a payment link

- object
  - `data` object, required
    - `order_id` string, required
    - `amount_minor` integer, required
    - `currency` string, required
    - `provider` 'stripe' | 'paypal' | 'infini', required: Payment provider for the link. Default: the first one this deployment offers.
    - `checkout_url` string, uri, required
    - `expires_at` string, date-time, required
  - `request_id` string, required

## Other responses

- `default`: Any failure: 400 validation_error, 401 authentication_required, 403 forbidden / capability_unavailable, 404 not_found, 409 invalid_state_transition / idempotency_conflict, 422 product_unavailable, 429 rate_limited, 500 internal_error.

---

[API](https://skmtc.dev/ipmusk/apis/ipmusk-customer-api.md) · [All operations](https://skmtc.dev/ipmusk/apis/ipmusk-customer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ipmusk/apis/ipmusk-customer-api/revisions/89f8b46fda61?raw)
