Skip to main content

List SMS Payments (v1)

Method & Path

GET /api/v1/workspace/:workspaceId/sms/payments

Description

Get a paginated list of SMS payment records.

Authentication

Required: Workspace authentication. User must be authenticated as Workspace Owner or Staff with workspace permissions.

Headers

Authorization: Bearer <workspace_token>
Content-Type: application/json

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesWorkspace identifier

Query Parameters

ParameterTypeRequiredDescription
limitnumberNoNumber of results per page (default: 50)
offsetnumberNoNumber of results to skip (default: 0)

Response 200 OK

{
"payments": [
{
"id": "507f1f77bcf86cd799439011",
"workspaceId": "507f1f77bcf86cd799439012",
"amount": 50.00,
"paymentMethod": "bank-transfer",
"description": "SMS payment for January 2025",
"notes": "Payment received",
"paymentDate": "2025-01-15T10:30:00.000Z",
"receiptImage": {
"url": "https://storage.googleapis.com/...",
"path": "sms-payments/...",
"sizeBytes": 50000
},
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-15T10:30:00.000Z"
}
],
"pagination": {
"total": 10,
"limit": 50,
"offset": 0,
"hasMore": false
}
}

Response Fields

payments

Array of SMS payment objects:

  • id (string): Payment identifier
  • workspaceId (string): Workspace identifier
  • amount (number): Payment amount
  • paymentMethod (string): Payment method (cash, bank-transfer, card, other)
  • description (string | null): Payment description
  • notes (string | null): Additional notes
  • paymentDate (string | null): Payment date (ISO 8601 format)
  • receiptImage (object | null): Receipt image information
  • createdAt (string): Creation timestamp (ISO 8601 format)
  • updatedAt (string): Last update timestamp (ISO 8601 format)

pagination

See List SMS Messages for pagination fields.

Common Errors

400 Bad Request: Invalid query parameters

401 Unauthorized: Missing or invalid authentication token

403 Forbidden: User does not have permission to view SMS payments

404 Not Found: Workspace not found

500 Internal Server Error: Server error occurred while processing the request