# Stripe Customer

> Stripe Customer with email, address, phone, and metadata.

- Name: `stripe-customer`
- Categories: stripe
- Depends on: `@open-types/stripe-shared`
- Detail page: https://open-types.dev/types/stripe-customer

## Install

```bash
# Types only
npx shadcn add @open-types/stripe-customer

# Types + Zod v4 validators
npx shadcn add @open-types/stripe-customer-zod

# Types + real-world examples
npx shadcn add @open-types/stripe-customer-examples
```

## Types

```typescript
import type { StripeAddress, StripeMetadata } from "./stripe-shared";

export interface StripeCustomer {
  id: string;
  object: "customer";
  email: string | null;
  name: string | null;
  phone: string | null;
  address: StripeAddress | null;
  description: string | null;
  metadata: StripeMetadata;
  created: number;
  livemode: boolean;
}
```

## Zod validator

```typescript
import * as z from "zod";
import type { StripeCustomer } from "../types/stripe-customer";
import {
  stripeAddressSchema,
  stripeMetadataSchema,
} from "./stripe-shared";

export const stripeCustomerSchema = z.object({
  id: z.string(),
  object: z.literal("customer"),
  email: z.string().nullable(),
  name: z.string().nullable(),
  phone: z.string().nullable(),
  address: stripeAddressSchema.nullable(),
  description: z.string().nullable(),
  metadata: stripeMetadataSchema,
  created: z.number(),
  livemode: z.boolean(),
}) satisfies z.ZodType<StripeCustomer>;

export type { StripeCustomer } from "../types/stripe-customer";
```

## Examples

```typescript
// Source: https://docs.stripe.com/api/customers/object
// Captured: 2026-05
import type { StripeCustomer } from "../types/stripe-customer";
import { stripeIds, stripeAddressSF } from "./shared/stripe.examples";

const full = {
  id: stripeIds.customer,
  object: "customer",
  email: "customer@example.com",
  name: "Jenny Rosen",
  phone: "+14155550123",
  address: stripeAddressSF,
  description: "VIP customer",
  metadata: { crm_id: "crm_123" },
  created: 1712948400,
  livemode: false,
} as const satisfies StripeCustomer;

export const stripeCustomerExamples = {
  full,
  minimal: {
    ...full,
    id: "cus_Q1w2E3r4T5y6min",
    email: null,
    name: null,
    phone: null,
    address: null,
    description: null,
    metadata: {},
  } satisfies StripeCustomer,
  livemode: { ...full, livemode: true } satisfies StripeCustomer,
  emailOnly: {
    ...full,
    id: "cus_Q1w2E3r4T5y6email",
    name: null,
    phone: null,
    address: null,
    description: null,
  } satisfies StripeCustomer,
} as const;
```
