Skip to main content
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

Authorization
string
required
Bearer token with your API key

Response

success
boolean
Whether the request was successful
data
object
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 currency

Active Reserves

Display activeReserveCount as a number

Next Release

Display nextReleaseAt and nextReleaseAmountInCents
Learn more about how reserves work in our Understanding Reserves guide.
Combine this with the Balance API to show a complete financial overview.