> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vellaro.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Build a mobile app

> iOS, Android, or Flutter on the same Storefront API.

A mobile app uses **exactly the same Storefront API** as a web frontend. The only
difference is that it doesn't run on the store's domain, so identify the store with the
[publishable key](/en/authentication) on every request.

## Client setup

<CodeGroup>
  ```dart Flutter theme={null}
  final dio = Dio(BaseOptions(
    baseUrl: "https://api.vellaro.io/api/v1",
    headers: { "X-Vellaro-Key": "cx_pk_live_demo_XXXXXXXXXXXX" },
  ));
  final res = await dio.get("/products", queryParameters: {"page": 1});
  ```

  ```swift Swift theme={null}
  var req = URLRequest(url: URL(string: "https://api.vellaro.io/api/v1/products")!)
  req.setValue("cx_pk_live_demo_XXXXXXXXXXXX", forHTTPHeaderField: "X-Vellaro-Key")
  ```

  ```kotlin Kotlin theme={null}
  val req = Request.Builder()
    .url("https://api.vellaro.io/api/v1/products")
    .header("X-Vellaro-Key", "cx_pk_live_demo_XXXXXXXXXXXX")
    .build()
  ```
</CodeGroup>

## Customer login & tokens

Login (`POST /auth/login`) returns an `access_token` (\~30 min) and a `refresh_token`.
Store the refresh token securely (Keychain / Keystore) and renew the access token with
`POST /auth/refresh`. Send the access token as `Authorization: Bearer` on account-area
calls.

## Push notifications

Register the customer's device token for transactional notifications (order shipped, etc.)
through the Storefront API's device-push endpoints — see the [API Reference](/en/api-reference).

<Note>
  Images and payments work the same as on the web: image URLs must be prefixed with the
  origin, and the payment flow returned by `POST /checkout` must be completed with the
  gateway's native SDK (Stripe/PayPal/…) when required.
</Note>
