Provide exactly one customer identifier: customer_id or customer_key. Do not send both. Every line item must reference a resource owned by your tenant.
Your API key must have the write or admin scope. Pass the raw key in the x-api-key header.
An order can contain at most one plan line item, and its quantity must be 1. For an invoice line item, omit price_option_id; Metrifox creates a carryover item and sets the quantity to 1.
Find the correct price option
For every priced line item, send the ID of the price option whose price.currency matches the order’s currency_code. An item can have price options in several currencies, so do not use a price option based only on the item ID.Retrieve the product and its full offering details with a read, write, or admin API key:
You can also provide country_code as a query parameter when you want the response filtered to the product’s pricing for a particular country.Use the following fields in the response:
item_type
item_id
Where to find price_option_id
plan, addon, or single_purchase
The selected published_version.version_id
The matching entry in published_version.price_options
entitlement
The selected entry’s ID in published_version.entitlements
The matching entry in published_version.entitlement_price_options
credit
The selected entry’s ID in published_version.credit_attachments
The matching entry in published_version.credit_attachment_price_options
charge
published_version.charge_attachments[].charge.id
The matching default charge.price_option or an entry in charge.localized_prices[].price_options
invoice
The existing invoice ID
Omit price_option_id; Metrifox derives it from the invoice carryover
Within the applicable price-option collection, choose the entry whose nested price.currency equals the order’s currency_code, then send that entry’s id as price_option_id. The price option must belong to the resource identified by item_id.
Authorizations
x-api-key
string
header
required
Body
application/json
Identify the customer by providing exactly one of customer_id or
customer_key. Do not send both fields.
currency_code
string
required
Three-letter ISO 4217 currency code used to price the order.
Required string length: 3
Example:
"USD"
line_items
object[]
required
Minimum array length: 1
Show child attributes
customer_id
string<uuid>
Metrifox customer ID. Provide this or customer_key, but not both.
customer_key
string
Your immutable customer identifier. Provide this or customer_id, but not both.
Example:
"customer-123"
is_manual
boolean | null
default:true
Whether the order is manually initiated.
skip_invoice
boolean
default:false
When true, do not generate an invoice for the order.
subscription_id
string<uuid> | null
Existing subscription associated with this order.
custom_start_date
string<date-time> | null
Custom date and time at which subscription provisioning should begin.
billing_interval
enum<string> | null
Billing cadence. Provide billing_interval_value with this field.
Available options:
daily,
weekly,
monthly,
quarterly,
biannually,
yearly,
once
billing_interval_value
integer | null
Number of billing intervals. Provide billing_interval with this field.
Required range: x >= 1
status
enum<string>
default:pending
Initial order status. Draft orders are saved without invoicing or provisioning.
Available options:
pending,
draft
transitioning_subscription_id
string<uuid> | null
Subscription being changed or migrated by this order.
change_type
enum<string> | null
Type of subscription change represented by the order.
Available options:
quantity_upgrade,
quantity_downgrade,
upgrade,
downgrade,
addon_add,
addon_remove,
plan_migration
policy
object | null
Plan-change policy used when transitioning an existing subscription.
manual_discount_selections
object[]
Discounts explicitly selected for this order.
Show child attributes
Response
Order created successfully
statusCode
integer
Example:
201
message
string
Example:
"Order Created Successfully"
meta
object
data
object
Show child attributes
errors
object
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Metrifox","colors":{"primary":"#B7CB56","light":"#DEF674","dark":"#15803D"},"logo":{"light":"https://mintcdn.com/metrifox/3lVK9D4biomYU0kB/logo/light.png?fit=max\u0026auto=format\u0026n=3lVK9D4biomYU0kB\u0026q=85\u0026s=cc75d1a9c11ce759bec6edc62c8ef4e0","dark":"https://mintcdn.com/metrifox/3lVK9D4biomYU0kB/logo/dark.png?fit=max\u0026auto=format\u0026n=3lVK9D4biomYU0kB\u0026q=85\u0026s=b1edf600b65d029ad11e8b651f6b0faa"},"favicon":"https://mintcdn.com/metrifox/3lVK9D4biomYU0kB/logo/light.png?fit=max\u0026auto=format\u0026n=3lVK9D4biomYU0kB\u0026q=85\u0026s=cc75d1a9c11ce759bec6edc62c8ef4e0","navbar":{"links":[{"href":"mailto:support@metrifox.com","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.metrifox.com/"}},"footer":{"socials":{"x":"https://x.com/metrifox","linkedin":"https://linkedin.com/company/metrifox","discord":"https://discord.gg/5T3rP7nwR"}},"seo":{"metatags":{"canonical":"https://docs.metrifox.com","google-site-verification":"gfPRXNDZQXHy-C4TzhCy6gBUxzJfC6UouBuooMmgH-k"}},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Blog","icon":"newspaper","href":"https://metrifox.com/blog"},{"anchor":"System Status","icon":"gauge","href":"https://status.metrifox.com"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"metrifox","hasAudioNarration":false,"actualSubdomain":"metrifox","customDomains":["docs.metrifox.com"],"gitSource":{"type":"github","owner":"metrifox","repo":"metrifox-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6aeb5a55d61fde81da2ff12f","clientVersion":"0.0.4270","searchFilterCounts":[{"language":"default","tag":"API Reference","count":52},{"language":"default","tag":"Guides","count":34},{"language":"default","tag":"Model Your Pricing","count":13},{"language":"default","tag":"SDKs","count":12},{"language":"default","tag":"Customers","count":11},{"language":"default","tag":"Webhooks","count":9},{"language":"default","tag":"Events","count":9},{"language":"default","tag":"Integrations","count":6},{"language":"default","tag":"Subscriptions","count":6},{"language":"default","tag":"Charge Customers","count":6}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"api-reference/orders/create","slug":"/api-reference/orders/create","pageMetadata":{"title":"Create Order","openapi":"POST /api/v1/orders","description":"Create an order for an existing customer","href":"/api-reference/orders/create"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Create an order for an existing customer\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Provide exactly one customer identifier: `,_jsx(_components.code,{children:`customer_id`}),` or `,_jsx(_components.code,{children:`customer_key`}),`. Do not send both. Every line item must reference a resource owned by your tenant.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Your API key must have the `,_jsx(_components.code,{children:`write`}),` or `,_jsx(_components.code,{children:`admin`}),` scope. Pass the raw key in the `,_jsx(_components.code,{children:`x-api-key`}),` header.`]})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`An order can contain at most one `,_jsx(_components.code,{children:`plan`}),` line item, and its quantity must be `,_jsx(_components.code,{children:`1`}),`. For an `,_jsx(_components.code,{children:`invoice`}),` line item, omit `,_jsx(_components.code,{children:`price_option_id`}),`; Metrifox creates a carryover item and sets the quantity to `,_jsx(_components.code,{children:`1`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`find-the-correct-price-option`,children:`Find the correct price option`}),`\n`,_jsxs(_components.p,{children:[`For every priced line item, send the ID of the price option whose `,_jsx(_components.code,{children:`price.currency`}),` matches the order’s `,_jsx(_components.code,{children:`currency_code`}),`. An item can have price options in several currencies, so do not use a price option based only on the item ID.`]}),`\n`,_jsxs(_components.p,{children:[`Retrieve the product and its full offering details with a `,_jsx(_components.code,{children:`read`}),`, `,_jsx(_components.code,{children:`write`}),`, or `,_jsx(_components.code,{children:`admin`}),` API key:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.metrifox.com/api/v1/product_catalogues/products/{product_id}\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$METRIFOX_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`You can also provide `,_jsx(_components.code,{children:`country_code`}),` as a query parameter when you want the response filtered to the product’s pricing for a particular country.`]}),`\n`,_jsx(_components.p,{children:`Use the following fields in the response:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:_jsx(_components.code,{children:`item_type`})}),_jsx(_components.th,{children:_jsx(_components.code,{children:`item_id`})}),_jsxs(_components.th,{children:[`Where to find `,_jsx(_components.code,{children:`price_option_id`})]})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`plan`}),`, `,_jsx(_components.code,{children:`addon`}),`, or `,_jsx(_components.code,{children:`single_purchase`})]}),_jsxs(_components.td,{children:[`The selected `,_jsx(_components.code,{children:`published_version.version_id`})]}),_jsxs(_components.td,{children:[`The matching entry in `,_jsx(_components.code,{children:`published_version.price_options`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`entitlement`})}),_jsxs(_components.td,{children:[`The selected entry’s ID in `,_jsx(_components.code,{children:`published_version.entitlements`})]}),_jsxs(_components.td,{children:[`The matching entry in `,_jsx(_components.code,{children:`published_version.entitlement_price_options`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`credit`})}),_jsxs(_components.td,{children:[`The selected entry’s ID in `,_jsx(_components.code,{children:`published_version.credit_attachments`})]}),_jsxs(_components.td,{children:[`The matching entry in `,_jsx(_components.code,{children:`published_version.credit_attachment_price_options`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`charge`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`published_version.charge_attachments[].charge.id`})}),_jsxs(_components.td,{children:[`The matching default `,_jsx(_components.code,{children:`charge.price_option`}),` or an entry in `,_jsx(_components.code,{children:`charge.localized_prices[].price_options`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`invoice`})}),_jsx(_components.td,{children:`The existing invoice ID`}),_jsxs(_components.td,{children:[`Omit `,_jsx(_components.code,{children:`price_option_id`}),`; Metrifox derives it from the invoice carryover`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Within the applicable price-option collection, choose the entry whose nested `,_jsx(_components.code,{children:`price.currency`}),` equals the order’s `,_jsx(_components.code,{children:`currency_code`}),`, then send that entry’s `,_jsx(_components.code,{children:`id`}),` as `,_jsx(_components.code,{children:`price_option_id`}),`. The price option must belong to the resource identified by `,_jsx(_components.code,{children:`item_id`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create Order","openapi":"POST /api/v1/orders","description":"Create an order for an existing customer","href":"/api-reference/orders/create"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Find the correct price option","slug":"find-the-correct-price-option","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"createOrder","summary":"Create an order","description":"Create an order for an existing customer","tags":["Orders"],"requestBody":"aebcaa1f-1e90-4cfd-b2c3-740ecd0d59c3","responses":{"201":"f9fa3d3c-1097-413d-9047-1a511973e928","400":"7cc2c9a1-5634-4ca8-8633-f72ad8f93c54","401":"5c729eb1-2efc-46a0-8d5f-2aaa20899a8c","404":"0e7d2b7b-967f-4c7c-b421-eac9aeace72c","422":"eef73f8b-409e-4bc1-ad9d-4c5322858867"},"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST https://api.metrifox.com/api/v1/orders \\\n -H \"x-api-key: $METRIFOX_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"currency_code\": \"USD\",\n \"customer_key\": \"customer-123\",\n \"line_items\": [\n {\n \"item_type\": \"plan\",\n \"item_id\": \"603efd2d-1100-4bf1-a577-5a96f4847891\",\n \"price_option_id\": \"85ba44aa-eb4f-47be-a84f-3b290488f1ca\",\n \"quantity\": 1\n }\n ]\n }'\n"}],"method":"post","type":"path","servers":["960802e0-6fb1-426c-b0db-f9d432d75e8e"],"security":["5fdc92ad-0d81-4605-a964-5172ec28d0f8"],"path":"/api/v1/orders","baseUrlOptions":["https://{defaultHost}"],"title":"Create an order","codeSamples":[{"label":"cURL","lang":"curl","source":"curl -X POST https://api.metrifox.com/api/v1/orders \\\n -H \"x-api-key: $METRIFOX_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"currency_code\": \"USD\",\n \"customer_key\": \"customer-123\",\n \"line_items\": [\n {\n \"item_type\": \"plan\",\n \"item_id\": \"603efd2d-1100-4bf1-a577-5a96f4847891\",\n \"price_option_id\": \"85ba44aa-eb4f-47be-a84f-3b290488f1ca\",\n \"quantity\": 1\n }\n ]\n }'\n"}],"requiredOnlyExamples":false,"requestExampleType":"codeSamples","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"Identify the customer by providing exactly one of `customer_id` or\n`customer_key`. Do not send both fields.\n","required":["currency_code","line_items"],"properties":{"currency_code":{"type":"string","minLength":3,"maxLength":3,"description":"Three-letter ISO 4217 currency code used to price the order.","example":"USD","isRequired":true,"uniqueKey":"currency_code","typeLabel":"string"},"line_items":{"type":"array","minItems":1,"items":{"type":"object","required":["item_type","item_id","quantity"],"properties":{"item_type":{"type":"string","enum":["plan","entitlement","single_purchase","addon","charge","credit","invoice"],"description":"Type of resource referenced by `item_id`:\n- `plan`: a plan offering version\n- `entitlement`: a product entitlement\n- `single_purchase`: a one-time-purchase offering version\n- `addon`: an add-on offering version\n- `charge`: a catalogue charge\n- `credit`: a credit attachment\n- `invoice`: an existing invoice to carry into this order\n","example":"plan","isRequired":true,"uniqueKey":"line_items.items.[INDEX].item_type","typeLabel":"enum\u003cstring>"},"item_id":{"type":"string","format":"uuid","description":"ID of the resource selected by `item_type`.","example":"603efd2d-1100-4bf1-a577-5a96f4847891","isRequired":true,"uniqueKey":"line_items.items.[INDEX].item_id","typeLabel":"string\u003cuuid>"},"quantity":{"type":"integer","minimum":1,"description":"Number of units. A `plan` must have quantity `1`; an `invoice` is always processed with quantity `1`.","example":1,"isRequired":true,"uniqueKey":"line_items.items.[INDEX].quantity","typeLabel":"integer"},"price_option_id":{"oneOf":[{"type":"string","format":"uuid","description":"For a priced line item, use the ID of the selected resource's price option\nwhose `price.currency` matches the order's `currency_code`. Retrieve the\nproduct with `GET /api/v1/product_catalogues/products/{product_id}` and\nselect the applicable option from the resource's published version. See\nthe Create Order guide for the response field used by each `item_type`.\nOmit this for an `invoice` line item; Metrifox derives the price from the\ninvoice carryover.\n","example":"85ba44aa-eb4f-47be-a84f-3b290488f1ca","uniqueKey":"line_items.items.[INDEX].price_option_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"For a priced line item, use the ID of the selected resource's price option\nwhose `price.currency` matches the order's `currency_code`. Retrieve the\nproduct with `GET /api/v1/product_catalogues/products/{product_id}` and\nselect the applicable option from the resource's published version. See\nthe Create Order guide for the response field used by each `item_type`.\nOmit this for an `invoice` line item; Metrifox derives the price from the\ninvoice carryover.\n","example":"85ba44aa-eb4f-47be-a84f-3b290488f1ca","uniqueKey":"line_items.items.[INDEX].price_option_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"line_items.items.[INDEX].price_option_id","typeLabel":"string\u003cuuid> | null"},"metadata":{"type":"object","additionalProperties":true,"default":{},"description":"Optional application-specific metadata for the line item.","uniqueKey":"line_items.items.[INDEX].metadata","typeLabel":"object"}},"uniqueKey":"line_items.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"line_items","typeLabel":"object[]"},"customer_id":{"type":"string","format":"uuid","description":"Metrifox customer ID. Provide this or `customer_key`, but not both.","uniqueKey":"customer_id","typeLabel":"string\u003cuuid>"},"customer_key":{"type":"string","description":"Your immutable customer identifier. Provide this or `customer_id`, but not both.","example":"customer-123","uniqueKey":"customer_key","typeLabel":"string"},"is_manual":{"oneOf":[{"type":"boolean","default":true,"description":"Whether the order is manually initiated.","uniqueKey":"is_manual.oneOf.0","typeLabel":"boolean"},{"type":"null","default":true,"description":"Whether the order is manually initiated.","uniqueKey":"is_manual.oneOf.1","typeLabel":"null"}],"uniqueKey":"is_manual","typeLabel":"boolean | null"},"skip_invoice":{"type":"boolean","default":false,"description":"When true, do not generate an invoice for the order.","uniqueKey":"skip_invoice","typeLabel":"boolean"},"subscription_id":{"oneOf":[{"type":"string","format":"uuid","description":"Existing subscription associated with this order.","uniqueKey":"subscription_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"Existing subscription associated with this order.","uniqueKey":"subscription_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription_id","typeLabel":"string\u003cuuid> | null"},"custom_start_date":{"oneOf":[{"type":"string","format":"date-time","description":"Custom date and time at which subscription provisioning should begin.","uniqueKey":"custom_start_date.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"Custom date and time at which subscription provisioning should begin.","uniqueKey":"custom_start_date.oneOf.1","typeLabel":"null"}],"uniqueKey":"custom_start_date","typeLabel":"string\u003cdate-time> | null"},"billing_interval":{"oneOf":[{"type":"string","enum":["daily","weekly","monthly","quarterly","biannually","yearly","once"],"description":"Billing cadence. Provide `billing_interval_value` with this field.","uniqueKey":"billing_interval.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["daily","weekly","monthly","quarterly","biannually","yearly","once"],"description":"Billing cadence. Provide `billing_interval_value` with this field.","uniqueKey":"billing_interval.oneOf.1","typeLabel":"null"}],"uniqueKey":"billing_interval","typeLabel":"enum\u003cstring> | null"},"billing_interval_value":{"oneOf":[{"type":"integer","minimum":1,"description":"Number of billing intervals. Provide `billing_interval` with this field.","uniqueKey":"billing_interval_value.oneOf.0","typeLabel":"integer"},{"type":"null","minimum":1,"description":"Number of billing intervals. Provide `billing_interval` with this field.","uniqueKey":"billing_interval_value.oneOf.1","typeLabel":"null"}],"uniqueKey":"billing_interval_value","typeLabel":"integer | null"},"status":{"type":"string","enum":["pending","draft"],"default":"pending","description":"Initial order status. Draft orders are saved without invoicing or provisioning.","uniqueKey":"status","typeLabel":"enum\u003cstring>"},"transitioning_subscription_id":{"oneOf":[{"type":"string","format":"uuid","description":"Subscription being changed or migrated by this order.","uniqueKey":"transitioning_subscription_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"Subscription being changed or migrated by this order.","uniqueKey":"transitioning_subscription_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"transitioning_subscription_id","typeLabel":"string\u003cuuid> | null"},"change_type":{"oneOf":[{"type":"string","enum":["quantity_upgrade","quantity_downgrade","upgrade","downgrade","addon_add","addon_remove","plan_migration"],"description":"Type of subscription change represented by the order.","uniqueKey":"change_type.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["quantity_upgrade","quantity_downgrade","upgrade","downgrade","addon_add","addon_remove","plan_migration"],"description":"Type of subscription change represented by the order.","uniqueKey":"change_type.oneOf.1","typeLabel":"null"}],"uniqueKey":"change_type","typeLabel":"enum\u003cstring> | null"},"policy":{"oneOf":[{"type":"object","additionalProperties":true,"description":"Plan-change policy used when transitioning an existing subscription.","uniqueKey":"policy.oneOf.0","typeLabel":"object"},{"type":"null","additionalProperties":true,"description":"Plan-change policy used when transitioning an existing subscription.","uniqueKey":"policy.oneOf.1","typeLabel":"null"}],"uniqueKey":"policy","typeLabel":"object | null"},"manual_discount_selections":{"type":"array","default":[],"items":{"type":"object","required":["discount_id"],"properties":{"discount_id":{"type":"string","format":"uuid","description":"ID of the discount to apply.","isRequired":true,"uniqueKey":"manual_discount_selections.items.[INDEX].discount_id","typeLabel":"string\u003cuuid>"},"line_item_ids":{"type":"array","items":{"type":"string","uniqueKey":"manual_discount_selections.items.[INDEX].line_item_ids.items.[INDEX]","typeLabel":"string"},"default":[],"description":"Existing line-item IDs targeted by the discount.","uniqueKey":"manual_discount_selections.items.[INDEX].line_item_ids","typeLabel":"string[]"},"price_option_ids":{"type":"array","items":{"type":"string","format":"uuid","uniqueKey":"manual_discount_selections.items.[INDEX].price_option_ids.items.[INDEX]","typeLabel":"string\u003cuuid>"},"default":[],"description":"Price-option IDs targeted by the discount.","uniqueKey":"manual_discount_selections.items.[INDEX].price_option_ids","typeLabel":"string\u003cuuid>[]"}},"uniqueKey":"manual_discount_selections.items.[INDEX]","typeLabel":"object"},"description":"Discounts explicitly selected for this order.","uniqueKey":"manual_discount_selections","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"plan_order":{"title":"plan_order","summary":"Create a plan order","value":{"currency_code":"USD","customer_key":"customer-123","line_items":[{"item_type":"plan","item_id":"603efd2d-1100-4bf1-a577-5a96f4847891","price_option_id":"85ba44aa-eb4f-47be-a84f-3b290488f1ca","quantity":1}]}},"multi_item_order":{"title":"multi_item_order","summary":"Create an order with a plan, add-on, and entitlement","value":{"currency_code":"USD","customer_key":"customer-123","billing_interval":"monthly","billing_interval_value":1,"line_items":[{"item_type":"plan","item_id":"603efd2d-1100-4bf1-a577-5a96f4847891","price_option_id":"85ba44aa-eb4f-47be-a84f-3b290488f1ca","quantity":1},{"item_type":"addon","item_id":"410e3a02-b63b-464f-bf17-80aeb394445d","price_option_id":"f9c31bac-864c-413a-ab46-4b24872f909a","quantity":2},{"item_type":"entitlement","item_id":"21398b99-c291-4147-9798-f1fbcc99bb76","price_option_id":"211eb88c-8bdc-43e0-a185-05f9f48492ca","quantity":100}]}},"invoice_carryover":{"title":"invoice_carryover","summary":"Carry an existing invoice into a new order","value":{"currency_code":"USD","customer_id":"764c80e3-ed59-44a5-ba07-7ee5ba547774","line_items":[{"item_type":"invoice","item_id":"a27366fc-b84c-4dac-af47-b750de9b2d86","quantity":1}]}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"f9fa3d3c-1097-413d-9047-1a511973e928":{"description":"Order created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":201,"uniqueKey":"statusCode","typeLabel":"integer"},"message":{"type":"string","example":"Order Created Successfully","uniqueKey":"message","typeLabel":"string"},"meta":{"type":"object","additionalProperties":true,"uniqueKey":"meta","typeLabel":"object"},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","uniqueKey":"data.id","typeLabel":"string\u003cuuid>"},"customer_id":{"type":"string","format":"uuid","uniqueKey":"data.customer_id","typeLabel":"string\u003cuuid>"},"order_number":{"oneOf":[{"type":"string","uniqueKey":"data.order_number.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"data.order_number.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.order_number","typeLabel":"string | null"},"status":{"type":"string","enum":["draft","pending","fulfilled","partially_fulfilled","refunded","failed","cancelled","abandoned","deleted"],"uniqueKey":"data.status","typeLabel":"enum\u003cstring>"},"currency_code":{"type":"string","uniqueKey":"data.currency_code","typeLabel":"string"},"subtotal_in_standard_unit":{"type":"number","format":"double","uniqueKey":"data.subtotal_in_standard_unit","typeLabel":"number\u003cdouble>"},"subtotal_before_discount_in_standard_unit":{"type":"number","format":"double","uniqueKey":"data.subtotal_before_discount_in_standard_unit","typeLabel":"number\u003cdouble>"},"discount_amount_in_standard_unit":{"type":"number","format":"double","uniqueKey":"data.discount_amount_in_standard_unit","typeLabel":"number\u003cdouble>"},"tax_amount_in_standard_unit":{"type":"number","format":"double","uniqueKey":"data.tax_amount_in_standard_unit","typeLabel":"number\u003cdouble>"},"total_in_standard_unit":{"type":"number","format":"double","uniqueKey":"data.total_in_standard_unit","typeLabel":"number\u003cdouble>"},"order_line_items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","uniqueKey":"data.order_line_items.items.[INDEX].id","typeLabel":"string\u003cuuid>"},"quantity":{"type":"integer","uniqueKey":"data.order_line_items.items.[INDEX].quantity","typeLabel":"integer"},"unit_price":{"type":"number","format":"double","uniqueKey":"data.order_line_items.items.[INDEX].unit_price","typeLabel":"number\u003cdouble>"},"total_price":{"type":"number","format":"double","uniqueKey":"data.order_line_items.items.[INDEX].total_price","typeLabel":"number\u003cdouble>"},"subtotal_before_discount":{"type":"number","format":"double","uniqueKey":"data.order_line_items.items.[INDEX].subtotal_before_discount","typeLabel":"number\u003cdouble>"},"discount_amount":{"type":"number","format":"double","uniqueKey":"data.order_line_items.items.[INDEX].discount_amount","typeLabel":"number\u003cdouble>"},"amount_before_tax":{"type":"number","format":"double","uniqueKey":"data.order_line_items.items.[INDEX].amount_before_tax","typeLabel":"number\u003cdouble>"},"tax_rate":{"type":"number","format":"double","uniqueKey":"data.order_line_items.items.[INDEX].tax_rate","typeLabel":"number\u003cdouble>"},"tax_amount":{"type":"number","format":"double","uniqueKey":"data.order_line_items.items.[INDEX].tax_amount","typeLabel":"number\u003cdouble>"},"tax_inclusive":{"type":"boolean","uniqueKey":"data.order_line_items.items.[INDEX].tax_inclusive","typeLabel":"boolean"},"name":{"oneOf":[{"type":"string","uniqueKey":"data.order_line_items.items.[INDEX].name.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"data.order_line_items.items.[INDEX].name.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.order_line_items.items.[INDEX].name","typeLabel":"string | null"},"source_type":{"type":"string","description":"Normalized source type, such as `plan`, `addon`, `entitlement`, `single_purchase`, `charge`, `credit`, or `invoice_carryover`.","uniqueKey":"data.order_line_items.items.[INDEX].source_type","typeLabel":"string"},"source_id":{"type":"string","format":"uuid","uniqueKey":"data.order_line_items.items.[INDEX].source_id","typeLabel":"string\u003cuuid>"},"invoice_id":{"oneOf":[{"type":"string","format":"uuid","uniqueKey":"data.order_line_items.items.[INDEX].invoice_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","uniqueKey":"data.order_line_items.items.[INDEX].invoice_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.order_line_items.items.[INDEX].invoice_id","typeLabel":"string\u003cuuid> | null"},"price_option":{"oneOf":[{"type":"object","additionalProperties":true,"uniqueKey":"data.order_line_items.items.[INDEX].price_option.oneOf.0","typeLabel":"object"},{"type":"null","additionalProperties":true,"uniqueKey":"data.order_line_items.items.[INDEX].price_option.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.order_line_items.items.[INDEX].price_option","typeLabel":"object | null"}},"uniqueKey":"data.order_line_items.items.[INDEX]","typeLabel":"object"},"uniqueKey":"data.order_line_items","typeLabel":"object[]"},"applied_discounts":{"type":"array","items":{"type":"object","additionalProperties":true,"uniqueKey":"data.applied_discounts.items.[INDEX]","typeLabel":"object"},"uniqueKey":"data.applied_discounts","typeLabel":"object[]"},"order_charges":{"oneOf":[{"type":"array","items":{"type":"object","additionalProperties":true,"uniqueKey":"data.order_charges.oneOf.0.items.[INDEX]","typeLabel":"object"},"uniqueKey":"data.order_charges.oneOf.0","typeLabel":"object[]"},{"type":"null","items":{"type":"object","additionalProperties":true},"uniqueKey":"data.order_charges.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.order_charges","typeLabel":"object[] | null"},"invoices":{"oneOf":[{"type":"array","items":{"type":"object","additionalProperties":true,"uniqueKey":"data.invoices.oneOf.0.items.[INDEX]","typeLabel":"object"},"uniqueKey":"data.invoices.oneOf.0","typeLabel":"object[]"},{"type":"null","items":{"type":"object","additionalProperties":true},"uniqueKey":"data.invoices.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.invoices","typeLabel":"object[] | null"},"setup_intent":{"oneOf":[{"type":"object","additionalProperties":true,"uniqueKey":"data.setup_intent.oneOf.0","typeLabel":"object"},{"type":"null","additionalProperties":true,"uniqueKey":"data.setup_intent.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.setup_intent","typeLabel":"object | null"},"is_manual":{"type":"boolean","uniqueKey":"data.is_manual","typeLabel":"boolean"},"is_sandbox":{"type":"boolean","uniqueKey":"data.is_sandbox","typeLabel":"boolean"},"customer":{"type":"object","additionalProperties":true,"uniqueKey":"data.customer","typeLabel":"object"},"payment_method":{"oneOf":[{"type":"string","uniqueKey":"data.payment_method.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"data.payment_method.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.payment_method","typeLabel":"string | null"},"billing_interval":{"oneOf":[{"type":"string","uniqueKey":"data.billing_interval.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"data.billing_interval.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.billing_interval","typeLabel":"string | null"},"billing_interval_value":{"oneOf":[{"type":"integer","uniqueKey":"data.billing_interval_value.oneOf.0","typeLabel":"integer"},{"type":"null","uniqueKey":"data.billing_interval_value.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.billing_interval_value","typeLabel":"integer | null"},"subscription_id":{"oneOf":[{"type":"string","format":"uuid","uniqueKey":"data.subscription_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","uniqueKey":"data.subscription_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.subscription_id","typeLabel":"string\u003cuuid> | null"},"subscription_config":{"oneOf":[{"type":"object","additionalProperties":true,"uniqueKey":"data.subscription_config.oneOf.0","typeLabel":"object"},{"type":"null","additionalProperties":true,"uniqueKey":"data.subscription_config.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.subscription_config","typeLabel":"object | null"},"policy":{"oneOf":[{"type":"object","additionalProperties":true,"uniqueKey":"data.policy.oneOf.0","typeLabel":"object"},{"type":"null","additionalProperties":true,"uniqueKey":"data.policy.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.policy","typeLabel":"object | null"},"should_collect_payment":{"type":"boolean","uniqueKey":"data.should_collect_payment","typeLabel":"boolean"},"should_collect_card":{"type":"boolean","uniqueKey":"data.should_collect_card","typeLabel":"boolean"},"manual_discount_selections":{"type":"array","items":{"type":"object","additionalProperties":true,"uniqueKey":"data.manual_discount_selections.items.[INDEX]","typeLabel":"object"},"uniqueKey":"data.manual_discount_selections","typeLabel":"object[]"},"created_at":{"type":"string","format":"date-time","uniqueKey":"data.created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"data.updated_at","typeLabel":"string\u003cdate-time>"}},"uniqueKey":"data","typeLabel":"object"},"errors":{"type":"object","additionalProperties":true,"uniqueKey":"errors","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"created":{"title":"created","summary":"Created order","value":{"statusCode":201,"message":"Order Created Successfully","meta":{},"data":{"id":"a8c9fc2f-6841-48ae-8496-ceca19be5a3d","customer_id":"764c80e3-ed59-44a5-ba07-7ee5ba547774","order_number":"ORD-1042","status":"pending","currency_code":"USD","subtotal_in_standard_unit":49,"subtotal_before_discount_in_standard_unit":49,"discount_amount_in_standard_unit":0,"tax_amount_in_standard_unit":0,"total_in_standard_unit":49,"order_line_items":[{"id":"947ac9c3-b7b6-4e52-a57d-220f835761cb","quantity":1,"unit_price":49,"total_price":49,"subtotal_before_discount":49,"discount_amount":0,"amount_before_tax":49,"tax_rate":0,"tax_amount":0,"tax_inclusive":false,"name":"Pro","source_type":"plan","source_id":"603efd2d-1100-4bf1-a577-5a96f4847891","invoice_id":null}],"applied_discounts":[],"order_charges":[],"invoices":[],"setup_intent":null,"is_manual":true,"is_sandbox":false,"customer":{},"payment_method":null,"billing_interval":"monthly","billing_interval_value":1,"subscription_id":null,"subscription_config":null,"policy":null,"should_collect_payment":true,"should_collect_card":false,"manual_discount_selections":[],"created_at":"2026-10-07T09:30:00Z","updated_at":"2026-10-07T09:30:00Z"},"errors":{}}}},"exampleType":"examples"}},"exampleType":"examples"},"7cc2c9a1-5634-4ca8-8633-f72ad8f93c54":{"description":"Invalid order data or line item","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message","uniqueKey":"message","typeLabel":"string"},"errors":{"type":"object","additionalProperties":true,"description":"Detailed error information","uniqueKey":"errors","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"\u003cstring>","errors":{}}}},"exampleType":"generated"}},"exampleType":"generated"},"5c729eb1-2efc-46a0-8d5f-2aaa20899a8c":{"description":"Missing, invalid, revoked, or read-only API key","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message","uniqueKey":"message","typeLabel":"string"},"errors":{"type":"object","additionalProperties":true,"description":"Detailed error information","uniqueKey":"errors","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"\u003cstring>","errors":{}}}},"exampleType":"generated"}},"exampleType":"generated"},"0e7d2b7b-967f-4c7c-b421-eac9aeace72c":{"description":"Customer, line-item resource, or price option not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message","uniqueKey":"message","typeLabel":"string"},"errors":{"type":"object","additionalProperties":true,"description":"Detailed error information","uniqueKey":"errors","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"\u003cstring>","errors":{}}}},"exampleType":"generated"}},"exampleType":"generated"},"eef73f8b-409e-4bc1-ad9d-4c5322858867":{"description":"Order could not be processed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message","uniqueKey":"message","typeLabel":"string"},"errors":{"type":"object","additionalProperties":true,"description":"Detailed error information","uniqueKey":"errors","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"\u003cstring>","errors":{}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"5fdc92ad-0d81-4605-a964-5172ec28d0f8":{"api_key":{"type":"apiKey","name":"x-api-key","in":"header","scopes":[],"schemeName":"api_key"}}},"servers":{"960802e0-6fb1-426c-b0db-f9d432d75e8e":{"url":"https://{defaultHost}","variables":{"defaultHost":{"default":"api.metrifox.com"}}}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","name":"x-api-key","in":"header","scopes":[],"schemeName":"api_key"},"schema":{"title":"x-api-key","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"api_key","name":"x-api-key"}],"title":"api_key"}]},"originalFileLocation":"api-reference/endpoint/openapi-bundled.yml"},"subdomain":"metrifox","siteName":"Metrifox","title":"Create Order - Metrifox","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-07T15:21:18.941Z","originalFileLocation":"api-reference/orders/create.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Create an order for an existing customer\">\u003cmeta data-mint-head name=\"application-name\" content=\"Metrifox\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/metrifox/wa_fSbDqW_qqXZ3b/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/metrifox/wa_fSbDqW_qqXZ3b/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/metrifox/wa_fSbDqW_qqXZ3b/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/metrifox/wa_fSbDqW_qqXZ3b/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/metrifox/wa_fSbDqW_qqXZ3b/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/metrifox/wa_fSbDqW_qqXZ3b/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/metrifox/wa_fSbDqW_qqXZ3b/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/metrifox/wa_fSbDqW_qqXZ3b/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/metrifox/wa_fSbDqW_qqXZ3b/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create Order - Metrifox\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create an order for an existing customer\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Metrifox\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.metrifox.com/api-reference/orders/create\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://metrifox.mintlify.site/_mintlify/api/og/v2?division=Orders\u0026amp;title=Create+Order\u0026amp;description=Create+an+order+for+an+existing+customer\u0026amp;theme=c6813e1a8eec3e66044bc0b4\u0026amp;signature=322052feb80e7925d52f6fee55df63a2cb63c7f8777b25de8301c4f502a2931a\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create Order - Metrifox\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create an order for an existing customer\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://metrifox.mintlify.site/_mintlify/api/og/v2?division=Orders\u0026amp;title=Create+Order\u0026amp;description=Create+an+order+for+an+existing+customer\u0026amp;theme=c6813e1a8eec3e66044bc0b4\u0026amp;signature=322052feb80e7925d52f6fee55df63a2cb63c7f8777b25de8301c4f502a2931a\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/metrifox/wa_fSbDqW_qqXZ3b/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Metrifox\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#B7CB56\">\u003cmeta data-mint-head name=\"google-site-verification\" content=\"gfPRXNDZQXHy-C4TzhCy6gBUxzJfC6UouBuooMmgH-k\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.metrifox.com/api-reference/orders/create\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/orders/create.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.metrifox.com/#organization\",\"name\":\"Metrifox\",\"url\":\"https://docs.metrifox.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/metrifox/3lVK9D4biomYU0kB/logo/light.png?fit=max\u0026auto=format\u0026n=3lVK9D4biomYU0kB\u0026q=85\u0026s=cc75d1a9c11ce759bec6edc62c8ef4e0\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.metrifox.com#website\",\"name\":\"Metrifox\",\"url\":\"https://docs.metrifox.com\",\"publisher\":{\"@id\":\"https://docs.metrifox.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.metrifox.com/api-reference/orders/create#webpage\",\"url\":\"https://docs.metrifox.com/api-reference/orders/create\",\"name\":\"Create Order\",\"description\":\"Create an order for an existing customer\",\"dateModified\":\"2026-10-07T15:21:18.941Z\",\"isPartOf\":{\"@id\":\"https://docs.metrifox.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.metrifox.com/api-reference/orders/create#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.metrifox.com/api-reference/orders/create#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Metrifox\",\"item\":\"https://docs.metrifox.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create Order\",\"item\":\"https://docs.metrifox.com/api-reference/orders/create\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.metrifox.com/api-reference/orders/create#apireference\",\"headline\":\"Create Order\",\"name\":\"Create Order\",\"description\":\"Create an order for an existing customer\",\"url\":\"https://docs.metrifox.com/api-reference/orders/create\",\"mainEntityOfPage\":{\"@id\":\"https://docs.metrifox.com/api-reference/orders/create#webpage\"},\"dateModified\":\"2026-10-07T15:21:18.941Z\",\"publisher\":{\"@id\":\"https://docs.metrifox.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.metrifox.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Metrifox\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Metrifox\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/orders/create.md","siteName":"Metrifox","nav":{"global":{"anchors":[{"anchor":"Blog","icon":"newspaper","href":"https://metrifox.com/blog"},{"anchor":"System Status","icon":"gauge","href":"https://status.metrifox.com"}]},"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":"/welcome"}]},{"tab":"API Reference","groups":[{"group":"API Documentation","pages":[{"title":"🔐 Authentication","href":"/api-reference/authentication"}]},{"group":"Customers","pages":[{"title":"Get Customers","openapi":"GET /api/v1/customers","href":"/api-reference/customers/get"},{"title":"Create Customer","openapi":"POST /api/v1/customers","href":"/api-reference/customers/post"},{"title":"Get One Customer","openapi":"GET /api/v1/customers/{customer_key}","href":"/api-reference/customers/get-one"},{"title":"Update Customer","openapi":"PUT /api/v1/customers/{customer_key}","href":"/api-reference/customers/update"},{"title":"Delete a Customer","openapi":"DELETE /api/v1/customers/{customer_key}","href":"/api-reference/customers/delete"},{"title":"Archive Customer","openapi":"POST /api/v1/customers/{customer_key}/archive","href":"/api-reference/customers/archive"},{"title":"Unarchive Customer","openapi":"POST /api/v1/customers/{customer_key}/unarchive","href":"/api-reference/customers/unarchive"},{"title":"Bulk Create Customers","openapi":"POST /api/v1/customers/bulk-create","href":"/api-reference/customers/bulk-create"},{"title":"Upload Customers in Bulk via CSV","openapi":"POST /api/v1/customers/csv-upload","href":"/api-reference/customers/upload-csv"},{"title":"Get a customer's subscription details","openapi":"GET /api/v1/customers/{customer_key}/details","href":"/api-reference/customers/details"},{"title":"Check Active Subscription","openapi":"GET /api/v1/customers/{customer_key}/check-active-subscription","description":"Check if a customer has an active subscription","href":"/api-reference/customers/check-active-subscription"}]},{"group":"Orders","pages":[{"title":"Create Order","openapi":"POST /api/v1/orders","href":"/api-reference/orders/create"}]},{"group":"Subscriptions","pages":[{"title":"Get entitlements usage","openapi":"GET /api/v1/subscriptions/{subscription_id}/v2/entitlements-usage","description":"Retrieve entitlements usage breakdown for a subscription, including purchased, included, pay-as-you-go, and rollover pools","href":"/api-reference/subscriptions/entitlements-usage"},{"title":"Get entitlements summary","openapi":"GET /api/v1/subscriptions/{subscription_id}/v2/entitlements-summary","href":"/api-reference/subscriptions/entitlements-summary"},{"title":"Get billing history","openapi":"GET /api/v1/subscriptions/{subscription_id}/billing-history","href":"/api-reference/subscriptions/billing-history"},{"title":"Top up credits on a subscription","openapi":"POST /api/v1/subscriptions/{subscription_id}/topup_credits","href":"/api-reference/subscriptions/topup-credits"},{"title":"Bulk assign plan","openapi":"POST /api/v1/subscriptions/bulk-assign-plan","href":"/api-reference/subscriptions/bulk-assign-plan"},{"title":"Cancel subscription","openapi":"POST /api/v1/subscriptions/{subscription_id}/schedule-cancellation","href":"/api-reference/subscriptions/cancel"}]},{"group":"Promotional Entitlements","pages":[{"title":"List promotional entitlements","openapi":"GET /api/v1/product_catalogues/promotional-entitlements","href":"/api-reference/promotional-entitlements/list"},{"title":"Get promotional entitlement","openapi":"GET /api/v1/product_catalogues/promotional-entitlements/{id}","href":"/api-reference/promotional-entitlements/get"},{"title":"Grant promotional entitlement","openapi":"POST /api/v1/product_catalogues/promotional-entitlements/{id}/apply","href":"/api-reference/promotional-entitlements/grant"},{"title":"Revoke promotional entitlement","openapi":"POST /api/v1/product_catalogues/promotional-entitlements/{id}/revoke","href":"/api-reference/promotional-entitlements/revoke"},{"title":"List promotional entitlement customers","openapi":"GET /api/v1/product_catalogues/promotional-entitlements/{id}/customers","href":"/api-reference/promotional-entitlements/customers"}]},{"group":"Promotional Credits","pages":[{"title":"List promotional credits","openapi":"GET /api/v1/credit_systems/promotional-credits","href":"/api-reference/promotional-credits/list"},{"title":"Get promotional credit","openapi":"GET /api/v1/credit_systems/promotional-credits/{id}","href":"/api-reference/promotional-credits/get"},{"title":"Grant promotional credit","openapi":"POST /api/v1/credit_systems/promotional-credits/{id}/apply","href":"/api-reference/promotional-credits/grant"},{"title":"Revoke promotional credit","openapi":"POST /api/v1/credit_systems/promotional-credits/{id}/revoke","href":"/api-reference/promotional-credits/revoke"},{"title":"List promotional credit customers","openapi":"GET /api/v1/credit_systems/promotional-credits/{id}/customers","href":"/api-reference/promotional-credits/customers"}]},{"group":"Wallets","pages":[{"title":"List a customer's wallets","openapi":"GET /api/v1/credit_systems/v2/wallets","href":"/api-reference/wallets/list"},{"title":"List credit allocations for a wallet","openapi":"GET /api/v1/credit_systems/v2/wallets/{id}/credit-allocations","href":"/api-reference/wallets/credit-allocations"},{"title":"Get a credit allocation","openapi":"GET /api/v1/credit_systems/v2/credit-allocations/{id}","href":"/api-reference/wallets/credit-allocation"},{"title":"List a customer's wallet transactions","openapi":"GET /api/v1/credit_systems/v2/wallets/transactions","href":"/api-reference/wallets/transactions"},{"title":"List transactions for a wallet","openapi":"GET /api/v1/credit_systems/v2/wallets/{id}/transactions","href":"/api-reference/wallets/wallet-transactions"}]},{"group":"Invoices","pages":[{"title":"Record a manual payment","openapi":"POST /api/v1/invoices/{invoice_id}/record-manual-payment","href":"/api-reference/invoices/record-manual-payment"}]},{"group":"Usage","pages":[{"title":"Check User Access","openapi":"GET /usage/access","href":"/api-reference/usage/check-access"},{"title":"Check Access \u0026 Record","openapi":"POST /usage/access","href":"/api-reference/usage/check-and-record"},{"title":"Record a Usage Event","openapi":"POST /usage/events","href":"/api-reference/usage/record-usage"},{"title":"Adjust a Usage Event","openapi":"POST /usage/events/adjust","href":"/api-reference/usage/adjust-usage"},{"title":"Get All Usage Events","openapi":"GET /usage/events","href":"/api-reference/usage/get-usage-events"}]},{"group":"Finance","pages":[{"title":"Get Quantity Price","openapi":"GET /api/v1/usage/quantity-price","href":"/api-reference/finance/compute-quantity-price"}]},{"group":"Checkout","pages":[{"title":"Generate Checkout URL","openapi":"GET /api/v1/products/offerings/generate-checkout-url","href":"/api-reference/checkout/generate-url"},{"title":"Generate Card Collection URL","openapi":"GET /api/v1/checkout/generate-card-collection-url","href":"/api-reference/checkout/generate-card-collection-url"}]},{"group":"Webhooks","pages":[{"group":"Events","pages":[{"title":"Customer Created","href":"/api-reference/webhooks/events/customer-created"},{"title":"Customer Updated","href":"/api-reference/webhooks/events/customer-updated"},{"title":"Customer Deleted","href":"/api-reference/webhooks/events/customer-deleted"},{"title":"Order Created","href":"/api-reference/webhooks/events/order-created"},{"title":"Subscription Created","href":"/api-reference/webhooks/events/subscription-created"},{"title":"Subscription Cancelled","href":"/api-reference/webhooks/events/subscription-cancelled"},{"title":"Subscription Cancel Scheduled","href":"/api-reference/webhooks/events/subscription-cancel-scheduled"},{"title":"Invoice Created","href":"/api-reference/webhooks/events/invoice-created"},{"title":"Credit Purchased","href":"/api-reference/webhooks/events/credit-purchased"}]}]}]},{"tab":"SDKs","pages":[{"title":"SDKs","href":"/sdks/overview"}]}]},"basePath":"","title":"Create Order - Metrifox","deploymentId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","buildId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CiUHMMOm.js","snippetPresets-BgfXU7Bw.js","utils-DWvOwgy_.js","style-to-object-BY3JEAdk.js","utils-BN7RXSMJ.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-CFw8bq89.js","conditional-requirements-CFM0id0Q.js","cloneDeep-CAwdfOU2.js","_Uint8Array-BJr8e-ZL.js","isObject-FP1Yky1u.js","ApiExamples-XX0UgMZK.js","usePlaygroundInputsStore-DXDFSa1V.js","shallow-CdX5aREi.js","isEqual-CoOaxexF.js","CodeSnippets-Cg2wpzWm.js","CodeSnippet-D_HwgQO_.js","getApiPlaygroundDisplay-CmCoerhe.js","Page-CVJ-f_k1.js","DynamicMarkdown-CQM9Bhbv.js","SectionHeading-DpbrP8nQ.js","icon-BPCgijHy.js","MethodPill-GQ8DuY0c.js","getPastedJson-Cb5mT31m.js","Check2Icon-a7bUI6e8.js","axios-CsQoIw0U.js","Markdown-CX2QY19L.js","AssistantPageLink-CY3bFglh.js","dist-Dl6_zDnT.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}