Class SessionCreateParams.SubscriptionData.Builder

java.lang.Object
com.stripe.param.checkout.SessionCreateParams.SubscriptionData.Builder
Enclosing class:
SessionCreateParams.SubscriptionData

public static class SessionCreateParams.SubscriptionData.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • build

      Finalize and obtain parameter instance from this builder.
    • setApplicationFeePercent

      public SessionCreateParams.SubscriptionData.Builder setApplicationFeePercent(BigDecimal applicationFeePercent)
      A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. To use an application fee percent, the request must be made on behalf of another account, using the Stripe-Account header or an OAuth key. For more information, see the application fees documentation.
    • setCoupon

      The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription.
    • addDefaultTaxRate

      public SessionCreateParams.SubscriptionData.Builder addDefaultTaxRate(String element)
      Add an element to `defaultTaxRates` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. See SessionCreateParams.SubscriptionData.defaultTaxRates for the field documentation.
    • addAllDefaultTaxRate

      public SessionCreateParams.SubscriptionData.Builder addAllDefaultTaxRate(List<String> elements)
      Add all elements to `defaultTaxRates` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. See SessionCreateParams.SubscriptionData.defaultTaxRates for the field documentation.
    • setDescription

      public SessionCreateParams.SubscriptionData.Builder setDescription(String description)
      The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe hosted surfaces.
    • putExtraParam

      public SessionCreateParams.SubscriptionData.Builder putExtraParam(String key, Object value)
      Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. See SessionCreateParams.SubscriptionData.extraParams for the field documentation.
    • putAllExtraParam

      Add all map key/value pairs to `extraParams` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. See SessionCreateParams.SubscriptionData.extraParams for the field documentation.
    • putMetadata

      Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. See SessionCreateParams.SubscriptionData.metadata for the field documentation.
    • putAllMetadata

      Add all map key/value pairs to `metadata` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. See SessionCreateParams.SubscriptionData.metadata for the field documentation.
    • setOnBehalfOf

      public SessionCreateParams.SubscriptionData.Builder setOnBehalfOf(String onBehalfOf)
      The account on behalf of which to charge, for each of the subscription's invoices.
    • setTransferData

      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.
    • setTrialEnd

      public SessionCreateParams.SubscriptionData.Builder setTrialEnd(Long trialEnd)
      Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. Has to be at least 48 hours in the future.
    • setTrialFromPlan

      public SessionCreateParams.SubscriptionData.Builder setTrialFromPlan(Boolean trialFromPlan)
      Indicates if a plan’s trial_period_days should be applied to the subscription. Setting trial_end on subscription_data is preferred. Defaults to false.
    • setTrialPeriodDays

      public SessionCreateParams.SubscriptionData.Builder setTrialPeriodDays(Long trialPeriodDays)
      Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1.