Package com.stripe.service
Class CustomerService
java.lang.Object
com.stripe.net.ApiService
com.stripe.service.CustomerService
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreate()
Creates a new customer object.create
(RequestOptions options) Creates a new customer object.create
(CustomerCreateParams params) Creates a new customer object.create
(CustomerCreateParams params, RequestOptions options) Creates a new customer object.Permanently deletes a customer.delete
(String customer, RequestOptions options) Permanently deletes a customer.deleteDiscount
(String customer) Removes the currently applied discount on a customer.deleteDiscount
(String customer, RequestOptions options) Removes the currently applied discount on a customer.list()
Returns a list of your customers.list
(RequestOptions options) Returns a list of your customers.list
(CustomerListParams params) Returns a list of your customers.list
(CustomerListParams params, RequestOptions options) Returns a list of your customers.Retrieves a Customer object.retrieve
(String customer, RequestOptions options) Retrieves a Customer object.retrieve
(String customer, CustomerRetrieveParams params) Retrieves a Customer object.retrieve
(String customer, CustomerRetrieveParams params, RequestOptions options) Retrieves a Customer object.search
(CustomerSearchParams params) Search for customers you’ve previously created using Stripe’s Search Query Language.search
(CustomerSearchParams params, RequestOptions options) Search for customers you’ve previously created using Stripe’s Search Query Language.taxIds()
Updates the specified customer by setting the values of the parameters passed.update
(String customer, RequestOptions options) Updates the specified customer by setting the values of the parameters passed.update
(String customer, CustomerUpdateParams params) Updates the specified customer by setting the values of the parameters passed.update
(String customer, CustomerUpdateParams params, RequestOptions options) Updates the specified customer by setting the values of the parameters passed.Methods inherited from class com.stripe.net.ApiService
getResponseGetter, request, requestStream
-
Constructor Details
-
CustomerService
-
-
Method Details
-
delete
Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer.- Throws:
StripeException
-
delete
Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer.- Throws:
StripeException
-
retrieve
Retrieves a Customer object.- Throws:
StripeException
-
retrieve
Retrieves a Customer object.- Throws:
StripeException
-
retrieve
Retrieves a Customer object.- Throws:
StripeException
-
retrieve
public Customer retrieve(String customer, CustomerRetrieveParams params, RequestOptions options) throws StripeException Retrieves a Customer object.- Throws:
StripeException
-
update
Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. For example, if you pass the source parameter, that becomes the customer’s active source (e.g., a card) to be used for all charges in the future. When you update a customer to a new valid card source by passing the source parameter: for each of the customer’s current subscriptions, if the subscription bills automatically and is in thepast_due
state, then the latest open invoice for the subscription with automatic collection enabled will be retried. This retry will not count as an automatic retry, and will not affect the next regularly scheduled payment for the invoice. Changing the default_source for a customer will not trigger this behavior.This request accepts mostly the same arguments as the customer creation call.
- Throws:
StripeException
-
update
Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. For example, if you pass the source parameter, that becomes the customer’s active source (e.g., a card) to be used for all charges in the future. When you update a customer to a new valid card source by passing the source parameter: for each of the customer’s current subscriptions, if the subscription bills automatically and is in thepast_due
state, then the latest open invoice for the subscription with automatic collection enabled will be retried. This retry will not count as an automatic retry, and will not affect the next regularly scheduled payment for the invoice. Changing the default_source for a customer will not trigger this behavior.This request accepts mostly the same arguments as the customer creation call.
- Throws:
StripeException
-
update
Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. For example, if you pass the source parameter, that becomes the customer’s active source (e.g., a card) to be used for all charges in the future. When you update a customer to a new valid card source by passing the source parameter: for each of the customer’s current subscriptions, if the subscription bills automatically and is in thepast_due
state, then the latest open invoice for the subscription with automatic collection enabled will be retried. This retry will not count as an automatic retry, and will not affect the next regularly scheduled payment for the invoice. Changing the default_source for a customer will not trigger this behavior.This request accepts mostly the same arguments as the customer creation call.
- Throws:
StripeException
-
update
public Customer update(String customer, CustomerUpdateParams params, RequestOptions options) throws StripeException Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. For example, if you pass the source parameter, that becomes the customer’s active source (e.g., a card) to be used for all charges in the future. When you update a customer to a new valid card source by passing the source parameter: for each of the customer’s current subscriptions, if the subscription bills automatically and is in thepast_due
state, then the latest open invoice for the subscription with automatic collection enabled will be retried. This retry will not count as an automatic retry, and will not affect the next regularly scheduled payment for the invoice. Changing the default_source for a customer will not trigger this behavior.This request accepts mostly the same arguments as the customer creation call.
- Throws:
StripeException
-
deleteDiscount
Removes the currently applied discount on a customer.- Throws:
StripeException
-
deleteDiscount
Removes the currently applied discount on a customer.- Throws:
StripeException
-
list
Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first.- Throws:
StripeException
-
list
Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first.- Throws:
StripeException
-
list
Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first.- Throws:
StripeException
-
list
public StripeCollection<Customer> list(CustomerListParams params, RequestOptions options) throws StripeException Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first.- Throws:
StripeException
-
create
Creates a new customer object.- Throws:
StripeException
-
create
Creates a new customer object.- Throws:
StripeException
-
create
Creates a new customer object.- Throws:
StripeException
-
create
Creates a new customer object.- Throws:
StripeException
-
search
Search for customers 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<Customer> search(CustomerSearchParams params, RequestOptions options) throws StripeException Search for customers 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
-
balanceTransactions
-
cashBalance
-
cashBalanceTransactions
-
fundingInstructions
-
paymentMethods
-
paymentSources
-
taxIds
-