Create checkout
curl --request POST \
--url https://api.platnova.com/v1/checkout \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"email": "[email protected]",
"amount": 25000,
"currency": "ngn",
"partner_reference": "order-1042",
"success_url": "https://shop.example.com/orders/1042/paid",
"cancel_url": "https://shop.example.com/orders/1042"
}
'import requests
url = "https://api.platnova.com/v1/checkout"
payload = {
"email": "[email protected]",
"amount": 25000,
"currency": "ngn",
"partner_reference": "order-1042",
"success_url": "https://shop.example.com/orders/1042/paid",
"cancel_url": "https://shop.example.com/orders/1042"
}
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({
email: '[email protected]',
amount: 25000,
currency: 'ngn',
partner_reference: 'order-1042',
success_url: 'https://shop.example.com/orders/1042/paid',
cancel_url: 'https://shop.example.com/orders/1042'
})
};
fetch('https://api.platnova.com/v1/checkout', 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.platnova.com/v1/checkout",
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([
'email' => '[email protected]',
'amount' => 25000,
'currency' => 'ngn',
'partner_reference' => 'order-1042',
'success_url' => 'https://shop.example.com/orders/1042/paid',
'cancel_url' => 'https://shop.example.com/orders/1042'
]),
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.platnova.com/v1/checkout"
payload := strings.NewReader("{\n \"email\": \"[email protected]\",\n \"amount\": 25000,\n \"currency\": \"ngn\",\n \"partner_reference\": \"order-1042\",\n \"success_url\": \"https://shop.example.com/orders/1042/paid\",\n \"cancel_url\": \"https://shop.example.com/orders/1042\"\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.platnova.com/v1/checkout")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"[email protected]\",\n \"amount\": 25000,\n \"currency\": \"ngn\",\n \"partner_reference\": \"order-1042\",\n \"success_url\": \"https://shop.example.com/orders/1042/paid\",\n \"cancel_url\": \"https://shop.example.com/orders/1042\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.platnova.com/v1/checkout")
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 \"email\": \"[email protected]\",\n \"amount\": 25000,\n \"currency\": \"ngn\",\n \"partner_reference\": \"order-1042\",\n \"success_url\": \"https://shop.example.com/orders/1042/paid\",\n \"cancel_url\": \"https://shop.example.com/orders/1042\"\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"data": {
"id": "<string>",
"url": "<string>",
"status": "pending",
"amount": 123,
"currency": "<string>",
"email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"partner_reference": "<string>",
"line_items": [
{
"name": "<string>",
"quantity": 5000,
"unit_amount": 123,
"partner_line_reference": "<string>"
}
],
"success_url": "<string>",
"cancel_url": "<string>",
"source": "<string>",
"purpose": "<string>",
"fee_bearer": "customer",
"payment_options": [
{
"id": "tag_transfer"
}
],
"paid_at": "2023-11-07T05:31:56Z",
"payment_reference": "<string>",
"entity": {},
"created_at": "2023-11-07T05:31:56Z"
},
"error": [
"<unknown>"
],
"message": "<string>"
}{
"status": false,
"data": {
"code": "request_in_progress"
},
"error": [
"<string>"
],
"message": "<string>"
}{
"status": false,
"data": {
"code": "request_in_progress"
},
"error": [
"<string>"
],
"message": "<string>"
}{
"status": false,
"data": {
"code": "request_in_progress"
},
"error": [
"<string>"
],
"message": "<string>"
}{
"status": false,
"data": {
"code": "request_in_progress"
},
"error": [
"<string>"
],
"message": "<string>"
}{
"status": "error",
"message": "Validation failed",
"errors": {}
}Checkout
Create Checkout
Create a hosted checkout for a sale. Authenticate with X-API-Key only: a dashboard session makes a self top-up instead.
POST
/
v1
/
checkout
Create checkout
curl --request POST \
--url https://api.platnova.com/v1/checkout \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"email": "[email protected]",
"amount": 25000,
"currency": "ngn",
"partner_reference": "order-1042",
"success_url": "https://shop.example.com/orders/1042/paid",
"cancel_url": "https://shop.example.com/orders/1042"
}
'import requests
url = "https://api.platnova.com/v1/checkout"
payload = {
"email": "[email protected]",
"amount": 25000,
"currency": "ngn",
"partner_reference": "order-1042",
"success_url": "https://shop.example.com/orders/1042/paid",
"cancel_url": "https://shop.example.com/orders/1042"
}
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({
email: '[email protected]',
amount: 25000,
currency: 'ngn',
partner_reference: 'order-1042',
success_url: 'https://shop.example.com/orders/1042/paid',
cancel_url: 'https://shop.example.com/orders/1042'
})
};
fetch('https://api.platnova.com/v1/checkout', 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.platnova.com/v1/checkout",
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([
'email' => '[email protected]',
'amount' => 25000,
'currency' => 'ngn',
'partner_reference' => 'order-1042',
'success_url' => 'https://shop.example.com/orders/1042/paid',
'cancel_url' => 'https://shop.example.com/orders/1042'
]),
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.platnova.com/v1/checkout"
payload := strings.NewReader("{\n \"email\": \"[email protected]\",\n \"amount\": 25000,\n \"currency\": \"ngn\",\n \"partner_reference\": \"order-1042\",\n \"success_url\": \"https://shop.example.com/orders/1042/paid\",\n \"cancel_url\": \"https://shop.example.com/orders/1042\"\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.platnova.com/v1/checkout")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"[email protected]\",\n \"amount\": 25000,\n \"currency\": \"ngn\",\n \"partner_reference\": \"order-1042\",\n \"success_url\": \"https://shop.example.com/orders/1042/paid\",\n \"cancel_url\": \"https://shop.example.com/orders/1042\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.platnova.com/v1/checkout")
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 \"email\": \"[email protected]\",\n \"amount\": 25000,\n \"currency\": \"ngn\",\n \"partner_reference\": \"order-1042\",\n \"success_url\": \"https://shop.example.com/orders/1042/paid\",\n \"cancel_url\": \"https://shop.example.com/orders/1042\"\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"data": {
"id": "<string>",
"url": "<string>",
"status": "pending",
"amount": 123,
"currency": "<string>",
"email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"partner_reference": "<string>",
"line_items": [
{
"name": "<string>",
"quantity": 5000,
"unit_amount": 123,
"partner_line_reference": "<string>"
}
],
"success_url": "<string>",
"cancel_url": "<string>",
"source": "<string>",
"purpose": "<string>",
"fee_bearer": "customer",
"payment_options": [
{
"id": "tag_transfer"
}
],
"paid_at": "2023-11-07T05:31:56Z",
"payment_reference": "<string>",
"entity": {},
"created_at": "2023-11-07T05:31:56Z"
},
"error": [
"<unknown>"
],
"message": "<string>"
}{
"status": false,
"data": {
"code": "request_in_progress"
},
"error": [
"<string>"
],
"message": "<string>"
}{
"status": false,
"data": {
"code": "request_in_progress"
},
"error": [
"<string>"
],
"message": "<string>"
}{
"status": false,
"data": {
"code": "request_in_progress"
},
"error": [
"<string>"
],
"message": "<string>"
}{
"status": false,
"data": {
"code": "request_in_progress"
},
"error": [
"<string>"
],
"message": "<string>"
}{
"status": "error",
"message": "Validation failed",
"errors": {}
}Overview
Authenticate with
X-API-Key only. A dashboard Authorization: Bearer token makes this a top-up of your own wallet, not a sale.Headers
Body
application/json

