Class CustomerService

java.lang.Object
com.stripe.net.ApiService
com.stripe.service.CustomerService

public final class CustomerService extends ApiService
  • Constructor Details

  • Method Details

    • delete

      public Customer delete(String customer) throws StripeException
      Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer.
      Throws:
      StripeException
    • delete

      public Customer delete(String customer, RequestOptions options) throws StripeException
      Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer.
      Throws:
      StripeException
    • retrieve

      public Customer retrieve(String customer, CustomerRetrieveParams params) throws StripeException
      Retrieves a Customer object.
      Throws:
      StripeException
    • retrieve

      public Customer retrieve(String customer, RequestOptions options) throws StripeException
      Retrieves a Customer object.
      Throws:
      StripeException
    • retrieve

      public Customer retrieve(String customer) throws StripeException
      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

      public Customer update(String customer, CustomerUpdateParams params) 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 the past_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, 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 the past_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) 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 the past_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 the past_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

      public Discount deleteDiscount(String customer) throws StripeException
      Removes the currently applied discount on a customer.
      Throws:
      StripeException
    • deleteDiscount

      public Discount deleteDiscount(String customer, RequestOptions options) throws StripeException
      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

      public StripeCollection<Customer> list() 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
    • list

      Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first.
      Throws:
      StripeException
    • create

      public Customer create(CustomerCreateParams params) throws StripeException
      Creates a new customer object.
      Throws:
      StripeException
    • create

      public Customer create(RequestOptions options) throws StripeException
      Creates a new customer object.
      Throws:
      StripeException
    • create

      public Customer create() throws StripeException
      Creates a new customer object.
      Throws:
      StripeException
    • create

      public Customer create(CustomerCreateParams params, RequestOptions options) throws StripeException
      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

      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

      public CustomerBalanceTransactionService balanceTransactions()
    • cashBalance

      public CustomerCashBalanceService cashBalance()
    • cashBalanceTransactions

      public CustomerCashBalanceTransactionService cashBalanceTransactions()
    • fundingInstructions

      public CustomerFundingInstructionsService fundingInstructions()
    • paymentMethods

      public CustomerPaymentMethodService paymentMethods()
    • paymentSources

      public CustomerPaymentSourceService paymentSources()
    • taxIds

      public CustomerTaxIdService taxIds()