Creates a subscription for an existing customer or creates a new customer as part of the action.
API key authentication
Subscription identifier combining customer and service details. Sample values: 'TechCorp - LLM API Access', 'Analytics Co - Data Platform Enterprise', 'StartupXYZ - Image Generation Service', 'Enterprise Inc - ML Training Platform'
Unique identifier for a plan
Subscription activation timestamp in ISO 8601 format. Sample values: '2024-01-15T10:30:00Z', '2024-02-01T00:00:00Z'
Enable automatic charging of invoices using stored payment methods. When true, invoices will be automatically paid using off-session payment. Defaults to false.
When true, forces tax rate to 0%. Use for customers with verified tax-exempt status.
Fields to create a new customer and consumer. Will use an existing consumer if one exists with the same email address. Required if customerId is not provided. Address with complete tax information (country, state, zipCode) is required for tax calculation when using Paygentic Tax.
Unique identifier for a customer
Subscription expiration timestamp in ISO 8601 format. Sample values: '2024-12-31T23:59:59Z', '2025-01-15T10:30:00Z'. Omit for indefinite subscriptions.
@deprecated Use minimumAccountBalance instead. Required initial wallet deposit amount. Sample values: '200.00' requires $200 prepaid balance for metered LLM usage, '1000.00' requires $1000 prepaid credits for data processing services, '50.00' requires $50 minimum for API call consumption
Minimum wallet balance requirement in decimal dollars (e.g., '100.00'). The system will calculate the difference between this minimum and the customer's current balance, charging only what's needed to reach the minimum. If the customer already has sufficient balance, no charge is made. Sample values: '200.00' requires minimum $200 balance for metered LLM usage, '1000.00' requires minimum $1000 balance for data processing services, '50.00' requires minimum $50 balance for API call consumption
Optional redirect URLs after payment completion or failure. If not provided, uses default platform behavior.
Test clock identifier for simulating time-based billing scenarios. Sample values: 'tc_abc123xyz', 'tc_789def456'. Restricted to non-production environments (local, dev, sandbox). Must belong to the same merchant organization.
Subscription already exists
subscription Whether automatic charging is enabled for this subscription. When true, invoices will be automatically paid using stored payment methods.
Projected tax percentage rate. Sample values: 8.875 indicates 8.875% tax rate, 10.0 indicates 10% tax rate, 0 indicates no tax applied
When true, tax rate is forced to 0%.
Payment session details when upfront payment is required
@deprecated Use minimumAccountBalance instead. Minimum required wallet balance in atomic units. Sample values: '200000000000' equals $200.00 minimum, '1000000000000' equals $1000.00 minimum
Minimum wallet balance requirement in nanodollars. The system calculates the difference between this minimum and the customer's current balance, charging only what's needed to reach the minimum. Sample values: '200000000000' equals $200.00 minimum, '1000000000000' equals $1000.00 minimum
pending_payment, active, terminated ID of who terminated the subscription (customer ID or merchant ID)
Reason for termination
Test clock ID if this subscription is attached to a test clock. Only present in non-production environments.
Optional (virtual) wallet ID for the subscription