Subotiz creates customer profiles during checkout, API integration, or admin operations to ensure every subscription and payment is linked to a single billing identity. Customer profiles are typically created early in the billing flow to keep invoices, subscription plans, and payment records consistent and traceable. This article explains the available creation entry points, how customer types are assigned, and what information is collected during profile creation.
Creating Customer Profiles
Subotiz supports multiple entry points for creating customer profiles, depending on your business workflow:
- Via API: A customer profile is created when an API request includes either an External Customer ID or an email address. If only a Subotiz Customer ID is provided and it does not match an existing record, no new profile is created.
- During checkout: When a checkout session starts, Subotiz checks for an existing customer profile using the provided identifiers. If no match is found, a new customer profile is automatically created to represent the billing identity for the transaction.
- Via admin import: Merchants can create or update customer profiles in bulk using the customer import feature in the admin. Imported records are identified using email addresses or External Customer IDs and follow the same matching logic as other creation methods. For detailed steps, see Customers|Customer Import
Assigning Customer Types
Customer type is automatically determined based on the contents of the cart:
- Customer: Created when the cart includes at least one subscription product.
- Guest: Created when the cart includes only one-time purchases.
Preventing Duplicate Customer Profiles
Subotiz applies a priority-based matching logic to determine whether an existing customer profile should be reused or a new one should be created. A new profile is created only when a valid identifier is provided.
Matching occurs in the following order:
- Subotiz Customer ID: Used only to locate existing profiles. If no match is found, no new profile is created.
- External Customer ID: If no match is found, a new profile is created.
- Email address: If no match is found, a new profile is created.
This logic helps prevent duplicate customer profiles and ensures billing and subscription records remain consistent.
Collecting Customer Information
As long as at least one valid identifier is provided, Subotiz creates a customer profile and automatically collects available contact and billing information from the checkout form, payment method, or API request.
Field |
Source |
|---|---|
Email |
Collected from the checkout form or passed through the API. |
Name |
Pulled from the payment method (e.g., credit card name, PayPal name). |
Phone |
Optional. From checkout or API. |
Address |
Optional. From payment method or API. |
Metadata |
Optional. Custom fields via API. |
Creation Timing
- API-based creation: The profile is created immediately when a valid API request is received.
- Checkout-based creation: A profile is created automatically during checkout if no matching profile is found.
Upgrading Guest Profiles
If a guest later purchases a subscription using the same identifier (typically an email address), Subotiz automatically upgrades the profile to a customer profile.
During the upgrade:
- The original customer ID is retained.
- The customer type is updated to Customer.
- Missing fields (such as name or address) are automatically populated when new data becomes available.
Subotiz maintains consistent customer data by linking transactions through Customer IDs, External Customer IDs, or email addresses. Guest profiles are automatically upgraded when subscription activity is detected, helping you maintain a clean and reliable billing system.