Properties
Not a developer?
Check out the Okra App Builder for a no-code way to get started with Okra's Widget and API.
Here's a breakdown of all the Okra Widget properties you can use to customize your widget. To use these options in your app you must first integrate an Okra Widget.
Name | Description | Default Value |
---|---|---|
tokenObjectId | The Client Token associated with your account; is available in the Dashboard. | none |
keyString | The key associated with your account; is available in the Dashboard. | none |
clientNameString | Displayed on the User Agreement and once a user has successfully linked their Record. | 'This Client' |
envString | The Okra API environment on which to create user accounts. Use production-sandbox for Sandbox and for Production, use production .Note: all Production requests apart from the 100 Records on our Startup Plan are billed. | production or production-sandbox |
countriesArray | Countries to support. It shows banks from this country | ['NG'] Please contact [email protected] for access to our ZA, and KY (South Africa and Kenya) banks. |
productsArray | A list of Okra products you wish to use. | ['auth', 'balance', 'identity'] Valid products are: transactions , auth , identity , balance , payments and income . Only banks that support all requested products will be shown.In Production, you will be billed for each product that you specify when initializing the Okra Widget. Example: ['auth', 'transactions']. Auth is free and automatically selected as users must be authenticated before accessing other products. |
sourceString | The integration type you are using. Options Include:android ios rn-ios rn-android ionic wordpress vue flutter integration laravel react | link |
modeString | Widget background color Options Include: primary - Primary Color light - Light Transparent dark - Dark transparent | primary |
callback_urlString | Specify a callback to associate with a Record. Okra fires a callback when the Record requires updated credentials, when new data is available, or when Auth numbers have been successfully verified. | none |
redirect_urlString | Specify a URL to redirect your customers when they click on the Done button at the end of the connection process. For example, you can guide your customer to a Success page, to any next steps, or any other location in your application's workflow. | none |
colorString | The color theme on the widget | 3AB795 |
logoString | Your App or Company logo | Okra's Logo |
optionsObject | You can pass object custom values to the widget, view Special Widget Options below | none |
enableAutoConnectBoolean | Allow users to automatically connect their accounts. This will automatically connect all accounts your customer has at the bank they are connecting with. | false |
debitLaterBoolean | Authenticate users for debit access at a later date. | false |
debitTypeString | Choose whether to debit the user on a recurring basis or one-time Options Include: one-time recurring garnish | 'one-time' |
showBalanceBoolean | Allow users to see their account balance | false |
enhancedBalanceBoolean | See your users enhanced balance (point in time balance) at every transaction line | false |
selfieVerifyBoolean | Allow users to verify their identity with selfies to determine if the person holding the device is the same person verifying their account. See more information on Selfies here | false |
geoLocationBoolean | See your user's transaction location | false |
continue_ctaString | The message on the button when a user completes linking | Continue |
multi_accountBoolean | Allow user's the ability to quickly return to the bank search screen and link another account. | true |
manualBoolean | Allow users log in by entering their NUBAN and a unique identifier of your choice e.g. BVN | false |
manualType | Unique identifier to check NUBAN against. This is to minimize fraud around NUBAN-only identity verification Options Include: bvn dob email phone | bvn |
manualUploadBoolean | Allow users to upload a bank statement that will be analyzed via OCR and available on your Okra dashboard.manual must be true to use | false |
ussdBoolean | Allow users log in with USSD You must be using a compatible Android SDK that supports USSD. | false |
success_titleString | Landing Page Success Title | You've successfully linked to Okra! |
success_messageString | Landing page success page | With your bank account linked, you would be able to access the best financial services & products. |
widget_successString | Customize the messages your users see when they successfully link their bank accounts to your app. | 'You successfully linked your account to clientName' |
widget_failedString | Customize what your users see if the widget fails. | 'Uh oh, an error occurred' |
identity_typeString | Unique Customer Identifier | BVN |
limitNumber | Statement length (3-24) | 24 |
corporateBoolean | Should only display corporate banks as well Options Include: null - Show both Ind & Corp true - Show only Corp false - Show only Ind | null |
institutionsArray | The banks you would like to display to your users, the remaining will be searchable min of 4 | `[ 'first-bank-of-nigeria', 'united-bank-for-africa', 'guaranty-trust-bank', 'access-bank', 'zenith-bank', 'diamond-bank', 'stanbic-ibtc-bank', 'first-city-monument-bank' ]``` ` |
geoLocationBoolean | Access your customer's transaction locations | false |
filterObject | Filter the banks you would like to show users. If nothing is sent all will be available. E.g. {filter: {banks: [...bank-slugs...]}} | none |
noPeriodicBoolean | When true we will always pull all transactions from the user once (when Transactions are used as a product) once from the customer, on subsequent pulls (or when transactions are not used) we will not pull any. | |
isWebviewBoolean | Set true if launching OkraJS within a WebView. | false |
connectMessageBoolean | Customize the messages your users see when they are about to connect their accounts. e.g. Select your Salary Account | 'Select your account to connect' |
metaObject | Send any data to the widget using the meta Object. | E.g meta: { clientDefinedId: 'XXXXXXXXXXXXX', }, |
displayQRBoolean | Display QR code option on payment widget. Set false to hide QR option | true |
Direct to bank flow
This feature makes it possible for you to pre-select a bank, skipping the bank selection screens on the widget.
Setup
When creating links for data or payments, pass the preselect_bank
option with the parameters shown below in your application's configuration on the client-side, to bypass the bank selection widget screens.
You can copy-paste this initialization example into an Html file, then replace it with your own API-KEY and Client-Token to run the widget. Find your API-KEY and Client-Token in the API keys section of the Okra dashboard.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Okra Direct Bank Flow</title>
</head>
<body onload="buildWithOptions()" style="background-color:#fff;height:100vh">
<script src="https://cdn.okra.ng/v2/bundle.js"></script>
<script type="text/javascript">
function buildWithOptions(){
Okra.buildWithOptions({
name: 'Kent Woods Inc',
env: 'production',
key: '<Public Production API Key>',
token: '<Client- Token>',
products: ['auth', 'identity', 'balance', 'transactions' ],
showBalance: true,
preselect_bank: {
bank: 'guaranty-trust-bank',
type: 'personal',
platform:'mobile',
app: 'gtbank',
},
onEvent: (event) => {
console.log('Event Payload', event)
},
onSuccess: function(data){
let response = {event:'option success', data}
console.log(data)
},
onClose: function(){
let response = {event:'option close'}
},
BeforeClose: function(){
let response = {event:'option before close'}
},
onError: function(data){
let response = {event:'option error', data}
}
})
}
</script>
</body>
</html>
Key | Value | Description |
---|---|---|
bank | bank slug - required E.g - guaranty-trust-bank. | The bank name you want to pre-select. Check here for a list of bank slugs |
type | personal - required | It refers to the type of account. E.g personal or business . |
platform | bank - required | It refers to the login methods, which are internet banking(bank) or mobile banking(mobile). |
login | pin_and_token - optional | This optional keyword refers to only banks that have multi-login options like Zenith bank, which have pin_and_token or password as login options. |
app | gtworld - optional | For banks with multiple mobile banking apps like GTbank, you can specify a particular app. |
Updated 11 days ago