Download OpenAPI specification:Download
Enterprise billing and subscription management system
Create a new payment intent for processing payments
| provider | string Enum: "stripe" "paypal" Payment provider to use (defaults to Stripe) |
| amount required | number >= 1 Payment amount in smallest currency unit (e.g., cents for USD) |
| currency required | string Enum: "usd" "eur" "gbp" "cad" "aud" Three-letter ISO currency code |
| customerId | string ID of existing customer |
| description | string Description of the payment |
| automaticPaymentMethods | boolean Default: true Enable automatic payment methods |
| metadata | object Metadata as key-value pairs |
{- "amount": 2000,
- "currency": "usd",
- "customerId": "cus_1234567890",
- "description": "Monthly subscription payment for Pro plan",
- "automaticPaymentMethods": true,
- "metadata": {
- "orderId": "order_123",
- "planId": "plan_pro"
}
}{- "success": true,
- "paymentIntent": {
- "id": "pi_1234567890",
- "amount": 2000,
- "currency": "usd",
- "status": "requires_payment_method",
- "clientSecret": "pi_1234567890_secret_abcdef",
- "customerId": "cus_1234567890",
- "description": "Monthly subscription payment",
- "metadata": {
- "orderId": "order_123"
}, - "provider": "stripe",
- "created": "2025-07-30T10:00:00Z",
- "updated": "2025-07-30T11:00:00Z"
}, - "customer": {
- "id": "cus_1234567890",
- "email": "customer@example.com",
- "name": "John Doe",
- "phone": "+1234567890",
- "metadata": {
- "tenantId": "tenant_123"
}, - "created": "2025-07-30T10:00:00Z"
}, - "error": {
- "code": "card_declined",
- "message": "Your card was declined.",
- "type": "card_error"
}, - "provider": "stripe",
- "timestamp": "2025-07-30T12:00:00Z"
}Retrieve a payment intent by its ID
| intentId required | string Example: pi_1234567890 Payment intent ID |
| provider | string Enum: "stripe" "paypal" Payment provider (defaults to Stripe) |
{- "success": true,
- "paymentIntent": {
- "id": "pi_1234567890",
- "amount": 2000,
- "currency": "usd",
- "status": "requires_payment_method",
- "clientSecret": "pi_1234567890_secret_abcdef",
- "customerId": "cus_1234567890",
- "description": "Monthly subscription payment",
- "metadata": {
- "orderId": "order_123"
}, - "provider": "stripe",
- "created": "2025-07-30T10:00:00Z",
- "updated": "2025-07-30T11:00:00Z"
}, - "customer": {
- "id": "cus_1234567890",
- "email": "customer@example.com",
- "name": "John Doe",
- "phone": "+1234567890",
- "metadata": {
- "tenantId": "tenant_123"
}, - "created": "2025-07-30T10:00:00Z"
}, - "error": {
- "code": "card_declined",
- "message": "Your card was declined.",
- "type": "card_error"
}, - "provider": "stripe",
- "timestamp": "2025-07-30T12:00:00Z"
}Update an existing payment intent
| intentId required | string Example: pi_1234567890 Payment intent ID |
| provider | string Enum: "stripe" "paypal" Payment provider (defaults to Stripe) |
| amount | number >= 1 Updated payment amount |
| currency | string Updated currency code |
| description | string Updated description |
| metadata | object Updated metadata |
{- "amount": 2500,
- "currency": "usd",
- "description": "Updated payment description",
- "metadata": {
- "updated": "true"
}
}{- "success": true,
- "paymentIntent": {
- "id": "pi_1234567890",
- "amount": 2000,
- "currency": "usd",
- "status": "requires_payment_method",
- "clientSecret": "pi_1234567890_secret_abcdef",
- "customerId": "cus_1234567890",
- "description": "Monthly subscription payment",
- "metadata": {
- "orderId": "order_123"
}, - "provider": "stripe",
- "created": "2025-07-30T10:00:00Z",
- "updated": "2025-07-30T11:00:00Z"
}, - "customer": {
- "id": "cus_1234567890",
- "email": "customer@example.com",
- "name": "John Doe",
- "phone": "+1234567890",
- "metadata": {
- "tenantId": "tenant_123"
}, - "created": "2025-07-30T10:00:00Z"
}, - "error": {
- "code": "card_declined",
- "message": "Your card was declined.",
- "type": "card_error"
}, - "provider": "stripe",
- "timestamp": "2025-07-30T12:00:00Z"
}Cancel an existing payment intent
| intentId required | string Example: pi_1234567890 Payment intent ID |
| provider | string Enum: "stripe" "paypal" Payment provider (defaults to Stripe) |
{- "success": true,
- "paymentIntent": {
- "id": "pi_1234567890",
- "amount": 2000,
- "currency": "usd",
- "status": "requires_payment_method",
- "clientSecret": "pi_1234567890_secret_abcdef",
- "customerId": "cus_1234567890",
- "description": "Monthly subscription payment",
- "metadata": {
- "orderId": "order_123"
}, - "provider": "stripe",
- "created": "2025-07-30T10:00:00Z",
- "updated": "2025-07-30T11:00:00Z"
}, - "customer": {
- "id": "cus_1234567890",
- "email": "customer@example.com",
- "name": "John Doe",
- "phone": "+1234567890",
- "metadata": {
- "tenantId": "tenant_123"
}, - "created": "2025-07-30T10:00:00Z"
}, - "error": {
- "code": "card_declined",
- "message": "Your card was declined.",
- "type": "card_error"
}, - "provider": "stripe",
- "timestamp": "2025-07-30T12:00:00Z"
}Confirm a payment intent for processing
| intentId required | string Example: pi_1234567890 Payment intent ID |
| provider | string Enum: "stripe" "paypal" Payment provider (defaults to Stripe) |
| paymentMethodId | string Payment method ID to confirm with |
| returnUrl | string Return URL for redirect-based payment methods |
{- "paymentMethodId": "pm_1234567890",
}{- "success": true,
- "paymentIntent": {
- "id": "pi_1234567890",
- "amount": 2000,
- "currency": "usd",
- "status": "requires_payment_method",
- "clientSecret": "pi_1234567890_secret_abcdef",
- "customerId": "cus_1234567890",
- "description": "Monthly subscription payment",
- "metadata": {
- "orderId": "order_123"
}, - "provider": "stripe",
- "created": "2025-07-30T10:00:00Z",
- "updated": "2025-07-30T11:00:00Z"
}, - "customer": {
- "id": "cus_1234567890",
- "email": "customer@example.com",
- "name": "John Doe",
- "phone": "+1234567890",
- "metadata": {
- "tenantId": "tenant_123"
}, - "created": "2025-07-30T10:00:00Z"
}, - "error": {
- "code": "card_declined",
- "message": "Your card was declined.",
- "type": "card_error"
}, - "provider": "stripe",
- "timestamp": "2025-07-30T12:00:00Z"
}Create a new customer in the payment gateway
| provider | string Enum: "stripe" "paypal" Payment provider (defaults to Stripe) |
string Customer email address | |
| name | string Customer full name |
| phone | string Customer phone number |
| metadata | object Customer metadata |
{- "email": "customer@example.com",
- "name": "John Doe",
- "phone": "+1234567890",
- "metadata": {
- "tenantId": "tenant_123",
- "userId": "user_456"
}
}{- "success": true,
- "paymentIntent": {
- "id": "pi_1234567890",
- "amount": 2000,
- "currency": "usd",
- "status": "requires_payment_method",
- "clientSecret": "pi_1234567890_secret_abcdef",
- "customerId": "cus_1234567890",
- "description": "Monthly subscription payment",
- "metadata": {
- "orderId": "order_123"
}, - "provider": "stripe",
- "created": "2025-07-30T10:00:00Z",
- "updated": "2025-07-30T11:00:00Z"
}, - "customer": {
- "id": "cus_1234567890",
- "email": "customer@example.com",
- "name": "John Doe",
- "phone": "+1234567890",
- "metadata": {
- "tenantId": "tenant_123"
}, - "created": "2025-07-30T10:00:00Z"
}, - "error": {
- "code": "card_declined",
- "message": "Your card was declined.",
- "type": "card_error"
}, - "provider": "stripe",
- "timestamp": "2025-07-30T12:00:00Z"
}Retrieve a customer by their ID
| customerId required | string Example: cus_1234567890 Customer ID |
| provider | string Enum: "stripe" "paypal" Payment provider (defaults to Stripe) |
{- "success": true,
- "paymentIntent": {
- "id": "pi_1234567890",
- "amount": 2000,
- "currency": "usd",
- "status": "requires_payment_method",
- "clientSecret": "pi_1234567890_secret_abcdef",
- "customerId": "cus_1234567890",
- "description": "Monthly subscription payment",
- "metadata": {
- "orderId": "order_123"
}, - "provider": "stripe",
- "created": "2025-07-30T10:00:00Z",
- "updated": "2025-07-30T11:00:00Z"
}, - "customer": {
- "id": "cus_1234567890",
- "email": "customer@example.com",
- "name": "John Doe",
- "phone": "+1234567890",
- "metadata": {
- "tenantId": "tenant_123"
}, - "created": "2025-07-30T10:00:00Z"
}, - "error": {
- "code": "card_declined",
- "message": "Your card was declined.",
- "type": "card_error"
}, - "provider": "stripe",
- "timestamp": "2025-07-30T12:00:00Z"
}Process incoming Stripe webhook events
| stripe-signature required | string Stripe webhook signature for verification |
{- "success": true,
- "eventId": "evt_1234567890",
- "eventType": "payment_intent.succeeded",
- "processed": true,
- "timestamp": "2025-07-30T12:00:00Z",
- "error": "Invalid event signature",
- "shouldRetry": false
}Create a new order with payment intent for processing payments
| amount required | number >= 1 Order amount in smallest currency unit (e.g., cents for USD) |
| currency required | string Enum: "usd" "eur" "gbp" "cad" "aud" Three-letter ISO currency code |
| provider required | string Enum: "STRIPE" "PAYPAL" "FUSIONPAY" Payment provider to use |
| payerUserId | string User ID of the person making the payment |
| description | string Order description |
| metadata | object Order metadata as key-value pairs |
| customerId | string Existing customer ID from payment provider |
| automaticPaymentMethods | boolean Default: true Enable automatic payment methods |
{- "amount": 2000,
- "currency": "usd",
- "provider": "STRIPE",
- "payerUserId": "123e4567-e89b-12d3-a456-426614174000",
- "description": "Monthly subscription payment for Pro plan",
- "metadata": {
- "planId": "plan_pro",
- "subscriptionId": "sub_123"
}, - "customerId": "cus_1234567890",
- "automaticPaymentMethods": true
}{- "success": true,
- "order": {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "payer_user_id": "123e4567-e89b-12d3-a456-426614174002",
- "provider": "STRIPE",
- "provider_intent_id": "pi_1234567890abcdef",
- "status": "SUCCEEDED",
- "amount": 2999,
- "currency": "usd",
- "description": "Pro plan subscription",
- "metadata": {
- "plan": "pro",
- "seats": 5
}, - "created_at": "2024-01-01T00:00:00.000Z",
- "updated_at": "2024-01-01T00:00:00.000Z"
}, - "error": "Order not found",
- "timestamp": "2025-07-30T12:00:00Z"
}Retrieve orders with filtering, sorting, and pagination
| status | string Enum: "PENDING" "REQUIRES_ACTION" "SUCCEEDED" "CANCELED" "REFUNDED" Example: status=SUCCEEDED Filter by order status |
| provider | string Enum: "STRIPE" "PAYPAL" "FUSIONPAY" Example: provider=STRIPE Filter by payment provider |
| payerUserId | string Example: payerUserId=123e4567-e89b-12d3-a456-426614174000 Filter by payer user ID |
| currency | string Example: currency=usd Filter by currency |
| minAmount | number >= 1 Example: minAmount=1000 Filter by minimum amount |
| maxAmount | number >= 1 Example: maxAmount=5000 Filter by maximum amount |
| createdFrom | string Example: createdFrom=2025-01-01T00:00:00Z Filter by created date (from) |
| createdTo | string Example: createdTo=2025-12-31T23:59:59Z Filter by created date (to) |
| page | number >= 1 Default: 1 Example: page=1 Page number for pagination |
| limit | number [ 1 .. 100 ] Default: 20 Example: limit=20 Number of items per page |
| sortBy | string Default: "created_at" Enum: "created_at" "updated_at" "amount" Example: sortBy=created_at Sort field |
| sortOrder | string Default: "desc" Enum: "asc" "desc" Example: sortOrder=desc Sort direction |
{- "data": [
- {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "payer_user_id": "123e4567-e89b-12d3-a456-426614174002",
- "provider": "STRIPE",
- "provider_intent_id": "pi_1234567890abcdef",
- "status": "SUCCEEDED",
- "amount": 2999,
- "currency": "usd",
- "description": "Pro plan subscription",
- "metadata": {
- "plan": "pro",
- "seats": 5
}, - "created_at": "2024-01-01T00:00:00.000Z",
- "updated_at": "2024-01-01T00:00:00.000Z"
}
], - "meta": {
- "currentPage": 1,
- "itemsPerPage": 20,
- "totalItems": 150,
- "totalPages": 8,
- "hasNextPage": true,
- "hasPreviousPage": false
}
}Retrieve a specific order by its ID
| orderId required | string Example: 123e4567-e89b-12d3-a456-426614174000 Order ID |
{- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "payer_user_id": "123e4567-e89b-12d3-a456-426614174002",
- "provider": "STRIPE",
- "provider_intent_id": "pi_1234567890abcdef",
- "status": "SUCCEEDED",
- "amount": 2999,
- "currency": "usd",
- "description": "Pro plan subscription",
- "metadata": {
- "plan": "pro",
- "seats": 5
}, - "created_at": "2024-01-01T00:00:00.000Z",
- "updated_at": "2024-01-01T00:00:00.000Z"
}Update an existing order (only for PENDING and REQUIRES_ACTION orders)
| orderId required | string Example: 123e4567-e89b-12d3-a456-426614174000 Order ID |
| amount | number >= 1 Updated order amount |
| description | string Updated order description |
| metadata | object Updated order metadata |
{- "amount": 2500,
- "description": "Updated subscription payment for Pro plan",
- "metadata": {
- "updated": "true",
- "planId": "plan_enterprise"
}
}{- "success": true,
- "order": {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "payer_user_id": "123e4567-e89b-12d3-a456-426614174002",
- "provider": "STRIPE",
- "provider_intent_id": "pi_1234567890abcdef",
- "status": "SUCCEEDED",
- "amount": 2999,
- "currency": "usd",
- "description": "Pro plan subscription",
- "metadata": {
- "plan": "pro",
- "seats": 5
}, - "created_at": "2024-01-01T00:00:00.000Z",
- "updated_at": "2024-01-01T00:00:00.000Z"
}, - "error": "Order not found",
- "timestamp": "2025-07-30T12:00:00Z"
}Cancel an existing order (only for PENDING and REQUIRES_ACTION orders)
| orderId required | string Example: 123e4567-e89b-12d3-a456-426614174000 Order ID |
{- "success": true,
- "order": {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "payer_user_id": "123e4567-e89b-12d3-a456-426614174002",
- "provider": "STRIPE",
- "provider_intent_id": "pi_1234567890abcdef",
- "status": "SUCCEEDED",
- "amount": 2999,
- "currency": "usd",
- "description": "Pro plan subscription",
- "metadata": {
- "plan": "pro",
- "seats": 5
}, - "created_at": "2024-01-01T00:00:00.000Z",
- "updated_at": "2024-01-01T00:00:00.000Z"
}, - "error": "Order not found",
- "timestamp": "2025-07-30T12:00:00Z"
}Confirm and process payment for an existing order
| orderId required | string Example: 123e4567-e89b-12d3-a456-426614174000 Order ID |
| paymentMethodId | string Payment method ID for payment confirmation |
| returnUrl | string Return URL for redirect-based payment methods |
{- "paymentMethodId": "pm_1234567890",
}{- "success": true,
- "order": {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "payer_user_id": "123e4567-e89b-12d3-a456-426614174002",
- "provider": "STRIPE",
- "provider_intent_id": "pi_1234567890abcdef",
- "status": "SUCCEEDED",
- "amount": 2999,
- "currency": "usd",
- "description": "Pro plan subscription",
- "metadata": {
- "plan": "pro",
- "seats": 5
}, - "created_at": "2024-01-01T00:00:00.000Z",
- "updated_at": "2024-01-01T00:00:00.000Z"
}, - "error": "Order not found",
- "timestamp": "2025-07-30T12:00:00Z"
}Process refund for a completed order (only for SUCCEEDED orders)
| orderId required | string Example: 123e4567-e89b-12d3-a456-426614174000 Order ID |
| amount | number >= 1 Refund amount (if partial refund). If not provided, full refund will be processed |
| reason | string Reason for the refund |
| metadata | object Refund metadata |
{- "amount": 1000,
- "reason": "Customer requested cancellation",
- "metadata": {
- "refundType": "customer_request",
- "processedBy": "admin"
}
}{- "success": true,
- "order": {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "payer_user_id": "123e4567-e89b-12d3-a456-426614174002",
- "provider": "STRIPE",
- "provider_intent_id": "pi_1234567890abcdef",
- "status": "SUCCEEDED",
- "amount": 2999,
- "currency": "usd",
- "description": "Pro plan subscription",
- "metadata": {
- "plan": "pro",
- "seats": 5
}, - "created_at": "2024-01-01T00:00:00.000Z",
- "updated_at": "2024-01-01T00:00:00.000Z"
}, - "error": "Order not found",
- "timestamp": "2025-07-30T12:00:00Z"
}Get detailed status information and possible actions for an order
| orderId required | string Example: 123e4567-e89b-12d3-a456-426614174000 Order ID |
{- "orderId": "string",
- "status": "string",
- "description": "string",
- "canBeCanceled": true,
- "canBeRefunded": true,
- "requiresAction": true,
- "possibleNextStatuses": [
- "string"
], - "recommendedActions": [
- "string"
]
}Retrieves available billing plans for subscription selection
| tier | string Enum: "FREE" "STARTER" "PRO" "ENTERPRISE" Example: tier=PRO Filter by plan tier |
| search | string Example: search=professional Search in plan name or description |
| active | boolean Example: active=true Filter by active status |
| includePrices | boolean Default: false Example: includePrices=true Include prices in response |
| page | number >= 1 Default: 1 Example: page=1 Page number for pagination |
| limit | number [ 1 .. 100 ] Default: 20 Example: limit=20 Number of items per page |
| sortBy | string Default: "created_at" Enum: "created_at" "updated_at" "display_name" "tier" Example: sortBy=created_at Sort field |
| sortOrder | string Default: "desc" Enum: "asc" "desc" Example: sortOrder=desc Sort direction |
{- "data": [
- {
- "id": "string",
- "display_name": "string",
- "description": "string",
- "tier": "string",
- "features": { },
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "prices": [
- "string"
], - "_count": { }
}
], - "meta": {
- "currentPage": 1,
- "itemsPerPage": 20,
- "totalItems": 150,
- "totalPages": 8,
- "hasNextPage": true,
- "hasPreviousPage": false
}
}Retrieves detailed information about a specific plan
| planId required | string Example: 123e4567-e89b-12d3-a456-426614174000 Plan UUID |
| includePrices required | boolean |
{- "id": "string",
- "display_name": "string",
- "description": "string",
- "tier": "string",
- "features": { },
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "prices": [
- "string"
], - "_count": { }
}Retrieves available pricing options for the specified plan
| planId required | string Example: 123e4567-e89b-12d3-a456-426614174000 Plan UUID |
| activeOnly required | boolean |
[- {
- "id": "string",
- "plan_id": "string",
- "currency": "string",
- "unit_amount": 0,
- "interval": "ONE_TIME",
- "seat_included": 0,
- "external_id": "string",
- "active": true,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "plan": { }
}
]Retrieves detailed information about a specific price
| priceId required | string Example: 123e4567-e89b-12d3-a456-426614174000 Price UUID |
{- "id": "string",
- "plan_id": "string",
- "currency": "string",
- "unit_amount": 0,
- "interval": "ONE_TIME",
- "seat_included": 0,
- "external_id": "string",
- "active": true,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "plan": { }
}Retrieves available plans for a specific pricing tier
| tier required | string Example: PRO Plan tier (FREE, STARTER, PRO, ENTERPRISE) |
[- {
- "id": "string",
- "display_name": "string",
- "description": "string",
- "tier": "string",
- "features": { },
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "prices": [
- "string"
], - "_count": { }
}
]Creates a new subscription for the specified plan
| payerUserId required | string User ID of the person creating the subscription |
| planId required | string Plan ID to subscribe to |
| provider required | string Enum: "STRIPE" "PAYPAL" "FUSIONPAY" Payment provider to use |
| seatCount required | number >= 1 Default: 1 Number of seats/users for this subscription |
| providerSubId | string External payment provider subscription ID (if already created) |
| trialEnd | string Trial period end date (ISO string) |
{- "payerUserId": "123e4567-e89b-12d3-a456-426614174000",
- "planId": "123e4567-e89b-12d3-a456-426614174000",
- "provider": "STRIPE",
- "seatCount": 5,
- "providerSubId": "sub_1234567890",
- "trialEnd": "2025-02-28T23:59:59Z"
}{- "success": true,
- "subscription": {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "payer_user_id": "123e4567-e89b-12d3-a456-426614174002",
- "plan_id": "123e4567-e89b-12d3-a456-426614174003",
- "plan": {
- "id": "string",
- "display_name": "string",
- "description": "string",
- "tier": "string",
- "features": { },
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "prices": [
- "string"
], - "_count": { }
}, - "provider": "STRIPE",
- "provider_sub_id": "sub_1234567890abcdef",
- "status": "ACTIVE",
- "seatCount": 5,
- "current_period_start": "2024-01-01T00:00:00.000Z",
- "current_period_end": "2024-02-01T00:00:00.000Z",
- "cancel_at_period_end": false,
- "created_at": "2024-01-01T00:00:00.000Z",
- "updated_at": "2024-01-01T00:00:00.000Z"
}, - "error": "Subscription not found",
- "timestamp": "2025-01-30T23:48:56.000Z"
}Retrieves a paginated list of subscriptions with optional filtering
| status | string Enum: "PENDING" "ACTIVE" "PAST_DUE" "CANCELED" Example: status=ACTIVE Filter by subscription status |
| provider | string Enum: "STRIPE" "PAYPAL" "FUSIONPAY" Example: provider=STRIPE Filter by payment provider |
| payerUserId | string Example: payerUserId=123e4567-e89b-12d3-a456-426614174000 Filter by payer user ID |
| planId | string Example: planId=123e4567-e89b-12d3-a456-426614174000 Filter by plan ID |
| minSeats | number >= 1 Example: minSeats=1 Filter by minimum seat count |
| maxSeats | number >= 1 Example: maxSeats=100 Filter by maximum seat count |
| periodStartFrom | string Example: periodStartFrom=2025-01-01T00:00:00Z Filter by period start date (from) |
| periodStartTo | string Example: periodStartTo=2025-12-31T23:59:59Z Filter by period start date (to) |
| periodEndFrom | string Example: periodEndFrom=2025-01-01T00:00:00Z Filter by period end date (from) |
| periodEndTo | string Example: periodEndTo=2025-12-31T23:59:59Z Filter by period end date (to) |
| createdFrom | string Example: createdFrom=2025-01-01T00:00:00Z Filter by created date (from) |
| createdTo | string Example: createdTo=2025-12-31T23:59:59Z Filter by created date (to) |
| includePlan | boolean Default: false Example: includePlan=true Include plan details in response |
| page | number >= 1 Default: 1 Example: page=1 Page number for pagination |
| limit | number [ 1 .. 100 ] Default: 20 Example: limit=20 Number of items per page |
| sortBy | string Default: "created_at" Enum: "created_at" "updated_at" "current_period_start" "current_period_end" Example: sortBy=created_at Sort field |
| sortOrder | string Default: "desc" Enum: "asc" "desc" Example: sortOrder=desc Sort direction |
{- "data": [
- {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "payer_user_id": "123e4567-e89b-12d3-a456-426614174002",
- "plan_id": "123e4567-e89b-12d3-a456-426614174003",
- "plan": {
- "id": "string",
- "display_name": "string",
- "description": "string",
- "tier": "string",
- "features": { },
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "prices": [
- "string"
], - "_count": { }
}, - "provider": "STRIPE",
- "provider_sub_id": "sub_1234567890abcdef",
- "status": "ACTIVE",
- "seatCount": 5,
- "current_period_start": "2024-01-01T00:00:00.000Z",
- "current_period_end": "2024-02-01T00:00:00.000Z",
- "cancel_at_period_end": false,
- "created_at": "2024-01-01T00:00:00.000Z",
- "updated_at": "2024-01-01T00:00:00.000Z"
}
], - "meta": {
- "currentPage": 1,
- "itemsPerPage": 20,
- "totalItems": 150,
- "totalPages": 8,
- "hasNextPage": true,
- "hasPreviousPage": false
}
}Retrieves all active subscriptions for the current tenant
[- {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "payer_user_id": "123e4567-e89b-12d3-a456-426614174002",
- "plan_id": "123e4567-e89b-12d3-a456-426614174003",
- "plan": {
- "id": "string",
- "display_name": "string",
- "description": "string",
- "tier": "string",
- "features": { },
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "prices": [
- "string"
], - "_count": { }
}, - "provider": "STRIPE",
- "provider_sub_id": "sub_1234567890abcdef",
- "status": "ACTIVE",
- "seatCount": 5,
- "current_period_start": "2024-01-01T00:00:00.000Z",
- "current_period_end": "2024-02-01T00:00:00.000Z",
- "cancel_at_period_end": false,
- "created_at": "2024-01-01T00:00:00.000Z",
- "updated_at": "2024-01-01T00:00:00.000Z"
}
]Retrieves a specific subscription by its ID
| subscriptionId required | string Example: 123e4567-e89b-12d3-a456-426614174000 Subscription UUID |
| includePlan required | boolean |
{- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "payer_user_id": "123e4567-e89b-12d3-a456-426614174002",
- "plan_id": "123e4567-e89b-12d3-a456-426614174003",
- "plan": {
- "id": "string",
- "display_name": "string",
- "description": "string",
- "tier": "string",
- "features": { },
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "prices": [
- "string"
], - "_count": { }
}, - "provider": "STRIPE",
- "provider_sub_id": "sub_1234567890abcdef",
- "status": "ACTIVE",
- "seatCount": 5,
- "current_period_start": "2024-01-01T00:00:00.000Z",
- "current_period_end": "2024-02-01T00:00:00.000Z",
- "cancel_at_period_end": false,
- "created_at": "2024-01-01T00:00:00.000Z",
- "updated_at": "2024-01-01T00:00:00.000Z"
}Updates an existing subscription with new details
| subscriptionId required | string Example: 123e4567-e89b-12d3-a456-426614174000 Subscription UUID |
| planId | string New plan ID to upgrade/downgrade to |
| seatCount | number >= 1 New number of seats/users for this subscription |
| cancelAtPeriodEnd | boolean Whether to cancel the subscription at the end of the current period |
{- "planId": "123e4567-e89b-12d3-a456-426614174000",
- "seatCount": 10,
- "cancelAtPeriodEnd": false
}{- "success": true,
- "subscription": {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "payer_user_id": "123e4567-e89b-12d3-a456-426614174002",
- "plan_id": "123e4567-e89b-12d3-a456-426614174003",
- "plan": {
- "id": "string",
- "display_name": "string",
- "description": "string",
- "tier": "string",
- "features": { },
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "prices": [
- "string"
], - "_count": { }
}, - "provider": "STRIPE",
- "provider_sub_id": "sub_1234567890abcdef",
- "status": "ACTIVE",
- "seatCount": 5,
- "current_period_start": "2024-01-01T00:00:00.000Z",
- "current_period_end": "2024-02-01T00:00:00.000Z",
- "cancel_at_period_end": false,
- "created_at": "2024-01-01T00:00:00.000Z",
- "updated_at": "2024-01-01T00:00:00.000Z"
}, - "error": "Subscription not found",
- "timestamp": "2025-01-30T23:48:56.000Z"
}Cancels a subscription either immediately or at the end of the billing period
| subscriptionId required | string Example: 123e4567-e89b-12d3-a456-426614174000 Subscription UUID |
| immediately | boolean Default: false Whether to cancel immediately or at period end |
| reason | string Reason for cancellation |
{- "immediately": false,
- "reason": "User requested cancellation"
}{- "success": true,
- "subscription": {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "payer_user_id": "123e4567-e89b-12d3-a456-426614174002",
- "plan_id": "123e4567-e89b-12d3-a456-426614174003",
- "plan": {
- "id": "string",
- "display_name": "string",
- "description": "string",
- "tier": "string",
- "features": { },
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "prices": [
- "string"
], - "_count": { }
}, - "provider": "STRIPE",
- "provider_sub_id": "sub_1234567890abcdef",
- "status": "ACTIVE",
- "seatCount": 5,
- "current_period_start": "2024-01-01T00:00:00.000Z",
- "current_period_end": "2024-02-01T00:00:00.000Z",
- "cancel_at_period_end": false,
- "created_at": "2024-01-01T00:00:00.000Z",
- "updated_at": "2024-01-01T00:00:00.000Z"
}, - "error": "Subscription not found",
- "timestamp": "2025-01-30T23:48:56.000Z"
}Reactivates a canceled subscription
| subscriptionId required | string Example: 123e4567-e89b-12d3-a456-426614174000 Subscription UUID |
| planId | string New plan to reactivate with (if different from original) |
| seatCount | number >= 1 Number of seats for reactivated subscription |
{- "planId": "123e4567-e89b-12d3-a456-426614174000",
- "seatCount": 5
}{- "success": true,
- "subscription": {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "payer_user_id": "123e4567-e89b-12d3-a456-426614174002",
- "plan_id": "123e4567-e89b-12d3-a456-426614174003",
- "plan": {
- "id": "string",
- "display_name": "string",
- "description": "string",
- "tier": "string",
- "features": { },
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "prices": [
- "string"
], - "_count": { }
}, - "provider": "STRIPE",
- "provider_sub_id": "sub_1234567890abcdef",
- "status": "ACTIVE",
- "seatCount": 5,
- "current_period_start": "2024-01-01T00:00:00.000Z",
- "current_period_end": "2024-02-01T00:00:00.000Z",
- "cancel_at_period_end": false,
- "created_at": "2024-01-01T00:00:00.000Z",
- "updated_at": "2024-01-01T00:00:00.000Z"
}, - "error": "Subscription not found",
- "timestamp": "2025-01-30T23:48:56.000Z"
}| subscriptionId required | string Subscription ID |
| provider required | string Enum: "STRIPE" "PAYPAL" "FUSIONPAY" Payment provider |
| providerInvoiceId required | string Provider invoice ID |
| total required | number >= 0 Invoice total amount in smallest currency unit |
| status required | string Enum: "DRAFT" "OPEN" "PAID" "VOID" Invoice status |
| dueDate required | string Invoice due date |
| tenantId | string Tenant ID (will be set from context if not provided) |
{- "subscriptionId": "123e4567-e89b-12d3-a456-426614174000",
- "provider": "STRIPE",
- "providerInvoiceId": "in_1234567890",
- "total": 2000,
- "status": "OPEN",
- "dueDate": "2025-08-30T00:00:00Z",
- "tenantId": "123e4567-e89b-12d3-a456-426614174000"
}{- "success": true,
- "invoice": {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "subscription_id": "123e4567-e89b-12d3-a456-426614174002",
- "subscription": {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "payer_user_id": "123e4567-e89b-12d3-a456-426614174002",
- "plan_id": "123e4567-e89b-12d3-a456-426614174003",
- "plan": {
- "id": "string",
- "display_name": "string",
- "description": "string",
- "tier": "string",
- "features": { },
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "prices": [
- "string"
], - "_count": { }
}, - "provider": "STRIPE",
- "provider_sub_id": "sub_1234567890abcdef",
- "status": "ACTIVE",
- "seatCount": 5,
- "current_period_start": "2024-01-01T00:00:00.000Z",
- "current_period_end": "2024-02-01T00:00:00.000Z",
- "cancel_at_period_end": false,
- "created_at": "2024-01-01T00:00:00.000Z",
- "updated_at": "2024-01-01T00:00:00.000Z"
}, - "provider": "STRIPE",
- "provider_invoice_id": "in_1234567890abcdef",
- "total": 2999,
- "status": "PAID",
- "due_date": "2024-01-31T23:59:59.000Z",
- "created_at": "2024-01-01T00:00:00.000Z",
- "updated_at": "2024-01-01T00:00:00.000Z"
}, - "error": "Invoice not found",
- "timestamp": "2025-07-30T12:00:00Z"
}| status | string Enum: "DRAFT" "OPEN" "PAID" "VOID" Example: status=PAID Filter by invoice status |
| provider | string Enum: "STRIPE" "PAYPAL" "FUSIONPAY" Example: provider=STRIPE Filter by payment provider |
| subscriptionId | string Example: subscriptionId=123e4567-e89b-12d3-a456-426614174000 Filter by subscription ID |
| providerInvoiceId | string Example: providerInvoiceId=in_1234567890 Filter by provider invoice ID |
| createdAfter | string Example: createdAfter=2025-01-01T00:00:00Z Filter invoices created after this date |
| createdBefore | string Example: createdBefore=2025-12-31T23:59:59Z Filter invoices created before this date |
| dueAfter | string Example: dueAfter=2025-01-01T00:00:00Z Filter invoices due after this date |
| dueBefore | string Example: dueBefore=2025-12-31T23:59:59Z Filter invoices due before this date |
| page | number >= 1 Example: page=1 Page number (1-based) |
| limit | number [ 1 .. 100 ] Example: limit=20 Number of items per page |
| sortBy | string Enum: "createdAt" "updatedAt" "dueDate" "total" Example: sortBy=createdAt Sort by field |
| sortOrder | string Enum: "asc" "desc" Example: sortOrder=desc Sort order |
{- "data": [
- {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "subscription_id": "123e4567-e89b-12d3-a456-426614174002",
- "subscription": {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "payer_user_id": "123e4567-e89b-12d3-a456-426614174002",
- "plan_id": "123e4567-e89b-12d3-a456-426614174003",
- "plan": {
- "id": "string",
- "display_name": "string",
- "description": "string",
- "tier": "string",
- "features": { },
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "prices": [
- "string"
], - "_count": { }
}, - "provider": "STRIPE",
- "provider_sub_id": "sub_1234567890abcdef",
- "status": "ACTIVE",
- "seatCount": 5,
- "current_period_start": "2024-01-01T00:00:00.000Z",
- "current_period_end": "2024-02-01T00:00:00.000Z",
- "cancel_at_period_end": false,
- "created_at": "2024-01-01T00:00:00.000Z",
- "updated_at": "2024-01-01T00:00:00.000Z"
}, - "provider": "STRIPE",
- "provider_invoice_id": "in_1234567890abcdef",
- "total": 2999,
- "status": "PAID",
- "due_date": "2024-01-31T23:59:59.000Z",
- "created_at": "2024-01-01T00:00:00.000Z",
- "updated_at": "2024-01-01T00:00:00.000Z"
}
], - "meta": {
- "currentPage": 1,
- "itemsPerPage": 20,
- "totalItems": 150,
- "totalPages": 8,
- "hasNextPage": true,
- "hasPreviousPage": false
}
}| status | string Enum: "DRAFT" "OPEN" "PAID" "VOID" Example: status=PAID Filter by invoice status |
| provider | string Enum: "STRIPE" "PAYPAL" "FUSIONPAY" Example: provider=STRIPE Filter by payment provider |
| subscriptionId | string Example: subscriptionId=123e4567-e89b-12d3-a456-426614174000 Filter by subscription ID |
| providerInvoiceId | string Example: providerInvoiceId=in_1234567890 Filter by provider invoice ID |
| createdAfter | string Example: createdAfter=2025-01-01T00:00:00Z Filter invoices created after this date |
| createdBefore | string Example: createdBefore=2025-12-31T23:59:59Z Filter invoices created before this date |
| dueAfter | string Example: dueAfter=2025-01-01T00:00:00Z Filter invoices due after this date |
| dueBefore | string Example: dueBefore=2025-12-31T23:59:59Z Filter invoices due before this date |
| page | number >= 1 Example: page=1 Page number (1-based) |
| limit | number [ 1 .. 100 ] Example: limit=20 Number of items per page |
| sortBy | string Enum: "createdAt" "updatedAt" "dueDate" "total" Example: sortBy=createdAt Sort by field |
| sortOrder | string Enum: "asc" "desc" Example: sortOrder=desc Sort order |
{- "data": [
- {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "subscription_id": "123e4567-e89b-12d3-a456-426614174002",
- "subscription": {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "payer_user_id": "123e4567-e89b-12d3-a456-426614174002",
- "plan_id": "123e4567-e89b-12d3-a456-426614174003",
- "plan": {
- "id": "string",
- "display_name": "string",
- "description": "string",
- "tier": "string",
- "features": { },
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "prices": [
- "string"
], - "_count": { }
}, - "provider": "STRIPE",
- "provider_sub_id": "sub_1234567890abcdef",
- "status": "ACTIVE",
- "seatCount": 5,
- "current_period_start": "2024-01-01T00:00:00.000Z",
- "current_period_end": "2024-02-01T00:00:00.000Z",
- "cancel_at_period_end": false,
- "created_at": "2024-01-01T00:00:00.000Z",
- "updated_at": "2024-01-01T00:00:00.000Z"
}, - "provider": "STRIPE",
- "provider_invoice_id": "in_1234567890abcdef",
- "total": 2999,
- "status": "PAID",
- "due_date": "2024-01-31T23:59:59.000Z",
- "created_at": "2024-01-01T00:00:00.000Z",
- "updated_at": "2024-01-01T00:00:00.000Z"
}
], - "meta": {
- "currentPage": 1,
- "itemsPerPage": 20,
- "totalItems": 150,
- "totalPages": 8,
- "hasNextPage": true,
- "hasPreviousPage": false
}
}| providerInvoiceId required | string Example: in_1234567890 Provider invoice ID (e.g., Stripe invoice ID) |
{- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "subscription_id": "123e4567-e89b-12d3-a456-426614174002",
- "subscription": {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "payer_user_id": "123e4567-e89b-12d3-a456-426614174002",
- "plan_id": "123e4567-e89b-12d3-a456-426614174003",
- "plan": {
- "id": "string",
- "display_name": "string",
- "description": "string",
- "tier": "string",
- "features": { },
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "prices": [
- "string"
], - "_count": { }
}, - "provider": "STRIPE",
- "provider_sub_id": "sub_1234567890abcdef",
- "status": "ACTIVE",
- "seatCount": 5,
- "current_period_start": "2024-01-01T00:00:00.000Z",
- "current_period_end": "2024-02-01T00:00:00.000Z",
- "cancel_at_period_end": false,
- "created_at": "2024-01-01T00:00:00.000Z",
- "updated_at": "2024-01-01T00:00:00.000Z"
}, - "provider": "STRIPE",
- "provider_invoice_id": "in_1234567890abcdef",
- "total": 2999,
- "status": "PAID",
- "due_date": "2024-01-31T23:59:59.000Z",
- "created_at": "2024-01-01T00:00:00.000Z",
- "updated_at": "2024-01-01T00:00:00.000Z"
}| id required | string Example: 123e4567-e89b-12d3-a456-426614174000 Invoice ID |
{- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "subscription_id": "123e4567-e89b-12d3-a456-426614174002",
- "subscription": {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "payer_user_id": "123e4567-e89b-12d3-a456-426614174002",
- "plan_id": "123e4567-e89b-12d3-a456-426614174003",
- "plan": {
- "id": "string",
- "display_name": "string",
- "description": "string",
- "tier": "string",
- "features": { },
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "prices": [
- "string"
], - "_count": { }
}, - "provider": "STRIPE",
- "provider_sub_id": "sub_1234567890abcdef",
- "status": "ACTIVE",
- "seatCount": 5,
- "current_period_start": "2024-01-01T00:00:00.000Z",
- "current_period_end": "2024-02-01T00:00:00.000Z",
- "cancel_at_period_end": false,
- "created_at": "2024-01-01T00:00:00.000Z",
- "updated_at": "2024-01-01T00:00:00.000Z"
}, - "provider": "STRIPE",
- "provider_invoice_id": "in_1234567890abcdef",
- "total": 2999,
- "status": "PAID",
- "due_date": "2024-01-31T23:59:59.000Z",
- "created_at": "2024-01-01T00:00:00.000Z",
- "updated_at": "2024-01-01T00:00:00.000Z"
}| id required | string Example: 123e4567-e89b-12d3-a456-426614174000 Invoice ID |
{- "success": true,
- "invoice": {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "subscription_id": "123e4567-e89b-12d3-a456-426614174002",
- "subscription": {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "payer_user_id": "123e4567-e89b-12d3-a456-426614174002",
- "plan_id": "123e4567-e89b-12d3-a456-426614174003",
- "plan": {
- "id": "string",
- "display_name": "string",
- "description": "string",
- "tier": "string",
- "features": { },
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "prices": [
- "string"
], - "_count": { }
}, - "provider": "STRIPE",
- "provider_sub_id": "sub_1234567890abcdef",
- "status": "ACTIVE",
- "seatCount": 5,
- "current_period_start": "2024-01-01T00:00:00.000Z",
- "current_period_end": "2024-02-01T00:00:00.000Z",
- "cancel_at_period_end": false,
- "created_at": "2024-01-01T00:00:00.000Z",
- "updated_at": "2024-01-01T00:00:00.000Z"
}, - "provider": "STRIPE",
- "provider_invoice_id": "in_1234567890abcdef",
- "total": 2999,
- "status": "PAID",
- "due_date": "2024-01-31T23:59:59.000Z",
- "created_at": "2024-01-01T00:00:00.000Z",
- "updated_at": "2024-01-01T00:00:00.000Z"
}, - "error": "Invoice not found",
- "timestamp": "2025-07-30T12:00:00Z"
}| id required | string Example: 123e4567-e89b-12d3-a456-426614174000 Invoice ID |
{- "success": true,
- "invoice": {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "subscription_id": "123e4567-e89b-12d3-a456-426614174002",
- "subscription": {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "payer_user_id": "123e4567-e89b-12d3-a456-426614174002",
- "plan_id": "123e4567-e89b-12d3-a456-426614174003",
- "plan": {
- "id": "string",
- "display_name": "string",
- "description": "string",
- "tier": "string",
- "features": { },
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "prices": [
- "string"
], - "_count": { }
}, - "provider": "STRIPE",
- "provider_sub_id": "sub_1234567890abcdef",
- "status": "ACTIVE",
- "seatCount": 5,
- "current_period_start": "2024-01-01T00:00:00.000Z",
- "current_period_end": "2024-02-01T00:00:00.000Z",
- "cancel_at_period_end": false,
- "created_at": "2024-01-01T00:00:00.000Z",
- "updated_at": "2024-01-01T00:00:00.000Z"
}, - "provider": "STRIPE",
- "provider_invoice_id": "in_1234567890abcdef",
- "total": 2999,
- "status": "PAID",
- "due_date": "2024-01-31T23:59:59.000Z",
- "created_at": "2024-01-01T00:00:00.000Z",
- "updated_at": "2024-01-01T00:00:00.000Z"
}, - "error": "Invoice not found",
- "timestamp": "2025-07-30T12:00:00Z"
}| featureKey required | string Feature key/identifier |
| validFrom required | string Entitlement valid from date |
| validTo required | string Entitlement valid to date |
| seatLimit required | number >= 1 Seat limit for this entitlement |
| usageCount | number >= 0 Initial usage count |
| tenantId | string Tenant ID (will be set from context if not provided) |
{- "featureKey": "hr_management",
- "validFrom": "2025-01-01T00:00:00Z",
- "validTo": "2025-12-31T23:59:59Z",
- "seatLimit": 10,
- "usageCount": 0,
- "tenantId": "123e4567-e89b-12d3-a456-426614174000"
}{- "success": true,
- "entitlement": {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "feature_key": "analytics",
- "valid_from": "2024-01-01T00:00:00.000Z",
- "valid_to": "2024-12-31T23:59:59.000Z",
- "seat_limit": 10,
- "usage_count": 5
}, - "error": "Entitlement not found",
- "timestamp": "2025-07-30T12:00:00Z"
}| featureKey | string Example: featureKey=hr_management Filter by feature key |
| tenantId | string Example: tenantId=123e4567-e89b-12d3-a456-426614174000 Filter by tenant ID (admin only) |
| validFromAfter | string Example: validFromAfter=2025-01-01T00:00:00Z Filter entitlements valid from after this date |
| validFromBefore | string Example: validFromBefore=2025-12-31T23:59:59Z Filter entitlements valid from before this date |
| validToAfter | string Example: validToAfter=2025-01-01T00:00:00Z Filter entitlements valid to after this date |
| validToBefore | string Example: validToBefore=2025-12-31T23:59:59Z Filter entitlements valid to before this date |
| active | boolean Example: active=true Filter by active status (based on current date) |
| expired | boolean Example: expired=false Filter by expired status (based on current date) |
| minSeatLimit | number >= 1 Example: minSeatLimit=5 Filter by minimum seat limit |
| maxSeatLimit | number >= 1 Example: maxSeatLimit=100 Filter by maximum seat limit |
| usageThreshold | number [ 0 .. 100 ] Example: usageThreshold=80 Filter by usage threshold (percentage of seat limit used) |
| page | number >= 1 Example: page=1 Page number (1-based) |
| limit | number [ 1 .. 100 ] Example: limit=20 Number of items per page |
| sortBy | string Enum: "createdAt" "validFrom" "validTo" "featureKey" "seatLimit" "usageCount" Example: sortBy=validTo Sort by field |
| sortOrder | string Enum: "asc" "desc" Example: sortOrder=asc Sort order |
{- "data": [
- {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "feature_key": "analytics",
- "valid_from": "2024-01-01T00:00:00.000Z",
- "valid_to": "2024-12-31T23:59:59.000Z",
- "seat_limit": 10,
- "usage_count": 5
}
], - "meta": {
- "currentPage": 1,
- "itemsPerPage": 20,
- "totalItems": 150,
- "totalPages": 8,
- "hasNextPage": true,
- "hasPreviousPage": false
}
}| featureKey | string Example: featureKey=hr_management Filter by feature key |
| tenantId | string Example: tenantId=123e4567-e89b-12d3-a456-426614174000 Filter by tenant ID (admin only) |
| validFromAfter | string Example: validFromAfter=2025-01-01T00:00:00Z Filter entitlements valid from after this date |
| validFromBefore | string Example: validFromBefore=2025-12-31T23:59:59Z Filter entitlements valid from before this date |
| validToAfter | string Example: validToAfter=2025-01-01T00:00:00Z Filter entitlements valid to after this date |
| validToBefore | string Example: validToBefore=2025-12-31T23:59:59Z Filter entitlements valid to before this date |
| active | boolean Example: active=true Filter by active status (based on current date) |
| expired | boolean Example: expired=false Filter by expired status (based on current date) |
| minSeatLimit | number >= 1 Example: minSeatLimit=5 Filter by minimum seat limit |
| maxSeatLimit | number >= 1 Example: maxSeatLimit=100 Filter by maximum seat limit |
| usageThreshold | number [ 0 .. 100 ] Example: usageThreshold=80 Filter by usage threshold (percentage of seat limit used) |
| page | number >= 1 Example: page=1 Page number (1-based) |
| limit | number [ 1 .. 100 ] Example: limit=20 Number of items per page |
| sortBy | string Enum: "createdAt" "validFrom" "validTo" "featureKey" "seatLimit" "usageCount" Example: sortBy=validTo Sort by field |
| sortOrder | string Enum: "asc" "desc" Example: sortOrder=asc Sort order |
{- "data": [
- {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "feature_key": "analytics",
- "valid_from": "2024-01-01T00:00:00.000Z",
- "valid_to": "2024-12-31T23:59:59.000Z",
- "seat_limit": 10,
- "usage_count": 5
}
], - "meta": {
- "currentPage": 1,
- "itemsPerPage": 20,
- "totalItems": 150,
- "totalPages": 8,
- "hasNextPage": true,
- "hasPreviousPage": false
}
}[- {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "feature_key": "analytics",
- "valid_from": "2024-01-01T00:00:00.000Z",
- "valid_to": "2024-12-31T23:59:59.000Z",
- "seat_limit": 10,
- "usage_count": 5
}
]| featureKey required | string Example: hr_management Feature key/identifier |
[- {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "feature_key": "analytics",
- "valid_from": "2024-01-01T00:00:00.000Z",
- "valid_to": "2024-12-31T23:59:59.000Z",
- "seat_limit": 10,
- "usage_count": 5
}
]| id required | string Example: 123e4567-e89b-12d3-a456-426614174000 Entitlement ID |
{- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "feature_key": "analytics",
- "valid_from": "2024-01-01T00:00:00.000Z",
- "valid_to": "2024-12-31T23:59:59.000Z",
- "seat_limit": 10,
- "usage_count": 5
}| id required | string Example: 123e4567-e89b-12d3-a456-426614174000 Entitlement ID |
{- "success": true,
- "entitlement": {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "feature_key": "analytics",
- "valid_from": "2024-01-01T00:00:00.000Z",
- "valid_to": "2024-12-31T23:59:59.000Z",
- "seat_limit": 10,
- "usage_count": 5
}, - "error": "Entitlement not found",
- "timestamp": "2025-07-30T12:00:00Z"
}| id required | string Example: 123e4567-e89b-12d3-a456-426614174000 Entitlement ID |
{- "success": true,
- "previousUsage": 5,
- "newUsage": 6,
- "remainingSeats": 4,
- "warning": "Usage is at 80% of limit",
- "error": "Usage would exceed seat limit",
- "timestamp": "2025-07-30T12:00:00Z"
}| threshold | string Usage percentage threshold (default: 80) |
[- {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "feature_key": "analytics",
- "valid_from": "2024-01-01T00:00:00.000Z",
- "valid_to": "2024-12-31T23:59:59.000Z",
- "seat_limit": 10,
- "usage_count": 5
}
]| days | string Number of days ahead to check (default: 30) |
[- {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "feature_key": "analytics",
- "valid_from": "2024-01-01T00:00:00.000Z",
- "valid_to": "2024-12-31T23:59:59.000Z",
- "seat_limit": 10,
- "usage_count": 5
}
]Process a specific event by ID, with optional force reprocessing
| eventId required | string Event ID to process |
| forceReprocess | boolean Default: false Force reprocessing even if already processed |
{- "eventId": "evt_1234567890",
- "forceReprocess": false
}{- "success": true,
- "eventId": "evt_1234567890",
- "eventType": "payment_intent.succeeded",
- "processed": true,
- "timestamp": "2025-07-30T10:00:00Z",
- "error": "Invalid event payload format",
- "shouldRetry": true,
- "retryCount": 1,
- "actions": [
- "order_updated",
- "notification_sent"
]
}Process all unprocessed events in the queue
| limit | number Example: limit=100 Maximum number of events to process |
{- "totalProcessed": 50,
- "successCount": 45,
- "failureCount": 5,
- "results": [
- {
- "success": true,
- "eventId": "evt_1234567890",
- "eventType": "payment_intent.succeeded",
- "processed": true,
- "timestamp": "2025-07-30T10:00:00Z",
- "error": "Invalid event payload format",
- "shouldRetry": true,
- "retryCount": 1,
- "actions": [
- "order_updated",
- "notification_sent"
]
}
]
}Retry processing of a specific event with exponential backoff
| eventId required | string Event ID to retry |
| maxRetries | number [ 1 .. 10 ] Default: 3 Maximum number of retry attempts |
{- "eventId": "evt_1234567890",
- "maxRetries": 3
}{- "success": true,
- "eventId": "evt_1234567890",
- "eventType": "payment_intent.succeeded",
- "processed": true,
- "timestamp": "2025-07-30T10:00:00Z",
- "error": "Invalid event payload format",
- "shouldRetry": true,
- "retryCount": 1,
- "actions": [
- "order_updated",
- "notification_sent"
]
}Retry all events that have failed but not exceeded max retry limit
| maxRetries | number Example: maxRetries=5 Maximum retry attempts per event |
| limit | number Example: limit=50 Maximum number of events to retry |
{- "totalRetried": 25,
- "successCount": 20,
- "failureCount": 3,
- "permanentlyFailedCount": 2
}Get comprehensive statistics about event processing
{- "totalProcessed": 1250,
- "totalFailed": 25,
- "totalPending": 5,
- "last24Hours": 150,
- "averageProcessingTime": 245,
- "commonEventTypes": [
- {
- "type": "payment_intent.succeeded",
- "count": 500
}, - {
- "type": "invoice.payment_succeeded",
- "count": 300
}
]
}Get paginated event history with optional filtering
| page | number Example: page=1 Page number |
| limit | number Example: limit=20 Items per page |
| eventType | string Enum: "payment_intent.created" "payment_intent.succeeded" "payment_intent.payment_failed" "payment_intent.canceled" "payment_intent.requires_action" "invoice.created" "invoice.finalized" "invoice.payment_succeeded" "invoice.payment_failed" "invoice.voided" "customer.subscription.created" "customer.subscription.updated" "customer.subscription.deleted" "customer.subscription.trial_will_end" "customer.created" "customer.updated" "customer.deleted" "charge.succeeded" "charge.failed" "charge.refunded" "charge.dispute.created" "setup_intent.succeeded" "setup_intent.setup_failed" Filter by event type |
| processed | boolean Filter by processing status |
| startDate | string Filter events from this date (ISO string) |
| endDate | string Filter events to this date (ISO string) |
{- "data": [
- {
- "id": "evt_1234567890",
- "tenantId": "123e4567-e89b-12d3-a456-426614174000",
- "type": "payment_intent.succeeded",
- "apiVersion": "2023-10-16",
- "payload": {
- "object": {
- "id": "pi_1234567890",
- "amount": 2000,
- "currency": "usd",
- "status": "succeeded"
}
}, - "context": "Authentication context or related object details",
- "processed": true,
- "retries": 0,
- "created": 1677721200,
- "processedAt": "2025-07-30T10:00:00Z",
- "receivedAt": "2025-07-30T10:00:00Z"
}
], - "meta": {
- "currentPage": 1,
- "itemsPerPage": 20,
- "totalItems": 150,
- "totalPages": 8,
- "hasNextPage": true,
- "hasPreviousPage": false
}
}Get detailed information about a specific event
| eventId required | string Example: evt_1234567890 Event ID |
{- "id": "evt_1234567890",
- "tenantId": "123e4567-e89b-12d3-a456-426614174000",
- "type": "payment_intent.succeeded",
- "apiVersion": "2023-10-16",
- "payload": {
- "object": {
- "id": "pi_1234567890",
- "amount": 2000,
- "currency": "usd",
- "status": "succeeded"
}
}, - "context": "Authentication context or related object details",
- "processed": true,
- "retries": 0,
- "created": 1677721200,
- "processedAt": "2025-07-30T10:00:00Z",
- "receivedAt": "2025-07-30T10:00:00Z"
}Get detailed performance metrics for event processing
| hours | number Example: hours=24 Number of hours to look back |
{- "eventsPerHour": [
- { }
], - "retryDistribution": [
- { }
], - "errorPatterns": [
- { }
], - "slowEvents": [
- { }
]
}Send a single email notification using a template
| tenantId required | string Tenant ID |
| templateType required | string Enum: "invoice_paid" "invoice_payment_failed" "invoice_finalized" "subscription_created" "subscription_updated" "subscription_canceled" "subscription_reactivated" "trial_will_end" "payment_succeeded" "payment_failed" "payment_action_required" "customer_created" Email template type |
required | Array of objects (EmailRecipientDto) Email recipients |
| templateVariables required | object Template variables for personalization |
| priority | string Default: "normal" Enum: "low" "normal" "high" "urgent" Email priority |
Array of objects (EmailAttachmentDto) Email attachments | |
| customSubject | string Custom email subject (overrides template default) |
| sendImmediate | boolean Default: false Send immediately (bypass queue) |
| scheduledAt | string Schedule sending for later (ISO date string) |
| metadata | object Additional metadata |
{- "tenantId": "123e4567-e89b-12d3-a456-426614174000",
- "templateType": "invoice_paid",
- "recipients": [
- {
- "email": "user@example.com",
- "name": "John Doe",
- "type": "to"
}
], - "templateVariables": {
- "customerName": "John Doe",
- "invoiceNumber": "INV-001",
- "amount": "$29.99",
- "dueDate": "2025-08-30"
}, - "priority": "normal",
- "attachments": [
- {
- "filename": "invoice.pdf",
- "contentType": "application/pdf",
- "content": "JVBERi0xLjQKJeLjz9MK...",
- "cid": "logo"
}
], - "customSubject": "Your invoice has been paid successfully",
- "sendImmediate": false,
- "scheduledAt": "2025-08-01T10:00:00Z",
- "metadata": {
- "orderId": "order_123",
- "campaignId": "campaign_456"
}
}{- "success": true,
- "operation": "email_sent",
- "count": 1,
- "notificationIds": [
- "123e4567-e89b-12d3-a456-426614174000"
], - "error": "SMTP server unavailable",
- "timestamp": "2025-07-30T10:00:00Z",
- "details": {
- "provider": "sendgrid",
- "batchId": "batch_123"
}
}Send multiple email notifications in batch
| tenantId required | string Tenant ID |
| templateType required | string Enum: "invoice_paid" "invoice_payment_failed" "invoice_finalized" "subscription_created" "subscription_updated" "subscription_canceled" "subscription_reactivated" "trial_will_end" "payment_succeeded" "payment_failed" "payment_action_required" "customer_created" Email template type |
required | Array of objects List of recipients with personalized data |
| priority | string Default: "normal" Enum: "low" "normal" "high" "urgent" Email priority |
| batchSize | number [ 1 .. 1000 ] Default: 100 Batch size for processing |
{- "tenantId": "123e4567-e89b-12d3-a456-426614174000",
- "templateType": "trial_will_end",
- "recipientData": [
- {
- "recipient": {
- "email": "user@example.com",
- "name": "John Doe",
- "type": "to"
}, - "templateVariables": { }
}
], - "priority": "normal",
- "batchSize": 100
}{- "success": true,
- "operation": "email_sent",
- "count": 1,
- "notificationIds": [
- "123e4567-e89b-12d3-a456-426614174000"
], - "error": "SMTP server unavailable",
- "timestamp": "2025-07-30T10:00:00Z",
- "details": {
- "provider": "sendgrid",
- "batchId": "batch_123"
}
}Send a single webhook notification
| tenantId required | string Tenant ID |
| url required | string Webhook endpoint URL |
| eventType required | string Enum: "payment.succeeded" "payment.failed" "invoice.paid" "invoice.payment_failed" "subscription.created" "subscription.updated" "subscription.canceled" "customer.created" "customer.updated" "entitlement.granted" "entitlement.revoked" "order.completed" "order.refunded" Webhook event type |
| payload required | object Webhook payload data |
| httpMethod | string Default: "POST" Enum: "POST" "PUT" "PATCH" HTTP method to use |
Array of objects (WebhookHeaderDto) Additional HTTP headers | |
| secret | string Webhook signature secret for HMAC validation |
| timeout | number [ 1000 .. 120000 ] Default: 30000 Request timeout in milliseconds |
| maxRetries | number [ 0 .. 10 ] Default: 3 Maximum number of retry attempts |
| sendImmediate | boolean Default: false Send immediately (bypass queue) |
| metadata | object Additional metadata |
{- "tenantId": "123e4567-e89b-12d3-a456-426614174000",
- "eventType": "payment.succeeded",
- "payload": {
- "id": "payment_123",
- "amount": 2000,
- "currency": "usd",
- "status": "succeeded",
- "customer": {
- "id": "cus_123",
- "email": "user@example.com"
}
}, - "httpMethod": "POST",
- "headers": [
- {
- "name": "Authorization",
- "value": "Bearer token123"
}
], - "secret": "whsec_1234567890abcdef",
- "timeout": 30000,
- "maxRetries": 3,
- "sendImmediate": false,
- "metadata": {
- "source": "billing_system",
- "version": "1.0"
}
}{- "success": true,
- "operation": "email_sent",
- "count": 1,
- "notificationIds": [
- "123e4567-e89b-12d3-a456-426614174000"
], - "error": "SMTP server unavailable",
- "timestamp": "2025-07-30T10:00:00Z",
- "details": {
- "provider": "sendgrid",
- "batchId": "batch_123"
}
}Send multiple webhook notifications in batch
| tenantId required | string Tenant ID |
| eventType required | string Enum: "payment.succeeded" "payment.failed" "invoice.paid" "invoice.payment_failed" "subscription.created" "subscription.updated" "subscription.canceled" "customer.created" "customer.updated" "entitlement.granted" "entitlement.revoked" "order.completed" "order.refunded" Webhook event type |
required | Array of objects List of webhook deliveries |
| batchSize | number [ 1 .. 100 ] Default: 50 Batch size for processing |
{- "tenantId": "123e4567-e89b-12d3-a456-426614174000",
- "eventType": "subscription.updated",
- "batchSize": 50
}{- "success": true,
- "operation": "email_sent",
- "count": 1,
- "notificationIds": [
- "123e4567-e89b-12d3-a456-426614174000"
], - "error": "SMTP server unavailable",
- "timestamp": "2025-07-30T10:00:00Z",
- "details": {
- "provider": "sendgrid",
- "batchId": "batch_123"
}
}Get detailed information about a specific email notification
| notificationId required | string Email notification ID |
{- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenantId": "123e4567-e89b-12d3-a456-426614174000",
- "templateType": "invoice_paid",
- "recipientEmail": "user@example.com",
- "recipientName": "John Doe",
- "subject": "Your invoice has been paid successfully",
- "status": "sent",
- "priority": "normal",
- "errorMessage": "SMTP connection timeout",
- "retryCount": 1,
- "createdAt": "2025-07-30T10:00:00Z",
- "sentAt": "2025-07-30T10:05:00Z",
- "deliveredAt": "2025-07-30T10:06:00Z",
- "openedAt": "2025-07-30T11:00:00Z",
- "clickedAt": "2025-07-30T11:30:00Z",
- "metadata": {
- "campaignId": "campaign_123",
- "templateVersion": "1.2"
}
}Get detailed information about a specific webhook notification
| notificationId required | string Webhook notification ID |
{- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenantId": "123e4567-e89b-12d3-a456-426614174000",
- "eventType": "payment.succeeded",
- "status": "sent",
- "responseStatus": 200,
- "responseBody": "{\"status\": \"received\"}",
- "errorMessage": "Connection timeout after 30 seconds",
- "retryCount": 0,
- "duration": 1250,
- "createdAt": "2025-07-30T10:00:00Z",
- "sentAt": "2025-07-30T10:00:05Z",
- "nextRetryAt": "2025-07-30T10:01:00Z",
- "metadata": {
- "source": "event_processor",
- "attemptId": "attempt_123"
}
}Retry a failed webhook notification
| notificationId required | string Webhook notification ID |
{- "success": true,
- "operation": "email_sent",
- "count": 1,
- "notificationIds": [
- "123e4567-e89b-12d3-a456-426614174000"
], - "error": "SMTP server unavailable",
- "timestamp": "2025-07-30T10:00:00Z",
- "details": {
- "provider": "sendgrid",
- "batchId": "batch_123"
}
}Get comprehensive notification statistics for the tenant
{- "totalSent": 1500,
- "totalFailed": 25,
- "totalPending": 10,
- "emailStats": {
- "delivered": 1200,
- "opened": 800,
- "clicked": 150,
- "bounced": 15,
- "openRate": 66.7,
- "clickRate": 12.5
}, - "webhookStats": {
- "successful": 280,
- "failed": 8,
- "averageResponseTime": 450,
- "successRate": 97.2
}, - "byTemplateType": [
- {
- "templateType": "invoice_paid",
- "count": 500,
- "successRate": 98.5
}, - {
- "templateType": "payment_failed",
- "count": 50,
- "successRate": 95
}
], - "last24Hours": {
- "sent": 150,
- "failed": 3,
- "hourlyBreakdown": [
- {
- "hour": "2025-07-30T09:00:00Z",
- "count": 12
}, - {
- "hour": "2025-07-30T10:00:00Z",
- "count": 18
}
]
}
}Preview an email template with sample or custom data
| templateType required | string Enum: "invoice_paid" "invoice_payment_failed" "invoice_finalized" "subscription_created" "subscription_updated" "subscription_canceled" "subscription_reactivated" "trial_will_end" "payment_succeeded" "payment_failed" "payment_action_required" "customer_created" Email template type |
{- "subject": "string",
- "html": "string",
- "text": "string"
}Process pending email and webhook notifications
| type | string Enum: "email" "webhook" "all" Notification type to process |
| limit | number Maximum number of notifications to process |
{- "email": {
- "processed": 0,
- "successful": 0,
- "failed": 0
}, - "webhook": {
- "processed": 0,
- "successful": 0,
- "failed": 0
}
}[- {
- "id": "string",
- "provider": "STRIPE",
- "mode": "SANDBOX",
- "public_key": "string",
- "secret_key": "string",
- "webhook_secret": "string",
- "extra": { },
- "active": true,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]| provider required | string Enum: "STRIPE" "PAYPAL" "FUSIONPAY" Payment provider type |
| mode required | string Enum: "SANDBOX" "LIVE" Environment mode |
| public_key | object Public key for the provider |
| secret_key | object Secret key for the provider |
| webhook_secret | object Webhook secret for the provider |
| extra | object Additional configuration data |
| active | boolean Default: true Whether the configuration is active |
{- "provider": "STRIPE",
- "mode": "SANDBOX",
- "public_key": "pk_test_...",
- "secret_key": "sk_test_...",
- "webhook_secret": "whsec_...",
- "active": true
}{- "id": "string",
- "provider": "STRIPE",
- "mode": "SANDBOX",
- "public_key": "string",
- "secret_key": "string",
- "webhook_secret": "string",
- "extra": { },
- "active": true,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}| id required | string |
{- "id": "string",
- "provider": "STRIPE",
- "mode": "SANDBOX",
- "public_key": "string",
- "secret_key": "string",
- "webhook_secret": "string",
- "extra": { },
- "active": true,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}| id required | string |
| provider | string Enum: "STRIPE" "PAYPAL" "FUSIONPAY" Payment provider type |
| mode | string Enum: "SANDBOX" "LIVE" Environment mode |
| public_key | object Public key for the provider |
| secret_key | object Secret key for the provider |
| webhook_secret | object Webhook secret for the provider |
| extra | object Additional configuration data |
| active | boolean Default: true Whether the configuration is active |
{- "provider": "STRIPE",
- "mode": "SANDBOX",
- "public_key": "pk_test_...",
- "secret_key": "sk_test_...",
- "webhook_secret": "whsec_...",
- "active": true
}{- "id": "string",
- "provider": "STRIPE",
- "mode": "SANDBOX",
- "public_key": "string",
- "secret_key": "string",
- "webhook_secret": "string",
- "extra": { },
- "active": true,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}| page | number Default: 1 Example: page=1 Page number |
| limit | number Default: 20 Example: limit=20 Items per page |
| search | string Example: search=Professional Search term |
[- {
- "id": "string",
- "display_name": "string",
- "description": "string",
- "tier": "string",
- "features": { },
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "prices": [
- "string"
], - "_count": { }
}
]| display_name required | string Display name of the plan |
| description | object Description of the plan |
| tier required | string Plan tier |
| features | Array of strings Plan features |
{- "display_name": "Professional Plan",
- "description": "Advanced features for growing teams",
- "tier": "PRO",
- "features": [
- "hr",
- "analytics",
- "crm"
]
}{- "id": "string",
- "display_name": "string",
- "description": "string",
- "tier": "string",
- "features": { },
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "prices": [
- "string"
], - "_count": { }
}{- "id": "string",
- "display_name": "string",
- "description": "string",
- "tier": "string",
- "features": { },
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "prices": [
- "string"
], - "_count": { }
}| id required | string |
| display_name | string Display name of the plan |
| description | object Description of the plan |
| tier | string Plan tier |
| features | Array of strings Plan features |
{- "display_name": "Professional Plan",
- "description": "Advanced features for growing teams",
- "tier": "PRO",
- "features": [
- "hr",
- "analytics",
- "crm"
]
}{- "id": "string",
- "display_name": "string",
- "description": "string",
- "tier": "string",
- "features": { },
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "prices": [
- "string"
], - "_count": { }
}| page | number Default: 1 Example: page=1 Page number |
| limit | number Default: 20 Example: limit=20 Items per page |
| plan_id | string Example: plan_id=123e4567-e89b-12d3-a456-426614174000 Plan ID filter |
[- {
- "id": "string",
- "plan_id": "string",
- "currency": "string",
- "unit_amount": 0,
- "interval": "ONE_TIME",
- "seat_included": 0,
- "external_id": "string",
- "active": true,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "plan": { }
}
]| plan_id required | string Plan ID this price belongs to |
| currency required | string Currency code |
| unit_amount required | number Unit amount as decimal (e.g., 29.99) |
| interval required | string Enum: "ONE_TIME" "MONTH" "YEAR" Billing interval |
| seat_included | number Default: 1 Number of seats included in this price |
| external_id | string External provider ID |
| active | boolean Default: true Whether the price is active |
{- "plan_id": "123e4567-e89b-12d3-a456-426614174000",
- "currency": "usd",
- "unit_amount": 29.99,
- "interval": "MONTH",
- "seat_included": 5,
- "external_id": "price_1234567890",
- "active": true
}{- "id": "string",
- "plan_id": "string",
- "currency": "string",
- "unit_amount": 0,
- "interval": "ONE_TIME",
- "seat_included": 0,
- "external_id": "string",
- "active": true,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "plan": { }
}{- "id": "string",
- "plan_id": "string",
- "currency": "string",
- "unit_amount": 0,
- "interval": "ONE_TIME",
- "seat_included": 0,
- "external_id": "string",
- "active": true,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "plan": { }
}| id required | string |
| plan_id | string Plan ID this price belongs to |
| currency | string Currency code |
| unit_amount | number Unit amount as decimal (e.g., 29.99) |
| interval | string Enum: "ONE_TIME" "MONTH" "YEAR" Billing interval |
| seat_included | number Default: 1 Number of seats included in this price |
| external_id | string External provider ID |
| active | boolean Default: true Whether the price is active |
{- "plan_id": "123e4567-e89b-12d3-a456-426614174000",
- "currency": "usd",
- "unit_amount": 29.99,
- "interval": "MONTH",
- "seat_included": 5,
- "external_id": "price_1234567890",
- "active": true
}{- "id": "string",
- "plan_id": "string",
- "currency": "string",
- "unit_amount": 0,
- "interval": "ONE_TIME",
- "seat_included": 0,
- "external_id": "string",
- "active": true,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "plan": { }
}| page | number Default: 1 Example: page=1 Page number |
| limit | number Default: 20 Example: limit=20 Items per page |
| status | string Enum: "PENDING" "REQUIRES_ACTION" "SUCCEEDED" "CANCELED" "REFUNDED" Order status filter |
| provider | string Enum: "STRIPE" "PAYPAL" "FUSIONPAY" Payment provider filter |
| tenant_id | string Example: tenant_id=123e4567-e89b-12d3-a456-426614174000 Tenant ID filter |
[- {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "payer_user_id": "123e4567-e89b-12d3-a456-426614174002",
- "provider": "STRIPE",
- "provider_intent_id": "pi_1234567890abcdef",
- "status": "SUCCEEDED",
- "amount": 2999,
- "currency": "usd",
- "description": "Pro plan subscription",
- "metadata": {
- "plan": "pro",
- "seats": 5
}, - "created_at": "2024-01-01T00:00:00.000Z",
- "updated_at": "2024-01-01T00:00:00.000Z"
}
]{- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "payer_user_id": "123e4567-e89b-12d3-a456-426614174002",
- "provider": "STRIPE",
- "provider_intent_id": "pi_1234567890abcdef",
- "status": "SUCCEEDED",
- "amount": 2999,
- "currency": "usd",
- "description": "Pro plan subscription",
- "metadata": {
- "plan": "pro",
- "seats": 5
}, - "created_at": "2024-01-01T00:00:00.000Z",
- "updated_at": "2024-01-01T00:00:00.000Z"
}| page | number Default: 1 Example: page=1 Page number |
| limit | number Default: 20 Example: limit=20 Items per page |
| status | string Enum: "PENDING" "ACTIVE" "PAST_DUE" "CANCELED" Subscription status filter |
| tenant_id | string Example: tenant_id=123e4567-e89b-12d3-a456-426614174000 Tenant ID filter |
[- {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "payer_user_id": "123e4567-e89b-12d3-a456-426614174002",
- "plan_id": "123e4567-e89b-12d3-a456-426614174003",
- "plan": {
- "id": "string",
- "display_name": "string",
- "description": "string",
- "tier": "string",
- "features": { },
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "prices": [
- "string"
], - "_count": { }
}, - "provider": "STRIPE",
- "provider_sub_id": "sub_1234567890abcdef",
- "status": "ACTIVE",
- "seatCount": 5,
- "current_period_start": "2024-01-01T00:00:00.000Z",
- "current_period_end": "2024-02-01T00:00:00.000Z",
- "cancel_at_period_end": false,
- "created_at": "2024-01-01T00:00:00.000Z",
- "updated_at": "2024-01-01T00:00:00.000Z"
}
]| id required | string |
{- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "payer_user_id": "123e4567-e89b-12d3-a456-426614174002",
- "plan_id": "123e4567-e89b-12d3-a456-426614174003",
- "plan": {
- "id": "string",
- "display_name": "string",
- "description": "string",
- "tier": "string",
- "features": { },
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "prices": [
- "string"
], - "_count": { }
}, - "provider": "STRIPE",
- "provider_sub_id": "sub_1234567890abcdef",
- "status": "ACTIVE",
- "seatCount": 5,
- "current_period_start": "2024-01-01T00:00:00.000Z",
- "current_period_end": "2024-02-01T00:00:00.000Z",
- "cancel_at_period_end": false,
- "created_at": "2024-01-01T00:00:00.000Z",
- "updated_at": "2024-01-01T00:00:00.000Z"
}| page | number Default: 1 Example: page=1 Page number |
| limit | number Default: 20 Example: limit=20 Items per page |
| status | string Enum: "DRAFT" "OPEN" "PAID" "VOID" Invoice status filter |
| tenant_id | string Example: tenant_id=123e4567-e89b-12d3-a456-426614174000 Tenant ID filter |
[- {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "subscription_id": "123e4567-e89b-12d3-a456-426614174002",
- "subscription": {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "payer_user_id": "123e4567-e89b-12d3-a456-426614174002",
- "plan_id": "123e4567-e89b-12d3-a456-426614174003",
- "plan": {
- "id": "string",
- "display_name": "string",
- "description": "string",
- "tier": "string",
- "features": { },
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "prices": [
- "string"
], - "_count": { }
}, - "provider": "STRIPE",
- "provider_sub_id": "sub_1234567890abcdef",
- "status": "ACTIVE",
- "seatCount": 5,
- "current_period_start": "2024-01-01T00:00:00.000Z",
- "current_period_end": "2024-02-01T00:00:00.000Z",
- "cancel_at_period_end": false,
- "created_at": "2024-01-01T00:00:00.000Z",
- "updated_at": "2024-01-01T00:00:00.000Z"
}, - "provider": "STRIPE",
- "provider_invoice_id": "in_1234567890abcdef",
- "total": 2999,
- "status": "PAID",
- "due_date": "2024-01-31T23:59:59.000Z",
- "created_at": "2024-01-01T00:00:00.000Z",
- "updated_at": "2024-01-01T00:00:00.000Z"
}
]{- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "subscription_id": "123e4567-e89b-12d3-a456-426614174002",
- "subscription": {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "payer_user_id": "123e4567-e89b-12d3-a456-426614174002",
- "plan_id": "123e4567-e89b-12d3-a456-426614174003",
- "plan": {
- "id": "string",
- "display_name": "string",
- "description": "string",
- "tier": "string",
- "features": { },
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "prices": [
- "string"
], - "_count": { }
}, - "provider": "STRIPE",
- "provider_sub_id": "sub_1234567890abcdef",
- "status": "ACTIVE",
- "seatCount": 5,
- "current_period_start": "2024-01-01T00:00:00.000Z",
- "current_period_end": "2024-02-01T00:00:00.000Z",
- "cancel_at_period_end": false,
- "created_at": "2024-01-01T00:00:00.000Z",
- "updated_at": "2024-01-01T00:00:00.000Z"
}, - "provider": "STRIPE",
- "provider_invoice_id": "in_1234567890abcdef",
- "total": 2999,
- "status": "PAID",
- "due_date": "2024-01-31T23:59:59.000Z",
- "created_at": "2024-01-01T00:00:00.000Z",
- "updated_at": "2024-01-01T00:00:00.000Z"
}| page | number Default: 1 Example: page=1 Page number |
| limit | number Default: 20 Example: limit=20 Items per page |
| tenant_id | string Example: tenant_id=123e4567-e89b-12d3-a456-426614174000 Tenant ID filter |
| feature_key | string Example: feature_key=hr Feature key filter |
[- {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "feature_key": "analytics",
- "valid_from": "2024-01-01T00:00:00.000Z",
- "valid_to": "2024-12-31T23:59:59.000Z",
- "seat_limit": 10,
- "usage_count": 5
}
]| id required | string |
{- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "feature_key": "analytics",
- "valid_from": "2024-01-01T00:00:00.000Z",
- "valid_to": "2024-12-31T23:59:59.000Z",
- "seat_limit": 10,
- "usage_count": 5
}| page | number Default: 1 Example: page=1 Page number |
| limit | number Default: 20 Example: limit=20 Items per page |
| type | string Example: type=invoice.payment_succeeded Event type filter |
| processed | boolean Example: processed=true Processed status filter |
| tenant_id | string Example: tenant_id=123e4567-e89b-12d3-a456-426614174000 Tenant ID filter |
[- {
- "id": "evt_1234567890abcdef",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "type": "customer.subscription.created",
- "api_version": "2020-08-27",
- "payload": {
- "object": "subscription",
- "id": "sub_1234567890abcdef",
- "status": "active"
}, - "context": "Authentication context for the event",
- "processed": true,
- "retries": 0,
- "created": 1640995200,
- "processed_at": "2024-01-01T00:00:00.000Z",
- "received_at": "2024-01-01T00:00:00.000Z"
}
]| id required | string |
{- "id": "evt_1234567890abcdef",
- "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
- "type": "customer.subscription.created",
- "api_version": "2020-08-27",
- "payload": {
- "object": "subscription",
- "id": "sub_1234567890abcdef",
- "status": "active"
}, - "context": "Authentication context for the event",
- "processed": true,
- "retries": 0,
- "created": 1640995200,
- "processed_at": "2024-01-01T00:00:00.000Z",
- "received_at": "2024-01-01T00:00:00.000Z"
}