Stripe | Financial Infrastructure to Grow Your Revenue

Stripe | Financial Infrastructure to Grow Your Revenue

4466 articles

Create Source


Create a Source stripe.createSource(element: object, sourceData: object) Use stripe.createSource to convert payment information collected by elements into a Source object that you safely pass to your server to use in an API call. See the Sources documentation for more information about sources. - element The Element containing payment information. If applicable, the Element pulls data from other elements you’ve created on the same Elements instance. - sourceData A required object containing the type of Source you want to create, and any additional payment information that you have collected. See the Sources API reference for details. ### Example title Create a Source

Last verified 2026-09-24

Is this helpful?