Package com.stripe
Class StripeClient
java.lang.Object
com.stripe.StripeClient
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.
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionStripeClient
(StripeResponseGetter responseGetter) Constructs a StripeClient with a custom StripeResponseGetter.StripeClient
(String apiKey) Constructs a StripeClient with default settings, using the provided API key. -
Method Summary
Modifier and TypeMethodDescriptionaccounts()
apps()
balance()
billing()
builder()
Builder class for creating aStripeClient
instance.charges()
checkout()
climate()
constructEvent
(String payload, String sigHeader, String secret) Returns an Event instance using the provided JSON payload.constructEvent
(String payload, String sigHeader, String secret, long tolerance) Returns an Event instance using the provided JSON payload.coupons()
disputes()
events()
files()
protected StripeResponseGetter
identity()
invoices()
issuing()
mandates()
payouts()
plans()
prices()
products()
quotes()
radar()
refunds()
reviews()
sigma()
sources()
tax()
taxCodes()
taxIds()
taxRates()
terminal()
tokens()
topups()
treasury()
-
Constructor Details
-
StripeClient
Constructs a StripeClient with default settings, using the provided API key. Use the builder instead if you require more complex configuration. -
StripeClient
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
-
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.
-
accountLinks
-
accountSessions
-
accounts
-
applePayDomains
-
applicationFees
-
apps
-
balance
-
balanceTransactions
-
billing
-
billingPortal
-
charges
-
checkout
-
climate
-
confirmationTokens
-
countrySpecs
-
coupons
-
creditNotes
-
customerSessions
-
customers
-
disputes
-
entitlements
-
ephemeralKeys
-
events
-
exchangeRates
-
fileLinks
-
files
-
financialConnections
-
forwarding
-
identity
-
invoiceItems
-
invoices
-
issuing
-
mandates
-
paymentIntents
-
paymentLinks
-
paymentMethodConfigurations
-
paymentMethodDomains
-
paymentMethods
-
payouts
-
plans
-
prices
-
products
-
promotionCodes
-
quotes
-
radar
-
refunds
-
reporting
-
reviews
-
setupAttempts
-
setupIntents
-
shippingRates
-
sigma
-
sources
-
subscriptionItems
-
subscriptionSchedules
-
subscriptions
-
tax
-
taxCodes
-
taxIds
-
taxRates
-
terminal
-
testHelpers
-
tokens
-
topups
-
transfers
-
treasury
-
webhookEndpoints
-
builder
Builder class for creating aStripeClient
instance. Allows you to specify settings like the API key, connect and read timeouts, and proxy settings.
-