Skip to main content
POST
Create an order

Overview

Create a new subscription order for a customer. Orders capture the customer’s intent to subscribe to products—they don’t immediately create active subscriptions. After an order is created and confirmed, you’ll use the Create Subscription endpoint to fulfill order items.
Orders are the starting point for the subscription lifecycle. Think of them as “checkout transactions” that need to be fulfilled by creating subscriptions and assigning assets.

Order Types

Common Use Cases

E-commerce Integration

Create orders from your checkout flow when customers complete a subscription purchase

Sales Tool

Build internal tools for sales teams to create orders during customer calls

B2B Portal

Let business customers place bulk orders through a self-service portal

Migration

Import historical orders when migrating from another subscription platform

Minimal Request Example

The simplest order needs customer info, billing address, and at least one item:
The sku must match an active product variant in your catalog. The system automatically looks up pricing based on the variant’s configured rates.

Complete Request Example

For business customers with full details:

Customer Handling

When you create an order:
  1. Existing customer (matching email): Order is linked to existing customer record
  2. New customer: A new customer record is created automatically
The customer’s customerId is returned in the order response and can be used for future orders.

Address Fields

Both billingAddress and shippingAddress support these fields:
If shippingAddress is not provided, the billingAddress will be used for shipping.

Custom Fields

Use customFields to store additional data specific to your business:
Custom fields can be used for:
  • Purchase order numbers
  • CRM/ERP reference IDs
  • Cost centers or department codes
  • Sales attribution
Configure custom fields in Dashboard → Settings to make them searchable and filterable.

What Happens Next

After creating an order:
  1. Order created with pending status
  2. Review the order (manual or automated)
  3. Confirm the order (updates to confirmed status)
  4. Create subscriptions for each item using Create Subscription
  5. Order fulfilled when all items have active subscriptions

Error Handling

Authorizations

Authorization
string
header
required

API key obtained from FlexPortal dashboard

Headers

Tenant-ID
string
required

Your tenant identifier

Body

application/json
customer
object
required
billingAddress
object
required
items
object[]
required
Minimum array length: 1
orderType
enum<string>
default:standard
Available options:
standard,
extension,
upgrade
extensionDetails
object
upgradeDetails
object
customFields
object | null
shippingAddress
object
notes
string

Response

Order created successfully

success
enum<boolean>
required
Available options:
true
message
string
required
orderId
string
required
order
object
required