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.

NameDescriptionDefault Value
token
ObjectId
The Client Token associated with your account; is available in the Dashboard.none
key
String
The key associated with your account; is available in the Dashboard.none
clientName
String
Displayed on the User Agreement and once a user has successfully linked their Record.'This Client'
env
String
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
countries
Array
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.
products
Array
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.
source
String
The integration type you are using. Options Include:

android
ios
rn-ios
rn-android
ionic
wordpress
vue
flutter
integration
laravel
react
link
mode
String
Widget background color

Options Include:
primary - Primary Color
light - Light Transparent
dark - Dark transparent
primary
callback_url
String
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_url
String
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
color
String
The color theme on the widget3AB795
logo
String
Your App or Company logoOkra's Logo
options
Object
You can pass object custom values to the widget, view Special Widget Options belownone
enableAutoConnect
Boolean
Allow users to automatically connect their accounts. This will automatically connect all accounts your customer has at the bank they are connecting with.false
debitLater
Boolean
Authenticate users for debit access at a later date.false
debitType
String
Choose whether to debit the user on a recurring basis or one-time

Options Include:
one-time
recurring
garnish
'one-time'
showBalance
Boolean
Allow users to see their account balancefalse
enhancedBalance
Boolean
See your users enhanced balance (point in time balance) at every transaction linefalse
selfieVerify
Boolean
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
geoLocation
Boolean
See your user's transaction locationfalse
continue_cta
String
The message on the button when a user completes linkingContinue
multi_account
Boolean
Allow user's the ability to quickly return to the bank search screen and link another account.true
manual
Boolean
Allow users log in by entering their NUBAN and a unique identifier of your choice e.g. BVNfalse
manualTypeUnique identifier to check NUBAN against. This is to minimize fraud around NUBAN-only identity verification

Options Include:
bvn
dob
email
phone
bvn
manualUpload
Boolean
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
ussd
Boolean
Allow users log in with USSD

You must be using a compatible Android SDK that supports USSD.
false
success_title
String
Landing Page Success TitleYou've successfully linked to Okra!
success_message
String
Landing page success pageWith your bank account linked, you would be able to access the best financial services & products.
widget_success
String
Customize the messages your users see when they successfully link their bank accounts to your app.'You successfully linked your account to clientName'
widget_failed
String
Customize what your users see if the widget fails.'Uh oh, an error occurred'
currency
String
Okra Wallet to Charge fromNGN
identity_type
String
Unique Customer IdentifierBVN
limit
Number
Statement length (3-24)24
corporate
Boolean
Should only display corporate banks as well

Options Include:
null - Show both Ind & Corp
true - Show only Corp
false - Show only Ind
null
institutions
Array
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' ]```
geoLocation
Boolean
Access your customer's transaction locationsfalse
filter
Object
Filter the banks you would like to show users. If nothing is sent all will be available.

E.g.

{filter: {banks: [...bank-slugs...]}}
none
noPeriodic
Boolean
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.
isWebview
Boolean
Set true if launching OkraJS within a WebView.false
connectMessage
Boolean
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'
meta
Object
Send any data to the widget using the meta Object.E.g
meta: {
clientDefinedId: 'XXXXXXXXXXXXX',
},
displayQR
Boolean
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>
KeyValueDescription
bankbank slug - required E.g - guaranty-trust-bank.The bank name you want to pre-select.
Check here for a list of bank slugs
typepersonal - requiredIt refers to the type of account. E.g personal or business.
platformbank - requiredIt refers to the login methods, which are internet banking(bank) or mobile banking(mobile).
loginpin_and_token - optionalThis optional keyword refers to only banks that have multi-login options like Zenith bank, which have pin_and_token or password as login options.
appgtworld - optionalFor banks with multiple mobile banking apps like GTbank, you can specify a particular app.