curl --request GET \
--url https://api.royalti.io/payment/ \
--header 'Authorization: Bearer <token>'{
"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": "[email protected]",
"profilePicture": null
}
}
}
],
"totalPages": "2,",
"currentPage": "1,",
"ilteredItems": 10
}Get Payments
curl --request GET \
--url https://api.royalti.io/payment/ \
--header 'Authorization: Bearer <token>'{
"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": "[email protected]",
"profilePicture": null
}
}
}
],
"totalPages": "2,",
"currentPage": "1,",
"ilteredItems": 10
}/payment/ endpoint retrieves a list of payments with filtering and pagination options.
Method:GET
Query Parameters:
| 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 |
const response = await fetch('https://api.royalti.io/payment/', {
method: 'GET',
headers: {
'Authorization': `Bearer ${token}`,
},
});
const data = await response.json();
console.log(data);
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Search query to filter payments
Page number for pagination
Number of payments per page
Field to sort by
Sort order ('asc' or 'desc')
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
PENDING, COMPLETED, FAILED