Class/Object

org.mdedetrich.stripe.v1.Subscriptions

SubscriptionInput

Related Docs: object SubscriptionInput | package Subscriptions

Permalink

case class SubscriptionInput(applicationFeePercent: Option[BigDecimal], coupon: Option[String], plan: String, source: Option[Source], quantity: Option[Long], metadata: Option[Map[String, String]], taxPercent: Option[BigDecimal], trialEnd: Option[OffsetDateTime]) extends Product with Serializable

applicationFeePercent

A positive decimal (with at most two decimal places) between 1 and 100. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner’s Stripe account. The request must be made with an OAuth key in order to set an application fee percentage. For more information, see the application fees

coupon

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

plan

The identifier of the plan to subscribe the customer to.

source

The source can either be a token, like the ones returned by our Stripe.js, or a dictionary containing a user's credit card details (with the options shown below). You must provide a source if the customer does not already have a valid source attached, and you are subscribing the customer for a plan that is not free. Passing source will create a new source object, make it the customer default source, and delete the old customer default if one exists. If you want to add an additional source to use with subscriptions, instead use the card creation API to add the card and then the customer update API to set it as the default. Whenever you attach a card to a customer, Stripe will automatically validate the card.

quantity

The quantity you'd like to apply to the subscription you're creating. For example, if your plan is $10/user/month, and your customer has 5 users, you could pass 5 as the quantity to have the customer charged $50 (5 x $10) monthly. If you update a subscription but don't change the plan ID (e.g. changing only the trial_end), the subscription will inherit the old subscription's quantity attribute unless you pass a new quantity parameter. If you update a subscription and change the plan ID, the new subscription will not inherit the quantity attribute and will default to 1 unless you pass a quantity parameter.

metadata

A set of key/value pairs that you can attach to a subscription object. It can be useful for storing additional information about the subscription in a structured format.

taxPercent

A positive decimal (with at most two decimal places) between 1 and 100. This represents the percentage of the subscription invoice subtotal that will be calculated and added as tax to the final amount each billing period. For example, a plan which charges $10/month with a taxPercent of 20.0 will charge $12 per invoice.

trialEnd

Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. If set, trialEnd will override the default trial period of the plan the customer is being subscribed to. The special value now can be provided to end the customer's trial immediately.

See also

https://stripe.com/docs/api#create_subscription-source

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SubscriptionInput
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SubscriptionInput(applicationFeePercent: Option[BigDecimal], coupon: Option[String], plan: String, source: Option[Source], quantity: Option[Long], metadata: Option[Map[String, String]], taxPercent: Option[BigDecimal], trialEnd: Option[OffsetDateTime])

    Permalink

    applicationFeePercent

    A positive decimal (with at most two decimal places) between 1 and 100. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner’s Stripe account. The request must be made with an OAuth key in order to set an application fee percentage. For more information, see the application fees

    coupon

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

    plan

    The identifier of the plan to subscribe the customer to.

    source

    The source can either be a token, like the ones returned by our Stripe.js, or a dictionary containing a user's credit card details (with the options shown below). You must provide a source if the customer does not already have a valid source attached, and you are subscribing the customer for a plan that is not free. Passing source will create a new source object, make it the customer default source, and delete the old customer default if one exists. If you want to add an additional source to use with subscriptions, instead use the card creation API to add the card and then the customer update API to set it as the default. Whenever you attach a card to a customer, Stripe will automatically validate the card.

    quantity

    The quantity you'd like to apply to the subscription you're creating. For example, if your plan is $10/user/month, and your customer has 5 users, you could pass 5 as the quantity to have the customer charged $50 (5 x $10) monthly. If you update a subscription but don't change the plan ID (e.g. changing only the trial_end), the subscription will inherit the old subscription's quantity attribute unless you pass a new quantity parameter. If you update a subscription and change the plan ID, the new subscription will not inherit the quantity attribute and will default to 1 unless you pass a quantity parameter.

    metadata

    A set of key/value pairs that you can attach to a subscription object. It can be useful for storing additional information about the subscription in a structured format.

    taxPercent

    A positive decimal (with at most two decimal places) between 1 and 100. This represents the percentage of the subscription invoice subtotal that will be calculated and added as tax to the final amount each billing period. For example, a plan which charges $10/month with a taxPercent of 20.0 will charge $12 per invoice.

    trialEnd

    Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. If set, trialEnd will override the default trial period of the plan the customer is being subscribed to. The special value now can be provided to end the customer's trial immediately.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. val applicationFeePercent: Option[BigDecimal]

    Permalink

    A positive decimal (with at most two decimal places) between 1 and 100.

    A positive decimal (with at most two decimal places) between 1 and 100. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner’s Stripe account. The request must be made with an OAuth key in order to set an application fee percentage. For more information, see the application fees

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. val coupon: Option[String]

    Permalink

    The code of the coupon to apply to this subscription.

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

  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  12. val metadata: Option[Map[String, String]]

    Permalink

    A set of key/value pairs that you can attach to a subscription object.

    A set of key/value pairs that you can attach to a subscription object. It can be useful for storing additional information about the subscription in a structured format.

  13. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  15. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. val plan: String

    Permalink

    The identifier of the plan to subscribe the customer to.

  17. val quantity: Option[Long]

    Permalink

    The quantity you'd like to apply to the subscription you're creating.

    The quantity you'd like to apply to the subscription you're creating. For example, if your plan is $10/user/month, and your customer has 5 users, you could pass 5 as the quantity to have the customer charged $50 (5 x $10) monthly. If you update a subscription but don't change the plan ID (e.g. changing only the trial_end), the subscription will inherit the old subscription's quantity attribute unless you pass a new quantity parameter. If you update a subscription and change the plan ID, the new subscription will not inherit the quantity attribute and will default to 1 unless you pass a quantity parameter.

  18. val source: Option[Source]

    Permalink

    The source can either be a token, like the ones returned by our Stripe.js, or a dictionary containing a user's credit card details (with the options shown below).

    The source can either be a token, like the ones returned by our Stripe.js, or a dictionary containing a user's credit card details (with the options shown below). You must provide a source if the customer does not already have a valid source attached, and you are subscribing the customer for a plan that is not free. Passing source will create a new source object, make it the customer default source, and delete the old customer default if one exists. If you want to add an additional source to use with subscriptions, instead use the card creation API to add the card and then the customer update API to set it as the default. Whenever you attach a card to a customer, Stripe will automatically validate the card.

  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  20. val taxPercent: Option[BigDecimal]

    Permalink

    A positive decimal (with at most two decimal places) between 1 and 100.

    A positive decimal (with at most two decimal places) between 1 and 100. This represents the percentage of the subscription invoice subtotal that will be calculated and added as tax to the final amount each billing period. For example, a plan which charges $10/month with a taxPercent of 20.0 will charge $12 per invoice.

  21. val trialEnd: Option[OffsetDateTime]

    Permalink

    Unix timestamp representing the end of the trial period the customer will get before being charged for the first time.

    Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. If set, trialEnd will override the default trial period of the plan the customer is being subscribed to. The special value now can be provided to end the customer's trial immediately.

  22. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped