JDBC Driver for Stripe

Build 24.0.8963

SubscriptionItems

Create, update, delete, and query the available subscription items in Stripe.

Table Specific Information

Select

Server-Side Query Support

The 本製品 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 本製品.

  • Id, SubscriptionId and AccountId support the following operator: =.

To query SubscriptionItems table, the Id of the subscription (SubscriptionId) whose items are retrieved is required:

SELECT * FROM SubscriptionItems WHERE SubscriptionId = 'sub_A9WZGVTbvgBJ4t'

In addition to SubscriptionId, provider supports all columns to be used as criteria in the WHERE clause of Select statement, as long as SupportEnhancedSQL is set to True. If SupportEnhancedSQL property is set to False, you still can retrieve a SubscriptionItem by specifying its Id:

SELECT * FROM SubscriptionItems WHERE Id = 'sit_A9WZGVTbvgBJ4t'

Insert

SubscriptionId and PlanId columns are required to create a new subscription item.

INSERT INTO SubscriptionItems (SubscriptionId, PlanId, ProrationDate, Quantity) VALUES ('sub_1OMqdl2eZvKYlo2CIci8bOT8', 'price_1OPjac2eZvKYlo2Cm8XeR5YQ', '2014-12-12', 10)

Update

To update a subscription item, specify the Id column.

UPDATE SubscriptionItems SET PlanId = 'price_1OPjac2eZvKYlo2Cm8XeR5YQ', ProrationDate = '2014-12-12', Quantity = 12 WHERE Id = 'si_PDakKMQHunYX0k'

Delete

To delete a subscription item specify the Id of the item.

DELETE FROM SubscriptionItems WHERE Id = 'sit_A9WZGVTbvgBJ4t'

Columns

Name Type ReadOnly References Description
Id [KEY] String True

The Id of the subscription item.

SubscriptionId String False

Subscriptions.Id

The Id of the subscription.

PlanId String False

Plans.Id

The Id of the plan.

PlanActive Boolean True

Whether the plan can be used for new purchases.

PlanAggregateUsage String True

Specifies a usage aggregation strategy for plans of usage_type=metered.

PlanAmount Integer True

The unit amount in cents to be charged, represented as a whole integer if possible.

PlanAmountDecimal String True

The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.

PlanBillingScheme String True

Describes how to compute the price per period.

PlanCreated Datetime True

Time at which the object was created. Measured in seconds since the Unix epoch.

PlanCurrency String True

Three-letter ISO currency code, in lowercase. Must be a supported currency.

PlanInterval String True

The frequency at which a subscription is billed. One of day, week, month or year.

PlanIntervalCount Integer True

The number of intervals (specified in the interval attribute) between subscription billings.

PlanLivemode Boolean True

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

PlanMetadata String True

Set of key-value pairs that you can attach to an object.

PlanMeter String True

The meter tracking the usage of a metered price.

PlanNickname String True

A brief description of the plan, hidden from customers.

PlanObject String True

String representing the object's type. Objects of the same type share the same value.

PlanProduct String True

The product whose pricing this plan determines.

PlanTiersMode String True

Defines if the tiering price should be graduated or volume based.

PlanTransformUsage String True

Apply a transformation to the reported usage or set quantity before computing the amount billed.

PlanTrialPeriodDays Integer True

Default number of trial days when subscribing a customer to this plan using trial_from_plan=true.

PlanUsageType String True

Configures how the quantity per period should be determined.

Quantity Double False

The quantity of the plan to which the customer should be subscribed.

Created Datetime True

Creation date.

MetadataAggregate String False

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

PriceId String False

Prices.Id

Unique identifier for the price.

PriceActive Boolean True

Whether the price can be used for new purchases.

PriceBillingScheme String True

Describes how to compute the price per period.

PriceCreated Datetime True

The creation date.

PriceCurrency String True

Currency in which subscription will be charged.

PriceCustomUnitAmount String True

Price custom unit amount.

PriceLivemode Boolean True

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

PriceLookupKey String True

A lookup key used to retrieve prices dynamically from a static string.

PriceMetadata String True

Set of key-value pairs that you can attach to an object.

PriceNickname String True

A brief description of the plan, hidden from customers.

PriceObject String True

String representing the object's type. Objects of the same type share the same value.

PriceProduct String True

The Id of the product this price is associated with.

PriceRecurringAggregateUsage String True

Price recurring aggregate usage.

PriceRecurringInterval String True

Price recurring interval.

PriceRecurringIntervalCount Integer True

Price recurring interval count.

PriceRecurringMeter String True

Price recurring meter.

PriceRecurringTrialPeriodDays Integer True

Price recurring trial period days.

PriceRecurringUsageType String True

Price recurring usage type.

PriceTaxBehaviour String True

Price tax behaviour.

PriceTiersMode String True

Price tiers mode.

PriceTransformQuantity String True

Price transform quantity.

PriceType String True

Price type.

PriceUnitAmount Integer True

Price unit amount.

PriceUnitAmountDecimal String True

Price unit amount decimal.

Object String True

String representing the object's type. Objects of the same type share the same value.

BillingThresholdsUsageGte Integer False

Usage threshold that triggers the subscription to create an invoice

TaxRatesAggregate String False

The tax rates which apply to this subscription_item. When set, the default_tax_rates on the subscription do not apply to this subscription_item.

Discounts String False

The coupons to redeem into discounts for the subscription item.

Pseudo-Columns

SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。

Name Type Description
IsProrate Boolean

Flag indicating whether to prorate switching plans during a billing cycle.

ProrationDate Date

If set, the proration will be calculated as though the subscription was updated at the given time.

PaymentBehavior String

Payment Behavior. Valid for INSERT, DELETE and UPDATE.

使用できる値は次のとおりです。allow_incomplete, default_incomplete, error_if_incomplete, pending_if_incomplete

ProrationBehavior String

Determines how to handle prorations when the billing cycle changes. Valid for INSERT, DELETE and UPDATE.

使用できる値は次のとおりです。always_invoice, create_prorations, none

AccountId String

The Id of the connected account to get subscription items for

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.8963