Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
curl --request POST \
--url https://soleaspay.com/api/agent/link/init \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"payment_receiver": "SP20208U",
"payment_id": "20000553G",
"amount": 10000,
"distribution": [
{
"matricule": "SP20231M",
"rate": 15
}
]
}
'import requests
url = "https://soleaspay.com/api/agent/link/init"
payload = {
"payment_receiver": "SP20208U",
"payment_id": "20000553G",
"amount": 10000,
"distribution": [
{
"matricule": "SP20231M",
"rate": 15
}
]
}
headers = {
"x-api-key": "<x-api-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<x-api-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
payment_receiver: 'SP20208U',
payment_id: '20000553G',
amount: 10000,
distribution: [{matricule: 'SP20231M', rate: 15}]
})
};
fetch('https://soleaspay.com/api/agent/link/init', 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/init",
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([
'payment_receiver' => 'SP20208U',
'payment_id' => '20000553G',
'amount' => 10000,
'distribution' => [
[
'matricule' => 'SP20231M',
'rate' => 15
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://soleaspay.com/api/agent/link/init"
payload := strings.NewReader("{\n \"payment_receiver\": \"SP20208U\",\n \"payment_id\": \"20000553G\",\n \"amount\": 10000,\n \"distribution\": [\n {\n \"matricule\": \"SP20231M\",\n \"rate\": 15\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
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://soleaspay.com/api/agent/link/init")
.header("x-api-key", "<x-api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"payment_receiver\": \"SP20208U\",\n \"payment_id\": \"20000553G\",\n \"amount\": 10000,\n \"distribution\": [\n {\n \"matricule\": \"SP20231M\",\n \"rate\": 15\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://soleaspay.com/api/agent/link/init")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"payment_receiver\": \"SP20208U\",\n \"payment_id\": \"20000553G\",\n \"amount\": 10000,\n \"distribution\": [\n {\n \"matricule\": \"SP20231M\",\n \"rate\": 15\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Transaction linked successfully"
}{
"success": false,
"message": "Error message"
}Initialize a new transaction before sending a payment, to prepare redistribution for involved SoPay users.
curl --request POST \
--url https://soleaspay.com/api/agent/link/init \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"payment_receiver": "SP20208U",
"payment_id": "20000553G",
"amount": 10000,
"distribution": [
{
"matricule": "SP20231M",
"rate": 15
}
]
}
'import requests
url = "https://soleaspay.com/api/agent/link/init"
payload = {
"payment_receiver": "SP20208U",
"payment_id": "20000553G",
"amount": 10000,
"distribution": [
{
"matricule": "SP20231M",
"rate": 15
}
]
}
headers = {
"x-api-key": "<x-api-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<x-api-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
payment_receiver: 'SP20208U',
payment_id: '20000553G',
amount: 10000,
distribution: [{matricule: 'SP20231M', rate: 15}]
})
};
fetch('https://soleaspay.com/api/agent/link/init', 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/init",
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([
'payment_receiver' => 'SP20208U',
'payment_id' => '20000553G',
'amount' => 10000,
'distribution' => [
[
'matricule' => 'SP20231M',
'rate' => 15
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://soleaspay.com/api/agent/link/init"
payload := strings.NewReader("{\n \"payment_receiver\": \"SP20208U\",\n \"payment_id\": \"20000553G\",\n \"amount\": 10000,\n \"distribution\": [\n {\n \"matricule\": \"SP20231M\",\n \"rate\": 15\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
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://soleaspay.com/api/agent/link/init")
.header("x-api-key", "<x-api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"payment_receiver\": \"SP20208U\",\n \"payment_id\": \"20000553G\",\n \"amount\": 10000,\n \"distribution\": [\n {\n \"matricule\": \"SP20231M\",\n \"rate\": 15\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://soleaspay.com/api/agent/link/init")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"payment_receiver\": \"SP20208U\",\n \"payment_id\": \"20000553G\",\n \"amount\": 10000,\n \"distribution\": [\n {\n \"matricule\": \"SP20231M\",\n \"rate\": 15\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Transaction linked successfully"
}{
"success": false,
"message": "Error message"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Your authentication API key.
"Your-Apikey-Here"
The SoPay ID of the main payment receiver.
"SP20208U"
A unique order ID for the current payment.
"20000553G"
The total amount of the transaction.
10000
List of users (by matricule) and the percentage they will receive.
Show child attributes
