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-sdk

Requirements: 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

npm

The package is published at npmjs.com/package/flasho-merchant-sdk.