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()
    • parseThinEvent

      public ThinEvent parseThinEvent(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.
    • parseThinEvent

      public ThinEvent parseThinEvent(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

      public AccountLinkService accountLinks()
      Deprecation Warning: StripeClient.accountLinks() will be deprecated in the next major release. 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

      public AccountNoticeService accountNotices()
      Deprecation Warning: StripeClient.accountNotices() will be deprecated in the next major release. 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

      public AccountSessionService accountSessions()
      Deprecation Warning: StripeClient.accountSessions() will be deprecated in the next major release. 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

      public AccountService accounts()
      Deprecation Warning: StripeClient.accounts() will be deprecated in the next major release. 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

      public ApplePayDomainService applePayDomains()
      Deprecation Warning: StripeClient.applePayDomains() will be deprecated in the next major release. 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

      public ApplicationFeeService applicationFees()
      Deprecation Warning: StripeClient.applicationFees() will be deprecated in the next major release. 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

      public AppsService apps()
      Deprecation Warning: StripeClient.apps() will be deprecated in the next major release. 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

      public BalanceService balance()
      Deprecation Warning: StripeClient.balance() will be deprecated in the next major release. 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

      public BalanceSettingsService balanceSettings()
      Deprecation Warning: StripeClient.balanceSettings() will be deprecated in the next major release. 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

      public BalanceTransactionService balanceTransactions()
      Deprecation Warning: StripeClient.balanceTransactions() will be deprecated in the next major release. 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

      public BillingService billing()
      Deprecation Warning: StripeClient.billing() will be deprecated in the next major release. 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

      public BillingPortalService billingPortal()
      Deprecation Warning: StripeClient.billingPortal() will be deprecated in the next major release. 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

      public CapitalService capital()
      Deprecation Warning: StripeClient.capital() will be deprecated in the next major release. 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

      public ChargeService charges()
      Deprecation Warning: StripeClient.charges() will be deprecated in the next major release. 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

      public CheckoutService checkout()
      Deprecation Warning: StripeClient.checkout() will be deprecated in the next major release. 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

      public ClimateService climate()
      Deprecation Warning: StripeClient.climate() will be deprecated in the next major release. 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

      public ConfirmationTokenService confirmationTokens()
      Deprecation Warning: StripeClient.confirmationTokens() will be deprecated in the next major release. 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

      public CountrySpecService countrySpecs()
      Deprecation Warning: StripeClient.countrySpecs() will be deprecated in the next major release. 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

      public CouponService coupons()
      Deprecation Warning: StripeClient.coupons() will be deprecated in the next major release. 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

      public CreditNoteService creditNotes()
      Deprecation Warning: StripeClient.creditNotes() will be deprecated in the next major release. 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

      public CustomerSessionService customerSessions()
      Deprecation Warning: StripeClient.customerSessions() will be deprecated in the next major release. 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

      public CustomerService customers()
      Deprecation Warning: StripeClient.customers() will be deprecated in the next major release. 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.
    • disputes

      public DisputeService disputes()
      Deprecation Warning: StripeClient.disputes() will be deprecated in the next major release. 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

      public EntitlementsService entitlements()
      Deprecation Warning: StripeClient.entitlements() will be deprecated in the next major release. 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

      public EphemeralKeyService ephemeralKeys()
      Deprecation Warning: StripeClient.ephemeralKeys() will be deprecated in the next major release. 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

      public EventService events()
      Deprecation Warning: StripeClient.events() will be deprecated in the next major release. 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

      public ExchangeRateService exchangeRates()
      Deprecation Warning: StripeClient.exchangeRates() will be deprecated in the next major release. 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

      public ExternalAccountService externalAccounts()
      Deprecation Warning: StripeClient.externalAccounts() will be deprecated in the next major release. 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

      public FileLinkService fileLinks()
      Deprecation Warning: StripeClient.fileLinks() will be deprecated in the next major release. 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

      public FileService files()
      Deprecation Warning: StripeClient.files() will be deprecated in the next major release. 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

      public FinancialConnectionsService financialConnections()
      Deprecation Warning: StripeClient.financialConnections() will be deprecated in the next major release. 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

      public ForwardingService forwarding()
      Deprecation Warning: StripeClient.forwarding() will be deprecated in the next major release. 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

      public FxQuoteService fxQuotes()
      Deprecation Warning: StripeClient.fxQuotes() will be deprecated in the next major release. 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

      public IdentityService identity()
      Deprecation Warning: StripeClient.identity() will be deprecated in the next major release. 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

      public InvoiceItemService invoiceItems()
      Deprecation Warning: StripeClient.invoiceItems() will be deprecated in the next major release. 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

      public InvoicePaymentService invoicePayments()
      Deprecation Warning: StripeClient.invoicePayments() will be deprecated in the next major release. 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

      public InvoiceRenderingTemplateService invoiceRenderingTemplates()
      Deprecation Warning: StripeClient.invoiceRenderingTemplates() will be deprecated in the next major release. 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

      public InvoiceService invoices()
      Deprecation Warning: StripeClient.invoices() will be deprecated in the next major release. 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

      public IssuingService issuing()
      Deprecation Warning: StripeClient.issuing() will be deprecated in the next major release. 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

      public MandateService mandates()
      Deprecation Warning: StripeClient.mandates() will be deprecated in the next major release. 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

      public MarginService margins()
      Deprecation Warning: StripeClient.margins() will be deprecated in the next major release. 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

      public OrderService orders()
      Deprecation Warning: StripeClient.orders() will be deprecated in the next major release. 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

      public PaymentAttemptRecordService paymentAttemptRecords()
      Deprecation Warning: StripeClient.paymentAttemptRecords() will be deprecated in the next major release. 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

      public PaymentIntentService paymentIntents()
      Deprecation Warning: StripeClient.paymentIntents() will be deprecated in the next major release. 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

      public PaymentLinkService paymentLinks()
      Deprecation Warning: StripeClient.paymentLinks() will be deprecated in the next major release. 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

      public PaymentMethodConfigurationService paymentMethodConfigurations()
      Deprecation Warning: StripeClient.paymentMethodConfigurations() will be deprecated in the next major release. 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

      public PaymentMethodDomainService paymentMethodDomains()
      Deprecation Warning: StripeClient.paymentMethodDomains() will be deprecated in the next major release. 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

      public PaymentMethodService paymentMethods()
      Deprecation Warning: StripeClient.paymentMethods() will be deprecated in the next major release. 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

      public PaymentRecordService paymentRecords()
      Deprecation Warning: StripeClient.paymentRecords() will be deprecated in the next major release. 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

      public PayoutService payouts()
      Deprecation Warning: StripeClient.payouts() will be deprecated in the next major release. 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

      public PlanService plans()
      Deprecation Warning: StripeClient.plans() will be deprecated in the next major release. 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

      public PriceService prices()
      Deprecation Warning: StripeClient.prices() will be deprecated in the next major release. 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

      public PrivacyService privacy()
      Deprecation Warning: StripeClient.privacy() will be deprecated in the next major release. 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

      public ProductService products()
      Deprecation Warning: StripeClient.products() will be deprecated in the next major release. 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

      public PromotionCodeService promotionCodes()
      Deprecation Warning: StripeClient.promotionCodes() will be deprecated in the next major release. 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

      public QuoteService quotes()
      Deprecation Warning: StripeClient.quotes() will be deprecated in the next major release. 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

      public RadarService radar()
      Deprecation Warning: StripeClient.radar() will be deprecated in the next major release. 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

      public RefundService refunds()
      Deprecation Warning: StripeClient.refunds() will be deprecated in the next major release. 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

      public ReportingService reporting()
      Deprecation Warning: StripeClient.reporting() will be deprecated in the next major release. 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

      public ReviewService reviews()
      Deprecation Warning: StripeClient.reviews() will be deprecated in the next major release. 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

      public SetupAttemptService setupAttempts()
      Deprecation Warning: StripeClient.setupAttempts() will be deprecated in the next major release. 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

      public SetupIntentService setupIntents()
      Deprecation Warning: StripeClient.setupIntents() will be deprecated in the next major release. 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

      public ShippingRateService shippingRates()
      Deprecation Warning: StripeClient.shippingRates() will be deprecated in the next major release. 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

      public SigmaService sigma()
      Deprecation Warning: StripeClient.sigma() will be deprecated in the next major release. 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

      public SourceService sources()
      Deprecation Warning: StripeClient.sources() will be deprecated in the next major release. 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

      public SubscriptionItemService subscriptionItems()
      Deprecation Warning: StripeClient.subscriptionItems() will be deprecated in the next major release. 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

      public SubscriptionScheduleService subscriptionSchedules()
      Deprecation Warning: StripeClient.subscriptionSchedules() will be deprecated in the next major release. 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

      public SubscriptionService subscriptions()
      Deprecation Warning: StripeClient.subscriptions() will be deprecated in the next major release. 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

      public TaxService tax()
      Deprecation Warning: StripeClient.tax() will be deprecated in the next major release. 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

      public TaxCodeService taxCodes()
      Deprecation Warning: StripeClient.taxCodes() will be deprecated in the next major release. 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

      public TaxIdService taxIds()
      Deprecation Warning: StripeClient.taxIds() will be deprecated in the next major release. 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

      public TaxRateService taxRates()
      Deprecation Warning: StripeClient.taxRates() will be deprecated in the next major release. 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

      public TerminalService terminal()
      Deprecation Warning: StripeClient.terminal() will be deprecated in the next major release. 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

      public TestHelpersService testHelpers()
      Deprecation Warning: StripeClient.testHelpers() will be deprecated in the next major release. 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

      public TokenService tokens()
      Deprecation Warning: StripeClient.tokens() will be deprecated in the next major release. 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

      public TopupService topups()
      Deprecation Warning: StripeClient.topups() will be deprecated in the next major release. 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

      public TransferService transfers()
      Deprecation Warning: StripeClient.transfers() will be deprecated in the next major release. 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

      public TreasuryService treasury()
      Deprecation Warning: StripeClient.treasury() will be deprecated in the next major release. 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

      public WebhookEndpointService webhookEndpoints()
      Deprecation Warning: StripeClient.webhookEndpoints() will be deprecated in the next major release. 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