Salla Docs
Merchant
Merchant
  • Merchant API
  • Salla OAuth 2.0
  • Merchant Dashboard
Partner APIs
Partner APIs
  • App API
  • Shipments & Fulfillment APIs
  • Salla AWB
  • Recurring Payments API
  • App Functions
  • Billing System Salla partners
  • Report Builder
  • App Onboarding
  • Communication Apps
Storefront
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Ecommerce Events
  • Component Bundle
  • Change Log
Salla CLI
Merchant
Merchant
  • Merchant API
  • Salla OAuth 2.0
  • Merchant Dashboard
Partner APIs
Partner APIs
  • App API
  • Shipments & Fulfillment APIs
  • Salla AWB
  • Recurring Payments API
  • App Functions
  • Billing System Salla partners
  • Report Builder
  • App Onboarding
  • Communication Apps
Storefront
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Ecommerce Events
  • Component Bundle
  • Change Log
Salla CLI
Salla - Opensource
Salla - Developers Community
  1. Checkout Module
  • Embedded SDK
    • Overview
    • Getting Started
    • Installation
    • Authentication
    • App Design Guidelines
    • Create an Embedded App
    • Playground
  • Auth Module
    • Get Token
    • Client Introspect
    • Refresh Token
  • Page Module
    • Iframe Resizing
    • External Redirects
    • Navigation
    • Set Page Title
  • Nav Module
    • Create Navbar Action
    • Listen for Nav Actions
    • Clearing Nav Actions
  • UI Module
    • Confirm Dialogs
    • Toast Notifications
    • Loading States
  • Checkout Module
    • Create Checkout
    • Subscribe for Payment Result
    • Get App Add-ons
  • Endpoints
    • Token Introspect
  • Resources
    • Support
  1. Checkout Module

Create Checkout

The create method initiates a native checkout flow within the Salla Merchant Dashboard. It opens the payment drawer where the merchant can review items and complete the purchase.

Usage#

You can pass a single item or an array of items for multi-item checkout.
Single Item
Multiple Items
With Context
Purchase a single addon.

API Reference#

embedded.checkout.create(input, config?)#

ParameterTypeRequiredDescription
inputCheckoutItem | CheckoutItem[]YesA single item or array of items to purchase.
configCheckoutCreateConfigNoOptional configuration.

CheckoutItem#

PropertyTypeRequiredDefaultDescription
type"addon"Yes-The item type. Currently only "addon" is supported.
slugstringYes-The unique slug identifier of the addon.
quantitynumberNo1Number of units to purchase.

CheckoutCreateConfig#

PropertyTypeRequiredDescription
contextunknownNoDeveloper-defined data persisted across 3DS redirects. Returned in onResult.

Validation#

The SDK validates all items before sending the checkout request. Invalid input throws an error immediately:
ConditionError Message
Empty array"At least one item is required"
Missing or empty slug"Item at index N must have a valid slug"
Missing or empty type"Item at index N must have a valid type"

Complete Example#

💡
Best Practices
Register onResult First: Always set up your result listener before calling create() to avoid missing the response.
Validate Slugs: Use getAddons() to retrieve valid addon slugs before calling create(). The checkout will fail if a slug doesn't match any available addon.
Context for Navigation: If your app has multi-step flows, pass the current route in context so you can restore it after a 3DS redirect.
Modified at 2026-02-11 20:21:55
Previous
Checkout Module
Next
Subscribe for Payment Result