--- title: "Get or Create Customer" openapi: "openapi POST /v1/customers.getOrCreate" --- import { DynamicParamField } from "/components/dynamic-param-field.jsx"; import { DynamicResponseField } from "/components/dynamic-response-field.jsx"; import { DynamicResponseExample } from "/components/dynamic-response-example.jsx"; If the customer already exists and you try to create it again, you will simply be returned the customer object (rather than an error being thrown). ### Body Parameters Your unique identifier for the customer Customer's name Customer's email address Unique identifier (eg, serial number) to detect duplicate customers and prevent free trial abuse Additional metadata for the customer Stripe customer ID if you already have one Whether to create the customer in Stripe The ID of the free plan to auto-enable for the customer Whether to send email receipts to this customer Customer expand options ### Response The name of the customer. The email address of the customer. A unique identifier (eg. serial number) to de-duplicate customers across devices or browsers. For example: apple device ID. Stripe customer ID. The environment this customer was created in. The metadata for the customer. Whether to send email receipts to the customer. Array of plan IDs included in this invoice The Stripe invoice ID The status of the invoice The total amount of the invoice The currency code for the invoice URL to the Stripe-hosted invoice page The name of the entity The customer ID this entity belongs to The feature ID this entity belongs to The environment (sandbox/live) Array of active discounts applied to the customer The name of the discount or coupon The type of reward The discount value (percentage or fixed amount) How long the discount lasts Number of billing periods the discount applies for repeating durations The currency code for fixed amount discounts Timestamp when the discount becomes active Timestamp when the discount expires The Stripe subscription ID this discount is applied to Total amount saved from this discount