App properties
Customize the your Okra app and define every aspect that your users see, from the list of available banks to a consistent brand experience.
The properties on this page can be used to customize the Okra app experience you provide to your users. Use these properties when building with options
or when creating an app link via the API. Check out the Integration guide for more details.
Configuring your Okra app
Use these properties to define the basic configuration for your Okra app according to your use case:
Set up event callbacks and webhooks
Use these properties to set up callback and webhook URLs:
Set up banks and institutions
Use these properties to define the banks and institutions that your users see in the Okra app:
preselect_banks
attributes
These properties enable you to pre-select a bank for your users. When using this option, the Okra app flow skips the bank selection screens.
Example code
You can find an example Web initialization with a pre-selected bank here:
preselect_bank
example code
<!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-sandbox",
key: "<Sandbox API Key>",
token: "<Client Token>",
products: ["auth", "identity", "balance", "transactions"],
showBalance: true,
preselect_bank: {
bank: "guaranty-trust-bank",
type: "personal",
platform: "mobile"
},
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>
You can test this initialization example by running it as an HTML file. Replace the values of api_key
and client_token
with your own API key and client token to run the Okra app. Read more about API key types and authentication in the API reference.
Set up the RUX flows
Use these properties to simplify the user journey in your app for users who already connected their accounts with Okra.
Account data & Payment flows
The API accepts these keys: id
, bvn
, phone
, email
|{"customer": {"id": "1dcfr...dsf"}}
|
Quick Pay
When using Okra's Flutter, iOS, or Android SDKs, or the official React Native package:
When using OkraJS or Okra Node:
Check out the Returning user experience guide for more details about these flows.
Set up bank account behavior
Use these properties to define the account connection behavior for your users:
Set up look & feel
Use these properties to customize texts and the branding of your Okra app:
Set up payments
Use these properties to set up a payments flow in your Okra app:
charge
attributes
These properties enable you to set up specific details about the payment you want to charge:
charge
code
Example Open charge
example
"charge": {
"type": "one-time",
"amount": 10000,
"note": "Service payment",
"currency": "NGN",
"account": "{The beneficiary account ID}"
}
cart
attributes
These properties enable you to show a detailed list of the items that you collect a payment for, much like a cart in a webshop:
cart
code
Example You can specify multiple items as an array of objects:
Open cart
example
"cart": [
{
"name": "Full English Breakfast",
"amount": 20000,
"currency": "NGN",
"quantity": 2
},
{
"name": "Coffee",
"amount": 2500,
"currency": "NGN",
"quantity": 2
}
]
Set up metadata and tracking
Use these properties to set up unique IDs, fingerprints, or any other tracking information for a specific Okra app implementation:
To use metadata effectively, make sure you set up Webhooks on an app-level when you define your Okra app properties.
Was this page helpful?