Prices one product for one named buyer and returns a private checkout link made out to
them. The price, the quantity and the buyer are settled here and are read-only on the
offer page, so everything the order will need has to be supplied in this request. The
offer accepts the payment methods the product already accepts; they cannot be chosen per
offer. Creating an offer does not notify the buyer — the link comes back as public_url
and is yours to send.
The body is read exactly as written. A member this reference does not list, at any
depth, is refused with 400 invalid_request rather than ignored, and so is a value of
the wrong JSON type — "24900" is not read as the integer 24900 — and any parameter
sent in the query string. The one member read without being listed is the name the
first edition of this reference gave product_id, still accepted in its place. An
explicit null for any member, at any depth, is read as leaving it out. A body that
names no product_id is a 400 too; 404 means the product named is not one you can sell.
Choosing a payment plan
pricing.plan_type decides the rest of the body. Send the fields its row asks for;
every other field under pricing is optional under all three plan types.
plan_type
What the buyer is charged
Send alongside plan_type and price_minor_units
one_time
price_minor_units, once.
nothing
subscription
price_minor_units now, then recurring_amount_minor_units every billing period until the subscription is cancelled.
price_minor_units now, then recurring_amount_minor_units every billing period until installment_count payments have been made in total, counting the first.
The billing period is interval × interval_count — month × 3 bills quarterly — and a
single period may not be longer than two years. second_payment_in, trial_days,
shipping_price_minor_units and custom_plan_name stay optional under every plan type.
installment is accepted only from sellers enabled for installment sales; one_time and
subscription are open to every seller.
The currency is the one line in the examples below that is not yours to copy: it must be
one the seller can actually be paid in, which means a currency COPE charges in that is also
the currency of one of the seller’s payout bank accounts. The currencies of the product’s own
payment plans are not considered. The examples are priced in EUR, and a seller whose payout
accounts are all in USD is refused with 422 validation_failed, errors[].parampricing.currency, naming the currencies they can use — no offer is created. Send theirs.
Without pricing.trial_days, the buyer gets the product’s own free trial
(trial_period_days), whatever the plan_type, one_time included. Send trial_days: 0
for no trial.
Selling more than one product
Send extra_lines to sell other products of yours on the same offer. Each names its product,
quantity and pricing, read as the top-level pricing is: its own plan type, price and
trial, in the offer’s currency. The buyer sees each as an ordinary line and pays for all of
them in one checkout. The offer takes the payment methods product_id accepts; an extra
product does not narrow them.
Opening the offer inside your own page
By default the buyer follows public_url, which redirects them to the offer’s checkout on
COPE. Send embed_origin instead and the same checkout can be framed in your own page:
the offer comes back with an embed_url and embed_origin echoing the one origin allowed
to frame it. Both are absent — not null — on an offer that cannot be framed, and
public_url keeps working either way.
Hand both to the Checkout SDK’s mountCheckout rather
than building the iframe yourself: the framed page waits for a mount handshake from its
parent before it starts, so a bare <iframe src=embed_url> never loads.
embed_origin must be an origin you have already registered and enabled for checkout
embedding. An origin you have not registered, one another seller registered, and one that
has been disabled or archived are each refused with 422 embed_origin_not_allowed, and no
offer is created. Disabling or archiving the origin afterwards stops every offer embed
bound to it.
Matching the order to your own records
Send external_reference — your customer, deal or quote id — and any metadata of your
own. Both are returned on the offer, and once the buyer pays, the order the offer becomes
carries them on every order and payment webhook: in metadata on cart.order.created and
cart.order.completed, and in order.metadata on every payment.* event, with
order.source set to offer. The buyer cannot change them on the offer’s checkout.
Identify the order by its id, not by the reference: a checkout link can carry the same
external_reference. Once the offer is paid, retrieving it returns order.id, the order
the payment webhooks name; use external_reference to group that order with your own
record. external_reference is a reserved key: send it as its own member, never inside
metadata, where it is refused with 422 reserved_metadata_key.
Requires the orders permission at write. An API key holds a permission at the lower of its own level (read for a read-only key) and its holder’s role; a key without it is refused with 403.
Bearer credential for the public API: a live COPE API key (ck_live_*; keys issued earlier as cope_sk_live_* keep working). Dashboard sign-in tokens are not accepted.
Headers
Idempotency-Key
string
required
Required. At most 255 characters of valid UTF-8 with no NUL byte. A retry that carries the same key and the same body returns the original response instead of performing the write a second time. The same key with a different body is refused with 409 idempotency_conflict. Keys are remembered for 24 hours. A returned original response carries the header Idempotent-Replayed: true.
Maximum string length: 255
Body
application/json
buyer
object
required
Show child attributes
currency
string
required
Currency of the offer, as an ISO 4217 code. It must be one the seller can be paid in: a currency COPE charges in that is also the currency of one of the seller's payout bank accounts. The currencies of the product's own payment plans are not considered. Anything else is refused with 422 validation_failed, errors[].parampricing.currency, naming the currencies the seller can use.
Pattern: ^[A-Z]{3}$
pricing
object
required
Shape and amounts of the payment. plan_type decides which of the fields below you have to send: one_time needs nothing beyond price_minor_units; subscription also needs recurring_amount_minor_units, interval and interval_count; installment needs those three and installment_count as well. Every other field here is optional under all three.
Show child attributes
product_id
string
required
Product the offer sells. It must belong to the seller the token is issued for; any other product answers 404.
Pattern: ^prod_[A-Za-z0-9]{8,32}$
Example:
"prod_A1b2C3d4"
embed_origin
string
Origin allowed to frame this offer's checkout, so the buyer can pay inside your own page instead of following the redirect. It must be one you have already registered and enabled for checkout embedding; anything else — including an origin another seller registered — is refused with 422 embed_origin_not_allowed and no offer is created. Omit it for a redirect-only offer.
Pattern: ^https://[^@/?#\s]+$
external_reference
string
Your own reference for this sale — a customer, deal or quote id. It is returned on the offer and arrives on every order and payment webhook for the order the offer becomes, as metadata.external_reference. A blank value is refused.
Required string length: 1 - 255
extra_lines
object[]
Other products on the same offer, each with its own plan type, price and trial, in the order the buyer sees them. The buyer pays for all of them in one checkout and can change none of them. The offer accepts the payment methods product_id accepts, whatever the extra products accept. Products the buyer could not pay for in one checkout are refused with 422 and errors[].paramextra_lines: mixed_vat_mode_cart when a Non-ESS product would share them with one that is not, mixed_seller_cart when they are sold under different legal entities of your business.
Show child attributes
link_expiration
object
Omit the object entirely to issue a link that never expires.
Show child attributes
metadata
object
Your own key-value data for this sale. It is returned on the offer and arrives on every order and payment webhook for the order the offer becomes, as metadata, beside external_reference. At most 50 entries at any level, 4 levels of nesting, keys of up to 64 characters, and 8 KB as JSON with external_reference included; anything larger is refused with 422 validation_failed. external_reference and the keys COPE uses itself (intended_payment_method, authority_kind, clerk_user_id, event_sales_session_id, seller_device_id) are refused inside it.
quantity
integer
default:1
Units of the product on the offer. More than 1 only when the product lets a buyer choose a quantity, and then up to its own maximum; anything else is refused with 422 quantity_not_allowed.
Required range: 1 <= x <= 1000
Response
Successful response
data
object
required
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"COPE","description":"COPE developer documentation: the public API, the Checkout SDK, webhooks, and AI agents.","colors":{"primary":"#101828","light":"#344054","dark":"#F9FAFB"},"api":{"mdx":{"auth":{"method":"bearer"}}},"navbar":{"links":[{"href":"https://cope.com","label":"COPE"},{"href":"https://app.cope.com","label":"App"},{"href":"/ai-agents/merchant-assistant","label":"MCP"}]},"footer":{"socials":{}},"styling":{"eyebrows":"breadcrumbs","codeblocks":{"theme":{"light":"github-light","dark":"github-dark"}},"latex":false},"contextual":{"options":["copy","view","chatgpt","claude","mcp"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"cope-demo","hasAudioNarration":false,"actualSubdomain":"cope-demo","customDomains":["docs.staging.cope-demo.com"],"gitSource":{"type":"github","owner":"copecart","repo":"cope","deployBranch":"new_architecture","contentDirectory":"apps/cope-docs","isPrivate":false,"mountPath":"","label":""},"entitlements":{},"buildId":"6b01b8ac3b287a20965722fd","clientVersion":"0.0.4270","searchFilterCounts":[{"language":"default","tag":"Public API","count":62},{"language":"default","tag":"Webhooks","count":56},{"language":"default","tag":"Commerce","count":42},{"language":"default","tag":"Event Reference","count":34},{"language":"default","tag":"API Reference","count":16},{"language":"default","tag":"Subscriptions","count":14},{"language":"default","tag":"Products","count":9},{"language":"default","tag":"Payouts","count":8},{"language":"default","tag":"Payments","count":7},{"language":"default","tag":"Disputes","count":6}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"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":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"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/offers/create-an-offer","slug":"/api-reference/offers/create-an-offer","pageMetadata":{"title":"Create an offer","description":"Prices one product for one named buyer and returns a private checkout link made out to\nthem. The price, the quantity and the buyer are settled here and are read-only on the\noffer page, so everything the order will need has to be supplied in this request. The\noffer accepts the payment methods the product already accepts; they cannot be chosen per\noffer. Creating an offer does not notify the buyer — the link comes back as `public_url`\nand is yours to send.\n\nThe body is read exactly as written. A member this reference does not list, at any\ndepth, is refused with 400 `invalid_request` rather than ignored, and so is a value of\nthe wrong JSON type — `\"24900\"` is not read as the integer 24900 — and any parameter\nsent in the query string. The one member read without being listed is the name the\nfirst edition of this reference gave `product_id`, still accepted in its place. An\nexplicit `null` for any member, at any depth, is read as leaving it out. A body that\nnames no `product_id` is a 400 too; 404 means the product named is not one you can sell.\n\n### Choosing a payment plan\n\n`pricing.plan_type` decides the rest of the body. Send the fields its row asks for;\nevery other field under `pricing` is optional under all three plan types.\n\n| `plan_type` | What the buyer is charged | Send alongside `plan_type` and `price_minor_units` |\n| --- | --- | --- |\n| `one_time` | `price_minor_units`, once. | nothing |\n| `subscription` | `price_minor_units` now, then `recurring_amount_minor_units` every billing period until the subscription is cancelled. | `recurring_amount_minor_units`, `interval`, `interval_count` |\n| `installment` | `price_minor_units` now, then `recurring_amount_minor_units` every billing period until `installment_count` payments have been made in total, counting the first. | `recurring_amount_minor_units`, `interval`, `interval_count`, `installment_count` |\n\nThe billing period is `interval` × `interval_count` — `month` × 3 bills quarterly — and a\nsingle period may not be longer than two years. `second_payment_in`, `trial_days`,\n`shipping_price_minor_units` and `custom_plan_name` stay optional under every plan type.\n`installment` is accepted only from sellers enabled for installment sales; `one_time` and\n`subscription` are open to every seller.\n\nThe `currency` is the one line in the examples below that is not yours to copy: it must be\none the seller can actually be paid in, which means a currency COPE charges in that is also\nthe currency of one of the seller's payout bank accounts. The currencies of the product's own\npayment plans are not considered. The examples are priced in EUR, and a seller whose payout\naccounts are all in USD is refused with 422 `validation_failed`, `errors[].param`\n`pricing.currency`, naming the currencies they can use — no offer is created. Send theirs.\n\nWithout `pricing.trial_days`, the buyer gets the product's own free trial\n(`trial_period_days`), whatever the `plan_type`, `one_time` included. Send `trial_days: 0`\nfor no trial.\n\n### Selling more than one product\n\nSend `extra_lines` to sell other products of yours on the same offer. Each names its product,\nquantity and `pricing`, read as the top-level `pricing` is: its own plan type, price and\ntrial, in the offer's `currency`. The buyer sees each as an ordinary line and pays for all of\nthem in one checkout. The offer takes the payment methods `product_id` accepts; an extra\nproduct does not narrow them.\n\n### Opening the offer inside your own page\n\nBy default the buyer follows `public_url`, which redirects them to the offer's checkout on\nCOPE. Send `embed_origin` instead and the same checkout can be framed in your own page:\nthe offer comes back with an `embed_url` and `embed_origin` echoing the one origin allowed\nto frame it. Both are absent — not null — on an offer that cannot be framed, and\n`public_url` keeps working either way.\n\nHand both to the Checkout SDK's `mountCheckout` rather\nthan building the iframe yourself: the framed page waits for a mount handshake from its\nparent before it starts, so a bare `\u003ciframe src=embed_url>` never loads.\n\n`embed_origin` must be an origin you have already registered and enabled for checkout\nembedding. An origin you have not registered, one another seller registered, and one that\nhas been disabled or archived are each refused with 422 `embed_origin_not_allowed`, and no\noffer is created. Disabling or archiving the origin afterwards stops every offer embed\nbound to it.\n\n### Matching the order to your own records\n\nSend `external_reference` — your customer, deal or quote id — and any `metadata` of your\nown. Both are returned on the offer, and once the buyer pays, the order the offer becomes\ncarries them on every order and payment webhook: in `metadata` on `cart.order.created` and\n`cart.order.completed`, and in `order.metadata` on every `payment.*` event, with\n`order.source` set to `offer`. The buyer cannot change them on the offer's checkout.\n\nIdentify the order by its id, not by the reference: a checkout link can carry the same\n`external_reference`. Once the offer is paid, retrieving it returns `order.id`, the order\nthe payment webhooks name; use `external_reference` to group that order with your own\nrecord. `external_reference` is a reserved key: send it as its own member, never inside\n`metadata`, where it is refused with 422 `reserved_metadata_key`.\n\nRequires the `orders` permission at `write`. An API key holds a permission at the lower of its own level (`read` for a read-only key) and its holder's role; a key without it is refused with 403.","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json post /v1/commerce/offers","href":"/api-reference/offers/create-an-offer","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n h3: \"h3\",\n p: \"p\",\n table: \"table\",\n tbody: \"tbody\",\n td: \"td\",\n th: \"th\",\n thead: \"thead\",\n tr: \"tr\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"Prices one product for one named buyer and returns a private checkout link made out to\\nthem. The price, the quantity and the buyer are settled here and are read-only on the\\noffer page, so everything the order will need has to be supplied in this request. The\\noffer accepts the payment methods the product already accepts; they cannot be chosen per\\noffer. Creating an offer does not notify the buyer — the link comes back as \", _jsx(_components.code, {\n children: \"public_url\"\n }), \"\\nand is yours to send.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The body is read exactly as written. A member this reference does not list, at any\\ndepth, is refused with 400 \", _jsx(_components.code, {\n children: \"invalid_request\"\n }), \" rather than ignored, and so is a value of\\nthe wrong JSON type — \", _jsx(_components.code, {\n children: \"\\\"24900\\\"\"\n }), \" is not read as the integer 24900 — and any parameter\\nsent in the query string. The one member read without being listed is the name the\\nfirst edition of this reference gave \", _jsx(_components.code, {\n children: \"product_id\"\n }), \", still accepted in its place. An\\nexplicit \", _jsx(_components.code, {\n children: \"null\"\n }), \" for any member, at any depth, is read as leaving it out. A body that\\nnames no \", _jsx(_components.code, {\n children: \"product_id\"\n }), \" is a 400 too; 404 means the product named is not one you can sell.\"]\n }), \"\\n\", _jsx(_components.h3, {\n children: \"Choosing a payment plan\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.code, {\n children: \"pricing.plan_type\"\n }), \" decides the rest of the body. Send the fields its row asks for;\\nevery other field under \", _jsx(_components.code, {\n children: \"pricing\"\n }), \" is optional under all three plan types.\"]\n }), \"\\n\", _jsxs(_components.table, {\n children: [_jsx(_components.thead, {\n children: _jsxs(_components.tr, {\n children: [_jsx(_components.th, {\n children: _jsx(_components.code, {\n children: \"plan_type\"\n })\n }), _jsx(_components.th, {\n children: \"What the buyer is charged\"\n }), _jsxs(_components.th, {\n children: [\"Send alongside \", _jsx(_components.code, {\n children: \"plan_type\"\n }), \" and \", _jsx(_components.code, {\n children: \"price_minor_units\"\n })]\n })]\n })\n }), _jsxs(_components.tbody, {\n children: [_jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"one_time\"\n })\n }), _jsxs(_components.td, {\n children: [_jsx(_components.code, {\n children: \"price_minor_units\"\n }), \", once.\"]\n }), _jsx(_components.td, {\n children: \"nothing\"\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"subscription\"\n })\n }), _jsxs(_components.td, {\n children: [_jsx(_components.code, {\n children: \"price_minor_units\"\n }), \" now, then \", _jsx(_components.code, {\n children: \"recurring_amount_minor_units\"\n }), \" every billing period until the subscription is cancelled.\"]\n }), _jsxs(_components.td, {\n children: [_jsx(_components.code, {\n children: \"recurring_amount_minor_units\"\n }), \", \", _jsx(_components.code, {\n children: \"interval\"\n }), \", \", _jsx(_components.code, {\n children: \"interval_count\"\n })]\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"installment\"\n })\n }), _jsxs(_components.td, {\n children: [_jsx(_components.code, {\n children: \"price_minor_units\"\n }), \" now, then \", _jsx(_components.code, {\n children: \"recurring_amount_minor_units\"\n }), \" every billing period until \", _jsx(_components.code, {\n children: \"installment_count\"\n }), \" payments have been made in total, counting the first.\"]\n }), _jsxs(_components.td, {\n children: [_jsx(_components.code, {\n children: \"recurring_amount_minor_units\"\n }), \", \", _jsx(_components.code, {\n children: \"interval\"\n }), \", \", _jsx(_components.code, {\n children: \"interval_count\"\n }), \", \", _jsx(_components.code, {\n children: \"installment_count\"\n })]\n })]\n })]\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The billing period is \", _jsx(_components.code, {\n children: \"interval\"\n }), \" × \", _jsx(_components.code, {\n children: \"interval_count\"\n }), \" — \", _jsx(_components.code, {\n children: \"month\"\n }), \" × 3 bills quarterly — and a\\nsingle period may not be longer than two years. \", _jsx(_components.code, {\n children: \"second_payment_in\"\n }), \", \", _jsx(_components.code, {\n children: \"trial_days\"\n }), \",\\n\", _jsx(_components.code, {\n children: \"shipping_price_minor_units\"\n }), \" and \", _jsx(_components.code, {\n children: \"custom_plan_name\"\n }), \" stay optional under every plan type.\\n\", _jsx(_components.code, {\n children: \"installment\"\n }), \" is accepted only from sellers enabled for installment sales; \", _jsx(_components.code, {\n children: \"one_time\"\n }), \" and\\n\", _jsx(_components.code, {\n children: \"subscription\"\n }), \" are open to every seller.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The \", _jsx(_components.code, {\n children: \"currency\"\n }), \" is the one line in the examples below that is not yours to copy: it must be\\none the seller can actually be paid in, which means a currency COPE charges in that is also\\nthe currency of one of the seller’s payout bank accounts. The currencies of the product’s own\\npayment plans are not considered. The examples are priced in EUR, and a seller whose payout\\naccounts are all in USD is refused with 422 \", _jsx(_components.code, {\n children: \"validation_failed\"\n }), \", \", _jsx(_components.code, {\n children: \"errors[].param\"\n }), \"\\n\", _jsx(_components.code, {\n children: \"pricing.currency\"\n }), \", naming the currencies they can use — no offer is created. Send theirs.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Without \", _jsx(_components.code, {\n children: \"pricing.trial_days\"\n }), \", the buyer gets the product’s own free trial\\n(\", _jsx(_components.code, {\n children: \"trial_period_days\"\n }), \"), whatever the \", _jsx(_components.code, {\n children: \"plan_type\"\n }), \", \", _jsx(_components.code, {\n children: \"one_time\"\n }), \" included. Send \", _jsx(_components.code, {\n children: \"trial_days: 0\"\n }), \"\\nfor no trial.\"]\n }), \"\\n\", _jsx(_components.h3, {\n children: \"Selling more than one product\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Send \", _jsx(_components.code, {\n children: \"extra_lines\"\n }), \" to sell other products of yours on the same offer. Each names its product,\\nquantity and \", _jsx(_components.code, {\n children: \"pricing\"\n }), \", read as the top-level \", _jsx(_components.code, {\n children: \"pricing\"\n }), \" is: its own plan type, price and\\ntrial, in the offer’s \", _jsx(_components.code, {\n children: \"currency\"\n }), \". The buyer sees each as an ordinary line and pays for all of\\nthem in one checkout. The offer takes the payment methods \", _jsx(_components.code, {\n children: \"product_id\"\n }), \" accepts; an extra\\nproduct does not narrow them.\"]\n }), \"\\n\", _jsx(_components.h3, {\n children: \"Opening the offer inside your own page\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"By default the buyer follows \", _jsx(_components.code, {\n children: \"public_url\"\n }), \", which redirects them to the offer’s checkout on\\nCOPE. Send \", _jsx(_components.code, {\n children: \"embed_origin\"\n }), \" instead and the same checkout can be framed in your own page:\\nthe offer comes back with an \", _jsx(_components.code, {\n children: \"embed_url\"\n }), \" and \", _jsx(_components.code, {\n children: \"embed_origin\"\n }), \" echoing the one origin allowed\\nto frame it. Both are absent — not null — on an offer that cannot be framed, and\\n\", _jsx(_components.code, {\n children: \"public_url\"\n }), \" keeps working either way.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Hand both to the Checkout SDK’s \", _jsx(_components.code, {\n children: \"mountCheckout\"\n }), \" rather\\nthan building the iframe yourself: the framed page waits for a mount handshake from its\\nparent before it starts, so a bare \", _jsx(_components.code, {\n children: \"\u003ciframe src=embed_url>\"\n }), \" never loads.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.code, {\n children: \"embed_origin\"\n }), \" must be an origin you have already registered and enabled for checkout\\nembedding. An origin you have not registered, one another seller registered, and one that\\nhas been disabled or archived are each refused with 422 \", _jsx(_components.code, {\n children: \"embed_origin_not_allowed\"\n }), \", and no\\noffer is created. Disabling or archiving the origin afterwards stops every offer embed\\nbound to it.\"]\n }), \"\\n\", _jsx(_components.h3, {\n children: \"Matching the order to your own records\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Send \", _jsx(_components.code, {\n children: \"external_reference\"\n }), \" — your customer, deal or quote id — and any \", _jsx(_components.code, {\n children: \"metadata\"\n }), \" of your\\nown. Both are returned on the offer, and once the buyer pays, the order the offer becomes\\ncarries them on every order and payment webhook: in \", _jsx(_components.code, {\n children: \"metadata\"\n }), \" on \", _jsx(_components.code, {\n children: \"cart.order.created\"\n }), \" and\\n\", _jsx(_components.code, {\n children: \"cart.order.completed\"\n }), \", and in \", _jsx(_components.code, {\n children: \"order.metadata\"\n }), \" on every \", _jsx(_components.code, {\n children: \"payment.*\"\n }), \" event, with\\n\", _jsx(_components.code, {\n children: \"order.source\"\n }), \" set to \", _jsx(_components.code, {\n children: \"offer\"\n }), \". The buyer cannot change them on the offer’s checkout.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Identify the order by its id, not by the reference: a checkout link can carry the same\\n\", _jsx(_components.code, {\n children: \"external_reference\"\n }), \". Once the offer is paid, retrieving it returns \", _jsx(_components.code, {\n children: \"order.id\"\n }), \", the order\\nthe payment webhooks name; use \", _jsx(_components.code, {\n children: \"external_reference\"\n }), \" to group that order with your own\\nrecord. \", _jsx(_components.code, {\n children: \"external_reference\"\n }), \" is a reserved key: send it as its own member, never inside\\n\", _jsx(_components.code, {\n children: \"metadata\"\n }), \", where it is refused with 422 \", _jsx(_components.code, {\n children: \"reserved_metadata_key\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Requires the \", _jsx(_components.code, {\n children: \"orders\"\n }), \" permission at \", _jsx(_components.code, {\n children: \"write\"\n }), \". An API key holds a permission at the lower of its own level (\", _jsx(_components.code, {\n children: \"read\"\n }), \" for a read-only key) and its holder’s role; a key without it is refused with 403.\"]\n })]\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}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"codeStyling":{"theme":{"light":"github-light","dark":"github-dark"}},"config":{},"pageMetadata":{"title":"Create an offer","description":"Prices one product for one named buyer and returns a private checkout link made out to\nthem. The price, the quantity and the buyer are settled here and are read-only on the\noffer page, so everything the order will need has to be supplied in this request. The\noffer accepts the payment methods the product already accepts; they cannot be chosen per\noffer. Creating an offer does not notify the buyer — the link comes back as `public_url`\nand is yours to send.\n\nThe body is read exactly as written. A member this reference does not list, at any\ndepth, is refused with 400 `invalid_request` rather than ignored, and so is a value of\nthe wrong JSON type — `\"24900\"` is not read as the integer 24900 — and any parameter\nsent in the query string. The one member read without being listed is the name the\nfirst edition of this reference gave `product_id`, still accepted in its place. An\nexplicit `null` for any member, at any depth, is read as leaving it out. A body that\nnames no `product_id` is a 400 too; 404 means the product named is not one you can sell.\n\n### Choosing a payment plan\n\n`pricing.plan_type` decides the rest of the body. Send the fields its row asks for;\nevery other field under `pricing` is optional under all three plan types.\n\n| `plan_type` | What the buyer is charged | Send alongside `plan_type` and `price_minor_units` |\n| --- | --- | --- |\n| `one_time` | `price_minor_units`, once. | nothing |\n| `subscription` | `price_minor_units` now, then `recurring_amount_minor_units` every billing period until the subscription is cancelled. | `recurring_amount_minor_units`, `interval`, `interval_count` |\n| `installment` | `price_minor_units` now, then `recurring_amount_minor_units` every billing period until `installment_count` payments have been made in total, counting the first. | `recurring_amount_minor_units`, `interval`, `interval_count`, `installment_count` |\n\nThe billing period is `interval` × `interval_count` — `month` × 3 bills quarterly — and a\nsingle period may not be longer than two years. `second_payment_in`, `trial_days`,\n`shipping_price_minor_units` and `custom_plan_name` stay optional under every plan type.\n`installment` is accepted only from sellers enabled for installment sales; `one_time` and\n`subscription` are open to every seller.\n\nThe `currency` is the one line in the examples below that is not yours to copy: it must be\none the seller can actually be paid in, which means a currency COPE charges in that is also\nthe currency of one of the seller's payout bank accounts. The currencies of the product's own\npayment plans are not considered. The examples are priced in EUR, and a seller whose payout\naccounts are all in USD is refused with 422 `validation_failed`, `errors[].param`\n`pricing.currency`, naming the currencies they can use — no offer is created. Send theirs.\n\nWithout `pricing.trial_days`, the buyer gets the product's own free trial\n(`trial_period_days`), whatever the `plan_type`, `one_time` included. Send `trial_days: 0`\nfor no trial.\n\n### Selling more than one product\n\nSend `extra_lines` to sell other products of yours on the same offer. Each names its product,\nquantity and `pricing`, read as the top-level `pricing` is: its own plan type, price and\ntrial, in the offer's `currency`. The buyer sees each as an ordinary line and pays for all of\nthem in one checkout. The offer takes the payment methods `product_id` accepts; an extra\nproduct does not narrow them.\n\n### Opening the offer inside your own page\n\nBy default the buyer follows `public_url`, which redirects them to the offer's checkout on\nCOPE. Send `embed_origin` instead and the same checkout can be framed in your own page:\nthe offer comes back with an `embed_url` and `embed_origin` echoing the one origin allowed\nto frame it. Both are absent — not null — on an offer that cannot be framed, and\n`public_url` keeps working either way.\n\nHand both to the Checkout SDK's `mountCheckout` rather\nthan building the iframe yourself: the framed page waits for a mount handshake from its\nparent before it starts, so a bare `\u003ciframe src=embed_url>` never loads.\n\n`embed_origin` must be an origin you have already registered and enabled for checkout\nembedding. An origin you have not registered, one another seller registered, and one that\nhas been disabled or archived are each refused with 422 `embed_origin_not_allowed`, and no\noffer is created. Disabling or archiving the origin afterwards stops every offer embed\nbound to it.\n\n### Matching the order to your own records\n\nSend `external_reference` — your customer, deal or quote id — and any `metadata` of your\nown. Both are returned on the offer, and once the buyer pays, the order the offer becomes\ncarries them on every order and payment webhook: in `metadata` on `cart.order.created` and\n`cart.order.completed`, and in `order.metadata` on every `payment.*` event, with\n`order.source` set to `offer`. The buyer cannot change them on the offer's checkout.\n\nIdentify the order by its id, not by the reference: a checkout link can carry the same\n`external_reference`. Once the offer is paid, retrieving it returns `order.id`, the order\nthe payment webhooks name; use `external_reference` to group that order with your own\nrecord. `external_reference` is a reserved key: send it as its own member, never inside\n`metadata`, where it is refused with 422 `reserved_metadata_key`.\n\nRequires the `orders` permission at `write`. An API key holds a permission at the lower of its own level (`read` for a read-only key) and its holder's role; a key without it is refused with 403.","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json post /v1/commerce/offers","href":"/api-reference/offers/create-an-offer","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"description":"Prices one product for one named buyer and returns a private checkout link made out to\nthem. The price, the quantity and the buyer are settled here and are read-only on the\noffer page, so everything the order will need has to be supplied in this request. The\noffer accepts the payment methods the product already accepts; they cannot be chosen per\noffer. Creating an offer does not notify the buyer — the link comes back as `public_url`\nand is yours to send.\n\nThe body is read exactly as written. A member this reference does not list, at any\ndepth, is refused with 400 `invalid_request` rather than ignored, and so is a value of\nthe wrong JSON type — `\"24900\"` is not read as the integer 24900 — and any parameter\nsent in the query string. The one member read without being listed is the name the\nfirst edition of this reference gave `product_id`, still accepted in its place. An\nexplicit `null` for any member, at any depth, is read as leaving it out. A body that\nnames no `product_id` is a 400 too; 404 means the product named is not one you can sell.\n\n### Choosing a payment plan\n\n`pricing.plan_type` decides the rest of the body. Send the fields its row asks for;\nevery other field under `pricing` is optional under all three plan types.\n\n| `plan_type` | What the buyer is charged | Send alongside `plan_type` and `price_minor_units` |\n| --- | --- | --- |\n| `one_time` | `price_minor_units`, once. | nothing |\n| `subscription` | `price_minor_units` now, then `recurring_amount_minor_units` every billing period until the subscription is cancelled. | `recurring_amount_minor_units`, `interval`, `interval_count` |\n| `installment` | `price_minor_units` now, then `recurring_amount_minor_units` every billing period until `installment_count` payments have been made in total, counting the first. | `recurring_amount_minor_units`, `interval`, `interval_count`, `installment_count` |\n\nThe billing period is `interval` × `interval_count` — `month` × 3 bills quarterly — and a\nsingle period may not be longer than two years. `second_payment_in`, `trial_days`,\n`shipping_price_minor_units` and `custom_plan_name` stay optional under every plan type.\n`installment` is accepted only from sellers enabled for installment sales; `one_time` and\n`subscription` are open to every seller.\n\nThe `currency` is the one line in the examples below that is not yours to copy: it must be\none the seller can actually be paid in, which means a currency COPE charges in that is also\nthe currency of one of the seller's payout bank accounts. The currencies of the product's own\npayment plans are not considered. The examples are priced in EUR, and a seller whose payout\naccounts are all in USD is refused with 422 `validation_failed`, `errors[].param`\n`pricing.currency`, naming the currencies they can use — no offer is created. Send theirs.\n\nWithout `pricing.trial_days`, the buyer gets the product's own free trial\n(`trial_period_days`), whatever the `plan_type`, `one_time` included. Send `trial_days: 0`\nfor no trial.\n\n### Selling more than one product\n\nSend `extra_lines` to sell other products of yours on the same offer. Each names its product,\nquantity and `pricing`, read as the top-level `pricing` is: its own plan type, price and\ntrial, in the offer's `currency`. The buyer sees each as an ordinary line and pays for all of\nthem in one checkout. The offer takes the payment methods `product_id` accepts; an extra\nproduct does not narrow them.\n\n### Opening the offer inside your own page\n\nBy default the buyer follows `public_url`, which redirects them to the offer's checkout on\nCOPE. Send `embed_origin` instead and the same checkout can be framed in your own page:\nthe offer comes back with an `embed_url` and `embed_origin` echoing the one origin allowed\nto frame it. Both are absent — not null — on an offer that cannot be framed, and\n`public_url` keeps working either way.\n\nHand both to the Checkout SDK's `mountCheckout` rather\nthan building the iframe yourself: the framed page waits for a mount handshake from its\nparent before it starts, so a bare `\u003ciframe src=embed_url>` never loads.\n\n`embed_origin` must be an origin you have already registered and enabled for checkout\nembedding. An origin you have not registered, one another seller registered, and one that\nhas been disabled or archived are each refused with 422 `embed_origin_not_allowed`, and no\noffer is created. Disabling or archiving the origin afterwards stops every offer embed\nbound to it.\n\n### Matching the order to your own records\n\nSend `external_reference` — your customer, deal or quote id — and any `metadata` of your\nown. Both are returned on the offer, and once the buyer pays, the order the offer becomes\ncarries them on every order and payment webhook: in `metadata` on `cart.order.created` and\n`cart.order.completed`, and in `order.metadata` on every `payment.*` event, with\n`order.source` set to `offer`. The buyer cannot change them on the offer's checkout.\n\nIdentify the order by its id, not by the reference: a checkout link can carry the same\n`external_reference`. Once the offer is paid, retrieving it returns `order.id`, the order\nthe payment webhooks name; use `external_reference` to group that order with your own\nrecord. `external_reference` is a reserved key: send it as its own member, never inside\n`metadata`, where it is refused with 422 `reserved_metadata_key`.\n\nRequires the `orders` permission at `write`. An API key holds a permission at the lower of its own level (`read` for a read-only key) and its holder's role; a key without it is refused with 403.","operationId":"commerce.offers.create","parameters":["28ca57c4-fcae-4931-b18b-7ceb0be16f46"],"requestBody":"342adfaa-27e1-48c4-8542-b3f6e7076656","responses":{"201":"3e101eef-35c0-4a0a-a960-96c384c08159","400":"61669a77-3930-4d6f-8e82-86061a96fe32","401":"ba41eac6-2709-4498-8f94-23cc81c559c0","403":"5c010286-578a-41a6-8c8d-47574862f423","404":"1a0f7761-263b-48d8-853f-2aa67aebb6cc","409":"d8f8ce36-5466-4114-a45f-f4367950b337","422":"e5a53365-c608-4c53-a693-d3420dc38285","500":"3d4b177f-6e95-40ee-a742-278f7953c5ab","503":"f537999c-a79b-4f32-82f7-3e0e67ba6cac"},"security":["23515acb-3319-4b53-8e47-254ac81bdf2c"],"summary":"Create an offer","tags":["Offers"],"x-cope-permission":{"level":"write","resource":"orders"},"x-cope-route-id":"commerce.offers.create","method":"post","type":"path","servers":["89e8b38d-aa16-49e3-b1cf-383f367594ab"],"path":"/v1/commerce/offers","baseUrlOptions":["https://api.cope.com"],"title":"Create an offer","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"28ca57c4-fcae-4931-b18b-7ceb0be16f46":{"description":"Required. At most 255 characters of valid UTF-8 with no NUL byte. A retry that carries the same key and the same body returns the original response instead of performing the write a second time. The same key with a different body is refused with 409 idempotency_conflict. Keys are remembered for 24 hours. A returned original response carries the header `Idempotent-Replayed: true`.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"type":"string","isRequired":true,"description":"Required. At most 255 characters of valid UTF-8 with no NUL byte. A retry that carries the same key and the same body returns the original response instead of performing the write a second time. The same key with a different body is refused with 409 idempotency_conflict. Keys are remembered for 24 hours. A returned original response carries the header `Idempotent-Replayed: true`.","uniqueKey":"","typeLabel":"string"}}},"requestBody":{"content":{"application/json":{"examples":{"one_time":{"title":"one_time","summary":"One-time payment — the buyer is charged 499.00 EUR once","value":{"buyer":{"address":{"city":"Berlin","line1":"Hauptstrasse 12","postal_code":"10115"},"country":"DE","email":"ada.fischer@example.com","first_name":"Ada","last_name":"Fischer","type":"person"},"currency":"EUR","pricing":{"plan_type":"one_time","price_minor_units":49900},"product_id":"prod_A1b2C3d4","quantity":1}},"subscription":{"title":"subscription","summary":"Subscription — 49.00 EUR now and every month until it is cancelled","value":{"buyer":{"address":{"city":"Berlin","line1":"Hauptstrasse 12","postal_code":"10115"},"country":"DE","email":"ada.fischer@example.com","first_name":"Ada","last_name":"Fischer","type":"person"},"currency":"EUR","pricing":{"interval":"month","interval_count":1,"plan_type":"subscription","price_minor_units":4900,"recurring_amount_minor_units":4900},"product_id":"prod_A1b2C3d4","quantity":1}},"installment":{"title":"installment","summary":"Installment plan — 499.00 EUR as four monthly payments of 124.75 EUR","value":{"buyer":{"address":{"city":"Berlin","line1":"Hauptstrasse 12","postal_code":"10115"},"country":"DE","email":"ada.fischer@example.com","first_name":"Ada","last_name":"Fischer","type":"person"},"currency":"EUR","pricing":{"installment_count":4,"interval":"month","interval_count":1,"plan_type":"installment","price_minor_units":12475,"recurring_amount_minor_units":12475},"product_id":"prod_A1b2C3d4","quantity":1}}},"schema":{"additionalProperties":false,"properties":{"buyer":{"additionalProperties":false,"properties":{"address":{"additionalProperties":false,"properties":{"postal_code":{"description":"Required for every country, with no exception: the tax quote is derived from it, and the buyer cannot add one later on the offer page.","minLength":1,"type":"string","isRequired":true,"uniqueKey":"buyer.address.postal_code","typeLabel":"string"},"city":{"description":"Required wherever line1 is.","minLength":1,"type":"string","uniqueKey":"buyer.address.city","typeLabel":"string"},"line1":{"description":"Required for a product that ships, and for a digital product or service sold to a buyer in the EU or the UK, where the invoice must carry a complete address.","minLength":1,"type":"string","uniqueKey":"buyer.address.line1","typeLabel":"string"},"line2":{"minLength":1,"type":"string","uniqueKey":"buyer.address.line2","typeLabel":"string"}},"required":["postal_code"],"type":"object","isRequired":true,"uniqueKey":"buyer.address","typeLabel":"object"},"country":{"description":"Buyer's country, as a two-letter ISO 3166-1 code.","pattern":"^[A-Z]{2}$","type":"string","isRequired":true,"uniqueKey":"buyer.country","typeLabel":"string"},"email":{"description":"Where the offer link is sent when you send it, and the address the receipt goes to.","format":"email","type":"string","isRequired":true,"uniqueKey":"buyer.email","typeLabel":"string\u003cemail>"},"first_name":{"minLength":1,"type":"string","isRequired":true,"uniqueKey":"buyer.first_name","typeLabel":"string"},"last_name":{"minLength":1,"type":"string","isRequired":true,"uniqueKey":"buyer.last_name","typeLabel":"string"},"type":{"enum":["person","company"],"type":"string","isRequired":true,"uniqueKey":"buyer.type","typeLabel":"enum\u003cstring>"},"company_name":{"description":"Required when the buyer is a company.","minLength":1,"type":"string","uniqueKey":"buyer.company_name","typeLabel":"string"},"locale":{"description":"The buyer's language: the checkout opens in it and the offer emails are written in it, and the buyer can still switch the checkout to another. A regional or differently cased code is read as its language (`de-DE` is `de`). Omit it, or name a language your checkout does not offer, and the checkout follows the buyer's browser and the offer emails are in English until the buyer picks a language in the checkout.","minLength":1,"type":"string","uniqueKey":"buyer.locale","typeLabel":"string"},"phone":{"description":"Optional, and must be a valid phone number when it is given.","minLength":1,"type":"string","uniqueKey":"buyer.phone","typeLabel":"string"},"state":{"description":"Required for buyers in US, CA, AU — tax there is calculated per state.","minLength":1,"type":"string","uniqueKey":"buyer.state","typeLabel":"string"},"vat_id":{"minLength":1,"type":"string","uniqueKey":"buyer.vat_id","typeLabel":"string"}},"required":["type","email","first_name","last_name","country","address"],"type":"object","isRequired":true,"uniqueKey":"buyer","typeLabel":"object"},"currency":{"description":"Currency of the offer, as an ISO 4217 code. It must be one the seller can be paid in: a currency COPE charges in that is also the currency of one of the seller's payout bank accounts. The currencies of the product's own payment plans are not considered. Anything else is refused with 422 `validation_failed`, `errors[].param` `pricing.currency`, naming the currencies the seller can use.","pattern":"^[A-Z]{3}$","type":"string","isRequired":true,"uniqueKey":"currency","typeLabel":"string"},"pricing":{"additionalProperties":false,"description":"Shape and amounts of the payment. `plan_type` decides which of the fields below you have to send: `one_time` needs nothing beyond `price_minor_units`; `subscription` also needs `recurring_amount_minor_units`, `interval` and `interval_count`; `installment` needs those three and `installment_count` as well. Every other field here is optional under all three.","properties":{"plan_type":{"description":"Shape of the payment. A value the seller is not enabled for is refused with a 422 naming the ones they are — installment sales are enabled per seller.","enum":["one_time","subscription","installment"],"type":"string","isRequired":true,"uniqueKey":"pricing.plan_type","typeLabel":"enum\u003cstring>"},"price_minor_units":{"description":"First payment, in the minor units of the offer currency, net or gross of tax as `has_net_price` says. It must sit within the charge bounds for that currency.","maximum":99999999,"minimum":200,"type":"integer","isRequired":true,"uniqueKey":"pricing.price_minor_units","typeLabel":"integer"},"custom_plan_name":{"description":"Name shown for the plan on the offer page and at checkout. Defaults to a label read from the plan type.","minLength":1,"type":"string","uniqueKey":"pricing.custom_plan_name","typeLabel":"string"},"has_net_price":{"description":"Whether `price_minor_units`, `recurring_amount_minor_units` and `shipping_price_minor_units` are net of tax. `true`: they are net, and the tax is added on top at checkout. `false`: they include the tax, which is taken out of them. Omit it to use the product's own `has_net_price`. The offer records the value it was made with, so changing the product later does not change the offer.","type":"boolean","uniqueKey":"pricing.has_net_price","typeLabel":"boolean"},"installment_count":{"description":"Total number of payments, counting the first. Required for installment. `interval_count` x (`installment_count` - 1) may be at most 365, 52, 36 or 6 for a `day`, `week`, `month` or `year` interval, so a plan paid every month has at most 37 payments. A longer plan is refused with `installment_duration_exceeds_max` on `installment_count`, or on `interval_count` when one billing period alone is longer than the limit. A request whose `interval_count` is already refused (a billing period longer than 2 years) answers only that code; the length is checked once it is fixed.","minimum":1,"type":"integer","uniqueKey":"pricing.installment_count","typeLabel":"integer"},"interval":{"description":"Unit of the billing period. Required for subscription and installment.","enum":["day","week","month","year"],"type":"string","uniqueKey":"pricing.interval","typeLabel":"enum\u003cstring>"},"interval_count":{"description":"How many intervals pass between payments. Required for subscription and installment; one billing period may not be longer than 2 years.","minimum":1,"type":"integer","uniqueKey":"pricing.interval_count","typeLabel":"integer"},"recurring_amount_minor_units":{"description":"Amount of every payment after the first, in the minor units of the offer currency, net or gross of tax as `has_net_price` says. Required for subscription and installment.","maximum":99999999,"minimum":200,"type":"integer","uniqueKey":"pricing.recurring_amount_minor_units","typeLabel":"integer"},"second_payment_in":{"description":"Days between the first payment and the second. Omit it to charge the second payment one billing period after the first.","minimum":1,"type":"integer","uniqueKey":"pricing.second_payment_in","typeLabel":"integer"},"shipping_price_minor_units":{"description":"Flat shipping fee for the order, in the minor units of the offer currency, net or gross of tax as `has_net_price` says. It is charged only when the product ships — a digital product carries no shipping whatever is sent here.","minimum":0,"type":"integer","uniqueKey":"pricing.shipping_price_minor_units","typeLabel":"integer"},"trial_days":{"description":"Free days before the first charge, at most 30. Leave it out and the buyer gets the product's own trial (its `trial_period_days`), under every `plan_type`, `one_time` included. Send `0` for no trial.","maximum":30,"minimum":0,"type":"integer","uniqueKey":"pricing.trial_days","typeLabel":"integer"}},"required":["plan_type","price_minor_units"],"type":"object","isRequired":true,"uniqueKey":"pricing","typeLabel":"object"},"product_id":{"description":"Product the offer sells. It must belong to the seller the token is issued for; any other product answers 404.","example":"prod_A1b2C3d4","pattern":"^prod_[A-Za-z0-9]{8,32}$","type":"string","isRequired":true,"uniqueKey":"product_id","typeLabel":"string"},"embed_origin":{"description":"Origin allowed to frame this offer's checkout, so the buyer can pay inside your own page instead of following the redirect. It must be one you have already registered and enabled for checkout embedding; anything else — including an origin another seller registered — is refused with 422 `embed_origin_not_allowed` and no offer is created. Omit it for a redirect-only offer.","pattern":"^https://[^@/?#\\s]+$","type":"string","uniqueKey":"embed_origin","typeLabel":"string"},"external_reference":{"description":"Your own reference for this sale — a customer, deal or quote id. It is returned on the offer and arrives on every order and payment webhook for the order the offer becomes, as `metadata.external_reference`. A blank value is refused.","maxLength":255,"minLength":1,"type":"string","uniqueKey":"external_reference","typeLabel":"string"},"extra_lines":{"description":"Other products on the same offer, each with its own plan type, price and trial, in the order the buyer sees them. The buyer pays for all of them in one checkout and can change none of them. The offer accepts the payment methods `product_id` accepts, whatever the extra products accept. Products the buyer could not pay for in one checkout are refused with 422 and `errors[].param` `extra_lines`: `mixed_vat_mode_cart` when a Non-ESS product would share them with one that is not, `mixed_seller_cart` when they are sold under different legal entities of your business.","items":{"additionalProperties":false,"properties":{"pricing":{"additionalProperties":false,"description":"Shape and amounts of this product's payment, read as `pricing` is. No shipping: an extra product is digital.","properties":{"plan_type":{"description":"Shape of the payment. A value the seller is not enabled for is refused with a 422 naming the ones they are — installment sales are enabled per seller.","enum":["one_time","subscription","installment"],"type":"string","isRequired":true,"uniqueKey":"extra_lines.items.[INDEX].pricing.plan_type","typeLabel":"enum\u003cstring>"},"price_minor_units":{"description":"First payment, in the minor units of the offer currency, net or gross of tax as `has_net_price` says. It must sit within the charge bounds for that currency.","maximum":99999999,"minimum":200,"type":"integer","isRequired":true,"uniqueKey":"extra_lines.items.[INDEX].pricing.price_minor_units","typeLabel":"integer"},"custom_plan_name":{"description":"Name shown for the plan on the offer page and at checkout. Defaults to a label read from the plan type.","minLength":1,"type":"string","uniqueKey":"extra_lines.items.[INDEX].pricing.custom_plan_name","typeLabel":"string"},"has_net_price":{"description":"Whether `price_minor_units`, `recurring_amount_minor_units` and `shipping_price_minor_units` are net of tax. `true`: they are net, and the tax is added on top at checkout. `false`: they include the tax, which is taken out of them. Omit it to use the product's own `has_net_price`. The offer records the value it was made with, so changing the product later does not change the offer.","type":"boolean","uniqueKey":"extra_lines.items.[INDEX].pricing.has_net_price","typeLabel":"boolean"},"installment_count":{"description":"Total number of payments, counting the first. Required for installment. `interval_count` x (`installment_count` - 1) may be at most 365, 52, 36 or 6 for a `day`, `week`, `month` or `year` interval, so a plan paid every month has at most 37 payments. A longer plan is refused with `installment_duration_exceeds_max` on `installment_count`, or on `interval_count` when one billing period alone is longer than the limit. A request whose `interval_count` is already refused (a billing period longer than 2 years) answers only that code; the length is checked once it is fixed.","minimum":1,"type":"integer","uniqueKey":"extra_lines.items.[INDEX].pricing.installment_count","typeLabel":"integer"},"interval":{"description":"Unit of the billing period. Required for subscription and installment.","enum":["day","week","month","year"],"type":"string","uniqueKey":"extra_lines.items.[INDEX].pricing.interval","typeLabel":"enum\u003cstring>"},"interval_count":{"description":"How many intervals pass between payments. Required for subscription and installment; one billing period may not be longer than 2 years.","minimum":1,"type":"integer","uniqueKey":"extra_lines.items.[INDEX].pricing.interval_count","typeLabel":"integer"},"recurring_amount_minor_units":{"description":"Amount of every payment after the first, in the minor units of the offer currency, net or gross of tax as `has_net_price` says. Required for subscription and installment.","maximum":99999999,"minimum":200,"type":"integer","uniqueKey":"extra_lines.items.[INDEX].pricing.recurring_amount_minor_units","typeLabel":"integer"},"second_payment_in":{"description":"Days between the first payment and the second. Omit it to charge the second payment one billing period after the first.","minimum":1,"type":"integer","uniqueKey":"extra_lines.items.[INDEX].pricing.second_payment_in","typeLabel":"integer"},"trial_days":{"description":"Free days before the first charge, at most 30. Leave it out and the buyer gets the product's own trial (its `trial_period_days`), under every `plan_type`, `one_time` included. Send `0` for no trial.","maximum":30,"minimum":0,"type":"integer","uniqueKey":"extra_lines.items.[INDEX].pricing.trial_days","typeLabel":"integer"}},"required":["plan_type","price_minor_units"],"type":"object","isRequired":true,"uniqueKey":"extra_lines.items.[INDEX].pricing","typeLabel":"object"},"product_id":{"description":"A product of yours to sell beside `product_id`. Any other product answers 404. Naming the main product, or one product twice, is refused with 422 `duplicate_extra_product`; a product not on sale with 422 `product_unavailable`.","example":"prod_A1b2C3d4","pattern":"^prod_[A-Za-z0-9]{8,32}$","type":"string","isRequired":true,"uniqueKey":"extra_lines.items.[INDEX].product_id","typeLabel":"string"},"quantity":{"default":1,"description":"Units of this product. More than 1 only when the product lets a buyer choose a quantity, and then up to its own maximum; anything else is refused with 422 `quantity_not_allowed`.","minimum":1,"type":"integer","uniqueKey":"extra_lines.items.[INDEX].quantity","typeLabel":"integer"}},"required":["product_id","pricing"],"type":"object","uniqueKey":"extra_lines.items.[INDEX]","typeLabel":"object"},"type":"array","uniqueKey":"extra_lines","typeLabel":"object[]"},"link_expiration":{"additionalProperties":false,"description":"Omit the object entirely to issue a link that never expires.","properties":{"mode":{"enum":["never","custom"],"type":"string","isRequired":true,"uniqueKey":"link_expiration.mode","typeLabel":"enum\u003cstring>"},"duration":{"description":"How many units the link stays valid for. Required unless the mode is never.","minimum":1,"type":"integer","uniqueKey":"link_expiration.duration","typeLabel":"integer"},"unit":{"description":"Required unless the mode is never.","enum":["minutes","hours","days"],"type":"string","uniqueKey":"link_expiration.unit","typeLabel":"enum\u003cstring>"}},"required":["mode"],"type":"object","uniqueKey":"link_expiration","typeLabel":"object"},"metadata":{"type":"object","description":"Your own key-value data for this sale. It is returned on the offer and arrives on every order and payment webhook for the order the offer becomes, as `metadata`, beside `external_reference`. At most 50 entries at any level, 4 levels of nesting, keys of up to 64 characters, and 8 KB as JSON with `external_reference` included; anything larger is refused with 422 `validation_failed`. `external_reference` and the keys COPE uses itself (`intended_payment_method`, `authority_kind`, `clerk_user_id`, `event_sales_session_id`, `seller_device_id`) are refused inside it.","maxProperties":50,"additionalProperties":true,"uniqueKey":"metadata","typeLabel":"object"},"quantity":{"default":1,"description":"Units of the product on the offer. More than 1 only when the product lets a buyer choose a quantity, and then up to its own maximum; anything else is refused with 422 `quantity_not_allowed`.","maximum":1000,"minimum":1,"type":"integer","uniqueKey":"quantity","typeLabel":"integer"}},"required":["product_id","currency","pricing","buyer"],"type":"object","uniqueKey":"","typeLabel":"object"},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"3e101eef-35c0-4a0a-a960-96c384c08159":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"buyer_profile":{"additionalProperties":false,"properties":{"address":{"additionalProperties":false,"properties":{"city":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"data.buyer_profile.address.city.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"data.buyer_profile.address.city.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.buyer_profile.address.city","typeLabel":"string | null"},"line1":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"data.buyer_profile.address.line1.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"data.buyer_profile.address.line1.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.buyer_profile.address.line1","typeLabel":"string | null"},"line2":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"data.buyer_profile.address.line2.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"data.buyer_profile.address.line2.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.buyer_profile.address.line2","typeLabel":"string | null"},"postal_code":{"type":"string","isRequired":true,"uniqueKey":"data.buyer_profile.address.postal_code","typeLabel":"string"}},"required":["line1","line2","city","postal_code"],"type":"object","isRequired":true,"uniqueKey":"data.buyer_profile.address","typeLabel":"object"},"company_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"data.buyer_profile.company_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"data.buyer_profile.company_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.buyer_profile.company_name","typeLabel":"string | null"},"country":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"data.buyer_profile.country.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"data.buyer_profile.country.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.buyer_profile.country","typeLabel":"string | null"},"email":{"type":"string","isRequired":true,"uniqueKey":"data.buyer_profile.email","typeLabel":"string"},"first_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"data.buyer_profile.first_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"data.buyer_profile.first_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.buyer_profile.first_name","typeLabel":"string | null"},"last_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"data.buyer_profile.last_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"data.buyer_profile.last_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.buyer_profile.last_name","typeLabel":"string | null"},"locale":{"description":"The language named when the offer was created, as it was sent. `en` when none was named, so `en` does not tell an offer that named English from one that follows the buyer's browser.","type":"string","isRequired":true,"uniqueKey":"data.buyer_profile.locale","typeLabel":"string"},"phone":{"oneOf":[{"description":"Buyer's phone number, as captured when the offer was created.","type":"string","isRequired":true,"uniqueKey":"data.buyer_profile.phone.oneOf.0","typeLabel":"string"},{"description":"Buyer's phone number, as captured when the offer was created.","type":"null","isRequired":true,"uniqueKey":"data.buyer_profile.phone.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.buyer_profile.phone","typeLabel":"string | null"},"state":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"data.buyer_profile.state.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"data.buyer_profile.state.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.buyer_profile.state","typeLabel":"string | null"},"type":{"type":"string","isRequired":true,"uniqueKey":"data.buyer_profile.type","typeLabel":"string"},"vat_id":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"data.buyer_profile.vat_id.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"data.buyer_profile.vat_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.buyer_profile.vat_id","typeLabel":"string | null"}},"required":["type","email","first_name","last_name","country","state","locale","address","company_name","vat_id","phone"],"type":"object","isRequired":true,"uniqueKey":"data.buyer_profile","typeLabel":"object"},"cancelled_at":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"data.cancelled_at.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"data.cancelled_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.cancelled_at","typeLabel":"string | null"},"cancelled_reason":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"data.cancelled_reason.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"data.cancelled_reason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.cancelled_reason","typeLabel":"string | null"},"created_at":{"type":"string","isRequired":true,"uniqueKey":"data.created_at","typeLabel":"string"},"expires_at":{"oneOf":[{"description":"When the offer link stops working. Null when the offer never expires, which is what an offer created without `link_expiration` gets.","type":"string","isRequired":true,"uniqueKey":"data.expires_at.oneOf.0","typeLabel":"string"},{"description":"When the offer link stops working. Null when the offer never expires, which is what an offer created without `link_expiration` gets.","type":"null","isRequired":true,"uniqueKey":"data.expires_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.expires_at","typeLabel":"string | null"},"extra_lines":{"description":"The products sold beside `product`, in the order the buyer sees them. Empty for an offer of one product.","items":{"additionalProperties":false,"properties":{"payment_plan_snapshot":{"additionalProperties":false,"description":"This product's plan as it stood when the offer was made.","properties":{"currency":{"type":"string","isRequired":true,"uniqueKey":"data.extra_lines.items.[INDEX].payment_plan_snapshot.currency","typeLabel":"string"},"custom_plan_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"data.extra_lines.items.[INDEX].payment_plan_snapshot.custom_plan_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"data.extra_lines.items.[INDEX].payment_plan_snapshot.custom_plan_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.extra_lines.items.[INDEX].payment_plan_snapshot.custom_plan_name","typeLabel":"string | null"},"installment_count":{"oneOf":[{"type":"integer","isRequired":true,"uniqueKey":"data.extra_lines.items.[INDEX].payment_plan_snapshot.installment_count.oneOf.0","typeLabel":"integer"},{"type":"null","isRequired":true,"uniqueKey":"data.extra_lines.items.[INDEX].payment_plan_snapshot.installment_count.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.extra_lines.items.[INDEX].payment_plan_snapshot.installment_count","typeLabel":"integer | null"},"interval":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"data.extra_lines.items.[INDEX].payment_plan_snapshot.interval.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"data.extra_lines.items.[INDEX].payment_plan_snapshot.interval.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.extra_lines.items.[INDEX].payment_plan_snapshot.interval","typeLabel":"string | null"},"interval_count":{"oneOf":[{"type":"integer","isRequired":true,"uniqueKey":"data.extra_lines.items.[INDEX].payment_plan_snapshot.interval_count.oneOf.0","typeLabel":"integer"},{"type":"null","isRequired":true,"uniqueKey":"data.extra_lines.items.[INDEX].payment_plan_snapshot.interval_count.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.extra_lines.items.[INDEX].payment_plan_snapshot.interval_count","typeLabel":"integer | null"},"plan_type":{"type":"string","isRequired":true,"uniqueKey":"data.extra_lines.items.[INDEX].payment_plan_snapshot.plan_type","typeLabel":"string"},"price_minor_units":{"type":"integer","isRequired":true,"uniqueKey":"data.extra_lines.items.[INDEX].payment_plan_snapshot.price_minor_units","typeLabel":"integer"},"quantity":{"type":"integer","isRequired":true,"uniqueKey":"data.extra_lines.items.[INDEX].payment_plan_snapshot.quantity","typeLabel":"integer"},"recurring_amount_minor_units":{"oneOf":[{"type":"integer","isRequired":true,"uniqueKey":"data.extra_lines.items.[INDEX].payment_plan_snapshot.recurring_amount_minor_units.oneOf.0","typeLabel":"integer"},{"type":"null","isRequired":true,"uniqueKey":"data.extra_lines.items.[INDEX].payment_plan_snapshot.recurring_amount_minor_units.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.extra_lines.items.[INDEX].payment_plan_snapshot.recurring_amount_minor_units","typeLabel":"integer | null"},"second_payment_in":{"oneOf":[{"type":"integer","isRequired":true,"uniqueKey":"data.extra_lines.items.[INDEX].payment_plan_snapshot.second_payment_in.oneOf.0","typeLabel":"integer"},{"type":"null","isRequired":true,"uniqueKey":"data.extra_lines.items.[INDEX].payment_plan_snapshot.second_payment_in.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.extra_lines.items.[INDEX].payment_plan_snapshot.second_payment_in","typeLabel":"integer | null"},"shipping_price_minor_units":{"oneOf":[{"type":"integer","isRequired":true,"uniqueKey":"data.extra_lines.items.[INDEX].payment_plan_snapshot.shipping_price_minor_units.oneOf.0","typeLabel":"integer"},{"type":"null","isRequired":true,"uniqueKey":"data.extra_lines.items.[INDEX].payment_plan_snapshot.shipping_price_minor_units.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.extra_lines.items.[INDEX].payment_plan_snapshot.shipping_price_minor_units","typeLabel":"integer | null"},"trial_days":{"oneOf":[{"type":"integer","isRequired":true,"uniqueKey":"data.extra_lines.items.[INDEX].payment_plan_snapshot.trial_days.oneOf.0","typeLabel":"integer"},{"type":"null","isRequired":true,"uniqueKey":"data.extra_lines.items.[INDEX].payment_plan_snapshot.trial_days.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.extra_lines.items.[INDEX].payment_plan_snapshot.trial_days","typeLabel":"integer | null"},"has_net_price":{"description":"Whether the amounts above are net of tax (`true`) or include it (`false`): the value the offer was made with. Absent on an offer made before this field existed, whose amounts follow the product's `has_net_price`.","type":"boolean","uniqueKey":"data.extra_lines.items.[INDEX].payment_plan_snapshot.has_net_price","typeLabel":"boolean"}},"required":["plan_type","currency","quantity","price_minor_units","shipping_price_minor_units","recurring_amount_minor_units","interval","interval_count","installment_count","second_payment_in","trial_days","custom_plan_name"],"type":"object","isRequired":true,"uniqueKey":"data.extra_lines.items.[INDEX].payment_plan_snapshot","typeLabel":"object"},"product":{"oneOf":[{"additionalProperties":false,"description":"Null once the product has been deleted.","properties":{"id":{"example":"prod_A1b2C3d4","pattern":"^prod_[A-Za-z0-9]{8,32}$","type":"string","isRequired":true,"uniqueKey":"data.extra_lines.items.[INDEX].product.oneOf.0.id","typeLabel":"string"},"name":{"type":"string","isRequired":true,"uniqueKey":"data.extra_lines.items.[INDEX].product.oneOf.0.name","typeLabel":"string"},"object":{"enum":["product"],"type":"string","isRequired":true,"uniqueKey":"data.extra_lines.items.[INDEX].product.oneOf.0.object","typeLabel":"enum\u003cstring>"}},"required":["object","id","name"],"type":"object","isRequired":true,"uniqueKey":"data.extra_lines.items.[INDEX].product.oneOf.0","typeLabel":"object"},{"additionalProperties":false,"description":"Null once the product has been deleted.","properties":{"id":{"example":"prod_A1b2C3d4","pattern":"^prod_[A-Za-z0-9]{8,32}$","type":"string"},"name":{"type":"string"},"object":{"enum":["product"],"type":"string"}},"required":["object","id","name"],"type":"null","isRequired":true,"uniqueKey":"data.extra_lines.items.[INDEX].product.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.extra_lines.items.[INDEX].product","typeLabel":"object | null"},"quantity":{"type":"integer","isRequired":true,"uniqueKey":"data.extra_lines.items.[INDEX].quantity","typeLabel":"integer"}},"required":["product","quantity","payment_plan_snapshot"],"type":"object","uniqueKey":"data.extra_lines.items.[INDEX]","typeLabel":"object"},"type":"array","isRequired":true,"uniqueKey":"data.extra_lines","typeLabel":"object[]"},"id":{"example":"of_A1b2C3d4E5f6","pattern":"^of_[A-Za-z0-9]{8,32}$","type":"string","isRequired":true,"uniqueKey":"data.id","typeLabel":"string"},"last_buyer_notification_at":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"data.last_buyer_notification_at.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"data.last_buyer_notification_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.last_buyer_notification_at","typeLabel":"string | null"},"next_resend_available_at":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"data.next_resend_available_at.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"data.next_resend_available_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.next_resend_available_at","typeLabel":"string | null"},"order":{"oneOf":[{"additionalProperties":false,"properties":{"id":{"example":"ord_A1b2C3d4E5f6","pattern":"^ord_[A-Za-z0-9]{8,32}$","type":"string","isRequired":true,"uniqueKey":"data.order.oneOf.0.id","typeLabel":"string"}},"required":["id"],"type":"object","isRequired":true,"uniqueKey":"data.order.oneOf.0","typeLabel":"object"},{"additionalProperties":false,"properties":{"id":{"example":"ord_A1b2C3d4E5f6","pattern":"^ord_[A-Za-z0-9]{8,32}$","type":"string"}},"required":["id"],"type":"null","isRequired":true,"uniqueKey":"data.order.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.order","typeLabel":"object | null"},"ordered_at":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"data.ordered_at.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"data.ordered_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.ordered_at","typeLabel":"string | null"},"payment_plan_snapshot":{"additionalProperties":false,"properties":{"currency":{"type":"string","isRequired":true,"uniqueKey":"data.payment_plan_snapshot.currency","typeLabel":"string"},"custom_plan_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"data.payment_plan_snapshot.custom_plan_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"data.payment_plan_snapshot.custom_plan_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.payment_plan_snapshot.custom_plan_name","typeLabel":"string | null"},"installment_count":{"oneOf":[{"type":"integer","isRequired":true,"uniqueKey":"data.payment_plan_snapshot.installment_count.oneOf.0","typeLabel":"integer"},{"type":"null","isRequired":true,"uniqueKey":"data.payment_plan_snapshot.installment_count.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.payment_plan_snapshot.installment_count","typeLabel":"integer | null"},"interval":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"data.payment_plan_snapshot.interval.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"data.payment_plan_snapshot.interval.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.payment_plan_snapshot.interval","typeLabel":"string | null"},"interval_count":{"oneOf":[{"type":"integer","isRequired":true,"uniqueKey":"data.payment_plan_snapshot.interval_count.oneOf.0","typeLabel":"integer"},{"type":"null","isRequired":true,"uniqueKey":"data.payment_plan_snapshot.interval_count.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.payment_plan_snapshot.interval_count","typeLabel":"integer | null"},"plan_type":{"type":"string","isRequired":true,"uniqueKey":"data.payment_plan_snapshot.plan_type","typeLabel":"string"},"price_minor_units":{"type":"integer","isRequired":true,"uniqueKey":"data.payment_plan_snapshot.price_minor_units","typeLabel":"integer"},"quantity":{"type":"integer","isRequired":true,"uniqueKey":"data.payment_plan_snapshot.quantity","typeLabel":"integer"},"recurring_amount_minor_units":{"oneOf":[{"type":"integer","isRequired":true,"uniqueKey":"data.payment_plan_snapshot.recurring_amount_minor_units.oneOf.0","typeLabel":"integer"},{"type":"null","isRequired":true,"uniqueKey":"data.payment_plan_snapshot.recurring_amount_minor_units.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.payment_plan_snapshot.recurring_amount_minor_units","typeLabel":"integer | null"},"second_payment_in":{"oneOf":[{"type":"integer","isRequired":true,"uniqueKey":"data.payment_plan_snapshot.second_payment_in.oneOf.0","typeLabel":"integer"},{"type":"null","isRequired":true,"uniqueKey":"data.payment_plan_snapshot.second_payment_in.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.payment_plan_snapshot.second_payment_in","typeLabel":"integer | null"},"shipping_price_minor_units":{"oneOf":[{"type":"integer","isRequired":true,"uniqueKey":"data.payment_plan_snapshot.shipping_price_minor_units.oneOf.0","typeLabel":"integer"},{"type":"null","isRequired":true,"uniqueKey":"data.payment_plan_snapshot.shipping_price_minor_units.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.payment_plan_snapshot.shipping_price_minor_units","typeLabel":"integer | null"},"trial_days":{"oneOf":[{"type":"integer","isRequired":true,"uniqueKey":"data.payment_plan_snapshot.trial_days.oneOf.0","typeLabel":"integer"},{"type":"null","isRequired":true,"uniqueKey":"data.payment_plan_snapshot.trial_days.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.payment_plan_snapshot.trial_days","typeLabel":"integer | null"},"has_net_price":{"description":"Whether the amounts above are net of tax (`true`) or include it (`false`): the value the offer was made with. Absent on an offer made before this field existed, whose amounts follow the product's `has_net_price`.","type":"boolean","uniqueKey":"data.payment_plan_snapshot.has_net_price","typeLabel":"boolean"}},"required":["plan_type","currency","quantity","price_minor_units","shipping_price_minor_units","recurring_amount_minor_units","interval","interval_count","installment_count","second_payment_in","trial_days","custom_plan_name"],"type":"object","isRequired":true,"uniqueKey":"data.payment_plan_snapshot","typeLabel":"object"},"product":{"oneOf":[{"additionalProperties":false,"properties":{"id":{"example":"prod_A1b2C3d4","pattern":"^prod_[A-Za-z0-9]{8,32}$","type":"string","isRequired":true,"uniqueKey":"data.product.oneOf.0.id","typeLabel":"string"},"name":{"type":"string","isRequired":true,"uniqueKey":"data.product.oneOf.0.name","typeLabel":"string"}},"required":["id","name"],"type":"object","isRequired":true,"uniqueKey":"data.product.oneOf.0","typeLabel":"object"},{"additionalProperties":false,"properties":{"id":{"example":"prod_A1b2C3d4","pattern":"^prod_[A-Za-z0-9]{8,32}$","type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"null","isRequired":true,"uniqueKey":"data.product.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.product","typeLabel":"object | null"},"public_url":{"type":"string","isRequired":true,"uniqueKey":"data.public_url","typeLabel":"string"},"regeneration_eligible":{"type":"boolean","isRequired":true,"uniqueKey":"data.regeneration_eligible","typeLabel":"boolean"},"status":{"type":"string","isRequired":true,"uniqueKey":"data.status","typeLabel":"string"},"embed_origin":{"description":"The one origin allowed to frame `embed_url`. Absent — not null — when the offer cannot be framed.","pattern":"^https://[^@/?#\\s]+$","type":"string","uniqueKey":"data.embed_origin","typeLabel":"string"},"embed_url":{"description":"Pass to the Checkout SDK's `mountCheckout` on `embed_origin` to open this offer's checkout inside your own page. The framed page waits for the SDK's mount handshake, so a bare iframe never loads. The same checkout `public_url` redirects to, not a second one. Absent — not null — when the offer cannot be framed.","type":"string","uniqueKey":"data.embed_url","typeLabel":"string"},"external_reference":{"description":"The reference the offer carries — the `external_reference` it was created with. Absent — not null — when it has none.","type":"string","uniqueKey":"data.external_reference","typeLabel":"string"},"metadata":{"type":"object","description":"Your own keys the offer carries — the `metadata` it was created with. Absent — not `{}` — when it has none.","maxProperties":50,"additionalProperties":true,"uniqueKey":"data.metadata","typeLabel":"object"}},"required":["buyer_profile","cancelled_at","cancelled_reason","created_at","expires_at","extra_lines","id","last_buyer_notification_at","next_resend_available_at","order","ordered_at","payment_plan_snapshot","product","public_url","regeneration_eligible","status"],"type":"object","isRequired":true,"uniqueKey":"data","typeLabel":"object"}},"required":["data"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"data":{"buyer_profile":{"address":{"city":"\u003cstring>","line1":"\u003cstring>","line2":"\u003cstring>","postal_code":"\u003cstring>"},"company_name":"\u003cstring>","country":"\u003cstring>","email":"\u003cstring>","first_name":"\u003cstring>","last_name":"\u003cstring>","locale":"\u003cstring>","phone":"\u003cstring>","state":"\u003cstring>","type":"\u003cstring>","vat_id":"\u003cstring>"},"cancelled_at":"\u003cstring>","cancelled_reason":"\u003cstring>","created_at":"\u003cstring>","expires_at":"\u003cstring>","extra_lines":[{"payment_plan_snapshot":{"currency":"\u003cstring>","custom_plan_name":"\u003cstring>","installment_count":123,"interval":"\u003cstring>","interval_count":123,"plan_type":"\u003cstring>","price_minor_units":123,"quantity":123,"recurring_amount_minor_units":123,"second_payment_in":123,"shipping_price_minor_units":123,"trial_days":123,"has_net_price":true},"product":{"id":"prod_A1b2C3d4","name":"\u003cstring>","object":"product"},"quantity":123}],"id":"of_A1b2C3d4E5f6","last_buyer_notification_at":"\u003cstring>","next_resend_available_at":"\u003cstring>","order":{"id":"ord_A1b2C3d4E5f6"},"ordered_at":"\u003cstring>","payment_plan_snapshot":{"currency":"\u003cstring>","custom_plan_name":"\u003cstring>","installment_count":123,"interval":"\u003cstring>","interval_count":123,"plan_type":"\u003cstring>","price_minor_units":123,"quantity":123,"recurring_amount_minor_units":123,"second_payment_in":123,"shipping_price_minor_units":123,"trial_days":123,"has_net_price":true},"product":{"id":"prod_A1b2C3d4","name":"\u003cstring>"},"public_url":"\u003cstring>","regeneration_eligible":true,"status":"\u003cstring>","embed_origin":"\u003cstring>","embed_url":"\u003cstring>","external_reference":"\u003cstring>","metadata":{}}}}},"exampleType":"generated"}},"description":"Successful response","exampleType":"generated"},"61669a77-3930-4d6f-8e82-86061a96fe32":{"content":{"application/problem+json":{"examples":{"idempotency_key_required":{"title":"idempotency_key_required","summary":"Missing Idempotency-Key header","value":{"code":"idempotency_key_required","detail":"Idempotency-Key header is required for this operation","errors":[{"code":"idempotency_key_required","detail":"Idempotency-Key header is required for this operation"}],"request_id":"0b6e3f2a-8c4d-4f1e-9a7b-5d2c8e1f4a90","status":400,"title":"Idempotency Key Required","type":"https://docs.cope.com/errors/idempotency_key_required"}},"offer_missing_product_id":{"title":"offer_missing_product_id","summary":"The body names no product","value":{"code":"invalid_request","detail":"param is missing or the value is empty or invalid: product_id","errors":[{"code":"missing","detail":"param is missing or the value is empty or invalid: product_id","param":"product_id"}],"request_id":"0b6e3f2a-8c4d-4f1e-9a7b-5d2c8e1f4a90","status":400,"title":"Invalid Request","type":"https://docs.cope.com/errors/invalid_request"}},"offer_unsupported_member":{"title":"offer_unsupported_member","summary":"The body carries a member this operation does not accept","value":{"code":"invalid_request","detail":"pricing.price is not supported by this public endpoint","errors":[{"code":"unsupported","detail":"pricing.price is not supported by this public endpoint","param":"pricing.price"}],"request_id":"0b6e3f2a-8c4d-4f1e-9a7b-5d2c8e1f4a90","status":400,"title":"Invalid Request","type":"https://docs.cope.com/errors/invalid_request"}},"offer_mistyped_member":{"title":"offer_mistyped_member","summary":"A member carries a value of the wrong type","value":{"code":"invalid_request","detail":"pricing.price_minor_units must be an integer","errors":[{"code":"invalid","detail":"pricing.price_minor_units must be an integer","param":"pricing.price_minor_units"}],"request_id":"0b6e3f2a-8c4d-4f1e-9a7b-5d2c8e1f4a90","status":400,"title":"Invalid Request","type":"https://docs.cope.com/errors/invalid_request"}},"unparsable_request":{"title":"unparsable_request","summary":"Unparsable request","value":{"code":"invalid_request","detail":"The request could not be parsed. Check the query string and the request body.","request_id":"0b6e3f2a-8c4d-4f1e-9a7b-5d2c8e1f4a90","status":400,"title":"Invalid Request","type":"https://docs.cope.com/errors/invalid_request"}},"invalid_idempotency_key":{"title":"invalid_idempotency_key","summary":"Malformed Idempotency-Key header","value":{"code":"invalid_idempotency_key","detail":"Idempotency-Key header must be at most 255 characters of valid UTF-8 without a NUL byte","request_id":"0b6e3f2a-8c4d-4f1e-9a7b-5d2c8e1f4a90","status":400,"title":"Invalid Idempotency Key","type":"https://docs.cope.com/errors/invalid_idempotency_key"}}},"schema":{"additionalProperties":false,"properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"request_id":{"description":"Correlates this response with COPE's logs; the response also carries it as `X-Request-Id`. It is the `X-Request-Id` you sent when that is 1-128 letters, digits, `_`, `@` or `-`, and otherwise one COPE generated. Quote it when you contact support.","type":"string","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"status":{"type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"title":{"type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"type":{"type":"string","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"detail":{"oneOf":[{"type":"string","uniqueKey":"detail.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"detail.oneOf.1","typeLabel":"null"}],"uniqueKey":"detail","typeLabel":"string | null"},"errors":{"items":{"additionalProperties":false,"properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].code","typeLabel":"string"},"detail":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].detail","typeLabel":"string"},"param":{"type":"string","uniqueKey":"errors.items.[INDEX].param","typeLabel":"string"}},"required":["code","detail"],"type":"object","uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"type":"array","uniqueKey":"errors","typeLabel":"object[]"}},"required":["type","title","status","code","request_id"],"type":"object","uniqueKey":"","typeLabel":"object"},"exampleType":"examples"}},"description":"Invalid request","exampleType":"examples"},"ba41eac6-2709-4498-8f94-23cc81c559c0":{"content":{"application/problem+json":{"schema":{"additionalProperties":false,"properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"request_id":{"description":"Correlates this response with COPE's logs; the response also carries it as `X-Request-Id`. It is the `X-Request-Id` you sent when that is 1-128 letters, digits, `_`, `@` or `-`, and otherwise one COPE generated. Quote it when you contact support.","type":"string","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"status":{"type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"title":{"type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"type":{"type":"string","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"detail":{"oneOf":[{"type":"string","uniqueKey":"detail.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"detail.oneOf.1","typeLabel":"null"}],"uniqueKey":"detail","typeLabel":"string | null"},"errors":{"items":{"additionalProperties":false,"properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].code","typeLabel":"string"},"detail":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].detail","typeLabel":"string"},"param":{"type":"string","uniqueKey":"errors.items.[INDEX].param","typeLabel":"string"}},"required":["code","detail"],"type":"object","uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"type":"array","uniqueKey":"errors","typeLabel":"object[]"}},"required":["type","title","status","code","request_id"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"\u003cstring>","request_id":"\u003cstring>","status":123,"title":"\u003cstring>","type":"\u003cstring>","detail":"\u003cstring>","errors":[{"code":"\u003cstring>","detail":"\u003cstring>","param":"\u003cstring>"}]}}},"exampleType":"generated"}},"description":"Missing or invalid bearer token","exampleType":"generated"},"5c010286-578a-41a6-8c8d-47574862f423":{"content":{"application/problem+json":{"schema":{"additionalProperties":false,"properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"request_id":{"description":"Correlates this response with COPE's logs; the response also carries it as `X-Request-Id`. It is the `X-Request-Id` you sent when that is 1-128 letters, digits, `_`, `@` or `-`, and otherwise one COPE generated. Quote it when you contact support.","type":"string","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"status":{"type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"title":{"type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"type":{"type":"string","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"detail":{"oneOf":[{"type":"string","uniqueKey":"detail.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"detail.oneOf.1","typeLabel":"null"}],"uniqueKey":"detail","typeLabel":"string | null"},"errors":{"items":{"additionalProperties":false,"properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].code","typeLabel":"string"},"detail":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].detail","typeLabel":"string"},"param":{"type":"string","uniqueKey":"errors.items.[INDEX].param","typeLabel":"string"}},"required":["code","detail"],"type":"object","uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"type":"array","uniqueKey":"errors","typeLabel":"object[]"}},"required":["type","title","status","code","request_id"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"\u003cstring>","request_id":"\u003cstring>","status":123,"title":"\u003cstring>","type":"\u003cstring>","detail":"\u003cstring>","errors":[{"code":"\u003cstring>","detail":"\u003cstring>","param":"\u003cstring>"}]}}},"exampleType":"generated"}},"description":"Bearer token is not authorized for this route","exampleType":"generated"},"1a0f7761-263b-48d8-853f-2aa67aebb6cc":{"content":{"application/problem+json":{"schema":{"additionalProperties":false,"properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"request_id":{"description":"Correlates this response with COPE's logs; the response also carries it as `X-Request-Id`. It is the `X-Request-Id` you sent when that is 1-128 letters, digits, `_`, `@` or `-`, and otherwise one COPE generated. Quote it when you contact support.","type":"string","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"status":{"type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"title":{"type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"type":{"type":"string","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"detail":{"oneOf":[{"type":"string","uniqueKey":"detail.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"detail.oneOf.1","typeLabel":"null"}],"uniqueKey":"detail","typeLabel":"string | null"},"errors":{"items":{"additionalProperties":false,"properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].code","typeLabel":"string"},"detail":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].detail","typeLabel":"string"},"param":{"type":"string","uniqueKey":"errors.items.[INDEX].param","typeLabel":"string"}},"required":["code","detail"],"type":"object","uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"type":"array","uniqueKey":"errors","typeLabel":"object[]"}},"required":["type","title","status","code","request_id"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"\u003cstring>","request_id":"\u003cstring>","status":123,"title":"\u003cstring>","type":"\u003cstring>","detail":"\u003cstring>","errors":[{"code":"\u003cstring>","detail":"\u003cstring>","param":"\u003cstring>"}]}}},"exampleType":"generated"}},"description":"Resource not found","exampleType":"generated"},"d8f8ce36-5466-4114-a45f-f4367950b337":{"content":{"application/problem+json":{"examples":{"idempotency_conflict_in_flight":{"title":"idempotency_conflict_in_flight","summary":"A request with this key is still processing","value":{"code":"idempotency_conflict","detail":"A request with this idempotency key is currently being processed","request_id":"0b6e3f2a-8c4d-4f1e-9a7b-5d2c8e1f4a90","status":409,"title":"Idempotency Conflict","type":"https://docs.cope.com/errors/idempotency_conflict"}},"idempotency_conflict_body_mismatch":{"title":"idempotency_conflict_body_mismatch","summary":"The key was reused with a different body","value":{"code":"idempotency_conflict","detail":"Request body does not match the original request for this idempotency key","request_id":"0b6e3f2a-8c4d-4f1e-9a7b-5d2c8e1f4a90","status":409,"title":"Idempotency Conflict","type":"https://docs.cope.com/errors/idempotency_conflict"}}},"schema":{"additionalProperties":false,"properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"request_id":{"description":"Correlates this response with COPE's logs; the response also carries it as `X-Request-Id`. It is the `X-Request-Id` you sent when that is 1-128 letters, digits, `_`, `@` or `-`, and otherwise one COPE generated. Quote it when you contact support.","type":"string","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"status":{"type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"title":{"type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"type":{"type":"string","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"detail":{"oneOf":[{"type":"string","uniqueKey":"detail.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"detail.oneOf.1","typeLabel":"null"}],"uniqueKey":"detail","typeLabel":"string | null"},"errors":{"items":{"additionalProperties":false,"properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].code","typeLabel":"string"},"detail":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].detail","typeLabel":"string"},"param":{"type":"string","uniqueKey":"errors.items.[INDEX].param","typeLabel":"string"}},"required":["code","detail"],"type":"object","uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"type":"array","uniqueKey":"errors","typeLabel":"object[]"}},"required":["type","title","status","code","request_id"],"type":"object","uniqueKey":"","typeLabel":"object"},"exampleType":"examples"}},"description":"The idempotency key cannot be honoured: either the first request carrying it is still processing, or it was reused with a different body. Retry the first case unchanged to collect the original response; the second needs the original body, or a new key for a genuinely new request.","exampleType":"examples"},"e5a53365-c608-4c53-a693-d3420dc38285":{"content":{"application/problem+json":{"examples":{"offer_validation_failed":{"title":"offer_validation_failed","summary":"Validation failed","value":{"code":"validation_failed","detail":"is required for all countries","errors":[{"code":"invalid","detail":"is required for all countries","param":"buyer.address.postal_code"}],"request_id":"0b6e3f2a-8c4d-4f1e-9a7b-5d2c8e1f4a90","status":422,"title":"Validation Failed","type":"https://docs.cope.com/errors/validation_failed"}},"offer_metadata_reserved_key":{"title":"offer_metadata_reserved_key","summary":"external_reference sent inside metadata","value":{"code":"reserved_metadata_key","detail":"Send external_reference as a top-level member, not inside metadata","errors":[{"code":"reserved_metadata_key","detail":"Send external_reference as a top-level member, not inside metadata","param":"metadata.external_reference"}],"request_id":"0b6e3f2a-8c4d-4f1e-9a7b-5d2c8e1f4a90","status":422,"title":"Reserved Metadata Key","type":"https://docs.cope.com/errors/reserved_metadata_key"}},"offer_embed_origin_not_allowed":{"title":"offer_embed_origin_not_allowed","summary":"embed_origin is not a registered, enabled origin for this seller","value":{"code":"embed_origin_not_allowed","detail":"embed_origin is not a registered, enabled embed domain for this seller. Register it first, then create the offer.","errors":[{"code":"embed_origin_not_allowed","detail":"embed_origin is not a registered, enabled embed domain for this seller. Register it first, then create the offer."}],"request_id":"0b6e3f2a-8c4d-4f1e-9a7b-5d2c8e1f4a90","status":422,"title":"Embed Origin Not Allowed","type":"https://docs.cope.com/errors/embed_origin_not_allowed"}},"tax_address_invalid":{"title":"tax_address_invalid","summary":"Tax address invalid","value":{"code":"tax_address_invalid","detail":"We couldn't calculate tax for this address. Please check it and try again.","errors":[{"code":"tax_address_invalid","detail":"We couldn't calculate tax for this address. Please check it and try again."}],"request_id":"0b6e3f2a-8c4d-4f1e-9a7b-5d2c8e1f4a90","status":422,"title":"Tax Address Invalid","type":"https://docs.cope.com/errors/tax_address_invalid"}},"tax_request_rejected":{"title":"tax_request_rejected","summary":"Tax request rejected","value":{"code":"tax_request_rejected","detail":"We couldn't calculate tax for this order. Please review the billing details, or contact support if the problem continues.","errors":[{"code":"tax_request_rejected","detail":"We couldn't calculate tax for this order. Please review the billing details, or contact support if the problem continues."}],"request_id":"0b6e3f2a-8c4d-4f1e-9a7b-5d2c8e1f4a90","status":422,"title":"Tax Request Rejected","type":"https://docs.cope.com/errors/tax_request_rejected"}},"vendor_not_payout_eligible":{"title":"vendor_not_payout_eligible","summary":"The business cannot take payments yet","value":{"code":"vendor_not_payout_eligible","detail":"The business cannot take payments yet: its payout account is not verified","errors":[{"code":"vendor_not_payout_eligible","detail":"The business cannot take payments yet: its payout account is not verified"}],"request_id":"0b6e3f2a-8c4d-4f1e-9a7b-5d2c8e1f4a90","status":422,"title":"Vendor Not Payout Eligible","type":"https://docs.cope.com/errors/vendor_not_payout_eligible"}},"product_unavailable":{"title":"product_unavailable","summary":"The product cannot be sold now","value":{"code":"product_unavailable","detail":"Product prod_A1b2C3d4E5f6G7h8 is not available (status=inactive, approval_status=review, payment plans=1)","errors":[{"code":"product_unavailable","detail":"Product prod_A1b2C3d4E5f6G7h8 is not available (status=inactive, approval_status=review, payment plans=1)"}],"request_id":"0b6e3f2a-8c4d-4f1e-9a7b-5d2c8e1f4a90","status":422,"title":"Product Unavailable","type":"https://docs.cope.com/errors/product_unavailable"}}},"schema":{"additionalProperties":false,"properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"request_id":{"description":"Correlates this response with COPE's logs; the response also carries it as `X-Request-Id`. It is the `X-Request-Id` you sent when that is 1-128 letters, digits, `_`, `@` or `-`, and otherwise one COPE generated. Quote it when you contact support.","type":"string","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"status":{"type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"title":{"type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"type":{"type":"string","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"detail":{"oneOf":[{"type":"string","uniqueKey":"detail.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"detail.oneOf.1","typeLabel":"null"}],"uniqueKey":"detail","typeLabel":"string | null"},"errors":{"items":{"additionalProperties":false,"properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].code","typeLabel":"string"},"detail":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].detail","typeLabel":"string"},"param":{"type":"string","uniqueKey":"errors.items.[INDEX].param","typeLabel":"string"}},"required":["code","detail"],"type":"object","uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"type":"array","uniqueKey":"errors","typeLabel":"object[]"}},"required":["type","title","status","code","request_id"],"type":"object","uniqueKey":"","typeLabel":"object"},"exampleType":"examples"}},"description":"Public commerce validation problem. A `buyer.email` whose domain does not exist in DNS is `validation_failed` with `errors[].code` `email_domain_not_found`; one whose domain DNS cannot answer for is accepted. An installment plan for a buyer whose country does not allow a new one is `validation_failed` with `errors[].code` `installment_not_available_in_country` on `pricing.plan_type`, as is one whose country is no two-letter ISO 3166-1 code while any country is restricted. A product none of whose payment methods can pay the offer for its buyer and payment plan is `no_payable_payment_method` on `product_id`: a company cannot pay with a method Stripe offers to consumers only, such as Klarna, and a person cannot pay with one it offers to businesses only, such as Billie. Also `invalid_parameter` (a value that cannot be read, such as `link_expiration`).","exampleType":"examples"},"3d4b177f-6e95-40ee-a742-278f7953c5ab":{"content":{"application/problem+json":{"examples":{"tax_calculation_failed":{"title":"tax_calculation_failed","summary":"Tax could not be calculated","value":{"code":"tax_calculation_failed","detail":"Tax could not be calculated for this order.","errors":[{"code":"tax_calculation_failed","detail":"Tax could not be calculated for this order."}],"request_id":"0b6e3f2a-8c4d-4f1e-9a7b-5d2c8e1f4a90","status":500,"title":"Tax Calculation Failed","type":"https://docs.cope.com/errors/tax_calculation_failed"}}},"schema":{"additionalProperties":false,"properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"request_id":{"description":"Correlates this response with COPE's logs; the response also carries it as `X-Request-Id`. It is the `X-Request-Id` you sent when that is 1-128 letters, digits, `_`, `@` or `-`, and otherwise one COPE generated. Quote it when you contact support.","type":"string","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"status":{"type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"title":{"type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"type":{"type":"string","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"detail":{"oneOf":[{"type":"string","uniqueKey":"detail.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"detail.oneOf.1","typeLabel":"null"}],"uniqueKey":"detail","typeLabel":"string | null"},"errors":{"items":{"additionalProperties":false,"properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].code","typeLabel":"string"},"detail":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].detail","typeLabel":"string"},"param":{"type":"string","uniqueKey":"errors.items.[INDEX].param","typeLabel":"string"}},"required":["code","detail"],"type":"object","uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"type":"array","uniqueKey":"errors","typeLabel":"object[]"}},"required":["type","title","status","code","request_id"],"type":"object","uniqueKey":"","typeLabel":"object"},"exampleType":"examples"}},"description":"Tax could not be calculated for this order for a reason other than the address or the tax provider (`tax_calculation_failed`). Quote `request_id` to COPE support.","exampleType":"examples"},"f537999c-a79b-4f32-82f7-3e0e67ba6cac":{"content":{"application/problem+json":{"examples":{"tax_service_unavailable":{"title":"tax_service_unavailable","summary":"Tax service unavailable","value":{"code":"tax_service_unavailable","detail":"Tax calculation is temporarily unavailable","request_id":"0b6e3f2a-8c4d-4f1e-9a7b-5d2c8e1f4a90","status":503,"title":"Tax Service Unavailable","type":"https://docs.cope.com/errors/tax_service_unavailable"}},"user_not_ready":{"title":"user_not_ready","summary":"The key's user is not available yet","value":{"code":"user_not_ready","detail":"Retry after 2 seconds","errors":[{"code":"user_not_ready","detail":"Retry after 2 seconds"}],"request_id":"0b6e3f2a-8c4d-4f1e-9a7b-5d2c8e1f4a90","status":503,"title":"User Not Ready","type":"https://docs.cope.com/errors/user_not_ready"}},"tenant_not_ready":{"title":"tenant_not_ready","summary":"The key's business is not available yet","value":{"code":"tenant_not_ready","detail":"Retry after 2 seconds","errors":[{"code":"tenant_not_ready","detail":"Retry after 2 seconds"}],"request_id":"0b6e3f2a-8c4d-4f1e-9a7b-5d2c8e1f4a90","status":503,"title":"Tenant Not Ready","type":"https://docs.cope.com/errors/tenant_not_ready"}}},"schema":{"additionalProperties":false,"properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"request_id":{"description":"Correlates this response with COPE's logs; the response also carries it as `X-Request-Id`. It is the `X-Request-Id` you sent when that is 1-128 letters, digits, `_`, `@` or `-`, and otherwise one COPE generated. Quote it when you contact support.","type":"string","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"status":{"type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"title":{"type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"type":{"type":"string","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"detail":{"oneOf":[{"type":"string","uniqueKey":"detail.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"detail.oneOf.1","typeLabel":"null"}],"uniqueKey":"detail","typeLabel":"string | null"},"errors":{"items":{"additionalProperties":false,"properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].code","typeLabel":"string"},"detail":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].detail","typeLabel":"string"},"param":{"type":"string","uniqueKey":"errors.items.[INDEX].param","typeLabel":"string"}},"required":["code","detail"],"type":"object","uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"type":"array","uniqueKey":"errors","typeLabel":"object[]"}},"required":["type","title","status","code","request_id"],"type":"object","uniqueKey":"","typeLabel":"object"},"exampleType":"examples"}},"description":"Tax calculation is temporarily unavailable. Or: The API key is valid but its user or business is not available to this API yet (`user_not_ready`, `tenant_not_ready`). Retry after the `Retry-After` seconds.","exampleType":"examples"}},"security":{"23515acb-3319-4b53-8e47-254ac81bdf2c":{"cope_sk":{"description":"Bearer credential for the public API: a live COPE API key (`ck_live_*`; keys issued earlier as `cope_sk_live_*` keep working). Dashboard sign-in tokens are not accepted.","scheme":"bearer","type":"http","scopes":[],"schemeName":"cope_sk"}}},"servers":{"89e8b38d-aa16-49e3-b1cf-383f367594ab":{"description":"Production","url":"https://api.cope.com"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"description":"Bearer credential for the public API: a live COPE API key (`ck_live_*`; keys issued earlier as `cope_sk_live_*` keep working). Dashboard sign-in tokens are not accepted.","scheme":"bearer","type":"http","scopes":[],"schemeName":"cope_sk"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer credential for the public API: a live COPE API key (`ck_live_*`; keys issued earlier as `cope_sk_live_*` keep working). Dashboard sign-in tokens are not accepted.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"cope_sk","name":"Authorization"}],"title":"cope_sk"}]},"originalFileLocation":"api-reference/commerce-v1.openapi.json"},"subdomain":"cope-demo","siteName":"COPE","title":"Create an offer - COPE","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-21T05:31:59.018Z","originalFileLocation":"api-reference/offers/create-an-offer.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=\"Prices one product for one named buyer and returns a private checkout link made out to them. The price, the quantity and the buyer are settled here and are read-only on the offer page, so everything the order will need has to be supplied in this request. The offer accepts the payment methods the product already accepts; they cannot be chosen per offer. Creating an offer does not notify the buyer — the link comes back as public_url and is yours to send. The body is read exactly as written. A member this reference does not list, at any depth, is refused with 400 invalid_request rather than ignored, and so is a value of the wrong JSON type — \u0026quot;24900\u0026quot; is not read as the integer 24900 — and any parameter sent in the query string. The one member read without being listed is the name the first edition of this reference gave product_id, still accepted in its place. An explicit null for any member, at any depth, is read as leaving it out. A body that names no product_id is a 400 too; 404 means the product named is not one you can sell. ### Choosing a payment plan pricing.plan_type decides the rest of the body. Send the fields its row asks for; every other field under pricing is optional under all three plan types. | plan_type | What the buyer is charged | Send alongside plan_type and price_minor_units | | --- | --- | --- | | one_time | price_minor_units, once. | nothing | | subscription | price_minor_units now, then recurring_amount_minor_units every billing period until the subscription is cancelled. | recurring_amount_minor_units, interval, interval_count | | installment | price_minor_units now, then recurring_amount_minor_units every billing period until installment_count payments have been made in total, counting the first. | recurring_amount_minor_units, interval, interval_count, installment_count | The billing period is interval × interval_count — month × 3 bills quarterly — and a single period may not be longer than two years. second_payment_in, trial_days, shipping_price_minor_units and custom_plan_name stay optional under every plan type. installment is accepted only from sellers enabled for installment sales; one_time and subscription are open to every seller. The currency is the one line in the examples below that is not yours to copy: it must be one the seller can actually be paid in, which means a currency COPE charges in that is also the currency of one of the seller\u0026#x27;s payout bank accounts. The currencies of the product\u0026#x27;s own payment plans are not considered. The examples are priced in EUR, and a seller whose payout accounts are all in USD is refused with 422 validation_failed, errors[].param pricing.currency, naming the currencies they can use — no offer is created. Send theirs. Without pricing.trial_days, the buyer gets the product\u0026#x27;s own free trial (trial_period_days), whatever the plan_type, one_time included. Send trial_days: 0 for no trial. ### Selling more than one product Send extra_lines to sell other products of yours on the same offer. Each names its product, quantity and pricing, read as the top-level pricing is: its own plan type, price and trial, in the offer\u0026#x27;s currency. The buyer sees each as an ordinary line and pays for all of them in one checkout. The offer takes the payment methods product_id accepts; an extra product does not narrow them. ### Opening the offer inside your own page By default the buyer follows public_url, which redirects them to the offer\u0026#x27;s checkout on COPE. Send embed_origin instead and the same checkout can be framed in your own page: the offer comes back with an embed_url and embed_origin echoing the one origin allowed to frame it. Both are absent — not null — on an offer that cannot be framed, and public_url keeps working either way. Hand both to the Checkout SDK\u0026#x27;s mountCheckout rather than building the iframe yourself: the framed page waits for a mount handshake from its parent before it starts, so a bare never loads. embed_origin must be an origin you have already registered and enabled for checkout embedding. An origin you have not registered, one another seller registered, and one that has been disabled or archived are each refused with 422 embed_origin_not_allowed, and no offer is created. Disabling or archiving the origin afterwards stops every offer embed bound to it. ### Matching the order to your own records Send external_reference — your customer, deal or quote id — and any metadata of your own. Both are returned on the offer, and once the buyer pays, the order the offer becomes carries them on every order and payment webhook: in metadata on cart.order.created and cart.order.completed, and in order.metadata on every payment.* event, with order.source set to offer. The buyer cannot change them on the offer\u0026#x27;s checkout. Identify the order by its id, not by the reference: a checkout link can carry the same external_reference. Once the offer is paid, retrieving it returns order.id, the order the payment webhooks name; use external_reference to group that order with your own record. external_reference is a reserved key: send it as its own member, never inside metadata, where it is refused with 422 reserved_metadata_key. Requires the orders permission at write. An API key holds a permission at the lower of its own level (read for a read-only key) and its holder\u0026#x27;s role; a key without it is refused with 403.\">\u003cmeta data-mint-head name=\"application-name\" content=\"COPE\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/cope-demo/_generated/favicon/apple-touch-icon.png?v=3\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/cope-demo/_generated/favicon/favicon-32x32.png?v=3\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/cope-demo/_generated/favicon/favicon-16x16.png?v=3\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/cope-demo/_generated/favicon/favicon.ico?v=3\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create an offer - COPE\">\u003cmeta data-mint-head property=\"og:description\" content=\"Prices one product for one named buyer and returns a private checkout link made out to them. The price, the quantity and the buyer are settled here and are read-only on the offer page, so everything the order will need has to be supplied in this request. The offer accepts the payment methods the product already accepts; they cannot be chosen per offer. Creating an offer does not notify the buyer — the link comes back as public_url and is yours to send. The body is read exactly as written. A member this reference does not list, at any depth, is refused with 400 invalid_request rather than ignored, and so is a value of the wrong JSON type — \u0026quot;24900\u0026quot; is not read as the integer 24900 — and any parameter sent in the query string. The one member read without being listed is the name the first edition of this reference gave product_id, still accepted in its place. An explicit null for any member, at any depth, is read as leaving it out. A body that names no product_id is a 400 too; 404 means the product named is not one you can sell. ### Choosing a payment plan pricing.plan_type decides the rest of the body. Send the fields its row asks for; every other field under pricing is optional under all three plan types. | plan_type | What the buyer is charged | Send alongside plan_type and price_minor_units | | --- | --- | --- | | one_time | price_minor_units, once. | nothing | | subscription | price_minor_units now, then recurring_amount_minor_units every billing period until the subscription is cancelled. | recurring_amount_minor_units, interval, interval_count | | installment | price_minor_units now, then recurring_amount_minor_units every billing period until installment_count payments have been made in total, counting the first. | recurring_amount_minor_units, interval, interval_count, installment_count | The billing period is interval × interval_count — month × 3 bills quarterly — and a single period may not be longer than two years. second_payment_in, trial_days, shipping_price_minor_units and custom_plan_name stay optional under every plan type. installment is accepted only from sellers enabled for installment sales; one_time and subscription are open to every seller. The currency is the one line in the examples below that is not yours to copy: it must be one the seller can actually be paid in, which means a currency COPE charges in that is also the currency of one of the seller\u0026#x27;s payout bank accounts. The currencies of the product\u0026#x27;s own payment plans are not considered. The examples are priced in EUR, and a seller whose payout accounts are all in USD is refused with 422 validation_failed, errors[].param pricing.currency, naming the currencies they can use — no offer is created. Send theirs. Without pricing.trial_days, the buyer gets the product\u0026#x27;s own free trial (trial_period_days), whatever the plan_type, one_time included. Send trial_days: 0 for no trial. ### Selling more than one product Send extra_lines to sell other products of yours on the same offer. Each names its product, quantity and pricing, read as the top-level pricing is: its own plan type, price and trial, in the offer\u0026#x27;s currency. The buyer sees each as an ordinary line and pays for all of them in one checkout. The offer takes the payment methods product_id accepts; an extra product does not narrow them. ### Opening the offer inside your own page By default the buyer follows public_url, which redirects them to the offer\u0026#x27;s checkout on COPE. Send embed_origin instead and the same checkout can be framed in your own page: the offer comes back with an embed_url and embed_origin echoing the one origin allowed to frame it. Both are absent — not null — on an offer that cannot be framed, and public_url keeps working either way. Hand both to the Checkout SDK\u0026#x27;s mountCheckout rather than building the iframe yourself: the framed page waits for a mount handshake from its parent before it starts, so a bare never loads. embed_origin must be an origin you have already registered and enabled for checkout embedding. An origin you have not registered, one another seller registered, and one that has been disabled or archived are each refused with 422 embed_origin_not_allowed, and no offer is created. Disabling or archiving the origin afterwards stops every offer embed bound to it. ### Matching the order to your own records Send external_reference — your customer, deal or quote id — and any metadata of your own. Both are returned on the offer, and once the buyer pays, the order the offer becomes carries them on every order and payment webhook: in metadata on cart.order.created and cart.order.completed, and in order.metadata on every payment.* event, with order.source set to offer. The buyer cannot change them on the offer\u0026#x27;s checkout. Identify the order by its id, not by the reference: a checkout link can carry the same external_reference. Once the offer is paid, retrieving it returns order.id, the order the payment webhooks name; use external_reference to group that order with your own record. external_reference is a reserved key: send it as its own member, never inside metadata, where it is refused with 422 reserved_metadata_key. Requires the orders permission at write. An API key holds a permission at the lower of its own level (read for a read-only key) and its holder\u0026#x27;s role; a key without it is refused with 403.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"COPE\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.staging.cope-demo.com/api-reference/offers/create-an-offer\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://cope-demo.mintlify.site/_mintlify/api/og/v2?division=Offers\u0026amp;title=Create+an+offer\u0026amp;description=Prices+one+product+for+one+named+buyer+and+returns+a+private+checkout+link+made+out+to%0Athem.+The+price%2C+the+quantity+and+the+buyer+are+settled+here+and+are+read\u0026amp;theme=91de461e0a61f712a6597810\u0026amp;signature=39129168b0ab99dfb53e431fc9e1b738377e19430487cd67daad6eceb83a2ca4\">\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 an offer - COPE\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Prices one product for one named buyer and returns a private checkout link made out to them. The price, the quantity and the buyer are settled here and are read-only on the offer page, so everything the order will need has to be supplied in this request. The offer accepts the payment methods the product already accepts; they cannot be chosen per offer. Creating an offer does not notify the buyer — the link comes back as public_url and is yours to send. The body is read exactly as written. A member this reference does not list, at any depth, is refused with 400 invalid_request rather than ignored, and so is a value of the wrong JSON type — \u0026quot;24900\u0026quot; is not read as the integer 24900 — and any parameter sent in the query string. The one member read without being listed is the name the first edition of this reference gave product_id, still accepted in its place. An explicit null for any member, at any depth, is read as leaving it out. A body that names no product_id is a 400 too; 404 means the product named is not one you can sell. ### Choosing a payment plan pricing.plan_type decides the rest of the body. Send the fields its row asks for; every other field under pricing is optional under all three plan types. | plan_type | What the buyer is charged | Send alongside plan_type and price_minor_units | | --- | --- | --- | | one_time | price_minor_units, once. | nothing | | subscription | price_minor_units now, then recurring_amount_minor_units every billing period until the subscription is cancelled. | recurring_amount_minor_units, interval, interval_count | | installment | price_minor_units now, then recurring_amount_minor_units every billing period until installment_count payments have been made in total, counting the first. | recurring_amount_minor_units, interval, interval_count, installment_count | The billing period is interval × interval_count — month × 3 bills quarterly — and a single period may not be longer than two years. second_payment_in, trial_days, shipping_price_minor_units and custom_plan_name stay optional under every plan type. installment is accepted only from sellers enabled for installment sales; one_time and subscription are open to every seller. The currency is the one line in the examples below that is not yours to copy: it must be one the seller can actually be paid in, which means a currency COPE charges in that is also the currency of one of the seller\u0026#x27;s payout bank accounts. The currencies of the product\u0026#x27;s own payment plans are not considered. The examples are priced in EUR, and a seller whose payout accounts are all in USD is refused with 422 validation_failed, errors[].param pricing.currency, naming the currencies they can use — no offer is created. Send theirs. Without pricing.trial_days, the buyer gets the product\u0026#x27;s own free trial (trial_period_days), whatever the plan_type, one_time included. Send trial_days: 0 for no trial. ### Selling more than one product Send extra_lines to sell other products of yours on the same offer. Each names its product, quantity and pricing, read as the top-level pricing is: its own plan type, price and trial, in the offer\u0026#x27;s currency. The buyer sees each as an ordinary line and pays for all of them in one checkout. The offer takes the payment methods product_id accepts; an extra product does not narrow them. ### Opening the offer inside your own page By default the buyer follows public_url, which redirects them to the offer\u0026#x27;s checkout on COPE. Send embed_origin instead and the same checkout can be framed in your own page: the offer comes back with an embed_url and embed_origin echoing the one origin allowed to frame it. Both are absent — not null — on an offer that cannot be framed, and public_url keeps working either way. Hand both to the Checkout SDK\u0026#x27;s mountCheckout rather than building the iframe yourself: the framed page waits for a mount handshake from its parent before it starts, so a bare never loads. embed_origin must be an origin you have already registered and enabled for checkout embedding. An origin you have not registered, one another seller registered, and one that has been disabled or archived are each refused with 422 embed_origin_not_allowed, and no offer is created. Disabling or archiving the origin afterwards stops every offer embed bound to it. ### Matching the order to your own records Send external_reference — your customer, deal or quote id — and any metadata of your own. Both are returned on the offer, and once the buyer pays, the order the offer becomes carries them on every order and payment webhook: in metadata on cart.order.created and cart.order.completed, and in order.metadata on every payment.* event, with order.source set to offer. The buyer cannot change them on the offer\u0026#x27;s checkout. Identify the order by its id, not by the reference: a checkout link can carry the same external_reference. Once the offer is paid, retrieving it returns order.id, the order the payment webhooks name; use external_reference to group that order with your own record. external_reference is a reserved key: send it as its own member, never inside metadata, where it is refused with 422 reserved_metadata_key. Requires the orders permission at write. An API key holds a permission at the lower of its own level (read for a read-only key) and its holder\u0026#x27;s role; a key without it is refused with 403.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://cope-demo.mintlify.site/_mintlify/api/og/v2?division=Offers\u0026amp;title=Create+an+offer\u0026amp;description=Prices+one+product+for+one+named+buyer+and+returns+a+private+checkout+link+made+out+to%0Athem.+The+price%2C+the+quantity+and+the+buyer+are+settled+here+and+are+read\u0026amp;theme=91de461e0a61f712a6597810\u0026amp;signature=39129168b0ab99dfb53e431fc9e1b738377e19430487cd67daad6eceb83a2ca4\">\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=\"https://mintlify.s3.us-west-1.amazonaws.com/cope-demo/_generated/favicon/browserconfig.xml?v=3\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"COPE\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#101828\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.staging.cope-demo.com/api-reference/offers/create-an-offer\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/offers/create-an-offer.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.staging.cope-demo.com/#organization\",\"name\":\"COPE\",\"url\":\"https://docs.staging.cope-demo.com\"},{\"@type\":\"WebSite\",\"@id\":\"https://docs.staging.cope-demo.com#website\",\"name\":\"COPE\",\"url\":\"https://docs.staging.cope-demo.com\",\"publisher\":{\"@id\":\"https://docs.staging.cope-demo.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.staging.cope-demo.com/api-reference/offers/create-an-offer#webpage\",\"url\":\"https://docs.staging.cope-demo.com/api-reference/offers/create-an-offer\",\"name\":\"Create an offer\",\"description\":\"Prices one product for one named buyer and returns a private checkout link made out to them. The price, the quantity and the buyer are settled here and are read-only on the offer page, so everything the order will need has to be supplied in this request. The offer accepts the payment methods the product already accepts; they cannot be chosen per offer. Creating an offer does not notify the buyer — the link comes back as public_url and is yours to send. The body is read exactly as written. A member this reference does not list, at any depth, is refused with 400 invalid_request rather than ignored, and so is a value of the wrong JSON type — \\\"24900\\\" is not read as the integer 24900 — and any parameter sent in the query string. The one member read without being listed is the name the first edition of this reference gave product_id, still accepted in its place. An explicit null for any member, at any depth, is read as leaving it out. A body that names no product_id is a 400 too; 404 means the product named is not one you can sell. ### Choosing a payment plan pricing.plan_type decides the rest of the body. Send the fields its row asks for; every other field under pricing is optional under all three plan types. | plan_type | What the buyer is charged | Send alongside plan_type and price_minor_units | | --- | --- | --- | | one_time | price_minor_units, once. | nothing | | subscription | price_minor_units now, then recurring_amount_minor_units every billing period until the subscription is cancelled. | recurring_amount_minor_units, interval, interval_count | | installment | price_minor_units now, then recurring_amount_minor_units every billing period until installment_count payments have been made in total, counting the first. | recurring_amount_minor_units, interval, interval_count, installment_count | The billing period is interval × interval_count — month × 3 bills quarterly — and a single period may not be longer than two years. second_payment_in, trial_days, shipping_price_minor_units and custom_plan_name stay optional under every plan type. installment is accepted only from sellers enabled for installment sales; one_time and subscription are open to every seller. The currency is the one line in the examples below that is not yours to copy: it must be one the seller can actually be paid in, which means a currency COPE charges in that is also the currency of one of the seller's payout bank accounts. The currencies of the product's own payment plans are not considered. The examples are priced in EUR, and a seller whose payout accounts are all in USD is refused with 422 validation_failed, errors[].param pricing.currency, naming the currencies they can use — no offer is created. Send theirs. Without pricing.trial_days, the buyer gets the product's own free trial (trial_period_days), whatever the plan_type, one_time included. Send trial_days: 0 for no trial. ### Selling more than one product Send extra_lines to sell other products of yours on the same offer. Each names its product, quantity and pricing, read as the top-level pricing is: its own plan type, price and trial, in the offer's currency. The buyer sees each as an ordinary line and pays for all of them in one checkout. The offer takes the payment methods product_id accepts; an extra product does not narrow them. ### Opening the offer inside your own page By default the buyer follows public_url, which redirects them to the offer's checkout on COPE. Send embed_origin instead and the same checkout can be framed in your own page: the offer comes back with an embed_url and embed_origin echoing the one origin allowed to frame it. Both are absent — not null — on an offer that cannot be framed, and public_url keeps working either way. Hand both to the Checkout SDK's mountCheckout rather than building the iframe yourself: the framed page waits for a mount handshake from its parent before it starts, so a bare never loads. embed_origin must be an origin you have already registered and enabled for checkout embedding. An origin you have not registered, one another seller registered, and one that has been disabled or archived are each refused with 422 embed_origin_not_allowed, and no offer is created. Disabling or archiving the origin afterwards stops every offer embed bound to it. ### Matching the order to your own records Send external_reference — your customer, deal or quote id — and any metadata of your own. Both are returned on the offer, and once the buyer pays, the order the offer becomes carries them on every order and payment webhook: in metadata on cart.order.created and cart.order.completed, and in order.metadata on every payment.* event, with order.source set to offer. The buyer cannot change them on the offer's checkout. Identify the order by its id, not by the reference: a checkout link can carry the same external_reference. Once the offer is paid, retrieving it returns order.id, the order the payment webhooks name; use external_reference to group that order with your own record. external_reference is a reserved key: send it as its own member, never inside metadata, where it is refused with 422 reserved_metadata_key. Requires the orders permission at write. An API key holds a permission at the lower of its own level (read for a read-only key) and its holder's role; a key without it is refused with 403.\",\"dateModified\":\"2026-11-21T05:31:59.018Z\",\"isPartOf\":{\"@id\":\"https://docs.staging.cope-demo.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.staging.cope-demo.com/api-reference/offers/create-an-offer#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.staging.cope-demo.com/api-reference/offers/create-an-offer#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Public API\",\"item\":\"https://docs.staging.cope-demo.com/api-reference/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Commerce\",\"item\":\"https://docs.staging.cope-demo.com/api-reference/balances/list-balances\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Offers\",\"item\":\"https://docs.staging.cope-demo.com/api-reference/offers/list-offers\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Create an offer\",\"item\":\"https://docs.staging.cope-demo.com/api-reference/offers/create-an-offer\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.staging.cope-demo.com/api-reference/offers/create-an-offer#apireference\",\"headline\":\"Create an offer\",\"name\":\"Create an offer\",\"description\":\"Prices one product for one named buyer and returns a private checkout link made out to them. The price, the quantity and the buyer are settled here and are read-only on the offer page, so everything the order will need has to be supplied in this request. The offer accepts the payment methods the product already accepts; they cannot be chosen per offer. Creating an offer does not notify the buyer — the link comes back as public_url and is yours to send. The body is read exactly as written. A member this reference does not list, at any depth, is refused with 400 invalid_request rather than ignored, and so is a value of the wrong JSON type — \\\"24900\\\" is not read as the integer 24900 — and any parameter sent in the query string. The one member read without being listed is the name the first edition of this reference gave product_id, still accepted in its place. An explicit null for any member, at any depth, is read as leaving it out. A body that names no product_id is a 400 too; 404 means the product named is not one you can sell. ### Choosing a payment plan pricing.plan_type decides the rest of the body. Send the fields its row asks for; every other field under pricing is optional under all three plan types. | plan_type | What the buyer is charged | Send alongside plan_type and price_minor_units | | --- | --- | --- | | one_time | price_minor_units, once. | nothing | | subscription | price_minor_units now, then recurring_amount_minor_units every billing period until the subscription is cancelled. | recurring_amount_minor_units, interval, interval_count | | installment | price_minor_units now, then recurring_amount_minor_units every billing period until installment_count payments have been made in total, counting the first. | recurring_amount_minor_units, interval, interval_count, installment_count | The billing period is interval × interval_count — month × 3 bills quarterly — and a single period may not be longer than two years. second_payment_in, trial_days, shipping_price_minor_units and custom_plan_name stay optional under every plan type. installment is accepted only from sellers enabled for installment sales; one_time and subscription are open to every seller. The currency is the one line in the examples below that is not yours to copy: it must be one the seller can actually be paid in, which means a currency COPE charges in that is also the currency of one of the seller's payout bank accounts. The currencies of the product's own payment plans are not considered. The examples are priced in EUR, and a seller whose payout accounts are all in USD is refused with 422 validation_failed, errors[].param pricing.currency, naming the currencies they can use — no offer is created. Send theirs. Without pricing.trial_days, the buyer gets the product's own free trial (trial_period_days), whatever the plan_type, one_time included. Send trial_days: 0 for no trial. ### Selling more than one product Send extra_lines to sell other products of yours on the same offer. Each names its product, quantity and pricing, read as the top-level pricing is: its own plan type, price and trial, in the offer's currency. The buyer sees each as an ordinary line and pays for all of them in one checkout. The offer takes the payment methods product_id accepts; an extra product does not narrow them. ### Opening the offer inside your own page By default the buyer follows public_url, which redirects them to the offer's checkout on COPE. Send embed_origin instead and the same checkout can be framed in your own page: the offer comes back with an embed_url and embed_origin echoing the one origin allowed to frame it. Both are absent — not null — on an offer that cannot be framed, and public_url keeps working either way. Hand both to the Checkout SDK's mountCheckout rather than building the iframe yourself: the framed page waits for a mount handshake from its parent before it starts, so a bare never loads. embed_origin must be an origin you have already registered and enabled for checkout embedding. An origin you have not registered, one another seller registered, and one that has been disabled or archived are each refused with 422 embed_origin_not_allowed, and no offer is created. Disabling or archiving the origin afterwards stops every offer embed bound to it. ### Matching the order to your own records Send external_reference — your customer, deal or quote id — and any metadata of your own. Both are returned on the offer, and once the buyer pays, the order the offer becomes carries them on every order and payment webhook: in metadata on cart.order.created and cart.order.completed, and in order.metadata on every payment.* event, with order.source set to offer. The buyer cannot change them on the offer's checkout. Identify the order by its id, not by the reference: a checkout link can carry the same external_reference. Once the offer is paid, retrieving it returns order.id, the order the payment webhooks name; use external_reference to group that order with your own record. external_reference is a reserved key: send it as its own member, never inside metadata, where it is refused with 422 reserved_metadata_key. Requires the orders permission at write. An API key holds a permission at the lower of its own level (read for a read-only key) and its holder's role; a key without it is refused with 403.\",\"url\":\"https://docs.staging.cope-demo.com/api-reference/offers/create-an-offer\",\"mainEntityOfPage\":{\"@id\":\"https://docs.staging.cope-demo.com/api-reference/offers/create-an-offer#webpage\"},\"dateModified\":\"2026-11-21T05:31:59.018Z\",\"publisher\":{\"@id\":\"https://docs.staging.cope-demo.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.staging.cope-demo.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"COPE\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"COPE\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/offers/create-an-offer.md","siteName":"COPE","nav":{"global":null,"groups":[{"group":"Start","public":true,"icon":"play","root":{"title":"COPE developer docs","href":"/index"},"pages":[{"title":"Build a vendor integration","href":"/quickstart/build-an-integration"},{"title":"Consume webhooks","href":"/quickstart/consume-webhooks"}]},{"group":"Public API","public":true,"icon":"cart-shopping","root":{"title":"Public API overview","href":"/api-reference/overview"},"pages":[{"title":"Authentication","href":"/api-reference/authentication"},{"title":"API key integrations","href":"/api-reference/api-key-integrations"},{"title":"Errors","href":"/api-reference/errors"},{"group":"Commerce","public":true,"icon":"plug","pages":[{"group":"Balances","pages":[{"title":"List balances","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json get /v1/commerce/balances","href":"/api-reference/balances/list-balances"}]},{"group":"Chargebacks","pages":[{"title":"List chargebacks","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json get /v1/commerce/chargebacks","href":"/api-reference/chargebacks/list-chargebacks"},{"title":"Retrieve a chargeback","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json get /v1/commerce/chargebacks/{id}","href":"/api-reference/chargebacks/retrieve-a-chargeback"}]},{"group":"Checkouts","pages":[{"title":"Create a checkout","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json post /v1/commerce/checkouts","href":"/api-reference/checkouts/create-a-checkout"},{"title":"Retrieve a checkout","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json get /v1/commerce/checkouts/{id}","href":"/api-reference/checkouts/retrieve-a-checkout"}]},{"group":"Currencies","pages":[{"title":"Retrieve sellable currencies","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json get /v1/commerce/currencies","href":"/api-reference/currencies/retrieve-sellable-currencies"}]},{"group":"Disputes","pages":[{"title":"List disputes","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json get /v1/commerce/disputes","href":"/api-reference/disputes/list-disputes"},{"title":"Retrieve a dispute","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json get /v1/commerce/disputes/{id}","href":"/api-reference/disputes/retrieve-a-dispute"}]},{"group":"Invoices","pages":[{"title":"List invoices","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json get /v1/commerce/invoices","href":"/api-reference/invoices/list-invoices"},{"title":"Retrieve an invoice","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json get /v1/commerce/invoices/{id}","href":"/api-reference/invoices/retrieve-an-invoice"}]},{"group":"Offers","pages":[{"title":"List offers","description":"Requires the `orders` permission at `read`. An API key holds a permission at the lower of its own level (`read` for a read-only key) and its holder's role; a key without it is refused with 403.","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json get /v1/commerce/offers","href":"/api-reference/offers/list-offers"},{"title":"Create an offer","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json post /v1/commerce/offers","href":"/api-reference/offers/create-an-offer"},{"title":"Retrieve an offer","description":"Requires the `orders` permission at `read`. An API key holds a permission at the lower of its own level (`read` for a read-only key) and its holder's role; a key without it is refused with 403.","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json get /v1/commerce/offers/{id}","href":"/api-reference/offers/retrieve-an-offer"},{"title":"Cancel an offer","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json post /v1/commerce/offers/{id}/cancel","href":"/api-reference/offers/cancel-an-offer"},{"title":"Resend an offer to its buyer","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json post /v1/commerce/offers/{id}/resend","href":"/api-reference/offers/resend-an-offer-to-its-buyer"},{"title":"Send an offer to its buyer","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json post /v1/commerce/offers/{id}/send","href":"/api-reference/offers/send-an-offer-to-its-buyer"}]},{"group":"Orders","pages":[{"title":"List orders","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json get /v1/commerce/orders","href":"/api-reference/orders/list-orders"},{"title":"Retrieve an order","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json get /v1/commerce/orders/{id}","href":"/api-reference/orders/retrieve-an-order"}]},{"group":"Payments","pages":[{"title":"List payments","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json get /v1/commerce/payments","href":"/api-reference/payments/list-payments"},{"title":"Retrieve a payment","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json get /v1/commerce/payments/{id}","href":"/api-reference/payments/retrieve-a-payment"}]},{"group":"Refunds","pages":[{"title":"Refund a payment","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json post /v1/commerce/payments/{id}/refunds","href":"/api-reference/refunds/refund-a-payment"},{"title":"List refunds","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json get /v1/commerce/refunds","href":"/api-reference/refunds/list-refunds"},{"title":"Retrieve a refund","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json get /v1/commerce/refunds/{id}","href":"/api-reference/refunds/retrieve-a-refund"}]},{"group":"Payouts","pages":[{"title":"List payouts","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json get /v1/commerce/payouts","href":"/api-reference/payouts/list-payouts"},{"title":"Retrieve a payout","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json get /v1/commerce/payouts/{id}","href":"/api-reference/payouts/retrieve-a-payout"},{"title":"List a payout's transactions","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json get /v1/commerce/payouts/{id}/transactions","href":"/api-reference/payouts/list-a-payouts-transactions"}]},{"group":"Products","pages":[{"title":"List products","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json get /v1/commerce/products","href":"/api-reference/products/list-products"},{"title":"Create a product","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json post /v1/commerce/products","href":"/api-reference/products/create-a-product"},{"title":"Retrieve a product","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json get /v1/commerce/products/{id}","href":"/api-reference/products/retrieve-a-product"},{"title":"Update a product","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json patch /v1/commerce/products/{id}","href":"/api-reference/products/update-a-product"},{"title":"Attach a downloadable file","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json post /v1/commerce/products/{product_id}/attachments","href":"/api-reference/products/attach-a-downloadable-file"},{"title":"Attach a product image","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json post /v1/commerce/products/{product_id}/images","href":"/api-reference/products/attach-a-product-image"},{"title":"Create a media upload session","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json post /v1/commerce/uploads","href":"/api-reference/products/create-a-media-upload-session"}]},{"group":"Subscriptions","pages":[{"title":"List subscriptions changed in a time window","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json get /v1/commerce/subscriptions","href":"/api-reference/subscriptions/list-subscriptions-changed-in-a-time-window"},{"title":"Retrieve a subscription","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json get /v1/commerce/subscriptions/{id}","href":"/api-reference/subscriptions/retrieve-a-subscription"},{"title":"Cancel a subscription","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json post /v1/commerce/subscriptions/{id}/cancel","href":"/api-reference/subscriptions/cancel-a-subscription"},{"title":"List a subscription's price and plan change attempts","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json get /v1/commerce/subscriptions/{id}/changes","href":"/api-reference/subscriptions/list-a-subscriptions-price-and-plan-change-attempts"},{"title":"Pause a subscription's renewals","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json post /v1/commerce/subscriptions/{id}/pause","href":"/api-reference/subscriptions/pause-a-subscriptions-renewals"},{"title":"Create a payment recovery link","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json post /v1/commerce/subscriptions/{id}/payment-recovery-links","href":"/api-reference/subscriptions/create-a-payment-recovery-link"},{"title":"Move a subscription to another plan","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json post /v1/commerce/subscriptions/{id}/plan","href":"/api-reference/subscriptions/move-a-subscription-to-another-plan"},{"title":"Change a subscription's recurring amount","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json post /v1/commerce/subscriptions/{id}/price","href":"/api-reference/subscriptions/change-a-subscriptions-recurring-amount"},{"title":"Resume a paused subscription","deprecated":null,"version":null,"openapi":"/api-reference/commerce-v1.openapi.json post /v1/commerce/subscriptions/{id}/resume","href":"/api-reference/subscriptions/resume-a-paused-subscription"}]}]},{"group":"Webhooks","public":true,"icon":"webhook","pages":[{"group":"API Reference","pages":[{"title":"List webhook deliveries","deprecated":null,"version":null,"openapi":"/api-reference/account-platform-webhooks-v1.openapi.json get /v1/webhooks/deliveries","href":"/api-reference/list-webhook-deliveries"},{"title":"Retrieve a webhook delivery","deprecated":null,"version":null,"openapi":"/api-reference/account-platform-webhooks-v1.openapi.json get /v1/webhooks/deliveries/{delivery_id}","href":"/api-reference/retrieve-a-webhook-delivery"},{"title":"Replay a webhook delivery","deprecated":null,"version":null,"openapi":"/api-reference/account-platform-webhooks-v1.openapi.json post /v1/webhooks/deliveries/{delivery_id}/replay","href":"/api-reference/replay-a-webhook-delivery"},{"title":"List webhook endpoints","deprecated":null,"version":null,"openapi":"/api-reference/account-platform-webhooks-v1.openapi.json get /v1/webhooks/endpoints","href":"/api-reference/list-webhook-endpoints"},{"title":"Create a webhook endpoint","deprecated":null,"version":null,"openapi":"/api-reference/account-platform-webhooks-v1.openapi.json post /v1/webhooks/endpoints","href":"/api-reference/create-a-webhook-endpoint"},{"title":"Retrieve a webhook endpoint","deprecated":null,"version":null,"openapi":"/api-reference/account-platform-webhooks-v1.openapi.json get /v1/webhooks/endpoints/{id}","href":"/api-reference/retrieve-a-webhook-endpoint"},{"title":"Delete a webhook endpoint","deprecated":null,"version":null,"openapi":"/api-reference/account-platform-webhooks-v1.openapi.json delete /v1/webhooks/endpoints/{id}","href":"/api-reference/delete-a-webhook-endpoint"},{"title":"Update a webhook endpoint","deprecated":null,"version":null,"openapi":"/api-reference/account-platform-webhooks-v1.openapi.json patch /v1/webhooks/endpoints/{id}","href":"/api-reference/update-a-webhook-endpoint"},{"title":"List webhook endpoint event subscriptions","deprecated":null,"version":null,"openapi":"/api-reference/account-platform-webhooks-v1.openapi.json get /v1/webhooks/endpoints/{id}/event-subscriptions","href":"/api-reference/list-webhook-endpoint-event-subscriptions"},{"title":"Update webhook endpoint event subscriptions","deprecated":null,"version":null,"openapi":"/api-reference/account-platform-webhooks-v1.openapi.json put /v1/webhooks/endpoints/{id}/event-subscriptions","href":"/api-reference/update-webhook-endpoint-event-subscriptions"},{"title":"Rotate a webhook endpoint signing secret","deprecated":null,"version":null,"openapi":"/api-reference/account-platform-webhooks-v1.openapi.json post /v1/webhooks/endpoints/{id}/secret-rotations","href":"/api-reference/rotate-a-webhook-endpoint-signing-secret"},{"title":"Send a test event to a webhook endpoint","deprecated":null,"version":null,"openapi":"/api-reference/account-platform-webhooks-v1.openapi.json post /v1/webhooks/endpoints/{id}/test-events","href":"/api-reference/send-a-test-event-to-a-webhook-endpoint"},{"title":"List public webhook event types","deprecated":null,"version":null,"openapi":"/api-reference/account-platform-webhooks-v1.openapi.json get /v1/webhooks/event-types","href":"/api-reference/list-public-webhook-event-types"},{"title":"Retrieve a public webhook event type","deprecated":null,"version":null,"openapi":"/api-reference/account-platform-webhooks-v1.openapi.json get /v1/webhooks/event-types/{id}","href":"/api-reference/retrieve-a-public-webhook-event-type"},{"title":"Create a webhook delivery replay job","deprecated":null,"version":null,"openapi":"/api-reference/account-platform-webhooks-v1.openapi.json post /v1/webhooks/replay-jobs","href":"/api-reference/create-a-webhook-delivery-replay-job"},{"title":"Retrieve a webhook delivery replay job","deprecated":null,"version":null,"openapi":"/api-reference/account-platform-webhooks-v1.openapi.json get /v1/webhooks/replay-jobs/{id}","href":"/api-reference/retrieve-a-webhook-delivery-replay-job"}]}]}]},{"group":"Checkout SDK","public":true,"icon":"code","root":{"title":"Checkout SDK overview","href":"/checkout-sdk/overview"},"pages":[{"title":"Metadata and attribution","href":"/checkout-sdk/metadata-and-attribution"},{"title":"Embedded hosted checkout","href":"/checkout-sdk/embedded-checkout"},{"title":"Prefilled checkout","href":"/checkout-sdk/prefilled-checkout"},{"title":"Checkout from your server","href":"/checkout-sdk/server-checkout"}]},{"group":"AI agents \u0026 MCP","public":true,"icon":"robot","pages":[{"title":"MCP for AI shopping agents (cope-sdk/mcp)","href":"/ai-agents/shopping-agents"},{"title":"MCP server for your store (cope-mcp)","href":"/ai-agents/merchant-assistant"}]},{"group":"Changelog","public":true,"icon":"newspaper","pages":[{"title":"Changelog","href":"/changelog"}]},{"group":"Webhooks","public":true,"icon":"webhook","root":{"title":"Webhooks overview","href":"/webhooks/overview"},"pages":[{"title":"Webhook endpoints","href":"/webhooks/endpoints"},{"title":"Webhook deliveries and replay","href":"/webhooks/deliveries"},{"title":"Event type discovery","href":"/webhooks/event-types"},{"title":"Webhook signing","href":"/webhooks/signing"},{"title":"Who started a refund","href":"/webhooks/refund-initiator"},{"group":"Event Reference","public":true,"icon":"braces","pages":[{"title":"Webhook events","href":"/webhooks/events/index"},{"group":"Products","public":true,"pages":[{"title":"cart.product.created","href":"/webhooks/events/cart.product.created"},{"title":"cart.product.approval_status.changed","href":"/webhooks/events/cart.product.approval_status.changed"}]},{"group":"Cart","public":true,"pages":[{"title":"cart.cart.created","href":"/webhooks/events/cart.cart.created"},{"title":"cart.cart_line.added","href":"/webhooks/events/cart.cart_line.added"},{"title":"cart.cart_line.removed","href":"/webhooks/events/cart.cart_line.removed"},{"title":"cart.cart.abandoned","href":"/webhooks/events/cart.cart.abandoned"}]},{"group":"Checkout","public":true,"pages":[{"title":"cart.checkout.created","href":"/webhooks/events/cart.checkout.created"},{"title":"cart.checkout.cancelled","href":"/webhooks/events/cart.checkout.cancelled"},{"title":"cart.checkout.expired","href":"/webhooks/events/cart.checkout.expired"}]},{"group":"Orders","public":true,"pages":[{"title":"cart.order.created","href":"/webhooks/events/cart.order.created"},{"title":"cart.order.completed","href":"/webhooks/events/cart.order.completed"},{"title":"cart.order.failed","href":"/webhooks/events/cart.order.failed"}]},{"group":"Payments","public":true,"pages":[{"title":"payment.sale.succeeded","href":"/webhooks/events/payment.sale.succeeded"},{"title":"payment.failed","href":"/webhooks/events/payment.failed"},{"title":"payment.attempt.failed","href":"/webhooks/events/payment.attempt.failed"},{"title":"payment.refund.created","href":"/webhooks/events/payment.refund.created"},{"title":"payment.refund.reversed","href":"/webhooks/events/payment.refund.reversed"}]},{"group":"Subscriptions","public":true,"pages":[{"title":"subscription.amount_changed","href":"/webhooks/events/subscription.amount_changed"},{"title":"subscription.plan_changed","href":"/webhooks/events/subscription.plan_changed"},{"title":"subscription.paused","href":"/webhooks/events/subscription.paused"},{"title":"subscription.resumed","href":"/webhooks/events/subscription.resumed"},{"title":"subscription.cancelled","href":"/webhooks/events/subscription.cancelled"}]},{"group":"Disputes","public":true,"pages":[{"title":"payment.dispute.opened","href":"/webhooks/events/payment.dispute.opened"},{"title":"payment.dispute.won","href":"/webhooks/events/payment.dispute.won"},{"title":"payment.dispute.lost","href":"/webhooks/events/payment.dispute.lost"},{"title":"payment.dispute.counter_fee.created","href":"/webhooks/events/payment.dispute.counter_fee.created"}]},{"group":"Chargebacks","public":true,"pages":[{"title":"payment.chargeback.created","href":"/webhooks/events/payment.chargeback.created"},{"title":"payment.chargeback.reversed","href":"/webhooks/events/payment.chargeback.reversed"}]},{"group":"Payouts","public":true,"pages":[{"title":"payouts.transfer.initiated","href":"/webhooks/events/payouts.transfer.initiated"},{"title":"payouts.transfer.completed","href":"/webhooks/events/payouts.transfer.completed"},{"title":"payouts.external_payout.paid","href":"/webhooks/events/payouts.external_payout.paid"},{"title":"payouts.external_payout.failed","href":"/webhooks/events/payouts.external_payout.failed"},{"title":"payouts.external_payout.canceled","href":"/webhooks/events/payouts.external_payout.canceled"}]}]}]},{"group":"Reference","public":true,"icon":"book-open","pages":[{"title":"Cart, checkout, and order lifecycle","href":"/reference/cart-checkout-order-lifecycle"},{"title":"Payment lifecycle","href":"/reference/payment-lifecycle"},{"title":"Event envelope","href":"/reference/event-envelope"}]}]},"basePath":"","title":"Create an offer - COPE","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"]}