Class ChargeService
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCapture the payment of an existing, uncaptured charge that was created with thecapture
option set to false.capture
(String charge, RequestOptions options) Capture the payment of an existing, uncaptured charge that was created with thecapture
option set to false.capture
(String charge, ChargeCaptureParams params) Capture the payment of an existing, uncaptured charge that was created with thecapture
option set to false.capture
(String charge, ChargeCaptureParams params, RequestOptions options) Capture the payment of an existing, uncaptured charge that was created with thecapture
option set to false.create()
This method is no longer recommended—use the Payment Intents API to initiate a new payment instead.create
(RequestOptions options) This method is no longer recommended—use the Payment Intents API to initiate a new payment instead.create
(ChargeCreateParams params) This method is no longer recommended—use the Payment Intents API to initiate a new payment instead.create
(ChargeCreateParams params, RequestOptions options) This method is no longer recommended—use the Payment Intents API to initiate a new payment instead.list()
Returns a list of charges you’ve previously created.list
(RequestOptions options) Returns a list of charges you’ve previously created.list
(ChargeListParams params) Returns a list of charges you’ve previously created.list
(ChargeListParams params, RequestOptions options) Returns a list of charges you’ve previously created.Retrieves the details of a charge that has previously been created.retrieve
(String charge, RequestOptions options) Retrieves the details of a charge that has previously been created.retrieve
(String charge, ChargeRetrieveParams params) Retrieves the details of a charge that has previously been created.retrieve
(String charge, ChargeRetrieveParams params, RequestOptions options) Retrieves the details of a charge that has previously been created.search
(ChargeSearchParams params) Search for charges you’ve previously created using Stripe’s Search Query Language.search
(ChargeSearchParams params, RequestOptions options) Search for charges you’ve previously created using Stripe’s Search Query Language.Updates the specified charge by setting the values of the parameters passed.update
(String charge, RequestOptions options) Updates the specified charge by setting the values of the parameters passed.update
(String charge, ChargeUpdateParams params) Updates the specified charge by setting the values of the parameters passed.update
(String charge, ChargeUpdateParams params, RequestOptions options) Updates the specified charge by setting the values of the parameters passed.Methods inherited from class com.stripe.net.ApiService
getResponseGetter, request, requestStream
-
Constructor Details
-
ChargeService
-
-
Method Details
-
list
Returns a list of charges you’ve previously created. The charges are returned in sorted order, with the most recent charges appearing first.- Throws:
StripeException
-
list
Returns a list of charges you’ve previously created. The charges are returned in sorted order, with the most recent charges appearing first.- Throws:
StripeException
-
list
Returns a list of charges you’ve previously created. The charges are returned in sorted order, with the most recent charges appearing first.- Throws:
StripeException
-
list
public StripeCollection<Charge> list(ChargeListParams params, RequestOptions options) throws StripeException Returns a list of charges you’ve previously created. The charges are returned in sorted order, with the most recent charges appearing first.- Throws:
StripeException
-
create
This method is no longer recommended—use the Payment Intents API to initiate a new payment instead. Confirmation of the PaymentIntent creates theCharge
object used to request payment.- Throws:
StripeException
-
create
This method is no longer recommended—use the Payment Intents API to initiate a new payment instead. Confirmation of the PaymentIntent creates theCharge
object used to request payment.- Throws:
StripeException
-
create
This method is no longer recommended—use the Payment Intents API to initiate a new payment instead. Confirmation of the PaymentIntent creates theCharge
object used to request payment.- Throws:
StripeException
-
create
This method is no longer recommended—use the Payment Intents API to initiate a new payment instead. Confirmation of the PaymentIntent creates theCharge
object used to request payment.- Throws:
StripeException
-
retrieve
Retrieves the details of a charge that has previously been created. Supply the unique charge ID that was returned from your previous request, and Stripe will return the corresponding charge information. The same information is returned when creating or refunding the charge.- Throws:
StripeException
-
retrieve
Retrieves the details of a charge that has previously been created. Supply the unique charge ID that was returned from your previous request, and Stripe will return the corresponding charge information. The same information is returned when creating or refunding the charge.- Throws:
StripeException
-
retrieve
Retrieves the details of a charge that has previously been created. Supply the unique charge ID that was returned from your previous request, and Stripe will return the corresponding charge information. The same information is returned when creating or refunding the charge.- Throws:
StripeException
-
retrieve
public Charge retrieve(String charge, ChargeRetrieveParams params, RequestOptions options) throws StripeException Retrieves the details of a charge that has previously been created. Supply the unique charge ID that was returned from your previous request, and Stripe will return the corresponding charge information. The same information is returned when creating or refunding the charge.- Throws:
StripeException
-
update
Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged.- Throws:
StripeException
-
update
Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged.- Throws:
StripeException
-
update
Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged.- Throws:
StripeException
-
update
public Charge update(String charge, ChargeUpdateParams params, RequestOptions options) throws StripeException Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged.- Throws:
StripeException
-
search
Search for charges you’ve previously created using Stripe’s Search Query Language. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.- Throws:
StripeException
-
search
public StripeSearchResult<Charge> search(ChargeSearchParams params, RequestOptions options) throws StripeException Search for charges you’ve previously created using Stripe’s Search Query Language. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.- Throws:
StripeException
-
capture
Capture the payment of an existing, uncaptured charge that was created with thecapture
option set to false.Uncaptured payments expire a set number of days after they are created (7 by default), after which they are marked as refunded and capture attempts will fail.
Don’t use this method to capture a PaymentIntent-initiated charge. Use Capture a PaymentIntent.
- Throws:
StripeException
-
capture
Capture the payment of an existing, uncaptured charge that was created with thecapture
option set to false.Uncaptured payments expire a set number of days after they are created (7 by default), after which they are marked as refunded and capture attempts will fail.
Don’t use this method to capture a PaymentIntent-initiated charge. Use Capture a PaymentIntent.
- Throws:
StripeException
-
capture
Capture the payment of an existing, uncaptured charge that was created with thecapture
option set to false.Uncaptured payments expire a set number of days after they are created (7 by default), after which they are marked as refunded and capture attempts will fail.
Don’t use this method to capture a PaymentIntent-initiated charge. Use Capture a PaymentIntent.
- Throws:
StripeException
-
capture
public Charge capture(String charge, ChargeCaptureParams params, RequestOptions options) throws StripeException Capture the payment of an existing, uncaptured charge that was created with thecapture
option set to false.Uncaptured payments expire a set number of days after they are created (7 by default), after which they are marked as refunded and capture attempts will fail.
Don’t use this method to capture a PaymentIntent-initiated charge. Use Capture a PaymentIntent.
- Throws:
StripeException
-