Skip to content
Create account
or
Sign in
The Stripe Docs logo
/
Ask AI
Create account
Sign in
Get started
Payments
Revenue
Platforms and marketplaces
Money management
Developer resources
Overview
About Stripe payments
Upgrade your integration
Payments analytics
Online payments
OverviewFind your use caseUse Managed Payments
Use Payment Links
Use a pre-built checkout page
    Overview
    Quickstarts
    Customise look and feel
    Collect additional information
      Collect physical addresses
      Charge for shipping
      Collect phone numbers
      Collect customer names
      Add custom fields
      Collect consent for promotional emails
    Collect taxes
    Dynamically update checkout
    Manage your product catalogue
    Subscriptions
    Manage payment methods
    Let customers pay in their local currency
    Add discounts, upsells, and optional items
    Set up future payments
    Save payment details during payment
    After the payment
    Migrate from legacy Checkout
    Migrate Checkout to use Prices
Build a custom integration with Elements
Build an in-app integration
Payment Methods
Add payment methods
Manage payment methods
Faster checkout with Link
Payment interfaces
Payment Links
Checkout
Web Elements
In-app payments
Payment scenarios
Handle multiple currencies
Custom payment flows
Flexible acquiring
Orchestration
In-person payments
Terminal
Beyond payments
Incorporate your company
Crypto
Agentic commerce
Financial Connections
Climate
Understand fraud
Radar fraud protection
Manage disputes
Verify identities
HomePaymentsUse a prebuilt checkout pageCollect additional information

Collect customer names

Collect business and individual names as first-class fields on Checkout.

You can enable name collection on the payment form to collect business or individual names from your customers. The information is available after the session is complete.

These first-class names are separate from the names collected within billing and shipping information and always appear as top-level name fields on the payment form if enabled.

First-class name fields in the Checkout form

Checkout adds top-level name fields to the payment form within contact details.

Enable name collection

Create a Checkout Session while specifying name collection settings. To enable name collection, configure the name_collection object when creating a Checkout Session. You can collect business names, individual names, or both, and set each field as either required or optional based on your needs.

Command Line
cURL
No results
curl https://api.stripe.com/v1/checkout/sessions \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d mode=payment \ --data-urlencode success_url="https://example.com/success" \ --data-urlencode cancel_url="https://example.com/cancel" \ -d "line_items[0][price]"=
{{PRICE_ID}}
\ -d "line_items[0][quantity]"=1 \ -d "name_collection[business][enabled]"=true \ -d "name_collection[individual][enabled]"=true \ -d "name_collection[individual][optional]"=true

Note

When you set business name collection to required, express checkout and one-click buttons, such as Apple Pay, move to the bottom of the payment form or are disabled.

Retrieve the collected names

After the session, you can retrieve customers’ business or individual names from the resulting Customer or Checkout Session objects:

On the Customer

Checkout saves collected names onto their respective business_name or individual_name properties of the Customer object, which you can access programmatically by either fetching the Customer object directly with the API or by listening for the customer.created event in a webhook.

The Customer object’s name will also be set to the business_name or individual_name, in that order.

{ "object": { "id": "cus_HQmikpKnGHkNwW", "object": "customer", ... "name": "Stripe, Inc." "business_name": "Stripe, Inc." ... "individual_name": "Jenny Rosen" ... } }

You can also view the customer names in the Dashboard.

On the Checkout Session

The customer’s names are also saved in the collected_information and customer_details hash of the Checkout Session object, under:

  • collected_information.business_name and collected_information.individual_name
  • customer_details.business_name and customer_details.individual_name
{ "object": { "id": "cs_test_a1dJwt0TCJTBsDkbK7RcoyJ91vJxe2Y", "object": "checkout.session", ... "collected_information": { "business_name": "Stripe, Inc.", "individual_name": "Jenny Rosen" }, ... "customer": "cus_id_of_new_customer", "customer_details": { ... "business_name": "Stripe, Inc.", "individual_name": "Jenny Rosen", "name": "Stripe, Inc." }, ... } }

After each successful Checkout Session, Stripe sends the checkout.session.completed event containing the Checkout Session object and collected values, which you can listen for in a webhook.

Was this page helpful?
YesNo
  • Need help? Contact Support.
  • Join our early access programme.
  • Check out our changelog.
  • Questions? Contact Sales.
  • LLM? Read llms.txt.
  • Powered by Markdoc