Skip to main content
GET
https://api.swiftpay.cx
/
api
/
checkout
/
sessions
# List all sessions
curl "https://api.swiftpay.cx/api/checkout/sessions?limit=20" \
  -H "Authorization: Bearer mp_live_your_api_key"

# Filter by status

curl "https://api.swiftpay.cx/api/checkout/sessions?status=completed&limit=50" \
 -H "Authorization: Bearer mp_live_your_api_key"

# With date range

curl "https://api.swiftpay.cx/api/checkout/sessions?startDate=2024-01-01&endDate=2024-01-31" \
 -H "Authorization: Bearer mp_live_your_api_key"

{
  "success": true,
  "data": [
    {
      "id": "sess_abc123",
      "amountInCents": 2999,
      "currency": "USD",
      "status": "completed",
      "customerEmail": "[email protected]",
      "metadata": {
        "orderId": "order_12345"
      },
      "createdAt": "2024-01-15T10:30:00Z"
    },
    {
      "id": "sess_def456",
      "amountInCents": 4999,
      "currency": "USD",
      "status": "pending",
      "customerEmail": "[email protected]",
      "metadata": {},
      "createdAt": "2024-01-15T09:15:00Z"
    }
  ],
  "pagination": {
    "hasMore": true,
    "nextCursor": "cursor_xyz789",
    "total": 150
  }
}

List Checkout Sessions

Returns a paginated list of checkout sessions for your business.

Request

Authorization
string
required
Bearer token with your API key
status
string
Filter by status: pending, processing, completed, failed, cancelled, refunded, or all.
limit
integer
default:"20"
Number of results per page (1-100).
page
integer
default:"1"
Page number for pagination.
Search by customer email or description.
from
string
Filter sessions created after this ISO 8601 date.
to
string
Filter sessions created before this ISO 8601 date.

Response

success
boolean
Whether the request was successful
data
object
# List all sessions
curl "https://api.swiftpay.cx/api/checkout/sessions?limit=20" \
  -H "Authorization: Bearer mp_live_your_api_key"

# Filter by status

curl "https://api.swiftpay.cx/api/checkout/sessions?status=completed&limit=50" \
 -H "Authorization: Bearer mp_live_your_api_key"

# With date range

curl "https://api.swiftpay.cx/api/checkout/sessions?startDate=2024-01-01&endDate=2024-01-31" \
 -H "Authorization: Bearer mp_live_your_api_key"

{
  "success": true,
  "data": [
    {
      "id": "sess_abc123",
      "amountInCents": 2999,
      "currency": "USD",
      "status": "completed",
      "customerEmail": "[email protected]",
      "metadata": {
        "orderId": "order_12345"
      },
      "createdAt": "2024-01-15T10:30:00Z"
    },
    {
      "id": "sess_def456",
      "amountInCents": 4999,
      "currency": "USD",
      "status": "pending",
      "customerEmail": "[email protected]",
      "metadata": {},
      "createdAt": "2024-01-15T09:15:00Z"
    }
  ],
  "pagination": {
    "hasMore": true,
    "nextCursor": "cursor_xyz789",
    "total": 150
  }
}