Official SDK for React Native apps on iOS and Android.
React Native SDK
React Native SDK
The flasho-merchant-sdk package is the Flasho client for React Native. It uses the same typed JavaScript API as the JavaScript SDK, and runs in the app with fetch.
Install
npm install flasho-merchant-sdkRequirements: React Native 0.71+ (native fetch). Works with Expo and bare React Native.
Quick start
import { FlashoClient } from 'flasho-merchant-sdk';
const flasho = new FlashoClient({ token: 'placeholder' });
await flasho.auth.login({
email: '[email protected]',
password: 'your-password',
});
const data = await flasho.account.bootstrap();
const { delivery } = await flasho.deliveries.create({
customerName: 'Ahmed Ali',
customerNumber: '99887766',
pickupLatitude: 29.3764,
pickupLongitude: 47.9785,
deliveryLatitude: 29.3117,
deliveryLongitude: 48.0034,
});Modules
Setup
Create the client and handle API errors in the app.
flasho.account
Bootstrap, branches, wallet, and pricing.
flasho.deliveries
Create, list, track, and poll deliveries.
flasho.pricing
Get price quotes before booking.
flasho.auth
JWT login for the merchant app.
npm
The package is published at npmjs.com/package/flasho-merchant-sdk.