Skip to content

Customer

Source: src/Stripe/Customer.ts

A Stripe Customer — the billing identity invoices, subscriptions, and Checkout sessions attach to. Email, name, description, phone, and metadata are updated in place. Deleting a customer is permanent and immediately cancels any active subscriptions.

Email and name

const customer = yield* Stripe.Customer("alice", {
email: "alice@example.com",
name: "Alice Example",
});

Description, phone, and metadata

const customer = yield* Stripe.Customer("alice", {
email: "alice@example.com",
name: "Alice Example",
description: "Beta tester",
phone: "+15555550100",
metadata: { plan: "pro" },
});
const customer = yield* Stripe.Customer("alice", {
email: "alice+updated@example.com",
name: "Alice Example",
metadata: { plan: "enterprise" },
});