- Stripe · Create a customer — A customer in Stripe.
- Stripe · Find a customer — Looks a customer up by email. Use it before creating one, so the same person is not added twice, or to get the id Create an invoice needs.
Who can do this
Workspace Admins and Editors, on every plan. Viewers see the step's settings but cannot change them.
Before you start
A Stripe connection — see Connect Stripe.
Steps
Find a customer:
- Select +. In the step picker, open Apps, select Stripe, then Find a customer.
- In Connection, choose your Stripe connection.
- In Email, the address to look up — Nobody found is an answer, not a failure: found is false. For example
{{ trigger.email }}. - Select Run this step.
Create a customer:
- In the step picker, under Stripe, select Create a customer.
- In Connection, choose your Stripe connection.
- Fill in any of Email, Name, Phone and Description — for example accounts@northwind.example and Northwind Logistics. All are optional; an empty one is not sent.
- Optional: under Metadata, select Add a field and add a name and value — Names and values Stripe keeps with it. For example order and
{{ trigger.orderId }}. - Select Run this step.
To create a customer only when there is none, put Find a customer first, then an If on {{ steps.find_a_customer.found }} — see Choose a path with If.
Output
| Field | What it is |
|---|---|
id |
Stripe's id for the customer — starts cus_. |
email, name, phone |
As Stripe has them. |
createdAt |
When the customer was made, in UTC. |
found |
Find a customer only: true, or false when nobody has that email. When false, only found and email are given. |
Good to know
- Stripe allows several customers with one email. Find a customer gives the first Stripe returns.
- Create a customer always makes a new one, even if the email is already there.
- Runs once per item.
If something goes wrong
| What you see | Why | What to do |
|---|---|---|
| Email is empty when the step ran — an earlier step may not have given the value it names. | Find a customer got no email. | Check the value it reads. |
| Stripe refused: … | Stripe would not do it, in its own words — an email it cannot read, a restricted key without Customers. | Fix what it names. |