Sentry

Invoices API

Create, send, and manage invoices with automated payment processing. Send invoices via SMS or email, track payment status, and send reminders.

GET/public/api/v1/invoices
invoice:read

List all invoices for the authenticated merchant account.

Example Request

curl -X GET \
  -H "Authorization: Bearer sntr_abcdefghijklmnopqrstuvwxyz123456" \
  https://sandbox.sentrypos.app/public/api/v1/invoices

Example Response

{
  "invoices": [
    {
      "id": "inv_abc123",
      "customerId": "cmm3zkkx000006ogg8arp52qb",
      "customer": {
        "name": "John Doe",
        "phone": "2025550123"
      },
      "amountCents": 2500,
      "description": "Consulting services",
      "status": "SENT",
      "dueAt": "2026-03-05T00:00:00Z",
      "createdAt": "2026-02-26T15:30:00Z",
      "paymentUrl": "https://sandbox.sentrypos.app/pay/token_abc123"
    }
  ]
}
POST/public/api/v1/invoices
invoice:write

Create a new invoice. Optionally send immediately via SMS or email.

Request Body

{
  "customerId": "cmm3zkkx000006ogg8arp52qb",  // optional if providing customer object
  "customer": {                              // optional - creates/updates customer
    "name": "John Doe",
    "phone": "2025550123",
    "email": "john@example.com"
  },
  "amountCents": 2500,                       // required - amount in cents
  "description": "Consulting services",      // optional
  "dueAt": "2026-03-05T00:00:00Z",           // optional - ISO 8601 datetime
  "sendVia": "SMS"                           // optional - "SMS", "EMAIL", or null
}

Example Request

curl -X POST \
  -H "Authorization: Bearer sntr_abcdefghijklmnopqrstuvwxyz123456" \
  -H "Content-Type: application/json" \
  -d '{
    "customer": {
      "name": "John Doe",
      "phone": "2025550123",
      "email": "john@example.com"
    },
    "amountCents": 2500,
    "description": "Consulting services",
    "sendVia": "SMS"
  }' \
  https://sandbox.sentrypos.app/public/api/v1/invoices

Example Response

{
  "invoice": {
    "id": "inv_abc123",
    "customerId": "cmm3zkkx000006ogg8arp52qb",
    "amountCents": 2500,
    "description": "Consulting services",
    "status": "SENT",
    "dueAt": "2026-03-05T00:00:00Z",
    "createdAt": "2026-02-26T15:30:00Z",
    "paymentUrl": "https://sandbox.sentrypos.app/pay/token_abc123",
    "message": "Invoice sent via SMS to 2025550123"
  }
}

Invoice Operations

The Invoices API supports the following operations on individual invoices:

EndpointMethodDescriptionScope
/invoices/{id}GETRetrieve a specific invoice by IDinvoice:read
/invoices/{id}PUTUpdate an invoice by IDinvoice:write
/invoices/{id}/remindPOSTSend a reminder for an unpaid invoiceinvoice:remind

Invoice Statuses

Invoices progress through the following statuses:

1

PENDING

Invoice created but not yet sent to customer

2

SENT

Invoice sent to customer via SMS or email

3

PAID

Customer has completed payment

4

CANCELLED

Invoice was cancelled by merchant

Reminder Endpoint

POST/public/api/v1/invoices/{id}/remind
invoice:remind

Send a payment reminder for an unpaid invoice.

Example Request

curl -X POST \
  -H "Authorization: Bearer sntr_abcdefghijklmnopqrstuvwxyz123456" \
  https://sandbox.sentrypos.app/public/api/v1/invoices/inv_abc123/remind

Example Response

{
  "success": true,
  "message": "Reminder sent via SMS to 2025550123"
}

Error Handling

StatusError CodeDescription
400VALIDATION_ERRORInvalid request data (missing amount, invalid customer, etc.)
403DEMO_INVOICECannot send or modify demo invoices
404NOT_FOUNDInvoice not found
409ALREADY_PAIDCannot send reminder for paid invoice

Integration Examples

OpenClaw Skill - Automated Invoicing

An AI agent that listens for customer requests and automatically sends invoices:

// OpenClaw skill that listens for customer requests
// and automatically creates and sends invoices

module.exports = {
  name: "sentry-invoicing",
  description: "Create and send invoices via Sentry Payments",
  triggers: [
    "send invoice to",
    "create invoice for",
    "bill customer",
    "invoice for"
  ],
  
  async execute(context, message) {
    // Extract customer and amount from message
    const match = message.match(/\$([\d\.]+)/);
    const amount = match ? match[1] : null;
    
    // Use Sentry API to create invoice
    const response = await fetch(
      `https://api.sentrypos.app/public/api/v1/invoices`,
      {
        method: "POST",
        headers: {
          "Authorization": `Bearer ${process.env.SENTRY_API_KEY}`,
          "Content-Type": "application/json"
        },
        body: JSON.stringify({
          amount: amount,
          description: `Invoice from ${message}`,
          customerPhone: "extracted from message"
        })
      }
    );
    
    return `Invoice created and sent for $${amount}`;
  }
}

Next: Sales API

Track payments and revenue with the Sales API for comprehensive reporting.

Go to Sales API