Skip to main content
POST

Authorizations

Authorization
string
header
required

Bearer credential for the public API. Vendor integrations should send a live COPE API key (cope_sk_live_*). Clerk bearer tokens are also accepted when paired with X-Cope-Business-Id.

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.

Maximum string length: 255

Body

application/json
buyer
object
required
currency
string
required

Currency of the offer, as an ISO 4217 code. It must be one the seller can be paid in — anything else is refused with a 422 naming the ones they can.

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.

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}$
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]+$

Omit the object entirely to issue a link that never expires.

quantity
integer
default:1

Units of the product on the offer. Defaults to 1, and may not exceed 100.

Required range: 1 <= x <= 100

Response

Successful response

data
object
required