---
title: "Get Or Create Customer"
openapi: "openapi POST /v1/customers.getOrCreate"
---
import { DynamicParamField } from "/snippets/dynamic-param-field.jsx";
import { DynamicResponseField } from "/snippets/dynamic-response-field.jsx";
import { DynamicResponseExample } from "/snippets/dynamic-response-example.jsx";
### 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
Your unique identifier for the customer.
The name of the customer.
The email address of the customer.
Timestamp of customer creation in milliseconds since epoch.
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.
The ID of the feature, used to refer to it in other API calls like /track or /check.
The name of the feature.
The type of the feature
Singular and plural display names for the feature.
The singular display name for the feature.
The plural display name for the feature.
Credit cost schema for credit system features.
The ID of the metered feature (should be a single_use feature).
The credit cost of the metered feature.
Whether or not the feature is archived.
The ID of the feature, used to refer to it in other API calls like /track or /check.
The name of the feature.
The type of the feature
Singular and plural display names for the feature.
The singular display name for the feature.
The plural display name for the feature.
Credit cost schema for credit system features.
The ID of the metered feature (should be a single_use feature).
The credit cost of the metered feature.
Whether or not the feature is archived.
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
Timestamp when the invoice was created
URL to the Stripe-hosted invoice page
The unique identifier of the entity
The name of the entity
The customer ID this entity belongs to
The feature ID this entity belongs to
Unix timestamp when the entity was created
The environment (sandbox/live)
Array of active discounts applied to the customer
The unique identifier for this discount
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
```json 200
{
"id": "cus_123",
"created_at": 1717000000,
"name": "John Doe",
"email": "john@example.com",
"fingerprint": "1234567890",
"stripe_id": "cus_123",
"env": "sandbox",
"metadata": {},
"subscriptions": [
{
"id": "sub_123",
"created_at": 1717000000,
"plan_id": "plan_123",
"status": "active",
"quantity": 1,
"interval": "month",
"interval_count": 1
}
],
"purchases": [],
"balances": {
"balance_1": {
"id": "balance_1",
"amount": 100,
"currency": "USD",
"created_at": 1717000000,
"updated_at": 1717000000
}
}
}
```