5 types of IDs in Okra you should know about

IDs are how we identify a specific property within Okra. They are long strings that are unique to the property they identify. This means that you can also rely on an ID to point to the same data or property.

We are going to define 10 of the most important IDs within Okra, how they are commonly used, and general best practices. To make this more relatable, we are going to call on the help of someone called Ade who has just linked his accounts to your application

📘

💡 Protip

It is important to note that these IDs can be used with multiple endpoints to fetch the required information. For example, a customer id can be used with one endpoint to fetch the user’s KYC information and the same id can be used with another endpoint to fetch the user’s account balance across all their connected accounts

Customer ID

E.g: "123456a1234a12345ab1234a",

What they mean:

This ID uniquely identifies a user within Okra. It speaks to an entity or customer almost like a name, whenever you call a customer ID only the entity or customer in question answers, returning the information tied to that entity.

Where they can be found:

  • webhooks response
  • onSuccess callback on the widget
  • any of the endpoints listed here
  • okra dashboard

Should I save this to my DB:

YES!



Account ID

E.g: "123ab123a1a1ab123a123abc",

What they mean:

This ID uniquely identifies a user’s account within Okra.

🚧

💎 Example

Ade has connected his Access bank account with account number 1234567890.
This unique ID points directly to this account number and bank that belongs to Ade.

It speaks to an entity or customer’s account details, this ID ensures that you are always using the right bank details in your application

Where they can be found:

  • webhooks response (except the Identity webhook)
  • onSuccess callback on the widget
  • any of the endpoints listed here

Should I save this to my DB:

YES!

📘

💡 Protip

Within the onSuccess callback, check for connected: true within the account property to confirm that you are saving the ID for the account that has been connected to your application



Product ID

E.g: "123ab123a1a1ab123a123abc",

What they mean:

This ID uniquely identifies a product for a connected user within your application.

All Okra products have an ID, Transaction ID, Payment ID, Balance ID, etc.

After connecting his account, you now have access to Ade’s transactions, with the transaction id you can fetch a specific Transaction set that points to transactions retrieved over a specific linking period.

🚧

💎 Example

If Ade links his account on Monday and also on Friday. with the transaction ID gotten on Monday, you can get the transactions that were retrieved only on Monday.

It speaks to an entity or customer’s account details, this ID ensures that you are always using the right bank details in your application

Where they can be found:

  • webhooks response (except the Identity webhook)
  • onSuccess callback on the widget
  • any of the endpoints listed here

Should I save this to my DB:

Optionally, if your use case is similar to the one described above, otherwise you can always use the account id or record id with relevant endpoints to get back the needed info. However, you should definitely save the PAYMENTS ID if you are using our payments product



Record ID

E.g: "1234567a123456789a1ab123",

What they mean:

This ID uniquely identifies a linking session for a user.

🚧

💎 Example

When Ade linked his account on Monday and Tuesday, two unique record ids are created. It will point to all the products retrieved for a particular user at a particular time when they linked their account.

It can be used to fetch other IDs from a particular session as well as for debugging purposes

Where they can be found:

  • webhooks response
  • onSuccess callback on the widget
  • any of the endpoints listed here

Should I save this to my DB:

YES!



Bank ID

E.g: "5d6fe57a4099cc4b210bbeb1",

What they mean:

This ID uniquely identifies a bank on Okra

Bank ID is one of the ways Okra identifies a bank. It is required by some endpoints and the full list of bank ids can be found here.

Where they can be found:

  • Okra documentation
  • on the API response for accounts, transactions, and balance

Should I save this to my DB:

Optional

👍

💡 Bonus Section: Metadata

We also allow you to pass in your own custom ID.
For example, within your application users have a unique user ID that looks like this “ADE123”
You can pass this in as an option to the widget and when your customer links their account, in addition to the default okra ids, you also get back your own unique id that can be used with some endpoints to retrieve data for that user.
Simply add meta: {user_id: “ADE123”} to the widget options and you can use this same id with any endpoint that has “by options” passing in your custom options


Did this page help you?