Collect payment (Pay-In)
curl --request POST \
--url https://sandbox.soleaspay.com/api/agent/bills/v3 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'operation: <operation>' \
--header 'service: <service>' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"wallet": "690000001",
"amount": 1000,
"currency": "XAF",
"order_id": "abc1234",
"description": "pay for rent",
"payer": "John",
"payerEmail": "john@mail.com",
"successUrl": "https://successurl.com/receive-payment",
"failureUrl": "https://failureurl.com/payment-fail"
}
'import requests
url = "https://sandbox.soleaspay.com/api/agent/bills/v3"
payload = {
"wallet": "690000001",
"amount": 1000,
"currency": "XAF",
"order_id": "abc1234",
"description": "pay for rent",
"payer": "John",
"payerEmail": "john@mail.com",
"successUrl": "https://successurl.com/receive-payment",
"failureUrl": "https://failureurl.com/payment-fail"
}
headers = {
"x-api-key": "<x-api-key>",
"operation": "<operation>",
"service": "<service>",
"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>',
operation: '<operation>',
service: '<service>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
wallet: '690000001',
amount: 1000,
currency: 'XAF',
order_id: 'abc1234',
description: 'pay for rent',
payer: 'John',
payerEmail: 'john@mail.com',
successUrl: 'https://successurl.com/receive-payment',
failureUrl: 'https://failureurl.com/payment-fail'
})
};
fetch('https://sandbox.soleaspay.com/api/agent/bills/v3', 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://sandbox.soleaspay.com/api/agent/bills/v3",
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([
'wallet' => '690000001',
'amount' => 1000,
'currency' => 'XAF',
'order_id' => 'abc1234',
'description' => 'pay for rent',
'payer' => 'John',
'payerEmail' => 'john@mail.com',
'successUrl' => 'https://successurl.com/receive-payment',
'failureUrl' => 'https://failureurl.com/payment-fail'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"operation: <operation>",
"service: <service>",
"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://sandbox.soleaspay.com/api/agent/bills/v3"
payload := strings.NewReader("{\n \"wallet\": \"690000001\",\n \"amount\": 1000,\n \"currency\": \"XAF\",\n \"order_id\": \"abc1234\",\n \"description\": \"pay for rent\",\n \"payer\": \"John\",\n \"payerEmail\": \"john@mail.com\",\n \"successUrl\": \"https://successurl.com/receive-payment\",\n \"failureUrl\": \"https://failureurl.com/payment-fail\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("operation", "<operation>")
req.Header.Add("service", "<service>")
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://sandbox.soleaspay.com/api/agent/bills/v3")
.header("x-api-key", "<x-api-key>")
.header("operation", "<operation>")
.header("service", "<service>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"wallet\": \"690000001\",\n \"amount\": 1000,\n \"currency\": \"XAF\",\n \"order_id\": \"abc1234\",\n \"description\": \"pay for rent\",\n \"payer\": \"John\",\n \"payerEmail\": \"john@mail.com\",\n \"successUrl\": \"https://successurl.com/receive-payment\",\n \"failureUrl\": \"https://failureurl.com/payment-fail\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.soleaspay.com/api/agent/bills/v3")
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["operation"] = '<operation>'
request["service"] = '<service>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"wallet\": \"690000001\",\n \"amount\": 1000,\n \"currency\": \"XAF\",\n \"order_id\": \"abc1234\",\n \"description\": \"pay for rent\",\n \"payer\": \"John\",\n \"payerEmail\": \"john@mail.com\",\n \"successUrl\": \"https://successurl.com/receive-payment\",\n \"failureUrl\": \"https://failureurl.com/payment-fail\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"code": 200,
"status": "PROCESSING",
"created_at": "2024-12-16 10:05:01",
"data": {
"operation": "PURCHASE",
"reference": "MLS2021B",
"external_reference": "abc1234",
"transaction_reference": "<unknown>",
"transaction_category": "direct",
"transaction_channel": "MSISDN",
"amount": "1000",
"currency": "XAF"
},
"message": "transaction processing"
}{
"success": false,
"message": "Invalid operation provide"
}Payments
Collect payment (Pay-In)
To collect payment by API call.
POST
/
api
/
agent
/
bills
/
v3
Collect payment (Pay-In)
curl --request POST \
--url https://sandbox.soleaspay.com/api/agent/bills/v3 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'operation: <operation>' \
--header 'service: <service>' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"wallet": "690000001",
"amount": 1000,
"currency": "XAF",
"order_id": "abc1234",
"description": "pay for rent",
"payer": "John",
"payerEmail": "john@mail.com",
"successUrl": "https://successurl.com/receive-payment",
"failureUrl": "https://failureurl.com/payment-fail"
}
'import requests
url = "https://sandbox.soleaspay.com/api/agent/bills/v3"
payload = {
"wallet": "690000001",
"amount": 1000,
"currency": "XAF",
"order_id": "abc1234",
"description": "pay for rent",
"payer": "John",
"payerEmail": "john@mail.com",
"successUrl": "https://successurl.com/receive-payment",
"failureUrl": "https://failureurl.com/payment-fail"
}
headers = {
"x-api-key": "<x-api-key>",
"operation": "<operation>",
"service": "<service>",
"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>',
operation: '<operation>',
service: '<service>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
wallet: '690000001',
amount: 1000,
currency: 'XAF',
order_id: 'abc1234',
description: 'pay for rent',
payer: 'John',
payerEmail: 'john@mail.com',
successUrl: 'https://successurl.com/receive-payment',
failureUrl: 'https://failureurl.com/payment-fail'
})
};
fetch('https://sandbox.soleaspay.com/api/agent/bills/v3', 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://sandbox.soleaspay.com/api/agent/bills/v3",
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([
'wallet' => '690000001',
'amount' => 1000,
'currency' => 'XAF',
'order_id' => 'abc1234',
'description' => 'pay for rent',
'payer' => 'John',
'payerEmail' => 'john@mail.com',
'successUrl' => 'https://successurl.com/receive-payment',
'failureUrl' => 'https://failureurl.com/payment-fail'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"operation: <operation>",
"service: <service>",
"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://sandbox.soleaspay.com/api/agent/bills/v3"
payload := strings.NewReader("{\n \"wallet\": \"690000001\",\n \"amount\": 1000,\n \"currency\": \"XAF\",\n \"order_id\": \"abc1234\",\n \"description\": \"pay for rent\",\n \"payer\": \"John\",\n \"payerEmail\": \"john@mail.com\",\n \"successUrl\": \"https://successurl.com/receive-payment\",\n \"failureUrl\": \"https://failureurl.com/payment-fail\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("operation", "<operation>")
req.Header.Add("service", "<service>")
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://sandbox.soleaspay.com/api/agent/bills/v3")
.header("x-api-key", "<x-api-key>")
.header("operation", "<operation>")
.header("service", "<service>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"wallet\": \"690000001\",\n \"amount\": 1000,\n \"currency\": \"XAF\",\n \"order_id\": \"abc1234\",\n \"description\": \"pay for rent\",\n \"payer\": \"John\",\n \"payerEmail\": \"john@mail.com\",\n \"successUrl\": \"https://successurl.com/receive-payment\",\n \"failureUrl\": \"https://failureurl.com/payment-fail\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.soleaspay.com/api/agent/bills/v3")
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["operation"] = '<operation>'
request["service"] = '<service>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"wallet\": \"690000001\",\n \"amount\": 1000,\n \"currency\": \"XAF\",\n \"order_id\": \"abc1234\",\n \"description\": \"pay for rent\",\n \"payer\": \"John\",\n \"payerEmail\": \"john@mail.com\",\n \"successUrl\": \"https://successurl.com/receive-payment\",\n \"failureUrl\": \"https://failureurl.com/payment-fail\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"code": 200,
"status": "PROCESSING",
"created_at": "2024-12-16 10:05:01",
"data": {
"operation": "PURCHASE",
"reference": "MLS2021B",
"external_reference": "abc1234",
"transaction_reference": "<unknown>",
"transaction_category": "direct",
"transaction_channel": "MSISDN",
"amount": "1000",
"currency": "XAF"
},
"message": "transaction processing"
}{
"success": false,
"message": "Invalid operation provide"
}Authorizations
Headers
Body
application/json
⌘I
