CustomerSubscriptions
Returns the subscriptions associated with a customer, including plan, billing, and tax details.
View-Specific Information
SELECT
The add-in uses the Stripe API to filter the results by the following columns and operators while the rest of the filter is executed client-side within the add-in.
| Column | Supported Operators |
| AccountId | = |
You can select from CustomerSubscriptions with the following queries:
SELECT * FROM CustomerSubscriptions WHERE AccountId = 'acct_1Gqj58Ly0qyl5A'
Columns
| Name | Type | References | Description |
| Id [KEY] | String | The Id of the Subscription object. | |
| CustomerId | String |
Customers.Id | The Id of the customer. |
| PlanId | String |
Plans.Id | The Id of the plan. |
| ApplicationFeePercent | Decimal | A positive decimal that represents the fee percentage of the subscription invoice amount that is transferred to the application of the Stripe account owner each billing period. | |
| AutomaticTaxEnabled | Boolean | Indicates whether automatic tax is enabled for this subscription. | |
| BillingCycleAnchor | Datetime | Determines the date of the first full invoice and, for plans with month or year intervals, the day of the month for subsequent invoices. | |
| BillingThreshold | String | The thresholds at which an invoice is sent and the subscription is advanced to a new billing period. | |
| CanceledAt | Datetime | The date of cancellation if the subscription has been canceled. If the subscription was canceled with cancel_at_period_end, canceled_at still reflects the date of the initial cancellation request, not the end of the subscription period when the subscription is automatically moved to a canceled state. | |
| Currency | String | The three-letter ISO currency code, in lowercase. Must be a supported currency. | |
| Description | String | The description of the subscription. | |
| DaysUntilDue | Integer | The number of days a customer has to pay invoices generated by this subscription. This value is null for subscriptions where collection_method is charge_automatically. | |
| DefaultSource | String | The Id of the default payment source for the subscription. | |
| DefaultTaxRates | String | The tax rates that apply to any subscription item that does not have tax_rates set. Invoices created have their default_tax_rates populated from the subscription. | |
| EndedAt | Datetime | The date the subscription ended if the subscription has ended, either because it was canceled or because the customer was switched to a new plan. | |
| Quantity | Double | The quantity of the plan to which the customer is subscribed. For example, if your plan is $10/user/month and your customer has 5 users, you can pass 5 as the quantity to have the customer charged $50 (5 x $10) monthly. | |
| Schedule | String | The schedule attached to the subscription. | |
| TestClock | String | The Id of the test clock this subscription belongs to. | |
| TransferData | String | The account, if any, that the subscription's payments are attributed to for tax reporting, and where funds from each payment are transferred to for each of the subscription's invoices. | |
| MetadataAggregate | String | The set of key/value pairs that you can attach to the subscription object. | |
| LiveMode | Boolean | Indicates whether the object exists in live mode. Returns true if the object exists in live mode and false if the object exists in test mode. | |
| LatestInvoice | String | The Id of the latest invoice generated for this subscription. | |
| NextPendingInvoiceItemInvoice | Datetime | The approximate timestamp on which any pending invoice items are billed according to the schedule provided at pending_invoice_item_interval. | |
| PauseCollection | String | If specified, payment collection for this subscription is paused. | |
| PaymentSettings | String | The payment settings passed on to invoices created by the subscription. | |
| PendingSetupIntent | String | The SetupIntent used to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. | |
| PendingUpdate | String | The pending updates that are applied to the subscription once the latest_invoice has been paid, if specified. |
Pseudocolumns
Pseudocolumn fields are used in the WHERE clause of SELECT statements and offer more granular control over the data returned from the data source.
| Name | Type | Description | |
| AccountId | String | The Id of the connected account to get customer subscriptions for. |