The accounts model keeps track of all carts, orders, invoices, and subscriptions for your store's customers—including their default billing and shipping details. Multiple credit cards and addresses can be saved and are selected by the customer in a checkout flow. You can add custom fields to accounts via the dashboard or Backend API to capture and store additional desired account information.
When a customer checks out as a guest, an account is created with their name and email address. The email functions as a secondary id, so if they later decide to sign up with the same email address, the existing account will be updated. This prevents duplicate customers from being created.
Customers can be designated as individual or business accounts. Aside from making it easier to distinguish the type of customer and parse the name field, business accounts can have a vat_number for tax reporting.
Accounts can be assigned to a group, which is useful for defining specific pricing, access levels, and custom logic to a certain subset of customers.
Customer accounts have the ability to receive and maintain a balance of credits for which they can use to make purchases on your storefront. In the case of returns, refunds can be issued in the form of account credits.
Credits support custom implementations as well. This allows for creating storefronts that facilitate transactions with credits instead of a currency. Customers would purchase credits for use when making purchases, drawing directly from the account balance for each transaction.
Swell provides a vault for storing encrypted credit card information. This allows customers to use any of their saved cards during checkout and enables recurring billing with any payment gateway that supports vaulted cards. Cards are tokenized for use in checkout flows.
See the accounts model