Payment Link From Checkout
curl --request POST \
--url https://seerbitapi.com/api/v2/payments \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"publicKey": "SBTESTPUBK_9sN3TuLgW6a9redEfY48cKKkUa09Pz2u",
"amount": "10.00",
"currency": "NGN",
"country": "NG",
"paymentReference": "P791090233047WZ73QN",
"email": "mamadou.diouf@intouchgroup.net",
"productId": "15013",
"productDescription": "touch badge",
"callbackUrl": "https://gutouch.com",
"hash": "cfb5464ea21cce315ea72fb28f7ea45c4b61c443783eeff82dea98e57d445e15",
"hashType": "sha256"
}
'import requests
url = "https://seerbitapi.com/api/v2/payments"
payload = {
"publicKey": "SBTESTPUBK_9sN3TuLgW6a9redEfY48cKKkUa09Pz2u",
"amount": "10.00",
"currency": "NGN",
"country": "NG",
"paymentReference": "P791090233047WZ73QN",
"email": "mamadou.diouf@intouchgroup.net",
"productId": "15013",
"productDescription": "touch badge",
"callbackUrl": "https://gutouch.com",
"hash": "cfb5464ea21cce315ea72fb28f7ea45c4b61c443783eeff82dea98e57d445e15",
"hashType": "sha256"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
publicKey: 'SBTESTPUBK_9sN3TuLgW6a9redEfY48cKKkUa09Pz2u',
amount: '10.00',
currency: 'NGN',
country: 'NG',
paymentReference: 'P791090233047WZ73QN',
email: 'mamadou.diouf@intouchgroup.net',
productId: '15013',
productDescription: 'touch badge',
callbackUrl: 'https://gutouch.com',
hash: 'cfb5464ea21cce315ea72fb28f7ea45c4b61c443783eeff82dea98e57d445e15',
hashType: 'sha256'
})
};
fetch('https://seerbitapi.com/api/v2/payments', 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://seerbitapi.com/api/v2/payments",
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([
'publicKey' => 'SBTESTPUBK_9sN3TuLgW6a9redEfY48cKKkUa09Pz2u',
'amount' => '10.00',
'currency' => 'NGN',
'country' => 'NG',
'paymentReference' => 'P791090233047WZ73QN',
'email' => 'mamadou.diouf@intouchgroup.net',
'productId' => '15013',
'productDescription' => 'touch badge',
'callbackUrl' => 'https://gutouch.com',
'hash' => 'cfb5464ea21cce315ea72fb28f7ea45c4b61c443783eeff82dea98e57d445e15',
'hashType' => 'sha256'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://seerbitapi.com/api/v2/payments"
payload := strings.NewReader("{\n \"publicKey\": \"SBTESTPUBK_9sN3TuLgW6a9redEfY48cKKkUa09Pz2u\",\n \"amount\": \"10.00\",\n \"currency\": \"NGN\",\n \"country\": \"NG\",\n \"paymentReference\": \"P791090233047WZ73QN\",\n \"email\": \"mamadou.diouf@intouchgroup.net\",\n \"productId\": \"15013\",\n \"productDescription\": \"touch badge\",\n \"callbackUrl\": \"https://gutouch.com\",\n \"hash\": \"cfb5464ea21cce315ea72fb28f7ea45c4b61c443783eeff82dea98e57d445e15\",\n \"hashType\": \"sha256\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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://seerbitapi.com/api/v2/payments")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"publicKey\": \"SBTESTPUBK_9sN3TuLgW6a9redEfY48cKKkUa09Pz2u\",\n \"amount\": \"10.00\",\n \"currency\": \"NGN\",\n \"country\": \"NG\",\n \"paymentReference\": \"P791090233047WZ73QN\",\n \"email\": \"mamadou.diouf@intouchgroup.net\",\n \"productId\": \"15013\",\n \"productDescription\": \"touch badge\",\n \"callbackUrl\": \"https://gutouch.com\",\n \"hash\": \"cfb5464ea21cce315ea72fb28f7ea45c4b61c443783eeff82dea98e57d445e15\",\n \"hashType\": \"sha256\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://seerbitapi.com/api/v2/payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"publicKey\": \"SBTESTPUBK_9sN3TuLgW6a9redEfY48cKKkUa09Pz2u\",\n \"amount\": \"10.00\",\n \"currency\": \"NGN\",\n \"country\": \"NG\",\n \"paymentReference\": \"P791090233047WZ73QN\",\n \"email\": \"mamadou.diouf@intouchgroup.net\",\n \"productId\": \"15013\",\n \"productDescription\": \"touch badge\",\n \"callbackUrl\": \"https://gutouch.com\",\n \"hash\": \"cfb5464ea21cce315ea72fb28f7ea45c4b61c443783eeff82dea98e57d445e15\",\n \"hashType\": \"sha256\"\n}"
response = http.request(request)
puts response.read_body{
"status": "SUCCESS",
"data": {
"code": "00",
"payments": {
"redirectLink": "https://checkout.seerbitapi.com/#/?mid=SBTESTPUBK_9sN3TuLgW6a9redEfY48cKKkUa09Pz2u&paymentReference=39910902330P7WZ73QN",
"paymentStatus": "08"
},
"message": "Successful"
}
}STANDARD CHECKOUT
Payment Link From Checkout
SeerBit Checkout Standard Initialises a transaction from merchants server to generate a payment link which redirects your customers to a page to make payment and after payment has been made the customer is redirected back to the merchants website.
POST
/
payments
Payment Link From Checkout
curl --request POST \
--url https://seerbitapi.com/api/v2/payments \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"publicKey": "SBTESTPUBK_9sN3TuLgW6a9redEfY48cKKkUa09Pz2u",
"amount": "10.00",
"currency": "NGN",
"country": "NG",
"paymentReference": "P791090233047WZ73QN",
"email": "mamadou.diouf@intouchgroup.net",
"productId": "15013",
"productDescription": "touch badge",
"callbackUrl": "https://gutouch.com",
"hash": "cfb5464ea21cce315ea72fb28f7ea45c4b61c443783eeff82dea98e57d445e15",
"hashType": "sha256"
}
'import requests
url = "https://seerbitapi.com/api/v2/payments"
payload = {
"publicKey": "SBTESTPUBK_9sN3TuLgW6a9redEfY48cKKkUa09Pz2u",
"amount": "10.00",
"currency": "NGN",
"country": "NG",
"paymentReference": "P791090233047WZ73QN",
"email": "mamadou.diouf@intouchgroup.net",
"productId": "15013",
"productDescription": "touch badge",
"callbackUrl": "https://gutouch.com",
"hash": "cfb5464ea21cce315ea72fb28f7ea45c4b61c443783eeff82dea98e57d445e15",
"hashType": "sha256"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
publicKey: 'SBTESTPUBK_9sN3TuLgW6a9redEfY48cKKkUa09Pz2u',
amount: '10.00',
currency: 'NGN',
country: 'NG',
paymentReference: 'P791090233047WZ73QN',
email: 'mamadou.diouf@intouchgroup.net',
productId: '15013',
productDescription: 'touch badge',
callbackUrl: 'https://gutouch.com',
hash: 'cfb5464ea21cce315ea72fb28f7ea45c4b61c443783eeff82dea98e57d445e15',
hashType: 'sha256'
})
};
fetch('https://seerbitapi.com/api/v2/payments', 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://seerbitapi.com/api/v2/payments",
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([
'publicKey' => 'SBTESTPUBK_9sN3TuLgW6a9redEfY48cKKkUa09Pz2u',
'amount' => '10.00',
'currency' => 'NGN',
'country' => 'NG',
'paymentReference' => 'P791090233047WZ73QN',
'email' => 'mamadou.diouf@intouchgroup.net',
'productId' => '15013',
'productDescription' => 'touch badge',
'callbackUrl' => 'https://gutouch.com',
'hash' => 'cfb5464ea21cce315ea72fb28f7ea45c4b61c443783eeff82dea98e57d445e15',
'hashType' => 'sha256'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://seerbitapi.com/api/v2/payments"
payload := strings.NewReader("{\n \"publicKey\": \"SBTESTPUBK_9sN3TuLgW6a9redEfY48cKKkUa09Pz2u\",\n \"amount\": \"10.00\",\n \"currency\": \"NGN\",\n \"country\": \"NG\",\n \"paymentReference\": \"P791090233047WZ73QN\",\n \"email\": \"mamadou.diouf@intouchgroup.net\",\n \"productId\": \"15013\",\n \"productDescription\": \"touch badge\",\n \"callbackUrl\": \"https://gutouch.com\",\n \"hash\": \"cfb5464ea21cce315ea72fb28f7ea45c4b61c443783eeff82dea98e57d445e15\",\n \"hashType\": \"sha256\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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://seerbitapi.com/api/v2/payments")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"publicKey\": \"SBTESTPUBK_9sN3TuLgW6a9redEfY48cKKkUa09Pz2u\",\n \"amount\": \"10.00\",\n \"currency\": \"NGN\",\n \"country\": \"NG\",\n \"paymentReference\": \"P791090233047WZ73QN\",\n \"email\": \"mamadou.diouf@intouchgroup.net\",\n \"productId\": \"15013\",\n \"productDescription\": \"touch badge\",\n \"callbackUrl\": \"https://gutouch.com\",\n \"hash\": \"cfb5464ea21cce315ea72fb28f7ea45c4b61c443783eeff82dea98e57d445e15\",\n \"hashType\": \"sha256\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://seerbitapi.com/api/v2/payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"publicKey\": \"SBTESTPUBK_9sN3TuLgW6a9redEfY48cKKkUa09Pz2u\",\n \"amount\": \"10.00\",\n \"currency\": \"NGN\",\n \"country\": \"NG\",\n \"paymentReference\": \"P791090233047WZ73QN\",\n \"email\": \"mamadou.diouf@intouchgroup.net\",\n \"productId\": \"15013\",\n \"productDescription\": \"touch badge\",\n \"callbackUrl\": \"https://gutouch.com\",\n \"hash\": \"cfb5464ea21cce315ea72fb28f7ea45c4b61c443783eeff82dea98e57d445e15\",\n \"hashType\": \"sha256\"\n}"
response = http.request(request)
puts response.read_body{
"status": "SUCCESS",
"data": {
"code": "00",
"payments": {
"redirectLink": "https://checkout.seerbitapi.com/#/?mid=SBTESTPUBK_9sN3TuLgW6a9redEfY48cKKkUa09Pz2u&paymentReference=39910902330P7WZ73QN",
"paymentStatus": "08"
},
"message": "Successful"
}
}Body
application/json
Response
The response is of type PaymentLinkFromCheckoutResponse · object.