Skip to main content
POST
Create Payment Quote

Authorizations

Authorization
string
header
required

An Account API key, an App API key, an account access token, an account-scoped user token, or a user OAuth token. Prepend the key or token with Bearer, for example Bearer ***************************. See Auth & API keys for how to get each one.

Headers

Idempotency-Key
string

A unique key that makes this request safe to retry. See Idempotent requests.

Maximum string length: 255
Example:

"d9105228-4a08-46b1-8b91-42fed586d383"

Api-Version-Date
string

Pins the request to a dated API version.

Example:

"2026-09-29"

Body

application/json

The purchase: the account it belongs to, what is bought, and the promo code applied. The same shape prices a purchase and pays for it.

account_id
string
required

The account the purchase belongs to, prefixed biz_.

Example:

"biz_xxxxxxxxxxxxxx"

line_items
object[]

What the buyer is purchasing. One entry charges that variant; several entries form a cart, which requires every variant to be compatible, belong to this account, and use the same currency.

Required array length: 1 - 50 elements
plan
object

The variant purchased, described by its attributes instead of an id: the variant with exactly these attributes is used, and one is created when none exists. Mutually exclusive with plan_id and line_items. Creating a variant requires plan:create; creating or updating a product requires the corresponding product permission.

plan_id
string

The variant purchased, prefixed plan_. It must belong to the account. Mutually exclusive with plan and line_items.

Example:

"plan_xxxxxxxxxxxxxx"

promo_code
string | null

The promo code as the buyer typed it, matched within the account regardless of case and surrounding spaces, as checkout matches it. It must be valid for the variant. Send it or promo_code_id, not both; an empty or whitespace-only string counts as not sent. A code the account does not have, or one that is no longer active, is refused before anything is written, with the error code promo_invalid.

Example:

"SHINE20"

promo_code_id
string | null

An active promo code to apply, prefixed promo_. It must belong to the account and be valid for the variant. Send it or promo_code, not both.

Example:

"promo_xxxxxxxxxxxxxx"

address
object | null

The buyer's billing address. Where tax is calculated when no shipping address is given, and the address a tax registration belongs to. A seller that collects tax on this purchase needs the buyer located: provide a country here, on shipping_address, or an ip_address. Only the keys you supply are kept.

ip_address
string | null

The buyer's IP address, when your server makes the call on their behalf. Locates the buyer when neither address carries a country. A quote located this way is an estimate (located_by is ip_address): quote again with the buyer's address.

Example:

"203.0.113.7"

shipping_address
object | null

Where physical goods ship. When present it is where tax is calculated; omit it for digital goods. Only the keys you supply are kept.

tax_ids
object[] | null

The buyer's tax registration, for a business purchase. One entry. Prices the purchase as business-to-business where that applies (EU reverse charge, for one) and requires an address to belong to.

Maximum array length: 1

Response

payment quote priced

account_id
string
required

The account the purchase is priced for, prefixed biz_.

Example:

"biz_xxxxxxxxxxxxxx"

address
object | null
required

The billing address the purchase was priced with, or null. Where tax was calculated when no shipping address was given, and the address the registration belongs to.

created_at
string
required

When the quote was priced, as an ISO 8601 timestamp.

Example:

"2026-01-01T12:00:00.000Z"

currency
string
required

ISO currency the purchase is priced and charged in, lowercase — the variants' own currency.

Example:

"usd"

discount
object
required

What the promo code takes off. Zero without a code.

expires_at
string
required

When the quote stops being chargeable, as an ISO 8601 timestamp. Quote again after it.

Example:

"2026-01-01T12:00:00.000Z"

id
string
required

Payment quote ID, prefixed pq_.

Example:

"pq_xxxxxxxxxxxxxx"

line_items
object[]
required
located_by
enum<string> | null
required

Which location tax was calculated for: shipping_address when it carries a country, else the billing address when it does, else the buyer's ip_address. A quote located by ip_address is an estimate: quote again with the buyer's address. Null when nothing in the request located the buyer, which only a seller that collects no tax on this purchase is quoted without; tax_status is then not_applicable.

Available options:
shipping_address,
address,
ip_address,
null
Example:

"address"

promo_code_id
string | null
required

The promo code the quote applied, prefixed promo_, or null.

Example:

null

shipping_address
object | null
required

The shipping address the purchase was priced with, or null. When present it is where tax was calculated.

subtotal
object
required

The price of every line before the promo code, tax and fees.

tax_amount
object
required

The tax owed on the purchase. Zero unless tax_status is calculated.

tax_behavior
enum<string> | null
required

Whether tax is added on top of the price (exclusive) or already inside it (inclusive). Null when no tax was calculated.

Available options:
inclusive,
exclusive,
null
Example:

"exclusive"

tax_ids
object[]
required
tax_status
enum<string>
required

calculated: every line was priced. not_applicable: this seller collects no tax on this purchase, so the quote owes none. unavailable: tax could not be priced — the provider did not answer, or this seller's tax setup cannot price a purchase here; quote again.

Available options:
calculated,
not_applicable,
unavailable
Example:

"calculated"

total
object
required

What the buyer pays: the subtotal less the discount, plus tax_amount when tax is added on top.