Creating Sandbox Customers

Simulate real customers and test the full power of Okra in your app.

We've launched Sandbox 2.0. 🎉

What does this mean? Well to start off, our legacy credentials have been deprecated.
You can no longer use okra_user okra_pass to login to a sandbox Widget and with this comes a lot of great new features.

You can now create (or bulk upload) sandbox customers to use for testing — but the great news is, you can now create/upload customer in sandbox and production. Meaning you can automate your existing processes without leaving out your customers who have yet to connect via Okra.

❗️

Don't have your API Key's?

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.

👍

Not a developer?

Check out the Okra Sandbox Dashboard for a no-code way to generate sandbox users for your Okra Widget.

NOTE: Ensure your mode is set to sandbox

Getting Started

Why is creating customers great? Glad you asked! 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.

Generating Customers

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
Customer will be automatically create

FALSE
Review customer before creating. When reviewed pass response.data to this endpoint

Creating Customers

To create a customer your must designate the bank you will associate the customer with. You can find a list of available Bank ID's 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 ID's 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

Customers 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",
    }
}

What's Next

Once you're ready to begin using your customer checkout our universal testing credentials

Did this page help you?