1. Customers
Documentation
  • Back to home
  • StripeKit
  • Installation
  • Getting Started
  • Choosing a Mode
  • Type Reference
  • Setup
    • Configuration
    • Timezones
    • Storage Adapter
    • Money and Currency
    • Error Handling
  • Stripe
    • Elements
  • Modules
    • Overview
    • Customers
      • Overview
      • List
      • Retrieve
      • Find or Create by Email
      • Create
      • Update
      • Sync
      • Delete
    • Payment Methods
      • Overview
      • Create Setup Intent
      • List
      • Attach
      • Detach
      • Set Default
      • Sync
    • Payments
      • Overview
      • Pay With Saved Method
      • Create
      • Retrieve
      • Confirm
      • Cancel
      • Sync
    • Checkout
      • Overview
      • Get
      • Create
      • Submit Fields
      • Apply Coupon
      • Mark Complete
    • Subscriptions
      • Overview
      • Create
      • Retrieve
      • Cancel
      • Resume
      • Toggle Collection Method
      • Update Fields
      • Apply Promotion Code
      • List By Customer
      • Find By Metadata
      • Sync
    • Invoices
      • Overview
      • Retrieve
      • List By Customer
      • List By Subscription
      • Pay With Saved Method
      • Void
      • Finalize
      • Sync
    • Coupons
      • Overview
      • Create
      • Validate
      • Apply To Subscription
      • List
      • Deactivate
    • Webhooks
      • Overview
      • Process
      • Events Reference
    • Sync
      • Overview
  1. Customers

Create

kit.customers.create()#

Creates a new customer in Stripe. If a storage adapter is configured, the normalized record is persisted via saveCustomer() immediately after creation.

Signature#

Parameters#

FieldTypeRequiredDescription
emailstringYesMust be a valid email address, or a ValidationError is thrown.
namestringNoCustomer's full name or business name.
phonestringNoPhone number.
descriptionstringNoInternal description shown in the Stripe Dashboard.
addressobjectNoline1, line2, city, state, postalCode, country.
taxIdstringNoIf provided, registered as an eu_vat tax ID on the customer.
metadataRecord<string,string>NoMerged with StripeKit's own source: "stripekit" metadata entry.
userIdstring|numberNoYour own internal user ID, stored on the returned record (not sent to Stripe).

Example request#

Example response#

Errors#

ExceptionWhen
ValidationErroremail is missing or not a valid address.
StripeOperationErrorStripe rejects the request, for example a duplicate tax ID or an invalid country code.

Notes#

StripeKit always writes source: "stripekit" into the customer's metadata on Stripe's side, in addition to anything you pass yourself, so you can identify StripeKit-created objects in the Stripe Dashboard.
taxId currently always registers as eu_vat. For other tax ID types, create the customer with StripeKit and add the tax ID afterwards using the underlying Stripe client via kit.raw.
Previous
Find or Create by Email
Next
Update
Built with