Place a wholesale order directly (self-serve checkout)
Places a wholesale order for an approved buyer directly, without the request-for-quote round-trip — the self-serve path for routine reorders at the buyer’s own agreed prices.
Send only the items and quantities; Galactic Core prices every line itself against the buyer’s wholesale price list (per-buyer, group, or default), enforces each item’s minimum order quantity, and computes the authoritative totals. Any price sent by the client is ignored. An item with no wholesale price for this buyer, or a quantity below its minimum order quantity, is rejected with a clear reason.
How the order settles depends on the supplier’s policy for this buyer:
- On terms — the order is confirmed and a terms invoice is issued (subject to the buyer’s credit limit). The response carries the invoice and its due date.
- Pay now — the order is created awaiting payment. The response carries an
order_idandamount; complete the payment through the standard payment flow (/v1/payments/initializethen/v1/payments/verify) with thatorder_id, exactly as for a normal online order.
Requires the buyer’s session token (x-auth-token or x-external-auth), an Idempotency-Key, and a request signature (X-Timestamp + X-Signature over the body with the store’s signing secret) — the same signing a standard order requires.
Authorizations
API Key Authentication
Use your API key in the Authorization header:
Key Types:
Secret Keys (Server-Side Only):
- Format:
tybrite_sk_live_*(production) ortybrite_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) ortybrite_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
Buyer session token (GC-native). Provide this or x-external-auth.
Bring-your-own-auth assertion identifying the buyer. Provide this or x-auth-token.
A unique key so a retried order is not duplicated.
Unix timestamp (milliseconds) used in the request signature. Required — a direct order must be signed, like a standard order. Must be within 5 minutes of the server time.
Base64 HMAC-SHA256 of {X-Timestamp}.{raw JSON body} using the store's signing secret. Required — a direct order must be signed, like a standard order.
Body
The items to order. Prices are resolved by Galactic Core; do not send prices.
An optional note on the order.
An optional free-text shipping address for this order.
An optional structured shipping address. When provided, tax is calculated accurately for the destination; otherwise the store's configured rate applies.
The order currency, e.g. USD.
Response
Order placed. The settlement field is terms (an invoice was issued) or pay_now
(an order awaiting payment). Fields present depend on which. tax_amount is always
resolved server-side; total/amount are tax-inclusive.
The result of a direct wholesale order. settlement is terms (a terms invoice was issued — invoice_id, invoice_number, and due_date are present) or pay_now (the order awaits payment — order_id, order_number, and amount are present; complete payment through the standard payment flow using order_id). purchase_order_id, po_number, and currency are always present.
How the order settles — on terms (invoice) or pay now (awaiting payment).
terms, pay_now "USD"
The order total, tax included (present on a terms order).
The tax on the order, resolved server-side — jurisdiction-accurate when a shipping address is supplied, otherwise the store's configured rate, and zero for a tax-exempt buyer.
The issued invoice (terms only).
The issued invoice number (terms only).
When the invoice is due (terms only).
The order to pay (pay-now only).
The order number (pay-now only).
The amount to pay, tax included (present on a pay-now order).

