Storefront

Create a public checkout order

Changed on

Public storefront endpoint. Create an order from direct items, from the guest cart referenced by X-Scalev-Guest-Token, or from direct items while clearing the referenced guest cart after successful order creation. Direct checkout items are store-scoped and not blocked by storefront listing visibility. Product prices, discounts, shipping, Other Income, the Store customer-fee policy, and service fees are recalculated from current backend data during creation. Preview values are not confirmation inputs and do not produce a quote-conflict response.

post/v3/stores/{store_id}/public/checkout

Request

  • Base URL
    https://api.scalev.com
  • URL
    https://api.scalev.com/v3/stores/{store_id}/public/checkout
  • Auth
    none required

Request body

checkout_intent_tokenstring

Optional cit_ write capability from checkout-intent capture. A valid matching token completes the intent when the order commits. Invalid, expired, mismatched or consumed tokens never block order creation.

customer_namestring required
customer_emailstring email required
customer_phonestring nullable
shipping_addressstring nullable
shipping_provincestring nullable
shipping_citystring nullable
shipping_subdistrictstring nullable
shipping_postal_codestring nullable
addressstring nullable
locationstring nullable
postal_codestring nullable
payment_methodstring

Storefront payment method code selected by the buyer. Required for normal checkout. May be omitted when the store uses strict two-step Payment Link checkout; Scalev resolves it to payment_link. Virtual Accounts use flat method codes such as va_bca.

courier_service_idinteger nullable
warehouse_unique_idstring nullable
courier_aggregator_codestring nullable
discount_code_codestring nullable
notesstring nullable

Example request

{
  "payment_method": "va_bca"
}

Response

Public checkout order

tracking_form_delivery'server_v1'

Present only when this accepted order owns the frozen server form-submission selections under server_v1, including explicit empty selections. A runtime that received the matching public capability may omit its direct Meta, TikTok and SnackVideo server form sends. Absence requires the compatible direct path. This acknowledges delivery ownership, not provider acceptance or attribution, and does not change browser or Purchase delivery.

idstring uuid required

Canonical UUIDv7 order primary key returned by the partitioned orders table.

secret_slugstring required
public_order_urlstring uri nullable required
payment_urlstring uri nullable required

Deprecated for checkout navigation. Retained for compatibility and scoped to the payment step. Always use redirect_url to navigate the buyer after checkout; do not use this field to infer the destination.

redirect_urlstring uri nullable

Canonical destination the buyer opens after checkout. Always prefer this field over the deprecated payment_url. The server resolves the destination from the payment method and After Checkout setting, including the payment page, order page, WhatsApp, another page, or a custom URL. When a destination cannot be resolved because the configuration is missing or unsupported, or a required phone number, page, or URL is unavailable, it falls back to Scalev's hosted payment instructions page (Halaman Instruksi Pembayaran) at /o/{secret_slug}/success, not the Thank You Page. This fallback requires a valid order identity and host. Storefront checkout records the normalized request Origin header, never body-supplied metadata.origin. Hosted order and Scalev PayLink URLs use HTTPS on that host only while it is a verified custom domain of the same business, connected to Scalev hosting. Otherwise links use the store's configured default domain if verified and owned by the same business, then the business's default Scalev domain if no eligible store domain exists. A CORS allowlist entry alone is insufficient. The same validation applies when generating later order responses and follow-up chat or WABA links. External provider URLs and configured custom destinations retain their existing behavior. Retained attribution parameters are forwarded onto a configured page or custom URL only while it stays on the currently validated checkout host or a Scalev-owned one. Null only when required order identity or host data is unavailable.

order_idstring required
statusstring required
payment_statusstring nullable required

Buyer-facing payment status. A settled payment is exposed as paid; this field never returns settled.

post_payment_redirect_urlstring uri

Canonical post-payment destination exposed only after a buyer-paid outcome (internal payment status paid or settled) when a valid redirect snapshot exists. Omitted before payment and when Scalev's hosted success flow applies.

is_probably_spamboolean nullable
draft_timestring date-time nullable
paid_timestring date-time nullable
transfer_timestring date-time nullable
transferproof_urlstring nullable
handler_phonestring nullable
chat_messagestring nullable
customer_idinteger nullable
discount_code_codestring nullable
other_income_namestring nullable

Other Income label. For payment_link, the winning concrete Payment Request's frozen Store label is reconciled after payment.

pg_payment_infoobject required

Buyer-facing payment gateway payload. Manual methods such as bank_transfer and cod can return an empty object. Virtual account methods expose provider reference and account details under the provider's payment_method object. QRIS responses expose QR data or a QR image payload. E-wallet, card, and invoice methods may expose provider actions or hosted provider URLs. SingaPay payments use normalized keys such as payment_url, deeplink_url, qr_string, qr_image_url, va_number, and va_name.

status_historyobject[]
payment_methodstring required
epayment_providerstring nullable

E-payment provider. xendit is the current/managed Xendit provider; xendit_legacy is the owned legacy Xendit provider. Other possible values include duitku, midtrans, durianpay, and singapay.

payment_account_holderstring nullable
payment_account_numberstring nullable
shipment_receiptstring nullable
variantsobject
bundle_price_optionsobject
payment_expiration_atstring date-time nullable

Example response

{
  "payment_method": "bank_transfer"
}

Changes

    • info

      added the new optional request property

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property / to the response with the status