Add gender to Stripe customers
For revenue analysis by audience, store gender and its probability in Stripe customer metadata when a customer is created. A small webhook handler does it in your own stack; Zapier and Make do it without code and can write the result to a sheet or CRM instead.
100 free credits every day. No card.
Webhook handler: customer.created → metadata
Listen for the customer.created event, look up the customer name (or the email when there is no name), and write the result back as metadata. Metadata keys are free-form and show in the Dashboard and in exports, so analysis tools that read Stripe data get the field without another join.
Verify the webhook signature before trusting the event, and keep the NameGender key in your server configuration, never in client code. Customers created through Checkout get the billing name, which is the person paying, not always the person using the product.
// After verifying the Stripe signature and parsing the event:
if (event.type === 'customer.created') {
const customer = event.data.object;
const byName = Boolean(customer.name);
const url = byName
? 'https://namegender.com/api/v1/gender?name=' + encodeURIComponent(customer.name)
: 'https://namegender.com/api/v1/gender/email?email=' + encodeURIComponent(customer.email || '');
const res = await fetch(url, {
headers: { Authorization: 'Bearer ' + process.env.NAMEGENDER_API_KEY },
});
const result = await res.json();
await stripe.customers.update(customer.id, {
metadata: {
gender: result.gender || '',
gender_probability: String(result.probability ?? ''),
},
});
}
Copy failed. Select and copy the text.
Without code: Zapier or Make
Add NameGender to your Zapier account with the invitation link on this page. Trigger: Stripe, New Customer. Action: NameGender, Find Gender, with the customer name, or the email and the type of value set to Email. Then write the result where you analyse revenue: Google Sheets, Create Spreadsheet Row, or your CRM’s update action.
A three-step Zap needs a paid Zapier plan. In Make: Stripe’s event trigger on customer.created, NameGender’s Get Gender from a Name, then your sheet or CRM module.
Use it for analysis, not for decisions about a customer
Inferred gender is an estimate from the name. It is useful for aggregate questions, such as how revenue splits across audiences or which campaign reached whom, and it should not change prices, payment terms, fraud rules or anything else applied to one person.
Mention the enrichment in your privacy notice, and report the share of customers where gender is unknown next to every split, so the analysis does not quietly drop them. A split that leaves out a fifth of customers answers a different question than the one on the chart.
Questions
Where should the result be stored?
Customer metadata keeps it next to the payment data. A sheet or CRM works when your analysis happens there.
What if the customer has no name?
Look up the email instead. Only the part before the @ is read.
Does it work for existing customers?
Export customers from the Dashboard, upload the CSV in the NameGender dashboard, and write the result back with the API or keep it in your analysis tool.
Can I use the result for pricing?
No. Use it for aggregate analysis only, not for decisions about an individual customer.
Related pages
Write a gender custom property to new Klaviyo profiles from the first name or email, and build segments that only use confident answers.
Fill a gender property on every new HubSpot contact from the first name or email. Zapier and Make steps, plus a CSV route for existing contacts.
Use the NameGender JavaScript client in Node.js, Deno or Bun. See country-aware lookups, bulk requests, error handling and safe API-key placement.
Reading the gender field alone discards everything that says whether to believe it. What each response field means and the thresholds behind confidence.
Check it against your own list
Every number on this page is reproducible with a free key. If your data breaks it, that is the more interesting result.