curl https://api.swiftpay.cx/api/reserves/summary \
-H "Authorization: Bearer mp_live_your_api_key"
const response = await fetch("https://api.swiftpay.cx/api/reserves/summary", {
headers: {
Authorization: "Bearer mp_live_your_api_key",
},
});
const summary = await response.json();
console.log(
`Total reserved: $${(summary.data.totalReservedAmountInCents / 100).toFixed(
2
)}`
);
console.log(`Active reserves: ${summary.data.activeReserveCount}`);
if (summary.data.nextReleaseAt) {
const releaseDate = new Date(summary.data.nextReleaseAt);
console.log(
`Next release: $${(summary.data.nextReleaseAmountInCents / 100).toFixed(
2
)} on ${releaseDate.toLocaleDateString()}`
);
}
import requests
from datetime import datetime
response = requests.get(
'https://api.swiftpay.cx/api/reserves/summary',
headers={'Authorization': 'Bearer mp_live_your_api_key'}
)
summary = response.json()
data = summary['data']
print(f"Total reserved: ${data['totalReservedAmountInCents'] / 100:.2f}")
print(f"Active reserves: {data['activeReserveCount']}")
if data['nextReleaseAt']:
release_date = datetime.fromisoformat(data['nextReleaseAt'].replace('Z', '+00:00'))
print(f"Next release: ${data['nextReleaseAmountInCents'] / 100:.2f} on {release_date.strftime('%Y-%m-%d')}")
{
"success": true,
"data": {
"totalReservedAmountInCents": 150000,
"activeReserveCount": 45,
"upcomingReleaseCount": 5,
"nextReleaseAt": "2024-02-15T00:00:00Z",
"nextReleaseAmountInCents": 5000
}
}
{
"success": true,
"data": {
"totalReservedAmountInCents": 0,
"activeReserveCount": 0,
"upcomingReleaseCount": 0,
"nextReleaseAt": null,
"nextReleaseAmountInCents": null
}
}
Reserves
Get Reserve Summary
Get an overview of your reserve status
GET
/
api
/
reserves
/
summary
curl https://api.swiftpay.cx/api/reserves/summary \
-H "Authorization: Bearer mp_live_your_api_key"
const response = await fetch("https://api.swiftpay.cx/api/reserves/summary", {
headers: {
Authorization: "Bearer mp_live_your_api_key",
},
});
const summary = await response.json();
console.log(
`Total reserved: $${(summary.data.totalReservedAmountInCents / 100).toFixed(
2
)}`
);
console.log(`Active reserves: ${summary.data.activeReserveCount}`);
if (summary.data.nextReleaseAt) {
const releaseDate = new Date(summary.data.nextReleaseAt);
console.log(
`Next release: $${(summary.data.nextReleaseAmountInCents / 100).toFixed(
2
)} on ${releaseDate.toLocaleDateString()}`
);
}
import requests
from datetime import datetime
response = requests.get(
'https://api.swiftpay.cx/api/reserves/summary',
headers={'Authorization': 'Bearer mp_live_your_api_key'}
)
summary = response.json()
data = summary['data']
print(f"Total reserved: ${data['totalReservedAmountInCents'] / 100:.2f}")
print(f"Active reserves: {data['activeReserveCount']}")
if data['nextReleaseAt']:
release_date = datetime.fromisoformat(data['nextReleaseAt'].replace('Z', '+00:00'))
print(f"Next release: ${data['nextReleaseAmountInCents'] / 100:.2f} on {release_date.strftime('%Y-%m-%d')}")
{
"success": true,
"data": {
"totalReservedAmountInCents": 150000,
"activeReserveCount": 45,
"upcomingReleaseCount": 5,
"nextReleaseAt": "2024-02-15T00:00:00Z",
"nextReleaseAmountInCents": 5000
}
}
{
"success": true,
"data": {
"totalReservedAmountInCents": 0,
"activeReserveCount": 0,
"upcomingReleaseCount": 0,
"nextReleaseAt": null,
"nextReleaseAmountInCents": null
}
}
Get Reserve Summary
Returns a summary of your current reserve status including totals and upcoming releases.Request
Bearer token with your API key
Response
Whether the request was successful
Show properties
Show properties
Total amount currently held in reserves (in cents)
Number of active reserve records
Number of reserves scheduled for release
ISO 8601 timestamp of next scheduled release.
null if no upcoming
releases.Amount to be released on next release date (in cents).
null if no
upcoming releases.curl https://api.swiftpay.cx/api/reserves/summary \
-H "Authorization: Bearer mp_live_your_api_key"
const response = await fetch("https://api.swiftpay.cx/api/reserves/summary", {
headers: {
Authorization: "Bearer mp_live_your_api_key",
},
});
const summary = await response.json();
console.log(
`Total reserved: $${(summary.data.totalReservedAmountInCents / 100).toFixed(
2
)}`
);
console.log(`Active reserves: ${summary.data.activeReserveCount}`);
if (summary.data.nextReleaseAt) {
const releaseDate = new Date(summary.data.nextReleaseAt);
console.log(
`Next release: $${(summary.data.nextReleaseAmountInCents / 100).toFixed(
2
)} on ${releaseDate.toLocaleDateString()}`
);
}
import requests
from datetime import datetime
response = requests.get(
'https://api.swiftpay.cx/api/reserves/summary',
headers={'Authorization': 'Bearer mp_live_your_api_key'}
)
summary = response.json()
data = summary['data']
print(f"Total reserved: ${data['totalReservedAmountInCents'] / 100:.2f}")
print(f"Active reserves: {data['activeReserveCount']}")
if data['nextReleaseAt']:
release_date = datetime.fromisoformat(data['nextReleaseAt'].replace('Z', '+00:00'))
print(f"Next release: ${data['nextReleaseAmountInCents'] / 100:.2f} on {release_date.strftime('%Y-%m-%d')}")
{
"success": true,
"data": {
"totalReservedAmountInCents": 150000,
"activeReserveCount": 45,
"upcomingReleaseCount": 5,
"nextReleaseAt": "2024-02-15T00:00:00Z",
"nextReleaseAmountInCents": 5000
}
}
{
"success": true,
"data": {
"totalReservedAmountInCents": 0,
"activeReserveCount": 0,
"upcomingReleaseCount": 0,
"nextReleaseAt": null,
"nextReleaseAmountInCents": null
}
}
Dashboard Usage
This endpoint is ideal for displaying reserve summary cards:Total Reserved
Display
totalReservedAmountInCents formatted as currencyActive Reserves
Display
activeReserveCount as a numberNext Release
Display
nextReleaseAt and nextReleaseAmountInCentsLearn more about how reserves work in our Understanding Reserves
guide.
Combine this with the Balance API to
show a complete financial overview.
⌘I