Initialize a checkout
curl --request POST \
--url https://api.payracle.com/api/v1/checkout/initialize \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 1500,
"email": "customer@example.com",
"title": "Order #9928",
"description": "Payment for running shoes",
"reference": "<string>",
"amount_control": "Fixed",
"valid_for": 900
}
'import requests
url = "https://api.payracle.com/api/v1/checkout/initialize"
payload = {
"amount": 1500,
"email": "customer@example.com",
"title": "Order #9928",
"description": "Payment for running shoes",
"reference": "<string>",
"amount_control": "Fixed",
"valid_for": 900
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 1500,
email: 'customer@example.com',
title: 'Order #9928',
description: 'Payment for running shoes',
reference: '<string>',
amount_control: 'Fixed',
valid_for: 900
})
};
fetch('https://api.payracle.com/api/v1/checkout/initialize', 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.payracle.com/api/v1/checkout/initialize",
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' => 1500,
'email' => 'customer@example.com',
'title' => 'Order #9928',
'description' => 'Payment for running shoes',
'reference' => '<string>',
'amount_control' => 'Fixed',
'valid_for' => 900
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.payracle.com/api/v1/checkout/initialize"
payload := strings.NewReader("{\n \"amount\": 1500,\n \"email\": \"customer@example.com\",\n \"title\": \"Order #9928\",\n \"description\": \"Payment for running shoes\",\n \"reference\": \"<string>\",\n \"amount_control\": \"Fixed\",\n \"valid_for\": 900\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.payracle.com/api/v1/checkout/initialize")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 1500,\n \"email\": \"customer@example.com\",\n \"title\": \"Order #9928\",\n \"description\": \"Payment for running shoes\",\n \"reference\": \"<string>\",\n \"amount_control\": \"Fixed\",\n \"valid_for\": 900\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payracle.com/api/v1/checkout/initialize")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 1500,\n \"email\": \"customer@example.com\",\n \"title\": \"Order #9928\",\n \"description\": \"Payment for running shoes\",\n \"reference\": \"<string>\",\n \"amount_control\": \"Fixed\",\n \"valid_for\": 900\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "<string>",
"data": {
"mode": "live",
"reference": "<string>",
"checkout_url": "<string>",
"amount": 123,
"account_number": "<string>",
"account_name": "<string>",
"bank_name": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"status": "<string>"
}
}Checkout & Dynamic Accounts
Initialize a Checkout
Start a one-time dynamic-account payment session
POST
/
checkout
/
initialize
Initialize a checkout
curl --request POST \
--url https://api.payracle.com/api/v1/checkout/initialize \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 1500,
"email": "customer@example.com",
"title": "Order #9928",
"description": "Payment for running shoes",
"reference": "<string>",
"amount_control": "Fixed",
"valid_for": 900
}
'import requests
url = "https://api.payracle.com/api/v1/checkout/initialize"
payload = {
"amount": 1500,
"email": "customer@example.com",
"title": "Order #9928",
"description": "Payment for running shoes",
"reference": "<string>",
"amount_control": "Fixed",
"valid_for": 900
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 1500,
email: 'customer@example.com',
title: 'Order #9928',
description: 'Payment for running shoes',
reference: '<string>',
amount_control: 'Fixed',
valid_for: 900
})
};
fetch('https://api.payracle.com/api/v1/checkout/initialize', 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.payracle.com/api/v1/checkout/initialize",
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' => 1500,
'email' => 'customer@example.com',
'title' => 'Order #9928',
'description' => 'Payment for running shoes',
'reference' => '<string>',
'amount_control' => 'Fixed',
'valid_for' => 900
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.payracle.com/api/v1/checkout/initialize"
payload := strings.NewReader("{\n \"amount\": 1500,\n \"email\": \"customer@example.com\",\n \"title\": \"Order #9928\",\n \"description\": \"Payment for running shoes\",\n \"reference\": \"<string>\",\n \"amount_control\": \"Fixed\",\n \"valid_for\": 900\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.payracle.com/api/v1/checkout/initialize")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 1500,\n \"email\": \"customer@example.com\",\n \"title\": \"Order #9928\",\n \"description\": \"Payment for running shoes\",\n \"reference\": \"<string>\",\n \"amount_control\": \"Fixed\",\n \"valid_for\": 900\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payracle.com/api/v1/checkout/initialize")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 1500,\n \"email\": \"customer@example.com\",\n \"title\": \"Order #9928\",\n \"description\": \"Payment for running shoes\",\n \"reference\": \"<string>\",\n \"amount_control\": \"Fixed\",\n \"valid_for\": 900\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "<string>",
"data": {
"mode": "live",
"reference": "<string>",
"checkout_url": "<string>",
"amount": 123,
"account_number": "<string>",
"account_name": "<string>",
"bank_name": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"status": "<string>"
}
}POST /v1/checkout/initialize
Callable with either a secret key (server-side) or a public key + X-Business-ID header (client-side widgets) — see Authentication.
number
required
Amount in Naira, minimum ₦5
string
Payer’s email address
string
Payment title shown on the checkout page. Defaults to “Payment”
string
Payment description shown on the checkout page
string
Your own unique reference for this payment. Auto-generated (
PAY-XXXXXXXXXX) if omittedstring
default:"Fixed"
Fixed, UnderPayment, or OverPayment — whether the customer must pay exactly this amountnumber
default:"900"
Seconds until the dynamic account expires, between 60 and 86400 (24h)
curl -X POST "https://api.payracle.com/api/v1/checkout/initialize" \
-H "Authorization: Bearer sk_live_YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": 1500,
"email": "customer@example.com",
"title": "Order #9928",
"description": "Payment for running shoes"
}'
Response
{
"status": true,
"message": "Checkout initialized.",
"data": {
"mode": "live",
"reference": "PAY-A1B2C3D4E5",
"checkout_url": "https://payracle.com/pay/PAY-A1B2C3D4E5",
"amount": 1500,
"account_number": "9012345678",
"account_name": "Payracle-Order #9928",
"bank_name": "Safe Haven MFB",
"expires_at": "2026-08-28T15:20:00.000000Z",
"status": "active"
}
}
checkout_url, or embed it directly — that’s exactly what the JS widget and mobile SDKs do under the hood (load it in an iframe/WebView instead of a full redirect).Authorizations
secretKeypublicKey & businessId
sk_live_... or sk_test_... — can call every endpoint. Server-side only.
Body
application/json
Required range:
x >= 5Example:
1500
Example:
"customer@example.com"
Example:
"Order #9928"
Example:
"Payment for running shoes"
Available options:
Fixed, UnderPayment, OverPayment Required range:
60 <= x <= 86400