create customer

This block is part of the stripe group and was last modified in core v15.0.0.

create customer v15.0.0

Creates the Stripe customer that saved cards, subscriptions and invoices hang off. Stripe enforces no uniqueness : creating this twice for one person gives them two billing histories and two sets of saved cards, so wire an idempotency key from your own user GUID.

In pins 10 + flow
  • flow
  • connection stripeconnection required
  • email value

    Where Stripe sends receipts and invoices.

  • name value
  • phone value
  • description value

    Shown in the Stripe dashboard : a good place for your own user id.

  • locale value

    Preferred language for Stripe's emails and hosted pages, e.g. nl.

  • address object

    {line1, line2, city, postal_code, state, country}. Needed for automatic tax.

  • shipping object

    {name, phone, address:{…}}.

  • meta data object
  • idempotency key value

    Optional. Reusing a key makes Stripe replay the first response instead of creating a second object : wire something stable per order, like the order GUID.

Out pins 12 + flow
  • flow
  • connection stripeconnection
  • customer id value

    cus_… : store this on your own user record.

  • email value
  • name value
  • balance number

    Stripe's sign convention is the opposite of the intuitive one: negative is credit the customer holds, positive is what they owe.

  • currency value
  • meta data object
  • customer object
  • success condition
  • error value

    Stripe's own message, or a sentinel like MISSING_SESSION_ID for a problem in the wiring.

  • error code value

    Stripe's machine-readable code, e.g. card_declined, resource_missing.

  • decline code value

    Why the bank refused, e.g. insufficient_funds. Only set on a declined card.

stripe customer
billing account

A Stripe customer is created once and referred to forever after, so the customer_id belongs in your own storage next to the account it describes. Here create customer takes an email and a name, and set custom field puts the returned id into a mutation that update document writes onto the user document. Skip this step and every later call has to search Stripe by email, which is slower and not unique.

Studio canvas example for the create customer block: creating a customer and keeping its id.

Version history

Introduced in v15.0.0.

Service documentation

External API reference This block wraps a third-party service. Click here for the service's own documentation of the underlying endpoint.
Back to stripe Return to the main group to view all sub-groups Back to customers Return to the group to view all blocks within this group