Stripe | Financial Infrastructure to Grow Your Revenue

Stripe | Financial Infrastructure to Grow Your Revenue

4466 articles

Create Source Data


Create source stripe.createSource(sourceData: object) Use stripe.createSource to convert raw payment information into a Source object that you can safely pass to your server for use in an API call. See the Sources documentation for more information about sources. > You cannot pass raw card information to stripe.createSource(sourceData). > Instead, you must gather card information in an Element and use stripe.createSource(element, sourceData). > You can also pass an existing card token to convert it into a Source object. - 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?