This example component shows how you might attach an event handler within
componentDidMount() that updates the component's state with the referral UUID:
When the form data is submitted to your server from React, you then add the
referral value to the Stripe customer's metadata:
Adding the referral UUID to the Stripe customer's metadata converts
the referral and associates it with the affiliate.
Whenever that customer is charged, a commission will be paid to the affiliate according to your campaign rules.
Please see the
Stripe API Reference
for full documentation on creating a customer with Node.js.