• Log in
  • Contact Us

Get in touch  

Concepts • Customers

How to manage customers

Last updated: 05 Jul 2019

Manage your customers through the API or directly through Moltin dashboard.

Create a customer

If you are creating a new customer on the API, you can optionally submit a password along with that customer’s details.

Customer creation is currently not available in the iOS SDK (support for implicit authentication only). Also, the PHP SDK doesn’t contain the Customers endpoints.

Delete a customer

Use a customer id or customer token to delete an existing customer if using an API, or do it directly through Moltin dashboard.

Customer authentication - passwords

Once you create a password for a customer, it cannot be retrieved again. Any customers with passwords will have the value of true in the password field.

If you have an existing customer who does not have a password, you can add the password field using the customer_id.

Customer token

You can only generate a customer token for existing customers using a combination of their email and password.

Use customer token for a scenario in which you don’t have full read/write access to the API (implicit token type) and you want to authenticate your customers through email and password to access and manage their own details, such as address, orders, etc.

In detail, use a customer token to:

  • Authenticate your customer’s identity (instead of using email address and password).
  • Get/update customer’s details.
  • Get/update customer’s address.
  • Get customer’s orders.
  • Provide your customer with implicit access to their details and orders.

Manage existing customers


One customer can have unlimited addresses set up for them, such as home, neighbor, wife’s office, etc. Use Moltin dashboard or set them up through the API. You can add/update/delete customer addresses on their behalf.

If you’re using customer token scenario, you can grant your customers access to their own data so that they can manage their own address details (add/update/delete an address). You can also cater for already authenticated users, and make their address part of the checkout workflow (as opposed to guest users).


Streamline the checkout workflow for your existing customers and create a Customer_ID-based checkout workflow. The returned order object will include the customer’s mailing details and create a relationship between the customer and the order that you can later use to retrieve all orders for a particular customer. Use it to provide your customers with ability to review their order history.

To retrieve orders for a customer, include the following details in the request header:

Authentication token

Customer token

Guest customers

To cater for guest customers, create a checkout flow based on the customer object. Each time, a guest customer will have to provide full shipping and billing details.

It is not possible to link orders with customer object, and as such, create orders records for guest users.

Add custom fields to a Customer object

Extend Customer object with Flows that allow you to add custom fields. To add a field, you’ll need to pass customer token in the request header.

Filter customers

Customer filtering is useful for customer management, e.g. it could help you determine whether to send a user to a signup or login function. If using JavaScript SDK, make sure it’s version 3.3.0 or higher.

Further reading

Explore More Concepts

01 Jul 2019

How to calculate cart and order totals

There are two methods that may be used to calculate cart and order totals. The method used depends on the calculation_method setting. The default is currently the simple method and this will continue...

Read More
James Carter
in Orders | Carts
18 Jun 2019

How promotions work

Promotions allow you to provide discounts to customers. By defining a Promotion and a code, you put in place the facility to offer discounts to customers applied directly to their shopping carts.

Read More
George FitzGibbons
in Carts | Promotions
06 Jun 2019

When to use a custom cart

Custom carts allow you to process an order for any type of item you wish to sell. The item does not need to exists in Moltin, which means custom cart items can be used for all sort of use cases.

Read More
George FitzGibbons
in Carts