Apps
An app («برنامه») is something a merchant installs to add what their shop needs: a warehouse sync, an accounting export, a messaging integration, a loyalty programme. The merchant approves exactly what it may read and change, and can remove it at any time.
An app is your own web service. It calls the Admin API with a token the merchant granted, and Kaladan calls it back with webhooks when something happens in the shop.
From your code to a shop
Section titled “From your code to a shop”-
Sign in as a partner. You sign in to the Partner API with a code sent to your mobile number. Your first sign-in creates your organization.
-
Create the app.
appCreategives you a client id, a client secret and a webhook signing secret. The two secrets are shown once. -
Declare a version. A version lists everything the app will ever ask for: its access scopes, its redirect URIs, and the webhook topics it subscribes to. Once submitted, a version is frozen: a merchant who approved it can trust it is what runs.
-
Install it on a shop. For a custom app,
appInstallLinkCreatemakes a link for one named shop. The merchant opens it, reads exactly what the app asks for on Kaladan’s own approval page, and approves. -
Exchange the code for a token with OAuth 2 and PKCE, and call the Admin API.
-
Hear about changes. Kaladan delivers the webhooks the version declared, signed with your signing secret.
Things that are easy to miss
Section titled “Things that are easy to miss”- Scopes are declared, not requested at runtime. To ask for more, publish a new version. Existing installs keep the old one until their merchant re-approves.
- A query that touches one field outside the grant is refused whole, before anything runs. It never returns the parts you may see.
- Every app must handle the privacy topics (
customers/data_request,customers/redact,shop/redact) andapp/uninstalled. See webhooks. - An app never takes money. It asks Kaladan to charge the merchant, who accepts on a Kaladan page. See Charging merchants.