curl --request POST \
--url https://api.development.mona.ng/pay/create \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"amount": 2000,
"phone": "7083287899",
"bvn": "2222222222222222",
"name": "John Doe",
"dob": "01-01-1990"
}
'import requests
url = "https://api.development.mona.ng/pay/create"
payload = {
"amount": 2000,
"phone": "7083287899",
"bvn": "2222222222222222",
"name": "John Doe",
"dob": "01-01-1990"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 2000,
phone: '7083287899',
bvn: '2222222222222222',
name: 'John Doe',
dob: '01-01-1990'
})
};
fetch('https://api.development.mona.ng/pay/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.development.mona.ng/pay/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => 2000,
'phone' => '7083287899',
'bvn' => '2222222222222222',
'name' => 'John Doe',
'dob' => '01-01-1990'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.development.mona.ng/pay/create"
payload := strings.NewReader("{\n \"amount\": 2000,\n \"phone\": \"7083287899\",\n \"bvn\": \"2222222222222222\",\n \"name\": \"John Doe\",\n \"dob\": \"01-01-1990\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.development.mona.ng/pay/create")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 2000,\n \"phone\": \"7083287899\",\n \"bvn\": \"2222222222222222\",\n \"name\": \"John Doe\",\n \"dob\": \"01-01-1990\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.development.mona.ng/pay/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 2000,\n \"phone\": \"7083287899\",\n \"bvn\": \"2222222222222222\",\n \"name\": \"John Doe\",\n \"dob\": \"01-01-1990\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Gateway checkout created",
"transactionId": "68363964c63df477cf65fd44",
"friendlyID": "MNA-TRC-343827",
"url": "https://pay.mona.ng/68363964c63df477cf65fd44",
"savedPaymentOptions": {
"card": [
{}
],
"bank": [
{}
]
}
}{
"error": 123,
"message": "<string>"
}Create a Payment
Create a Payment is where users can generate a new checkout session to accept payments from customers via cards, bank transfers, and Mona Pay.
curl --request POST \
--url https://api.development.mona.ng/pay/create \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"amount": 2000,
"phone": "7083287899",
"bvn": "2222222222222222",
"name": "John Doe",
"dob": "01-01-1990"
}
'import requests
url = "https://api.development.mona.ng/pay/create"
payload = {
"amount": 2000,
"phone": "7083287899",
"bvn": "2222222222222222",
"name": "John Doe",
"dob": "01-01-1990"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 2000,
phone: '7083287899',
bvn: '2222222222222222',
name: 'John Doe',
dob: '01-01-1990'
})
};
fetch('https://api.development.mona.ng/pay/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.development.mona.ng/pay/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => 2000,
'phone' => '7083287899',
'bvn' => '2222222222222222',
'name' => 'John Doe',
'dob' => '01-01-1990'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.development.mona.ng/pay/create"
payload := strings.NewReader("{\n \"amount\": 2000,\n \"phone\": \"7083287899\",\n \"bvn\": \"2222222222222222\",\n \"name\": \"John Doe\",\n \"dob\": \"01-01-1990\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.development.mona.ng/pay/create")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 2000,\n \"phone\": \"7083287899\",\n \"bvn\": \"2222222222222222\",\n \"name\": \"John Doe\",\n \"dob\": \"01-01-1990\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.development.mona.ng/pay/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 2000,\n \"phone\": \"7083287899\",\n \"bvn\": \"2222222222222222\",\n \"name\": \"John Doe\",\n \"dob\": \"01-01-1990\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Gateway checkout created",
"transactionId": "68363964c63df477cf65fd44",
"friendlyID": "MNA-TRC-343827",
"url": "https://pay.mona.ng/68363964c63df477cf65fd44",
"savedPaymentOptions": {
"card": [
{}
],
"bank": [
{}
]
}
}{
"error": 123,
"message": "<string>"
}Authorizations
Body
Checkout session parameters
The amount to be paid in kobo (Nigerian minor currency unit)
2000
The customer's phone number (Optional)
"7083287899"
The customer's BVN (Optional)
"2222222222222222"
The customer's name (Optional)
"John Doe"
The customer's date of birth in DD-MM-YYYY format (Optional)
"01-01-1990"
Response
Checkout created response
Indicates if the request was successful
true
Success message
"Gateway checkout created"
Unique identifier for the transaction (pass to SDK)
"68363964c63df477cf65fd44"
Human-readable transaction ID
"MNA-TRC-343827"
Payment URL to redirect the customer to
"https://pay.mona.ng/68363964c63df477cf65fd44"
Customer's saved payment methods
Show child attributes
Show child attributes