Payments
Download SpecOkra API endpoints for Payments
amount
int
required
The amount of money to transfer. When the currency is NGN
, this amount is transferred in kobo.
- Example
- 50000
name
string
required
The name of payment link.
- Example
- "A payment link"
currency
string
required
The currency used in the transfer. Defaults to NGN
.
- Example
- "NGN"
note
string
A description for the payment link.
- Example
- "For groceries."
countries
string
The account’s country.
- Enum
-
- NG
- Example
- "NG"
account
string
The beneficiary account ID. If you do not specify a value for account
in your request, the Okra API defaults to the account ID that is linked to your business.
- Example
- "{account ID}"
type
string
required
The type of payment you want to charge. Check out the Payments guide for more details.
- Enum
-
- one-time
- Example
- "NG"
filter
object (filter)
Filter for banks that you would like to show to your users on the bank selection screen. To filter for banks, list bank slugs in an array of strings in your filter object. Use the List banks API endpoint to retrieve bank slugs for institutions that Okra supports.
- Example
- { "filter": { "banks": [ "first-bank-of-nigeria", "guaranty-trust-bank", "kuda-bank", "zenith-bank" ] } }
banks
array[string]
List the bank slugs in an array of strings.
string
bearer
Request
{
"amount": 50000,
"name": "A payment link",
"currency": "NGN",
"note": "For groceries.",
"countries": "NG",
"account": "{account ID}",
"type": "NG",
"filter": {
"filter": {
"banks": [
"first-bank-of-nigeria",
"guaranty-trust-bank",
"kuda-bank",
"zenith-bank"
]
}
}
}
Response
Created
{
"status": "success",
"message": "Payment link successfully created!",
"data": {
"preselect_bank": {
"bank": null,
"type": null,
"platform": null,
"login": null
},
"schedule": {
"startDate": null,
"endDate": null
},
"whatsapp": {
"enabled": false,
"users": [],
"message_templates": [],
"qr": []
},
"filter": {
"banks": [
"first-bank-of-nigeria",
"guaranty-trust-bank",
"kuda-bank",
"zenith-bank"
]
},
"amount": 40000,
"currency": "NGN",
"type": "one-time",
"debitLater": false,
"countries": [
"NG"
],
"unique_views": [],
"institutions": [],
"qr": null,
"displayQR": false,
"billable_products": [
"auth",
"identity",
"balance",
"payment"
],
"data": false,
"archived": false,
"corporate": null,
"projects": [],
"_id": "15086eb9e6ccab3fe5147b6e",
"note": "Payment description",
"count": 0,
"created_by": "1f2922b59afab10984102e52",
"support_email": null,
"url": "{URL of the Payment link}",
"meta": {
"transaction_id": 1000000001012
},
"surl": "{URL of the Payment link}",
"short_url": "eTKuRWMqn",
"owner": {
"_id": "1d9288ea182d3d000cb7c486",
"name": "Okra Tech Inc.",
"app_name": "Okra, Inc"
},
"garnish": false,
"success_url": "continue-url",
"callback_url": "{The callback URL.}",
"redirect_url": "{The redirect URL.}",
"name": "Cool Payment Link",
"clientName": "Cool Inc.",
"env": "production-sandbox",
"logo": null,
"color": "#6734eb",
"account": "15086eb9e6ccab3fe5147b6d",
"receipt_merchant": null,
"current_project": "1050d01a9306f087a64462cf",
"created_at": "2023-09-18T15:37:29.578Z",
"last_updated": "2023-09-18T15:37:29.578Z",
"__v": 0,
"shared": null
}
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
status
string
The status of your request.
- Example
- "Created"
message
string
The response message.
- Example
- "Payment link successfully created"
data
object (data)
_id
string
A unique identifier for this record.
schedule
object (schedule)
- Example
- {}
startDate
string or null
A timestamp at which to start payment initiation e.g. 2021/09/20
endDate
string or null
A timestamp at which to end payment initiation e.g. 2021/06/20
amount
int
i32
Amount to transfer in kobo
if currency is NGN
.
currency
string
The currency used on the account that receives the payment. The default value is NGN
.
- Example
- "NGN"
type
string
The type of the payment. Check out the Payments guide for more details.
- Example
- "one-time"
debitLater
boolean
It allows you to save a customer’s details without an initial payment, return true
if initial amount is not
countries
array[string]
The account’s country.
string
unique_views
array[string]
string
billable_products
array[string]
Lists the products that you defined in your Okra app initialization.
string
data
boolean
Returns true for the payment objects.
archived
boolean
corporate
boolean or null
Returns true
if the account is a corporate account, and false
if it is an individual account.
projects
array[string]
Identifies your Okra projects.
string
note
string
A note that tied to a specific payment.
count
int
i32
created_by
string
The name of the account holder that initiated the payment.
url
string
The Payment link's URL.
surl
string
The Payment link's URL.
qr
string
The Payment QR code.
short_url
string
The short URL of the Payment link.
name
string
The customer's name.
env
string
The application environment where process was carried out.
account
string
The customer's account number.
created_at
string
Indicates the date when the payment was created. The timestamp value follows the ISO 8601 format.
last_updated
string
Indicates the date when the payment was updated. The timestamp value follows the ISO 8601 format.
__v
int
i32
The document version.
filter
object (filter)
Filters for banks that the Okra app shows to users on the bank selection screen.
banks
array[string]
Lists the bank slugs in an array of strings.
string
preselect_bank
object (preselect_bank)
Lists the banks that are preselected for the user, bypassing the bank selection screens in the Okra app flow.
bank
string
Lists the bank slugs in an array of strings.
type
string
Returns the account type. Possible values: personal
, business
platform
string
Returns the user's login method. Possible values: bank
, mobile
login
string
Returns additional login options for banks that have multi-login options. Possible values: pin_and_token
, password
support_email
string
A support email address.
current_project
string
Returns the ID
of the project that the payment belongs to.
color
string
The color theme of the Okra app, using HEX color code.
logo
string
A URLs that point to an image file of your logo.
payment_id
string
The ID of the payment you want to verify
bearer
Request
{
"payment_id": "// The payment_id"
}
Response
OK
{
"status": "success",
"message": "Payment Status suceccefully retrieved!",
"data": {
"payment_status": {
"_id": "",
"amount": 100,
"currency": "NGN",
"customer": "",
"error": {},
"link": {
"_id": "",
"url": "",
"surl": "",
"short_url": ""
},
"status": "",
"response_status": ""
}
}
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
status
string
message
string
data
object (data)
- Example
- { "payment_status": { "_id": "", "amount": 100, "currency": "NGN", "customer": "", "error": {}, "link": { "_id": "", "url": "", "surl": "", "short_url": "" }, "status": "", "response_status": "" } }
payment_status
object (payment_status)
- Example
- { "_id": "", "amount": 100, "currency": "NGN", "customer": "", "error": {}, "link": { "_id": "", "url": "", "surl": "", "short_url": "" }, "status": "", "response_status": "" }
_id
string
Okra's unique identifier used to reference the current owner.
amount
int
i32
Amount transfered in kobo
if currency is NGN
.
error
string
An error code unique to the error received.
currency
string
The currency of the transfer. Defaults to NGN
customer
string
The ID for the customer whose payment was made to
link
object (link)
- Example
- { "_id": "", "url": "", "surl": "", "short_url": "" }
_id
string
Okra's unique identifier used to reference the payment link
url
string
The payment url.
surl
string
The payment short url.
short_url
string
The payment short url.
status
string
Filter payment by status ('failed', 'success', 'pending')
Content-Security-Policy
string
- Content Type
- text/plain
- Example
- "default-src 'self';base-uri 'self';block-all-mixed-content;font-src 'self' https: data:;frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"
X-DNS-Prefetch-Control
string
- Content Type
- text/plain
- Example
- "off"
Expect-CT
string
- Content Type
- text/plain
- Example
- "max-age=0"
X-Frame-Options
string
- Content Type
- text/plain
- Example
- "SAMEORIGIN"
Strict-Transport-Security
string
- Content Type
- text/plain
- Example
- "max-age=15552000; includeSubDomains"
X-Download-Options
string
- Content Type
- text/plain
- Example
- "noopen"
X-Content-Type-Options
string
- Content Type
- text/plain
- Example
- "nosniff"
X-Permitted-Cross-Domain-Policies
string
- Content Type
- text/plain
- Example
- "none"
Referrer-Policy
string
- Content Type
- text/plain
- Example
- "no-referrer"
X-XSS-Protection
string
- Content Type
- text/plain
- Example
- "0"
Access-Control-Allow-Methods
string
- Content Type
- text/plain
- Example
- "GET, POST, OPTIONS, PUT, PATCH, DELETE"
Access-Control-Allow-Headers
string
- Content Type
- text/plain
- Example
- "X-Requested-With,content-type,authorization"
Access-Control-Allow-Credentials
string
- Content Type
- text/plain
- Example
- "true"
Content-Length
string
- Content Type
- text/plain
- Example
- "398"
ETag
string
- Content Type
- text/plain
- Example
- "W/\"18e-fiAT1GhwEg1xIPdBFd3bq+apiRg\""
Date
string
- Content Type
- text/plain
- Example
- "Fri, 29 Jan 2021 14:25:39 GMT"
Connection
string
- Content Type
- text/plain
- Example
- "keep-alive"
Keep-Alive
string
- Content Type
- text/plain
- Example
- "timeout=5"
Get all Payments
This endpoint allows you retrieve all the payment transactions in your Okra account.
payment_id
string
The ID of the payment you want to verify
bearer
Request
{
"payment_id": "// payment_id"
}
Response
OK
{
"status": "",
"message": "",
"data": {
"payment": {
"_id": "",
"record": "",
"__v": 0,
"amount": 100,
"created_at": "",
"credit_account": "",
"currency": "NGN",
"customer": "",
"debit_account": "",
"env": "",
"error": {},
"last_updated": "",
"link": {
"_id": "",
"url": "",
"surl": "",
"short_url": ""
},
"ref": "",
"source": "",
"status": "",
"current_project": "",
"projects": [
""
],
"response_status": ""
}
}
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
status
string
message
string
data
object (data)
- Example
- { "payment": { "_id": "", "record": "", "__v": 0, "amount": 100, "created_at": "", "credit_account": "", "currency": "NGN", "customer": "", "debit_account": "", "env": "", "error": {}, "last_updated": "", "link": { "_id": "", "url": "", "surl": "", "short_url": "" }, "ref": "", "source": "", "status": "", "current_project": "", "projects": [ "" ], "response_status": "" } }
payment
object (payment)
- Example
- { "_id": "", "record": "", "__v": 0, "amount": 100, "created_at": "", "credit_account": "", "currency": "NGN", "customer": "", "debit_account": "", "env": "", "error": {}, "last_updated": "", "link": { "_id": "", "url": "", "surl": "", "short_url": "" }, "ref": "", "source": "", "status": "", "current_project": "", "projects": [ "" ], "response_status": "" }
_id
string
Okra's unique identifier used to reference the current owner.
record
string
The record ID of the payment.
__v
int
i32
The document version of the payment
amount
int
i32
Amount to transfer in kobo if currency is NGN
.
created_at
string
Timestamp in ISO 8601 format (YYYY-MM-DDTHH:mm:ssZ) indicating the first time that the payment was created.
credit_account
string
The account to be credited.
currency
string
The currency of the transfer. Defaults to NGN
customer
string
The ID for the customer whose payment was made to
debit_account
string
The account to be debited.
string or null
Customer's email address
env
string
The application environment where process was carried out.
error
object (error)
An error code unique to the error received.
last_updated
string
Timestamp in ISO 8601 format (YYYY-MM-DDTHH:mm:ssZ) indicating the last time that the payment was updated.
link
object (link)
- Example
- { "_id": "", "url": "", "surl": "", "short_url": "" }
_id
string
Okra's unique identifier used to reference the payment link
url
string
The payment url.
surl
string
The payment short url.
short_url
string
The payment short url.
meta
string or null
Stringified JSON object of custom data.
ref
string
Unique payment reference. Only -
, .
, =
and alphanumeric characters allowed.
source
string
Where should we transfer from? Only balance for now
status
string
Filter payment by status ('failed', 'success', 'pending')
current_project
string
projects
array[string]
string
response_status
string
Content-Security-Policy
string
- Content Type
- text/plain
- Example
- "default-src 'self';base-uri 'self';block-all-mixed-content;font-src 'self' https: data:;frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"
X-DNS-Prefetch-Control
string
- Content Type
- text/plain
- Example
- "off"
Expect-CT
string
- Content Type
- text/plain
- Example
- "max-age=0"
X-Frame-Options
string
- Content Type
- text/plain
- Example
- "SAMEORIGIN"
Strict-Transport-Security
string
- Content Type
- text/plain
- Example
- "max-age=15552000; includeSubDomains"
X-Download-Options
string
- Content Type
- text/plain
- Example
- "noopen"
X-Content-Type-Options
string
- Content Type
- text/plain
- Example
- "nosniff"
X-Permitted-Cross-Domain-Policies
string
- Content Type
- text/plain
- Example
- "none"
Referrer-Policy
string
- Content Type
- text/plain
- Example
- "no-referrer"
X-XSS-Protection
string
- Content Type
- text/plain
- Example
- "0"
Access-Control-Allow-Methods
string
- Content Type
- text/plain
- Example
- "GET, POST, OPTIONS, PUT, PATCH, DELETE"
Access-Control-Allow-Headers
string
- Content Type
- text/plain
- Example
- "X-Requested-With,content-type,authorization"
Access-Control-Allow-Credentials
string
- Content Type
- text/plain
- Example
- "true"
Content-Length
string
- Content Type
- text/plain
- Example
- "768"
ETag
string
- Content Type
- text/plain
- Example
- "W/\"300-NGgMqFko2RjWgyOPjxkN+xulTCE\""
Date
string
- Content Type
- text/plain
- Example
- "Tue, 23 Mar 2021 14:53:43 GMT"
Connection
string
- Content Type
- text/plain
- Example
- "keep-alive"
Keep-Alive
string
- Content Type
- text/plain
- Example
- "timeout=5"
Get Payments by id
This endpoint allows you retrieve a specific the payment transactions in your Okra account.
payment_id
string
The ID of the payment you want to verify
bearer
Request
{
"payment_id": "// payment_id"
}
Response
OK
{
"status": "",
"message": "",
"data": {
"payment": {
"_id": "",
"record": "",
"__v": 0,
"amount": 100,
"created_at": "",
"credit_account": "",
"currency": "NGN",
"customer": "",
"debit_account": "",
"env": "",
"error": {},
"last_updated": "",
"link": {
"_id": "",
"url": "",
"surl": "",
"short_url": ""
},
"ref": "",
"source": "",
"status": "",
"current_project": "",
"projects": [
""
],
"response_status": ""
}
}
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
status
string
message
string
data
object (data)
- Example
- { "payment": { "_id": "", "record": "", "__v": 0, "amount": 100, "created_at": "", "credit_account": "", "currency": "NGN", "customer": "", "debit_account": "", "env": "", "error": {}, "last_updated": "", "link": { "_id": "", "url": "", "surl": "", "short_url": "" }, "ref": "", "source": "", "status": "", "current_project": "", "projects": [ "" ], "response_status": "" } }
payment
object (payment)
- Example
- { "_id": "", "record": "", "__v": 0, "amount": 100, "created_at": "", "credit_account": "", "currency": "NGN", "customer": "", "debit_account": "", "env": "", "error": {}, "last_updated": "", "link": { "_id": "", "url": "", "surl": "", "short_url": "" }, "ref": "", "source": "", "status": "", "current_project": "", "projects": [ "" ], "response_status": "" }
_id
string
Okra's unique identifier used to reference the current owner.
record
string
The record ID of the payment.
__v
int
i32
The document version of the payment
amount
int
i32
Amount to transfer in kobo if currency is NGN
.
created_at
string
Timestamp in ISO 8601 format (YYYY-MM-DDTHH:mm:ssZ) indicating the first time that the payment was created.
credit_account
string
The account to be credited.
currency
string
The currency of the transfer. Defaults to NGN
customer
string
The ID for the customer whose payment was made to
debit_account
string
The account to be debited.
string or null
Customer's email address
env
string
The application environment where process was carried out.
error
object (error)
An error code unique to the error received.
last_updated
string
Timestamp in ISO 8601 format (YYYY-MM-DDTHH:mm:ssZ) indicating the last time that the payment was updated.
link
object (link)
- Example
- { "_id": "", "url": "", "surl": "", "short_url": "" }
_id
string
Okra's unique identifier used to reference the payment link
url
string
The payment url.
surl
string
The payment short url.
short_url
string
The payment short url.
meta
string or null
Stringified JSON object of custom data.
ref
string
Unique payment reference. Only -
, .
, =
and alphanumeric characters allowed.
source
string
Where should we transfer from? Only balance for now
status
string
Filter payment by status ('failed', 'success', 'pending')
current_project
string
projects
array[string]
string
response_status
string
Content-Security-Policy
string
- Content Type
- text/plain
- Example
- "default-src 'self';base-uri 'self';block-all-mixed-content;font-src 'self' https: data:;frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"
X-DNS-Prefetch-Control
string
- Content Type
- text/plain
- Example
- "off"
Expect-CT
string
- Content Type
- text/plain
- Example
- "max-age=0"
X-Frame-Options
string
- Content Type
- text/plain
- Example
- "SAMEORIGIN"
Strict-Transport-Security
string
- Content Type
- text/plain
- Example
- "max-age=15552000; includeSubDomains"
X-Download-Options
string
- Content Type
- text/plain
- Example
- "noopen"
X-Content-Type-Options
string
- Content Type
- text/plain
- Example
- "nosniff"
X-Permitted-Cross-Domain-Policies
string
- Content Type
- text/plain
- Example
- "none"
Referrer-Policy
string
- Content Type
- text/plain
- Example
- "no-referrer"
X-XSS-Protection
string
- Content Type
- text/plain
- Example
- "0"
Access-Control-Allow-Methods
string
- Content Type
- text/plain
- Example
- "GET, POST, OPTIONS, PUT, PATCH, DELETE"
Access-Control-Allow-Headers
string
- Content Type
- text/plain
- Example
- "X-Requested-With,content-type,authorization"
Access-Control-Allow-Credentials
string
- Content Type
- text/plain
- Example
- "true"
Content-Length
string
- Content Type
- text/plain
- Example
- "768"
ETag
string
- Content Type
- text/plain
- Example
- "W/\"300-NGgMqFko2RjWgyOPjxkN+xulTCE\""
Date
string
- Content Type
- text/plain
- Example
- "Tue, 23 Mar 2021 14:51:36 GMT"
Connection
string
- Content Type
- text/plain
- Example
- "keep-alive"
Keep-Alive
string
- Content Type
- text/plain
- Example
- "timeout=5"
Get payments by options
This endpoint allows you verify the payments via the metadata or options.
options
string
required
Verify the payment by passing options
- Example
- "\"reference\": \"xxxxx\""
page
int
i32
A page number within the paginated result set.
- Example
- 1
limit
int
i32
This limits the number of records returned based on a limit value
- Example
- 1
Response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
Was this page helpful?