Class Session

    • Constructor Detail

      • Session

        public Session()
    • Method Detail

      • getCustomer

        public java.lang.String getCustomer()
        Get ID of expandable customer object.
      • setCustomer

        public void setCustomer​(java.lang.String id)
      • getCustomerObject

        public Customer getCustomerObject()
        Get expanded customer.
      • setCustomerObject

        public void setCustomerObject​(Customer expandableObject)
      • getPaymentIntent

        public java.lang.String getPaymentIntent()
        Get ID of expandable paymentIntent object.
      • setPaymentIntent

        public void setPaymentIntent​(java.lang.String id)
      • getPaymentIntentObject

        public PaymentIntent getPaymentIntentObject()
        Get expanded paymentIntent.
      • setPaymentIntentObject

        public void setPaymentIntentObject​(PaymentIntent expandableObject)
      • getSetupIntent

        public java.lang.String getSetupIntent()
        Get ID of expandable setupIntent object.
      • setSetupIntent

        public void setSetupIntent​(java.lang.String id)
      • getSetupIntentObject

        public SetupIntent getSetupIntentObject()
        Get expanded setupIntent.
      • setSetupIntentObject

        public void setSetupIntentObject​(SetupIntent expandableObject)
      • getSubscription

        public java.lang.String getSubscription()
        Get ID of expandable subscription object.
      • setSubscription

        public void setSubscription​(java.lang.String id)
      • getSubscriptionObject

        public Subscription getSubscriptionObject()
        Get expanded subscription.
      • setSubscriptionObject

        public void setSubscriptionObject​(Subscription expandableObject)
      • getAfterExpiration

        public Session.AfterExpiration getAfterExpiration()
        When set, provides configuration for actions to take if this Checkout Session expires.
      • getAllowPromotionCodes

        public java.lang.Boolean getAllowPromotionCodes()
        Enables user redeemable promotion codes.
      • getAmountSubtotal

        public java.lang.Long getAmountSubtotal()
        Total of all items before discounts or taxes are applied.
      • getAmountTotal

        public java.lang.Long getAmountTotal()
        Total of all items after discounts and taxes are applied.
      • getBillingAddressCollection

        public java.lang.String getBillingAddressCollection()
        Describes whether Checkout should collect the customer's billing address.

        One of auto, or required.

      • getCancelUrl

        public java.lang.String getCancelUrl()
        The URL the customer will be directed to if they decide to cancel payment and return to your website.
      • getClientReferenceId

        public java.lang.String getClientReferenceId()
        A unique string to reference the Checkout Session. This can be a customer ID, a cart ID, or similar, and can be used to reconcile the Session with your internal systems.
      • getConsent

        public Session.Consent getConsent()
        Results of consent_collection for this session.
      • getConsentCollection

        public Session.ConsentCollection getConsentCollection()
        When set, provides configuration for the Checkout Session to gather active consent from customers.
      • getCustomerDetails

        public Session.CustomerDetails getCustomerDetails()
        The customer details including the customer's tax exempt status and the customer's tax IDs. Only present on Sessions in payment or subscription mode.
      • getCustomerEmail

        public java.lang.String getCustomerEmail()
        If provided, this value will be used when the Customer object is created. If not provided, customers will be asked to enter their email address. Use this parameter to prefill customer data if you already have an email on file. To access information about the customer once the payment flow is complete, use the customer attribute.
      • getExpiresAt

        public java.lang.Long getExpiresAt()
        The timestamp at which the Checkout Session will expire.
      • getLineItems

        public LineItemCollection getLineItems()
        The line items purchased by the customer.
      • getLivemode

        public java.lang.Boolean getLivemode()
        Has the value true if the object exists in live mode or the value false if the object exists in test mode.
      • getLocale

        public java.lang.String getLocale()
        The IETF language tag of the locale Checkout is displayed in. If blank or auto, the browser's locale is used.

        One of auto, bg, cs, da, de, el, en, en-GB, es, es-419, et, fi, fil, fr, fr-CA, hr, hu, id, it, ja, ko, lt, lv, ms, mt, nb, nl, pl, pt, pt-BR, ro, ru, sk, sl, sv, th, tr, vi, zh, zh-HK, or zh-TW.

      • getMetadata

        public java.util.Map<java.lang.String,​java.lang.String> getMetadata()
        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.
      • getMode

        public java.lang.String getMode()
        The mode of the Checkout Session.

        One of payment, setup, or subscription.

      • getObject

        public java.lang.String getObject()
        String representing the object's type. Objects of the same type share the same value.

        Equal to checkout.session.

      • getPaymentMethodOptions

        public Session.PaymentMethodOptions getPaymentMethodOptions()
        Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession.
      • getPaymentMethodTypes

        public java.util.List<java.lang.String> getPaymentMethodTypes()
        A list of the types of payment methods (e.g. card) this Checkout Session is allowed to accept.
      • getPaymentStatus

        public java.lang.String getPaymentStatus()
        The payment status of the Checkout Session, one of paid, unpaid, or no_payment_required. You can use this value to decide when to fulfill your customer's order.
      • getRecoveredFrom

        public java.lang.String getRecoveredFrom()
        The ID of the original expired Checkout Session that triggered the recovery flow.
      • getShipping

        public ShippingDetails getShipping()
        Shipping information for this Checkout Session.
      • getShippingAddressCollection

        public Session.ShippingAddressCollection getShippingAddressCollection()
        When set, provides configuration for Checkout to collect a shipping address from a customer.
      • getSubmitType

        public java.lang.String getSubmitType()
        Describes the type of transaction being performed by Checkout in order to customize relevant text on the page, such as the submit button. submit_type can only be specified on Checkout Sessions in payment mode, but not Checkout Sessions in subscription or setup mode.

        One of auto, book, donate, or pay.

      • getSuccessUrl

        public java.lang.String getSuccessUrl()
        The URL the customer will be directed to after the payment or subscription creation is successful.
      • getTotalDetails

        public Session.TotalDetails getTotalDetails()
        Tax and discount details for the computed total amount.
      • getUrl

        public java.lang.String getUrl()
        The URL to the Checkout Session.
      • setAfterExpiration

        public void setAfterExpiration​(Session.AfterExpiration afterExpiration)
        When set, provides configuration for actions to take if this Checkout Session expires.
      • setAllowPromotionCodes

        public void setAllowPromotionCodes​(java.lang.Boolean allowPromotionCodes)
        Enables user redeemable promotion codes.
      • setAmountSubtotal

        public void setAmountSubtotal​(java.lang.Long amountSubtotal)
        Total of all items before discounts or taxes are applied.
      • setAmountTotal

        public void setAmountTotal​(java.lang.Long amountTotal)
        Total of all items after discounts and taxes are applied.
      • setBillingAddressCollection

        public void setBillingAddressCollection​(java.lang.String billingAddressCollection)
        Describes whether Checkout should collect the customer's billing address.

        One of auto, or required.

      • setCancelUrl

        public void setCancelUrl​(java.lang.String cancelUrl)
        The URL the customer will be directed to if they decide to cancel payment and return to your website.
      • setClientReferenceId

        public void setClientReferenceId​(java.lang.String clientReferenceId)
        A unique string to reference the Checkout Session. This can be a customer ID, a cart ID, or similar, and can be used to reconcile the Session with your internal systems.
      • setConsent

        public void setConsent​(Session.Consent consent)
        Results of consent_collection for this session.
      • setConsentCollection

        public void setConsentCollection​(Session.ConsentCollection consentCollection)
        When set, provides configuration for the Checkout Session to gather active consent from customers.
      • setCustomerDetails

        public void setCustomerDetails​(Session.CustomerDetails customerDetails)
        The customer details including the customer's tax exempt status and the customer's tax IDs. Only present on Sessions in payment or subscription mode.
      • setCustomerEmail

        public void setCustomerEmail​(java.lang.String customerEmail)
        If provided, this value will be used when the Customer object is created. If not provided, customers will be asked to enter their email address. Use this parameter to prefill customer data if you already have an email on file. To access information about the customer once the payment flow is complete, use the customer attribute.
      • setExpiresAt

        public void setExpiresAt​(java.lang.Long expiresAt)
        The timestamp at which the Checkout Session will expire.
      • setId

        public void setId​(java.lang.String id)
        Unique identifier for the object. Used to pass to redirectToCheckout in Stripe.js.
      • setLineItems

        public void setLineItems​(LineItemCollection lineItems)
        The line items purchased by the customer.
      • setLivemode

        public void setLivemode​(java.lang.Boolean livemode)
        Has the value true if the object exists in live mode or the value false if the object exists in test mode.
      • setLocale

        public void setLocale​(java.lang.String locale)
        The IETF language tag of the locale Checkout is displayed in. If blank or auto, the browser's locale is used.

        One of auto, bg, cs, da, de, el, en, en-GB, es, es-419, et, fi, fil, fr, fr-CA, hr, hu, id, it, ja, ko, lt, lv, ms, mt, nb, nl, pl, pt, pt-BR, ro, ru, sk, sl, sv, th, tr, vi, zh, zh-HK, or zh-TW.

      • setMetadata

        public void setMetadata​(java.util.Map<java.lang.String,​java.lang.String> metadata)
        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.
      • setMode

        public void setMode​(java.lang.String mode)
        The mode of the Checkout Session.

        One of payment, setup, or subscription.

      • setObject

        public void setObject​(java.lang.String object)
        String representing the object's type. Objects of the same type share the same value.

        Equal to checkout.session.

      • setPaymentMethodOptions

        public void setPaymentMethodOptions​(Session.PaymentMethodOptions paymentMethodOptions)
        Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession.
      • setPaymentMethodTypes

        public void setPaymentMethodTypes​(java.util.List<java.lang.String> paymentMethodTypes)
        A list of the types of payment methods (e.g. card) this Checkout Session is allowed to accept.
      • setPaymentStatus

        public void setPaymentStatus​(java.lang.String paymentStatus)
        The payment status of the Checkout Session, one of paid, unpaid, or no_payment_required. You can use this value to decide when to fulfill your customer's order.
      • setRecoveredFrom

        public void setRecoveredFrom​(java.lang.String recoveredFrom)
        The ID of the original expired Checkout Session that triggered the recovery flow.
      • setShipping

        public void setShipping​(ShippingDetails shipping)
        Shipping information for this Checkout Session.
      • setShippingAddressCollection

        public void setShippingAddressCollection​(Session.ShippingAddressCollection shippingAddressCollection)
        When set, provides configuration for Checkout to collect a shipping address from a customer.
      • setSubmitType

        public void setSubmitType​(java.lang.String submitType)
        Describes the type of transaction being performed by Checkout in order to customize relevant text on the page, such as the submit button. submit_type can only be specified on Checkout Sessions in payment mode, but not Checkout Sessions in subscription or setup mode.

        One of auto, book, donate, or pay.

      • setSuccessUrl

        public void setSuccessUrl​(java.lang.String successUrl)
        The URL the customer will be directed to after the payment or subscription creation is successful.
      • setTotalDetails

        public void setTotalDetails​(Session.TotalDetails totalDetails)
        Tax and discount details for the computed total amount.
      • setUrl

        public void setUrl​(java.lang.String url)
        The URL to the Checkout Session.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • canEqual

        protected boolean canEqual​(java.lang.Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getId

        public java.lang.String getId()
        Unique identifier for the object. Used to pass to redirectToCheckout in Stripe.js.
        Specified by:
        getId in interface HasId