Get Payments
curl --request GET \
--url https://api.royalti.io/payment/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.royalti.io/payment/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.royalti.io/payment/', 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.royalti.io/payment/",
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>"
],
]);
$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://api.royalti.io/payment/"
req, _ := http.NewRequest("GET", url, nil)
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://api.royalti.io/payment/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.royalti.io/payment/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"totalItems": "18,",
"Payments": [
{
"id": "65f4b71d-ce3e-4458-ab6d-97d3c10d166c",
"PaymentRequestId": "null,",
"TenantUserId": "09de2d9b-a9eb-4b98-a15a-3b7f59f6161f",
"title": "Payment Receipt updated",
"transactionDate": "2023-04-21T00:00:00.000Z",
"currency": "USD",
"amount": 74000,
"amountUSD": 100,
"balanceCurrency": null,
"balance": null,
"conversionRate": 740,
"externalId": null,
"settings": null,
"status": "completed",
"memo": "Sale of album",
"files": [
"file3.pdf",
"file2.pdf"
],
"transactionId": "null,",
"createdAt": "2024-11-18T15:40:45.843Z",
"updatedAt": "2025-03-07T01:14:18.001Z",
"TenantUser": {
"id": "09de2d9b-a9eb-4b98-a15a-3b7f59f6161f",
"firstName": "odiri",
"lastName": "ighogboja",
"role": "user",
"User": {
"email": "admin_user1@royalti.io",
"profilePicture": null
}
}
}
],
"totalPages": "2,",
"currentPage": "1,",
"ilteredItems": 10
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}Payments
Get Payments
Get Payments
GET
/
payment
/
Get Payments
curl --request GET \
--url https://api.royalti.io/payment/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.royalti.io/payment/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.royalti.io/payment/', 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.royalti.io/payment/",
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>"
],
]);
$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://api.royalti.io/payment/"
req, _ := http.NewRequest("GET", url, nil)
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://api.royalti.io/payment/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.royalti.io/payment/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"totalItems": "18,",
"Payments": [
{
"id": "65f4b71d-ce3e-4458-ab6d-97d3c10d166c",
"PaymentRequestId": "null,",
"TenantUserId": "09de2d9b-a9eb-4b98-a15a-3b7f59f6161f",
"title": "Payment Receipt updated",
"transactionDate": "2023-04-21T00:00:00.000Z",
"currency": "USD",
"amount": 74000,
"amountUSD": 100,
"balanceCurrency": null,
"balance": null,
"conversionRate": 740,
"externalId": null,
"settings": null,
"status": "completed",
"memo": "Sale of album",
"files": [
"file3.pdf",
"file2.pdf"
],
"transactionId": "null,",
"createdAt": "2024-11-18T15:40:45.843Z",
"updatedAt": "2025-03-07T01:14:18.001Z",
"TenantUser": {
"id": "09de2d9b-a9eb-4b98-a15a-3b7f59f6161f",
"firstName": "odiri",
"lastName": "ighogboja",
"role": "user",
"User": {
"email": "admin_user1@royalti.io",
"profilePicture": null
}
}
}
],
"totalPages": "2,",
"currentPage": "1,",
"ilteredItems": 10
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}This endpoint requires authentication. Include your Bearer token in the Authorization header.
Description
Get Payments Description: The/payment/ endpoint retrieves a list of payments with filtering and pagination options.
Method:
GET
Authorization:
- Required role:
useror higher
| Parameter | Type | Description |
|---|---|---|
| q (Optional) | string | Search query to filter payments |
| page (Optional) | integer | Page number for pagination. Default: 1 |
| size (Optional) | integer | Number of payments per page. Default: 10 |
| sort (Optional) | string | Field to sort by. Default: ‘updatedAt’ |
| order (Optional) | string | Sort order (‘asc’ or ‘desc’). Default: ‘desc’ |
| user (Optional) | string | Filter by user ID |
| status (Optional) | string | Filter by status |
| startDate (Optional) | string | Filter payments from this date |
| endDate (Optional) | string | Filter payments to this date |
| include (Optional) | string | Specify ‘count’ to include the total count of items |
Code Examples
const response = await fetch('https://api.royalti.io/payment/', {
method: 'GET',
headers: {
'Authorization': `Bearer ${token}`,
},
});
const data = await response.json();
console.log(data);
import requests
response = requests.get(
'https://api.royalti.io/payment/',
headers={
'Authorization': f'Bearer {token}'
},
)
data = response.json()
print(data)
curl -X GET https://api.royalti.io/payment/ \
-H "Authorization: Bearer YOUR_TOKEN" \
Authorizations
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Query Parameters
Search query to filter payments
Page number for pagination
Number of payments per page
Field to sort by
Sort order ('asc' or 'desc')
Available options:
asc, desc Filter by user ID
Filter payments from this date
Filter payments to this date
Specify 'count' to include the total count of items
Filter payments by status
Available options:
completed, processing, failed Filter payments by currency code (e.g., USD, EUR, GBP)
⌘I