Sentry

Sales API

Access comprehensive sales history, transaction data, and revenue analytics for your merchant account. Track payments, view summaries, and analyze business performance.

GET/public/api/v1/sales
sales:read

Retrieve sales history with optional date range filtering.

Query Parameters

?startDate=2026-02-01    // Optional: Start date (ISO 8601)
&endDate=2026-02-28      // Optional: End date (ISO 8601)
&limit=100               // Optional: Maximum records (default: 100)
&status=COMPLETED        // Optional: Filter by status

Example Request

curl -X GET \
  -H "Authorization: Bearer sntr_abcdefghijklmnopqrstuvwxyz123456" \
  "https://sandbox.sentrypos.app/public/api/v1/sales?startDate=2026-02-01&endDate=2026-02-28"

Example Response

{
  "sales": [
    {
      "id": "pay_abc123",
      "invoiceId": "inv_abc123",
      "customer": {
        "name": "John Doe",
        "phone": "2025550123"
      },
      "amountCents": 2500,
      "status": "COMPLETED",
      "network": "VISA",
      "createdAt": "2026-02-15T14:30:00Z",
      "completedAt": "2026-02-15T14:31:00Z"
    },
    {
      "id": "pay_abc124",
      "invoiceId": "inv_abc124",
      "customer": {
        "name": "Jane Smith",
        "phone": "2025550124"
      },
      "amountCents": 5000,
      "status": "COMPLETED",
      "network": "MASTERCARD",
      "createdAt": "2026-02-20T10:15:00Z",
      "completedAt": "2026-02-20T10:16:00Z"
    }
  ],
  "pagination": {
    "total": 42,
    "limit": 100,
    "hasMore": false
  }
}
GET/public/api/v1/sales/summary
sales:read

Get aggregated sales summary with revenue analytics.

Query Parameters

?startDate=2026-02-01    // Optional: Start date (ISO 8601)
&endDate=2026-02-28      // Optional: End date (ISO 8601)
&groupBy=day             // Optional: "day", "week", "month"

Example Request

curl -X GET \
  -H "Authorization: Bearer sntr_abcdefghijklmnopqrstuvwxyz123456" \
  "https://sandbox.sentrypos.app/public/api/v1/sales/summary?startDate=2026-02-01&groupBy=day"

Example Response

{
  "summary": {
    "totalAmountCents": 125000,
    "totalTransactions": 42,
    "averageTransactionCents": 2976,
    "successRate": 0.95
  },
  "dailyBreakdown": [
    {
      "date": "2026-02-01",
      "amountCents": 5000,
      "transactions": 2,
      "successfulTransactions": 2
    },
    {
      "date": "2026-02-02",
      "amountCents": 7500,
      "transactions": 3,
      "successfulTransactions": 3
    }
  ],
  "networkBreakdown": [
    {
      "network": "VISA",
      "amountCents": 65000,
      "transactions": 22,
      "percentage": 0.52
    },
    {
      "network": "MASTERCARD",
      "amountCents": 45000,
      "transactions": 15,
      "percentage": 0.36
    },
    {
      "network": "AMEX",
      "amountCents": 15000,
      "transactions": 5,
      "percentage": 0.12
    }
  ]
}

Payment Statuses

Payments can have the following statuses:

PENDING

Payment initiated but not yet processed

COMPLETED

Payment successfully processed

FAILED

Payment failed (insufficient funds, declined, etc.)

↩️

REFUNDED

Payment was refunded to customer

Data Model

FieldTypeDescription
idstringUnique payment identifier
invoiceIdstringAssociated invoice ID
customerobjectCustomer name and phone
amountCentsintegerPayment amount in cents
statusstringPayment status
networkstringCard network (VISA, MASTERCARD, etc.)
createdAtdatetimeWhen payment was initiated
completedAtdatetimeWhen payment was completed

Integration Examples

Analytics Dashboard

Build a custom analytics dashboard for your business:

// 1. Get monthly summary
GET /sales/summary?startDate=2026-02-01&groupBy=day

// 2. Display daily revenue chart
// 3. Show network breakdown pie chart
// 4. Calculate success rate and average transaction

Accounting Integration

Sync sales data with accounting software:

// 1. Get completed sales for the month
GET /sales?status=COMPLETED&startDate=2026-02-01

// 2. Format as CSV or accounting journal entries
// 3. Include customer details for reconciliation
// 4. Schedule daily sync via cron job

OpenClaw Business Intelligence

AI agent that analyzes sales performance:

// AI Agent Prompt:
"Analyze last month's sales and tell me:
- Total revenue and growth
- Best performing days
- Most popular payment networks
- Any failed payment patterns"

// Agent uses:
GET /sales/summary?startDate=2026-02-01
GET /sales?status=FAILED&startDate=2026-02-01

Error Handling

StatusError CodeDescription
400INVALID_DATEInvalid date format in query parameters
401UNAUTHORIZEDInvalid or missing API key
403FORBIDDENInsufficient permissions for requested scope
429RATE_LIMITEDToo many requests, rate limit exceeded

Next: OpenClaw Integration

Learn how to build AI-powered workflows with OpenClaw using the Sentry Payments API.

Go to OpenClaw Integration