Skip to main content

React Native

ortho-react-native is the official Ortho SDK for React Native/Expo applications. Don't forget to star ✨

Getting your keys.

Before you can use any Ortho's SDK, you'd need an Ortho account, head on to Ortho Dashboard and create your account. You can also watch this video on how to get your slugs and also create a payment from the dashboard.

Installation

You can install ortho in your react/react native application using npm or yarn.

using npm: npm install ortho-react-native

using yarn: yarn add ortho-react-native

Extra

You'll also need to install react-native-webview. To install;

run yarn add react-native-webview

Usage

import { Ortho } from 'ortho-react-native';
export default function App() {
const config = {}
return (
<Ortho
slug='<your-slug-goes-here>'
config={config}
color={'red'}
callback={
(e) => console.log('res=>', e)
}
/>
);
}

setting up your config

config = {
provider_values:
[
{
"provider": "okra-short-url",
"values": {"short-url": "test"}
}
]
}

Note: you can add more configs for providers in your provider_value array. To get provider configs, take a look at our Provider docs

Licensing

This project is licensed under BSD-3-Clause License.