Package com.stripe

Class StripeClient

java.lang.Object
com.stripe.StripeClient

public class StripeClient extends Object
This is the primary entrypoint to make requests against Stripe's API. It provides a means of accessing all the methods on the Stripe API, and the ability to set configuration such as apiKey and connection timeouts.
  • Constructor Details

    • StripeClient

      public StripeClient(String apiKey)
      Constructs a StripeClient with default settings, using the provided API key. Use the builder instead if you require more complex configuration.
    • StripeClient

      public StripeClient(StripeResponseGetter responseGetter)
      Constructs a StripeClient with a custom StripeResponseGetter.

      Use this for testing, or advanced use cases where you need to make fundamental changes to how the StripeClient makes requests.

  • Method Details

    • getResponseGetter

      protected StripeResponseGetter getResponseGetter()
    • parseEventNotification

      public EventNotification parseEventNotification(String payload, String sigHeader, String secret) throws SignatureVerificationException
      Returns an StripeEvent instance using the provided JSON payload. Throws a JsonSyntaxException if the payload is not valid JSON, and a SignatureVerificationException if the signature verification fails for any reason.
      Parameters:
      payload - the payload sent by Stripe.
      sigHeader - the contents of the signature header sent by Stripe.
      secret - secret used to generate the signature.
      Returns:
      the StripeEvent instance
      Throws:
      SignatureVerificationException - if the verification fails.
    • parseEventNotification

      public EventNotification parseEventNotification(String payload, String sigHeader, String secret, long tolerance) throws SignatureVerificationException
      Returns an StripeEvent instance using the provided JSON payload. Throws a JsonSyntaxException if the payload is not valid JSON, and a SignatureVerificationException if the signature verification fails for any reason.
      Parameters:
      payload - the payload sent by Stripe.
      sigHeader - the contents of the signature header sent by Stripe.
      secret - secret used to generate the signature.
      tolerance - number of seconds that the event's timestamp can differ from the system time. Passing `0` will disable the time check entirely and is **strongly discouraged**.
      Returns:
      the StripeEvent instance
      Throws:
      SignatureVerificationException - if the verification fails.
    • constructEvent

      public Event constructEvent(String payload, String sigHeader, String secret) throws SignatureVerificationException
      Returns an Event instance using the provided JSON payload. Throws a JsonSyntaxException if the payload is not valid JSON, and a SignatureVerificationException if the signature verification fails for any reason.
      Parameters:
      payload - the payload sent by Stripe.
      sigHeader - the contents of the signature header sent by Stripe.
      secret - secret used to generate the signature.
      Returns:
      the Event instance
      Throws:
      SignatureVerificationException - if the verification fails.
    • constructEvent

      public Event constructEvent(String payload, String sigHeader, String secret, long tolerance) throws SignatureVerificationException
      Returns an Event instance using the provided JSON payload. Throws a JsonSyntaxException if the payload is not valid JSON, and a SignatureVerificationException if the signature verification fails for any reason.
      Parameters:
      payload - the payload sent by Stripe.
      sigHeader - the contents of the signature header sent by Stripe.
      secret - secret used to generate the signature.
      tolerance - maximum difference in seconds allowed between the header's timestamp and the current time
      Returns:
      the Event instance
      Throws:
      SignatureVerificationException - if the verification fails.
    • v1

      public V1Services v1()
    • v2

      public V2Services v2()
    • accountLinks

      @Deprecated public AccountLinkService accountLinks()
      Deprecated.
      StripeClient.accountLinks() is deprecated, use StripeClient.v1().accountLinks() instead. All functionality under it has been copied over to StripeClient.v1().accountLinks(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • accountNotices

      @Deprecated public AccountNoticeService accountNotices()
      Deprecated.
      StripeClient.accountNotices() is deprecated, use StripeClient.v1().accountNotices() instead. All functionality under it has been copied over to StripeClient.v1().accountNotices(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • accountSessions

      @Deprecated public AccountSessionService accountSessions()
      Deprecated.
      StripeClient.accountSessions() is deprecated, use StripeClient.v1().accountSessions() instead. All functionality under it has been copied over to StripeClient.v1().accountSessions(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • accounts

      @Deprecated public AccountService accounts()
      Deprecated.
      StripeClient.accounts() is deprecated, use StripeClient.v1().accounts() instead. All functionality under it has been copied over to StripeClient.v1().accounts(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • applePayDomains

      @Deprecated public ApplePayDomainService applePayDomains()
      Deprecated.
      StripeClient.applePayDomains() is deprecated, use StripeClient.v1().applePayDomains() instead. All functionality under it has been copied over to StripeClient.v1().applePayDomains(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • applicationFees

      @Deprecated public ApplicationFeeService applicationFees()
      Deprecated.
      StripeClient.applicationFees() is deprecated, use StripeClient.v1().applicationFees() instead. All functionality under it has been copied over to StripeClient.v1().applicationFees(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • apps

      @Deprecated public AppsService apps()
      Deprecated.
      StripeClient.apps() is deprecated, use StripeClient.v1().apps() instead. All functionality under it has been copied over to StripeClient.v1().apps(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • balance

      @Deprecated public BalanceService balance()
      Deprecated.
      StripeClient.balance() is deprecated, use StripeClient.v1().balance() instead. All functionality under it has been copied over to StripeClient.v1().balance(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • balanceSettings

      @Deprecated public BalanceSettingsService balanceSettings()
      Deprecated.
      StripeClient.balanceSettings() is deprecated, use StripeClient.v1().balanceSettings() instead. All functionality under it has been copied over to StripeClient.v1().balanceSettings(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • balanceTransactions

      @Deprecated public BalanceTransactionService balanceTransactions()
      Deprecated.
      StripeClient.balanceTransactions() is deprecated, use StripeClient.v1().balanceTransactions() instead. All functionality under it has been copied over to StripeClient.v1().balanceTransactions(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • billing

      @Deprecated public BillingService billing()
      Deprecated.
      StripeClient.billing() is deprecated, use StripeClient.v1().billing() instead. All functionality under it has been copied over to StripeClient.v1().billing(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • billingPortal

      @Deprecated public BillingPortalService billingPortal()
      Deprecated.
      StripeClient.billingPortal() is deprecated, use StripeClient.v1().billingPortal() instead. All functionality under it has been copied over to StripeClient.v1().billingPortal(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • capital

      @Deprecated public CapitalService capital()
      Deprecated.
      StripeClient.capital() is deprecated, use StripeClient.v1().capital() instead. All functionality under it has been copied over to StripeClient.v1().capital(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • charges

      @Deprecated public ChargeService charges()
      Deprecated.
      StripeClient.charges() is deprecated, use StripeClient.v1().charges() instead. All functionality under it has been copied over to StripeClient.v1().charges(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • checkout

      @Deprecated public CheckoutService checkout()
      Deprecated.
      StripeClient.checkout() is deprecated, use StripeClient.v1().checkout() instead. All functionality under it has been copied over to StripeClient.v1().checkout(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • climate

      @Deprecated public ClimateService climate()
      Deprecated.
      StripeClient.climate() is deprecated, use StripeClient.v1().climate() instead. All functionality under it has been copied over to StripeClient.v1().climate(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • confirmationTokens

      @Deprecated public ConfirmationTokenService confirmationTokens()
      Deprecated.
      StripeClient.confirmationTokens() is deprecated, use StripeClient.v1().confirmationTokens() instead. All functionality under it has been copied over to StripeClient.v1().confirmationTokens(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • countrySpecs

      @Deprecated public CountrySpecService countrySpecs()
      Deprecated.
      StripeClient.countrySpecs() is deprecated, use StripeClient.v1().countrySpecs() instead. All functionality under it has been copied over to StripeClient.v1().countrySpecs(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • coupons

      @Deprecated public CouponService coupons()
      Deprecated.
      StripeClient.coupons() is deprecated, use StripeClient.v1().coupons() instead. All functionality under it has been copied over to StripeClient.v1().coupons(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • creditNotes

      @Deprecated public CreditNoteService creditNotes()
      Deprecated.
      StripeClient.creditNotes() is deprecated, use StripeClient.v1().creditNotes() instead. All functionality under it has been copied over to StripeClient.v1().creditNotes(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • customerSessions

      @Deprecated public CustomerSessionService customerSessions()
      Deprecated.
      StripeClient.customerSessions() is deprecated, use StripeClient.v1().customerSessions() instead. All functionality under it has been copied over to StripeClient.v1().customerSessions(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • customers

      @Deprecated public CustomerService customers()
      Deprecated.
      StripeClient.customers() is deprecated, use StripeClient.v1().customers() instead. All functionality under it has been copied over to StripeClient.v1().customers(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • delegatedCheckout

      @Deprecated public DelegatedCheckoutService delegatedCheckout()
      Deprecated.
      StripeClient.delegatedCheckout() is deprecated, use StripeClient.v1().delegatedCheckout() instead. All functionality under it has been copied over to StripeClient.v1().delegatedCheckout(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • disputes

      @Deprecated public DisputeService disputes()
      Deprecated.
      StripeClient.disputes() is deprecated, use StripeClient.v1().disputes() instead. All functionality under it has been copied over to StripeClient.v1().disputes(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • entitlements

      @Deprecated public EntitlementsService entitlements()
      Deprecated.
      StripeClient.entitlements() is deprecated, use StripeClient.v1().entitlements() instead. All functionality under it has been copied over to StripeClient.v1().entitlements(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • ephemeralKeys

      @Deprecated public EphemeralKeyService ephemeralKeys()
      Deprecated.
      StripeClient.ephemeralKeys() is deprecated, use StripeClient.v1().ephemeralKeys() instead. All functionality under it has been copied over to StripeClient.v1().ephemeralKeys(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • events

      @Deprecated public EventService events()
      Deprecated.
      StripeClient.events() is deprecated, use StripeClient.v1().events() instead. All functionality under it has been copied over to StripeClient.v1().events(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • exchangeRates

      @Deprecated public ExchangeRateService exchangeRates()
      Deprecated.
      StripeClient.exchangeRates() is deprecated, use StripeClient.v1().exchangeRates() instead. All functionality under it has been copied over to StripeClient.v1().exchangeRates(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • externalAccounts

      @Deprecated public ExternalAccountService externalAccounts()
      Deprecated.
      StripeClient.externalAccounts() is deprecated, use StripeClient.v1().externalAccounts() instead. All functionality under it has been copied over to StripeClient.v1().externalAccounts(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • fileLinks

      @Deprecated public FileLinkService fileLinks()
      Deprecated.
      StripeClient.fileLinks() is deprecated, use StripeClient.v1().fileLinks() instead. All functionality under it has been copied over to StripeClient.v1().fileLinks(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • files

      @Deprecated public FileService files()
      Deprecated.
      StripeClient.files() is deprecated, use StripeClient.v1().files() instead. All functionality under it has been copied over to StripeClient.v1().files(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • financialConnections

      @Deprecated public FinancialConnectionsService financialConnections()
      Deprecated.
      StripeClient.financialConnections() is deprecated, use StripeClient.v1().financialConnections() instead. All functionality under it has been copied over to StripeClient.v1().financialConnections(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • forwarding

      @Deprecated public ForwardingService forwarding()
      Deprecated.
      StripeClient.forwarding() is deprecated, use StripeClient.v1().forwarding() instead. All functionality under it has been copied over to StripeClient.v1().forwarding(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • fxQuotes

      @Deprecated public FxQuoteService fxQuotes()
      Deprecated.
      StripeClient.fxQuotes() is deprecated, use StripeClient.v1().fxQuotes() instead. All functionality under it has been copied over to StripeClient.v1().fxQuotes(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • identity

      @Deprecated public IdentityService identity()
      Deprecated.
      StripeClient.identity() is deprecated, use StripeClient.v1().identity() instead. All functionality under it has been copied over to StripeClient.v1().identity(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • invoiceItems

      @Deprecated public InvoiceItemService invoiceItems()
      Deprecated.
      StripeClient.invoiceItems() is deprecated, use StripeClient.v1().invoiceItems() instead. All functionality under it has been copied over to StripeClient.v1().invoiceItems(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • invoicePayments

      @Deprecated public InvoicePaymentService invoicePayments()
      Deprecated.
      StripeClient.invoicePayments() is deprecated, use StripeClient.v1().invoicePayments() instead. All functionality under it has been copied over to StripeClient.v1().invoicePayments(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • invoiceRenderingTemplates

      @Deprecated public InvoiceRenderingTemplateService invoiceRenderingTemplates()
      Deprecated.
      StripeClient.invoiceRenderingTemplates() is deprecated, use StripeClient.v1().invoiceRenderingTemplates() instead. All functionality under it has been copied over to StripeClient.v1().invoiceRenderingTemplates(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • invoices

      @Deprecated public InvoiceService invoices()
      Deprecated.
      StripeClient.invoices() is deprecated, use StripeClient.v1().invoices() instead. All functionality under it has been copied over to StripeClient.v1().invoices(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • issuing

      @Deprecated public IssuingService issuing()
      Deprecated.
      StripeClient.issuing() is deprecated, use StripeClient.v1().issuing() instead. All functionality under it has been copied over to StripeClient.v1().issuing(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • mandates

      @Deprecated public MandateService mandates()
      Deprecated.
      StripeClient.mandates() is deprecated, use StripeClient.v1().mandates() instead. All functionality under it has been copied over to StripeClient.v1().mandates(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • margins

      @Deprecated public MarginService margins()
      Deprecated.
      StripeClient.margins() is deprecated, use StripeClient.v1().margins() instead. All functionality under it has been copied over to StripeClient.v1().margins(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • orders

      @Deprecated public OrderService orders()
      Deprecated.
      StripeClient.orders() is deprecated, use StripeClient.v1().orders() instead. All functionality under it has been copied over to StripeClient.v1().orders(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • paymentAttemptRecords

      @Deprecated public PaymentAttemptRecordService paymentAttemptRecords()
      Deprecated.
      StripeClient.paymentAttemptRecords() is deprecated, use StripeClient.v1().paymentAttemptRecords() instead. All functionality under it has been copied over to StripeClient.v1().paymentAttemptRecords(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • paymentIntents

      @Deprecated public PaymentIntentService paymentIntents()
      Deprecated.
      StripeClient.paymentIntents() is deprecated, use StripeClient.v1().paymentIntents() instead. All functionality under it has been copied over to StripeClient.v1().paymentIntents(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • paymentLinks

      @Deprecated public PaymentLinkService paymentLinks()
      Deprecated.
      StripeClient.paymentLinks() is deprecated, use StripeClient.v1().paymentLinks() instead. All functionality under it has been copied over to StripeClient.v1().paymentLinks(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • paymentMethodConfigurations

      @Deprecated public PaymentMethodConfigurationService paymentMethodConfigurations()
      Deprecated.
      StripeClient.paymentMethodConfigurations() is deprecated, use StripeClient.v1().paymentMethodConfigurations() instead. All functionality under it has been copied over to StripeClient.v1().paymentMethodConfigurations(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • paymentMethodDomains

      @Deprecated public PaymentMethodDomainService paymentMethodDomains()
      Deprecated.
      StripeClient.paymentMethodDomains() is deprecated, use StripeClient.v1().paymentMethodDomains() instead. All functionality under it has been copied over to StripeClient.v1().paymentMethodDomains(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • paymentMethods

      @Deprecated public PaymentMethodService paymentMethods()
      Deprecated.
      StripeClient.paymentMethods() is deprecated, use StripeClient.v1().paymentMethods() instead. All functionality under it has been copied over to StripeClient.v1().paymentMethods(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • paymentRecords

      @Deprecated public PaymentRecordService paymentRecords()
      Deprecated.
      StripeClient.paymentRecords() is deprecated, use StripeClient.v1().paymentRecords() instead. All functionality under it has been copied over to StripeClient.v1().paymentRecords(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • payouts

      @Deprecated public PayoutService payouts()
      Deprecated.
      StripeClient.payouts() is deprecated, use StripeClient.v1().payouts() instead. All functionality under it has been copied over to StripeClient.v1().payouts(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • plans

      @Deprecated public PlanService plans()
      Deprecated.
      StripeClient.plans() is deprecated, use StripeClient.v1().plans() instead. All functionality under it has been copied over to StripeClient.v1().plans(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • prices

      @Deprecated public PriceService prices()
      Deprecated.
      StripeClient.prices() is deprecated, use StripeClient.v1().prices() instead. All functionality under it has been copied over to StripeClient.v1().prices(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • privacy

      @Deprecated public PrivacyService privacy()
      Deprecated.
      StripeClient.privacy() is deprecated, use StripeClient.v1().privacy() instead. All functionality under it has been copied over to StripeClient.v1().privacy(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • products

      @Deprecated public ProductService products()
      Deprecated.
      StripeClient.products() is deprecated, use StripeClient.v1().products() instead. All functionality under it has been copied over to StripeClient.v1().products(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • promotionCodes

      @Deprecated public PromotionCodeService promotionCodes()
      Deprecated.
      StripeClient.promotionCodes() is deprecated, use StripeClient.v1().promotionCodes() instead. All functionality under it has been copied over to StripeClient.v1().promotionCodes(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • quotes

      @Deprecated public QuoteService quotes()
      Deprecated.
      StripeClient.quotes() is deprecated, use StripeClient.v1().quotes() instead. All functionality under it has been copied over to StripeClient.v1().quotes(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • radar

      @Deprecated public RadarService radar()
      Deprecated.
      StripeClient.radar() is deprecated, use StripeClient.v1().radar() instead. All functionality under it has been copied over to StripeClient.v1().radar(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • refunds

      @Deprecated public RefundService refunds()
      Deprecated.
      StripeClient.refunds() is deprecated, use StripeClient.v1().refunds() instead. All functionality under it has been copied over to StripeClient.v1().refunds(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • reporting

      @Deprecated public ReportingService reporting()
      Deprecated.
      StripeClient.reporting() is deprecated, use StripeClient.v1().reporting() instead. All functionality under it has been copied over to StripeClient.v1().reporting(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • reviews

      @Deprecated public ReviewService reviews()
      Deprecated.
      StripeClient.reviews() is deprecated, use StripeClient.v1().reviews() instead. All functionality under it has been copied over to StripeClient.v1().reviews(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • setupAttempts

      @Deprecated public SetupAttemptService setupAttempts()
      Deprecated.
      StripeClient.setupAttempts() is deprecated, use StripeClient.v1().setupAttempts() instead. All functionality under it has been copied over to StripeClient.v1().setupAttempts(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • setupIntents

      @Deprecated public SetupIntentService setupIntents()
      Deprecated.
      StripeClient.setupIntents() is deprecated, use StripeClient.v1().setupIntents() instead. All functionality under it has been copied over to StripeClient.v1().setupIntents(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • shippingRates

      @Deprecated public ShippingRateService shippingRates()
      Deprecated.
      StripeClient.shippingRates() is deprecated, use StripeClient.v1().shippingRates() instead. All functionality under it has been copied over to StripeClient.v1().shippingRates(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • sigma

      @Deprecated public SigmaService sigma()
      Deprecated.
      StripeClient.sigma() is deprecated, use StripeClient.v1().sigma() instead. All functionality under it has been copied over to StripeClient.v1().sigma(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • sources

      @Deprecated public SourceService sources()
      Deprecated.
      StripeClient.sources() is deprecated, use StripeClient.v1().sources() instead. All functionality under it has been copied over to StripeClient.v1().sources(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • subscriptionItems

      @Deprecated public SubscriptionItemService subscriptionItems()
      Deprecated.
      StripeClient.subscriptionItems() is deprecated, use StripeClient.v1().subscriptionItems() instead. All functionality under it has been copied over to StripeClient.v1().subscriptionItems(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • subscriptionSchedules

      @Deprecated public SubscriptionScheduleService subscriptionSchedules()
      Deprecated.
      StripeClient.subscriptionSchedules() is deprecated, use StripeClient.v1().subscriptionSchedules() instead. All functionality under it has been copied over to StripeClient.v1().subscriptionSchedules(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • subscriptions

      @Deprecated public SubscriptionService subscriptions()
      Deprecated.
      StripeClient.subscriptions() is deprecated, use StripeClient.v1().subscriptions() instead. All functionality under it has been copied over to StripeClient.v1().subscriptions(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • tax

      @Deprecated public TaxService tax()
      Deprecated.
      StripeClient.tax() is deprecated, use StripeClient.v1().tax() instead. All functionality under it has been copied over to StripeClient.v1().tax(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • taxCodes

      @Deprecated public TaxCodeService taxCodes()
      Deprecated.
      StripeClient.taxCodes() is deprecated, use StripeClient.v1().taxCodes() instead. All functionality under it has been copied over to StripeClient.v1().taxCodes(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • taxIds

      @Deprecated public TaxIdService taxIds()
      Deprecated.
      StripeClient.taxIds() is deprecated, use StripeClient.v1().taxIds() instead. All functionality under it has been copied over to StripeClient.v1().taxIds(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • taxRates

      @Deprecated public TaxRateService taxRates()
      Deprecated.
      StripeClient.taxRates() is deprecated, use StripeClient.v1().taxRates() instead. All functionality under it has been copied over to StripeClient.v1().taxRates(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • terminal

      @Deprecated public TerminalService terminal()
      Deprecated.
      StripeClient.terminal() is deprecated, use StripeClient.v1().terminal() instead. All functionality under it has been copied over to StripeClient.v1().terminal(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • testHelpers

      @Deprecated public TestHelpersService testHelpers()
      Deprecated.
      StripeClient.testHelpers() is deprecated, use StripeClient.v1().testHelpers() instead. All functionality under it has been copied over to StripeClient.v1().testHelpers(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • tokens

      @Deprecated public TokenService tokens()
      Deprecated.
      StripeClient.tokens() is deprecated, use StripeClient.v1().tokens() instead. All functionality under it has been copied over to StripeClient.v1().tokens(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • topups

      @Deprecated public TopupService topups()
      Deprecated.
      StripeClient.topups() is deprecated, use StripeClient.v1().topups() instead. All functionality under it has been copied over to StripeClient.v1().topups(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • transfers

      @Deprecated public TransferService transfers()
      Deprecated.
      StripeClient.transfers() is deprecated, use StripeClient.v1().transfers() instead. All functionality under it has been copied over to StripeClient.v1().transfers(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • treasury

      @Deprecated public TreasuryService treasury()
      Deprecated.
      StripeClient.treasury() is deprecated, use StripeClient.v1().treasury() instead. All functionality under it has been copied over to StripeClient.v1().treasury(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • webhookEndpoints

      @Deprecated public WebhookEndpointService webhookEndpoints()
      Deprecated.
      StripeClient.webhookEndpoints() is deprecated, use StripeClient.v1().webhookEndpoints() instead. All functionality under it has been copied over to StripeClient.v1().webhookEndpoints(). See migration guide for more on this and tips on migrating to the new v1 namespace.
    • builder

      public static StripeClient.StripeClientBuilder builder()
      Builder class for creating a StripeClient instance. Allows you to specify settings like the API key, connect and read timeouts, and proxy settings.
    • rawRequest

      public StripeResponse rawRequest(ApiResource.RequestMethod method, String relativeUrl, String content) throws StripeException
      Send raw request to Stripe API. This is the lowest level method for interacting with the Stripe API. This method is useful for interacting with endpoints that are not covered yet in stripe-java.
      Parameters:
      method - the HTTP method
      relativeUrl - the relative URL of the request, e.g. "/v1/charges"
      content - the body of the request as a string
      Returns:
      the JSON response as a string
      Throws:
      StripeException
    • rawRequest

      public StripeResponse rawRequest(ApiResource.RequestMethod method, String relativeUrl, String content, RawRequestOptions options) throws StripeException
      Send raw request to Stripe API. This is the lowest level method for interacting with the Stripe API. This method is useful for interacting with endpoints that are not covered yet in stripe-java.
      Parameters:
      method - the HTTP method
      relativeUrl - the relative URL of the request, e.g. "/v1/charges"
      content - the body of the request as a string
      options - the special modifiers of the request
      Returns:
      the JSON response as a string
      Throws:
      StripeException
    • deserialize

      public StripeObject deserialize(String rawJson, ApiMode apiMode) throws StripeException
      Deserializes StripeResponse returned by rawRequest into a similar class.
      Throws:
      StripeException