Skip to main content
POST
Check out a multi-merchant cart

Authorizations

Authorization
string
header
required

API Key Authentication

Use your API key in the Authorization header:

Key Types:

Secret Keys (Server-Side Only):

  • Format: tybrite_sk_live_* (production) or tybrite_sk_test_* (sandbox)
  • Full read/write access to all endpoints
  • ⚠️ NEVER expose in client-side code or public repositories
  • Required for: write operations, authentication, payment verification, AI recommendations

Publishable Keys (Client-Safe):

  • Format: tybrite_pk_live_* (production) or tybrite_pk_test_* (sandbox)
  • Read-only access (GET requests only, plus POST semantic search)
  • βœ… Safe for client-side JavaScript, mobile apps, and public code
  • Allowed for: browsing products, search, CMS content, pricing queries

Endpoint-Specific Requirements:

  • Authentication endpoints (/v1/auth/*): Secret key required
  • Payment verification (POST /v1/payments/verify): Secret key required
  • AI Recommendations (POST /v1/recommendations): Secret key required
  • Semantic Search (POST /v1/search): Both key types allowed (read-only operation)
  • All write operations: Secret key required
  • All read operations: Both key types allowed

Using a publishable key for restricted operations returns 403 Forbidden.

Headers

x-customer-token
string

Session token of a shopper signed in through Galactic Core, tying the checkout to their account rather than treating it as a guest checkout. Optional. Also accepted as x-auth-token.

x-auth-token
string

Alias of x-customer-token.

Body

application/json
items
object[]
required

The cart line items to check out.

Minimum array length: 1
customer_email
string<email>
required
customer_name
string
customer_phone
string
currency
string

ISO currency code for the order. Defaults to USD.

Example:

"USD"

shipping_address
object
billing_address
object
discounts
object[]

Optional per-merchant discounts. Each entry applies a merchant's own promotion and/or gift card to that merchant's portion of the basket, reducing only that merchant's subtotal. Marketplace-wide promotions run by the operator apply automatically and are not passed here.

attribution
object

Where the shopper came from, recorded so the sale is credited to the right traffic source in the merchant's reports. The same fields are also accepted at the top level of this request body if you already send them that way.

Response

The multi-merchant order was created and is awaiting payment.

A created multi-merchant order awaiting payment. Use client_secret to complete the payment on the storefront; the order finalizes automatically once payment succeeds.

order_group_id
string<uuid>

Identifier for the multi-merchant order.

group_number
string

Human-readable reference for the order.

Example:

"MKT-100042"

payment_intent_id
string

Identifier of the payment to complete on the storefront.

client_secret
string

Secret used by the storefront payment form to complete the charge.

currency
string
Example:

"USD"

subtotal
number
Example:

245

total_amount
number
Example:

245

discount_total
number

Total discount applied across the whole basket β€” the sum of every merchant's own promotion and gift card discounts plus any marketplace-wide promotion run by the operator.

Example:

10

operator_funded_discount
number

The portion of discount_total funded by the marketplace operator (for example a marketplace-wide promotion). The remainder is funded by individual merchants.

Example:

5

discount_breakdown
object[]

Per-merchant breakdown of how discounts were applied.

merchant_breakdown
object[]

Per-merchant gross, discount, commission, and net amounts for this order.