Sandbox
Use the Sandbox to quickly develop and test your app
Overview
The Okra Sandbox is a free and fully-featured environment for application development and testing. All Okra functionality of both the Okra API and its widget is supported in the Sandbox environment. A variety of test accounts and institutions are available to test against, and you can create an unlimited number of test Items. Sandbox API keys can be obtained in the Okra Dashboard.
You can now create (or bulk upload) sandbox customers to use for testing — but the great news is, you can now create/upload customers in sandbox and production. Meaning you can automate your existing processes without leaving out your customers who have yet to connect via Okra.
Testing with sandbox
Why is creating customers great? It's great because you can now test and create realistic data which can account for different account types, identity profiles, internet speeds, Identification types, and more.
Using sandbox
To start using Sandbox, you make an HTTPS POST request to the endpoints on the
https://api.okra.ng/v2/sandbox/` domain. In order to use the Sandbox with a client library, specify production-sandbox
as your environment when initializing.
Creating customers
You can create, auto-generate and list sandbox customers directly from our API Reference in seconds.
Generate via the API
curl -X POST https://api.okra.ng/v2/sandbox/customers/generate
-H 'Content-Type: application/json'
-H 'Authorization Bearer ${secretkey}'
{
number: 1,
create: true
}
Data dictionary
Key | Type | Required | Description |
---|---|---|---|
number | Number | true | The number of customers you want to create, maximum is 10 |
create | Boolean | true | TRUE Customers will automatically create FALSE Review customers before creating. When reviewed pass response.data to this endpoint |
To create a customer you must designate the bank you will associate the customer with. You can find a list of available Bank IDs here.
Create via the API
POST
Authorization `Bearer ${secretkey}`
URL
https://api.okra.ng/v2/sandbox/customers/create
[{
noOfAccount: 3,
name: "Gavin Belson",
bank: "5d6fe57a4099cc4b210bbeb3",
username: "gavinisthebest",
password: "piedpiperismine",
type: "ind",
volume: "high",
identity: 100,
internetSpeed: 4
}]
{
status: "success",
message: "customer suceccefully created!",
data: {
status: true,
message: "customer suceccefully created!",
customers: [{..created customer}]
}
}
{
status: "error",
data: {
msg: "Username and password in the same bank already exists",
username: "gavinisthebest"
}
}
{
status: "error",
data: {
"msg": "GTBank requires only numbers as a password!"
}
}
Data dictionary
Key | Type | Description |
---|---|---|
noOfAccount | Number | The number of accounts the sandbox customer will have at the bank, maximum is 5 |
name | String | Customer name |
bank | Object ID | Bank ID, you can find a list of available Bank IDs here. |
username | String | Customer Username |
password | String | Customer password |
type | String | Either 'ind' or 'corp' for account type |
volume | String | The amount of transactions the user has at this bank, 'high', 'medium', or 'low' |
identity | Number | Percentage of the identity to be returned >25, >50, and >75 |
internetSpeed | Number | Customer's internet speed, 4,3,2 as for 4G,3G,2G |
Fetching customers
Fetch customers you created via the Okra API
curl -X POST https://okra.ng/v2/sandbox/customers/get
-H 'Content-Type: application/json'
-H 'Authorization Bearer ${secretkey}'
{
customer: CUSTOMER_ID
}
{
status: "success",
message: "customer suceccefully retrieved!",
data: {
status: true,
customer: {... details ... }
}
}
{
status: "error",
data: {
msg: "Customer not found",
}
}
Test credentials
Fields | Value |
---|---|
Payment OTP | 1111 |
Login OTP | 11111 |
Transaction Pin | tpin |
Secret Answer | tsecret |
BVN | 22111111111 |
Nuban Account Number | 0012345678 |
Not a developer?
Check out the Okra Sandbox Dashboard for a no-code way to generate sandbox users for your Okra Widget.Ensure your mode is set to sandbox
Don't have your API Keys?
If you don't already have one, you'll need to create an Okra developer account. After creating your account, you can find your API keys under the Settings Keys menu inside the Okra dashboard.
Updated 9 months ago