public class SubscriptionCreateParams extends ApiRequestParams
Modifier and Type | Class and Description |
---|---|
static class |
SubscriptionCreateParams.BillingThresholds |
static class |
SubscriptionCreateParams.Builder |
static class |
SubscriptionCreateParams.CollectionMethod
Add all map key/value pairs to `extraParams` map.
|
static class |
SubscriptionCreateParams.InvoiceCustomerBalanceSettings
Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached.
|
static class |
SubscriptionCreateParams.Item
Add all map key/value pairs to `extraParams` map.
|
static class |
SubscriptionCreateParams.PaymentBehavior |
static class |
SubscriptionCreateParams.PendingInvoiceItemInterval
Usage threshold that triggers the subscription to advance to a new billing period.
|
static class |
SubscriptionCreateParams.TransferData |
static class |
SubscriptionCreateParams.TrialEnd |
ApiRequestParams.EnumParam
EXTRA_PARAMS_KEY
Modifier and Type | Method and Description |
---|---|
static SubscriptionCreateParams.Builder |
builder() |
java.math.BigDecimal |
getApplicationFeePercent()
A non-negative decimal between 0 and 100, with at most two decimal places.
|
java.lang.Long |
getBackdateStartDate()
For new subscriptions, a past timestamp to backdate the subscription's start date to.
|
java.lang.Long |
getBillingCycleAnchor()
A future timestamp to anchor the subscription's [billing
cycle](https://stripe.com/docs/subscriptions/billing-cycle).
|
java.lang.Object |
getBillingThresholds()
Define thresholds at which an invoice will be sent, and the subscription advanced to a new
billing period.
|
java.lang.Long |
getCancelAt()
A timestamp at which the subscription should cancel.
|
java.lang.Boolean |
getCancelAtPeriodEnd()
Boolean indicating whether this subscription should cancel at the end of the current period.
|
SubscriptionCreateParams.CollectionMethod |
getCollectionMethod()
Either `charge_automatically`, or `send_invoice`.
|
java.lang.String |
getCoupon()
The code of the coupon to apply to this subscription.
|
java.lang.String |
getCustomer()
The identifier of the customer to subscribe.
|
java.lang.Long |
getDaysUntilDue()
Number of days a customer has to pay invoices generated by this subscription.
|
java.lang.String |
getDefaultPaymentMethod()
ID of the default payment method for the subscription.
|
java.lang.String |
getDefaultSource()
ID of the default payment source for the subscription.
|
java.lang.Object |
getDefaultTaxRates()
The tax rates that will apply to any subscription item that does not have `tax_rates` set.
|
java.util.List<java.lang.String> |
getExpand()
Specifies which fields in the response should be expanded.
|
java.util.Map<java.lang.String,java.lang.Object> |
getExtraParams()
Map of extra parameters for custom features not available in this client library.
|
SubscriptionCreateParams.InvoiceCustomerBalanceSettings |
getInvoiceCustomerBalanceSettings()
Controls whether a customer balance applied to an invoice should be consumed and not credited
or debited back to the customer if voided by this subscription.
|
java.util.List<SubscriptionCreateParams.Item> |
getItems()
List of subscription items, each with an attached plan.
|
java.util.Map<java.lang.String,java.lang.String> |
getMetadata()
A set of key-value pairs that you can attach to a `Subscription` object.
|
java.lang.Boolean |
getOffSession()
Indicates if a customer is on or off-session while an invoice payment is attempted.
|
SubscriptionCreateParams.PaymentBehavior |
getPaymentBehavior()
Use `allow_incomplete` to create subscriptions with `status=incomplete` if its first invoice
cannot be paid.
|
java.lang.Object |
getPendingInvoiceItemInterval()
Specifies an interval for how often to bill for any pending invoice items.
|
java.lang.Boolean |
getProrate()
Boolean (defaults to `true`) telling us whether to [credit for unused
time](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle
changes (e.g.
|
java.lang.Object |
getTaxPercent()
A non-negative decimal (with at most four decimal places) between 0 and 100.
|
SubscriptionCreateParams.TransferData |
getTransferData()
If specified, the funds from the subscription's invoices will be transferred to the destination
and the ID of the resulting transfers will be found on the resulting charges.
|
java.lang.Object |
getTrialEnd()
Unix timestamp representing the end of the trial period the customer will get before being
charged for the first time.
|
java.lang.Boolean |
getTrialFromPlan()
Indicates if a plan's `trial_period_days` should be applied to the subscription.
|
java.lang.Long |
getTrialPeriodDays()
Integer representing the number of trial period days before the customer is charged for the
first time.
|
toMap
public static SubscriptionCreateParams.Builder builder()
public java.math.BigDecimal getApplicationFeePercent()
public java.lang.Long getBackdateStartDate()
public java.lang.Long getBillingCycleAnchor()
public java.lang.Object getBillingThresholds()
public java.lang.Long getCancelAt()
public java.lang.Boolean getCancelAtPeriodEnd()
public SubscriptionCreateParams.CollectionMethod getCollectionMethod()
public java.lang.String getCoupon()
public java.lang.String getCustomer()
public java.lang.Long getDaysUntilDue()
public java.lang.String getDefaultPaymentMethod()
public java.lang.String getDefaultSource()
public java.lang.Object getDefaultTaxRates()
public java.util.List<java.lang.String> getExpand()
public java.util.Map<java.lang.String,java.lang.Object> getExtraParams()
@SerializedName
value. Instead, each
key/value pair is serialized as if the key is a root-level field (serialized) name in this
param object. Effectively, this map is flattened to its parent instance.public SubscriptionCreateParams.InvoiceCustomerBalanceSettings getInvoiceCustomerBalanceSettings()
public java.util.List<SubscriptionCreateParams.Item> getItems()
public java.util.Map<java.lang.String,java.lang.String> getMetadata()
public java.lang.Boolean getOffSession()
public SubscriptionCreateParams.PaymentBehavior getPaymentBehavior()
Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.
public java.lang.Object getPendingInvoiceItemInterval()
public java.lang.Boolean getProrate()
public java.lang.Object getTaxPercent()
public SubscriptionCreateParams.TransferData getTransferData()
public java.lang.Object getTrialEnd()
public java.lang.Boolean getTrialFromPlan()
public java.lang.Long getTrialPeriodDays()