Payment Links
curl --request POST \
--url https://api.viarosandbox.com/v1/payment_links \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"amount": {},
"currency": "<string>",
"description": "<string>",
"redirect_url": "<string>",
"metadata": {}
}
'import requests
url = "https://api.viarosandbox.com/v1/payment_links"
payload = {
"title": "<string>",
"amount": {},
"currency": "<string>",
"description": "<string>",
"redirect_url": "<string>",
"metadata": {}
}
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({
title: '<string>',
amount: {},
currency: '<string>',
description: '<string>',
redirect_url: '<string>',
metadata: {}
})
};
fetch('https://api.viarosandbox.com/v1/payment_links', 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.viarosandbox.com/v1/payment_links",
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([
'title' => '<string>',
'amount' => [
],
'currency' => '<string>',
'description' => '<string>',
'redirect_url' => '<string>',
'metadata' => [
]
]),
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.viarosandbox.com/v1/payment_links"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"amount\": {},\n \"currency\": \"<string>\",\n \"description\": \"<string>\",\n \"redirect_url\": \"<string>\",\n \"metadata\": {}\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.viarosandbox.com/v1/payment_links")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"amount\": {},\n \"currency\": \"<string>\",\n \"description\": \"<string>\",\n \"redirect_url\": \"<string>\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.viarosandbox.com/v1/payment_links")
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 \"title\": \"<string>\",\n \"amount\": {},\n \"currency\": \"<string>\",\n \"description\": \"<string>\",\n \"redirect_url\": \"<string>\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_bodyCheckout & Payment Links
Payment Links
Create, retrieve, and manage shareable payment links that customers can open anywhere to pay.
POST
/
payment_links
Payment Links
curl --request POST \
--url https://api.viarosandbox.com/v1/payment_links \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"amount": {},
"currency": "<string>",
"description": "<string>",
"redirect_url": "<string>",
"metadata": {}
}
'import requests
url = "https://api.viarosandbox.com/v1/payment_links"
payload = {
"title": "<string>",
"amount": {},
"currency": "<string>",
"description": "<string>",
"redirect_url": "<string>",
"metadata": {}
}
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({
title: '<string>',
amount: {},
currency: '<string>',
description: '<string>',
redirect_url: '<string>',
metadata: {}
})
};
fetch('https://api.viarosandbox.com/v1/payment_links', 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.viarosandbox.com/v1/payment_links",
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([
'title' => '<string>',
'amount' => [
],
'currency' => '<string>',
'description' => '<string>',
'redirect_url' => '<string>',
'metadata' => [
]
]),
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.viarosandbox.com/v1/payment_links"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"amount\": {},\n \"currency\": \"<string>\",\n \"description\": \"<string>\",\n \"redirect_url\": \"<string>\",\n \"metadata\": {}\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.viarosandbox.com/v1/payment_links")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"amount\": {},\n \"currency\": \"<string>\",\n \"description\": \"<string>\",\n \"redirect_url\": \"<string>\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.viarosandbox.com/v1/payment_links")
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 \"title\": \"<string>\",\n \"amount\": {},\n \"currency\": \"<string>\",\n \"description\": \"<string>\",\n \"redirect_url\": \"<string>\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_bodyPayment Links allow you to generate shareable URLs that your customers can open on any browser, mobile phone, or messaging app (WhatsApp, Telegram, SMS) to pay you without writing code or building checkout pages.
Pursar automatically serves a localized checkout experience supporting Mobile Money (MTN, Orange, Moov, Wave, M-Pesa), Cards, and Bank Transfer with full responsive design.
Create a Payment Link
string
required
The title of the payment link displayed to the customer (e.g.,
"Pro Developer License").integer | string
required
The amount to collect. Can be an integer or string.
string
required
Three-letter ISO currency code (
XAF, XOF, GHS, KES, UGX, RWF, USD, EUR).string
Detailed explanation of what the customer is purchasing.
string
URL to redirect the customer to after successful payment completion.
object
Custom key-value pairs associated with the payment link.
Code Examples
curl -X POST https://api.viarosandbox.com/v1/payment_links \
-u sk_test_uLsofsae3tB9Izwgeuy0Mxbh4JIxUPSG: \
-H "Content-Type: application/json" \
-d '{
"title": "Pro Plan Subscription Link",
"amount": 15000,
"currency": "XAF",
"description": "Hosted payment link for pro plan",
"redirect_url": "https://example.com/payment-success"
}'
import requests
url = "https://api.viarosandbox.com/v1/payment_links"
auth = ("sk_test_uLsofsae3tB9Izwgeuy0Mxbh4JIxUPSG", "")
payload = {
"title": "Pro Plan Subscription Link",
"amount": 15000,
"currency": "XAF",
"description": "Hosted payment link for pro plan",
"redirect_url": "https://example.com/payment-success"
}
response = requests.post(url, auth=auth, json=payload)
print(response.json())
const axios = require('axios');
async function createPaymentLink() {
const response = await axios.post(
'https://api.viarosandbox.com/v1/payment_links',
{
title: 'Pro Plan Subscription Link',
amount: 15000,
currency: 'XAF',
description: 'Hosted payment link for pro plan',
redirect_url: 'https://example.com/payment-success'
},
{
auth: {
username: 'sk_test_uLsofsae3tB9Izwgeuy0Mxbh4JIxUPSG',
password: ''
}
}
);
console.log(response.data);
}
createPaymentLink();
Response
{
"id": "pl_8f293b01ad7e",
"slug": "pl_8f293b01ad7e",
"url": "https://checkout.viarosandbox.com/pay/pl_8f293b01ad7e",
"title": "Pro Plan Subscription Link",
"description": "Hosted payment link for pro plan",
"amount": 15000,
"currency": "XAF",
"status": "active",
"redirect_url": "https://example.com/payment-success",
"created_at": "2026-11-06T12:00:00Z"
}
List Payment Links
Retrieve a list of all payment links created for your business.GET /payment_links
cURL
curl -G https://api.viarosandbox.com/v1/payment_links \
-u sk_test_uLsofsae3tB9Izwgeuy0Mxbh4JIxUPSG:
Retrieve a Public Payment Link
Retrieve public details of a payment link using its slug. This endpoint does not require authentication and is used by hosted checkout frontends.GET /public/payment-links/{slug}
cURL
curl https://api.viarosandbox.com/v1/public/payment-links/pl_8f293b01ad7e

