Customers
The full list of request body parameters and possible outcomes can be found here.
#
Create a customerCreate a customer which can be linked to one or more payment instruments, and can be passed as a source when making a payment, using the customer’s default instrument.
CustomerRequest request = CustomerRequest.builder() .email() .name() .phone(Phone.builder().build()) .build();
IdResponse response = api.customersClient().create(request).get();
#
Get customer detailsReturns the details of a customer and their instruments.
CustomerDetailsResponse response = api.customersClient().get(request).get();
#
Update customer detailsUpdate details of a customer
CustomerRequest request = CustomerRequest.builder() .email() .name() .phone(Phone.builder().build()) .build();
api.customersClient().update("cus_123456789ASDZX", request).get();
#
Delete a customerDelete a customer and all of their linked payment instruments
api.customersClient().delete("cus_123456789ASDZX").get();