Check out the Wallet API overview to understand how Okra uses wallets to handle payments for the services and products that you use, and how you can manage your wallets.
/wallet/get
null
A successful response of the get wallet operation.
[
{
"status": "success",
"message": "Wallet successfully retrieved!",
"data": {
"wallet": {
"_id": "14550e9c2264c151c9cfc1e4",
"auto_topup": {
"status": true,
"payment_method": "xxxxxxxxxxxxxxxxxxxxxxxx",
"topup_amount": 101,
"available_balance_threshold": 100,
"currency": "USD",
"amount": 101
},
"notifications": {
"available_balance": {
"status": true,
"min": 900,
"schedule": "hourly",
"emails": [
"test+user1@okra.ng",
"test+user2@okra.ng"
]
}
},
"created_at": "2023-05-05T14:12:00.807Z",
"credits": 1.35364000000007,
"last_updated": "2023-05-10T09:32:13.861Z",
"current_project": "1ff62b99aea7a57a5c3baa01",
"current_project_name": "My Project"
}
}
}
]
An example response of a successful get wallet operation.
/wallet/list
page
int
Page determines the page that the API returns in the response. For example, if you set page
to 1 in your request, the API will return the first page of results in the response.
limit
int
Limit sets the number of results that the API returns in a single page. If you do not specify a value for limit
, the API will limit the response to 10 results per page.
project
string
The unique ID
of an Okra project.
id
string
The unique ID
of an Okra wallet.
term
string
A search term that filters for project name.
{
"term": "My project",
"page": 1,
"limit": 10
}
A successful response of the list wallets operation.
[
{
"summary": "Wallets returned successfully",
"description": "An example response of a successful list wallets operation.",
"value": [
{
"status": "success",
"message": "Wallet(s) successfully retrieved!",
"data": {
"wallets": [
{
"id": "13cfa4261521184c8cf428c3",
"current_project": "131f47360d4cdca777a7e671",
"current_project_name": "My Project",
"company": {
"_id": "131f4736b5dba8be3595cdbb",
"name": "BUGA MOTORS GLOBAL INVESTMENT LIMITED"
},
"auto_topup": {
"status": true,
"payment_method": "xxxxxxxxxxxxxxxxxxxxxxxx",
"topup_amount": 101,
"available_balance_threshold": 100,
"currency": "USD",
"amount": 101
},
"notifications": {
"available_balance": {
"status": true,
"min": 900,
"schedule": "hourly",
"emails": [
"test+user1@okra.ng",
"test+user2@okra.ng"
]
}
},
"credits": 1000
}
],
"total": null,
"pagination": {
"totalDocs": null
}
}
}
]
}
]
An example response of a successful get wallet operation.
/wallet/balance/check
project
string
The unique ID
of an Okra project.
id
string
The unique ID
of an Okra wallet.
{
"project": "1dadfa049f45083b5e14d75a"
}
A successful response of the check wallet balance operation.
[
{
"status": "success",
"message": "Balance successfully fetched!",
"data": {
"balance": [
{
"auto_topup": {
"status": true,
"payment_method": "xxxxxxxxxxxxxxxxxxxxxxxx",
"topup_amount": 101,
"available_balance_threshold": 100,
"currency": "USD",
"amount": 101
},
"notifications": {
"available_balance": {
"status": true,
"min": 900,
"schedule": "hourly",
"emails": [
"test+user1@okra.ng",
"test+user2@okra.ng"
]
}
},
"credits": 1000,
"current_project": "1dadfa049f45083b5e14d75a",
"current_project_name": "My Project",
"last_updated": "2023-03-13T00:32:51.252Z"
}
]
}
}
]
An example response of a successful check wallet balance operation.
Was this page helpful?