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
  • App Onboarding
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
  • App Onboarding
Storefront
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Ecommerce Events
  • Component Bundle
  • Change Log
Salla CLI
Salla - Opensource
Salla - Developers Community
  1. App Onboarding
  • Overview
  • Get Started
  • Interfaces and Responses
  • Real World Scenario
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
  • App Onboarding
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
  • App Onboarding
Storefront
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Ecommerce Events
  • Component Bundle
  • Change Log
Salla CLI
Salla - Opensource
Salla - Developers Community
  1. App Onboarding

Interfaces and Responses

Use the below blueprint that describes the structure of data your app receives when an onboarding step is completed.

Responses#

Understanding how the Step Function returns data is crucial, especially for Synchronous Actions where the response directly influences the merchant's operation. This guide details the structure, behavior, and utility tools for handling function responses.
Every Step Function is expected to return an object conforming to the Response contract.
While the structure is required for all functions, its effect on the platform varies significantly based on the execution type.
FieldTypeRequiredDescription
successbooleanYesIndicates if your function logic completed successfully.
dataobjectNoA payload containing data to be returned or applied to the Salla operation (used primarily for Synchronous Actions).
errorstringNoA human-readable error message. Required if success is false for Synchronous Actions.
statusnumberNo(Optional) An HTTP status code (e.g., 200, 400). Set via the Response utility class.
messagestringNo(Optional) An informative message. Set via the Response utility class.
The Response utility class provides a structured way to create responses. It's particularly useful for Customer Events and some Merchant Events that require more detailed response handling.
Success Response
Error Response
This response confirms that the onboarding step was completed successfully and allows the merchant to continue.
These onboarding handler functions act as validation and processing checkpoints. Returning Resp.success() allows the onboarding process to continue, while returning Resp.error() stops progression and displays validation feedback to the merchant.

Response Utility Methods#

MethodDescriptionRequiredDefault
Resp.success()Create a successful responseYes (for success)-
Resp.error()Create an error responseYes (for errors)-

When to Use Response Utility vs Plain Object#

ScenarioRecommended ApproachReason
Customer EventsResponse utilityProvides structured responses for tracking and analytics
Synchronous ActionsPlain objectSimpler and faster (performance critical)
Merchant Events (Simple)Plain objectStraightforward with less overhead
Merchant Events (Complex)Response utilityBetter error handling and status control
Error HandlingEither (Response utility recommended)Response utility provides better error structure
Modified at 2026-02-18 17:37:29
Previous
Get Started
Next
Real World Scenario