Create a Customer
To create a customer, use themodempay.customers.create() method, which allows you to add key information like the customer’s name, email, phone number, and an optional starting balance. The distinct option, when set to true, checks for existing customers with matching fields (e.g., email) to avoid duplicate entries. If distinct is omitted or set to false, a new customer entry will be created without duplicate checks.
Sample Request:
Retrieve a Customer
To fetch a customer’s details, usemodempay.customers.retrieve(customerId). Replace customerId with the customer’s unique ID.
Sample Request:
Update a Customer
Update a customer’s information usingmodempay.customers.update(customerId, params). Specify the customer ID and the fields to update.
Sample Request:
Delete a Customer
Remove a customer from your records usingmodempay.customers.delete(customerId). This action is irreversible.
Sample Request:
List All Customers
To view all customers, usemodempay.customers.list(). This returns a list of customers, with pagination options if there are many entries.
Sample Request: