Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
curl --request GET \
--url https://soleaspay.com/api/agent/link/new \
--header 'Authorization: Bearer <token>' \
--header 'x-api-key: <x-api-key>'import requests
url = "https://soleaspay.com/api/agent/link/new"
headers = {
"x-api-key": "<x-api-key>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<x-api-key>', Authorization: 'Bearer <token>'}
};
fetch('https://soleaspay.com/api/agent/link/new', 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://soleaspay.com/api/agent/link/new",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"x-api-key: <x-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"
"net/http"
"io"
)
func main() {
url := "https://soleaspay.com/api/agent/link/new"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://soleaspay.com/api/agent/link/new")
.header("x-api-key", "<x-api-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://soleaspay.com/api/agent/link/new")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<x-api-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"apikey": "XLkynIRt7StyFdxnYQLxTyDxhk-WEjWQ1DEY-cwHMN8",
"matricule": "SP20231M"
},
"message": "link success"
}{
"code": "400",
"success": false,
"message": "Error message"
}Link a user in your app to a Sopay wallet.
curl --request GET \
--url https://soleaspay.com/api/agent/link/new \
--header 'Authorization: Bearer <token>' \
--header 'x-api-key: <x-api-key>'import requests
url = "https://soleaspay.com/api/agent/link/new"
headers = {
"x-api-key": "<x-api-key>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<x-api-key>', Authorization: 'Bearer <token>'}
};
fetch('https://soleaspay.com/api/agent/link/new', 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://soleaspay.com/api/agent/link/new",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"x-api-key: <x-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"
"net/http"
"io"
)
func main() {
url := "https://soleaspay.com/api/agent/link/new"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://soleaspay.com/api/agent/link/new")
.header("x-api-key", "<x-api-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://soleaspay.com/api/agent/link/new")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<x-api-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"apikey": "XLkynIRt7StyFdxnYQLxTyDxhk-WEjWQ1DEY-cwHMN8",
"matricule": "SP20231M"
},
"message": "link success"
}{
"code": "400",
"success": false,
"message": "Error message"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Your API key
User's email address
User's phone number
Country phone code (e.g., +237)
