## Create source `stripe.createSource(sourceData: object)` Use `stripe.createSource` to convert raw payment information into a [Source](https://docs.stripe.com/api.md#sources) object that you can safely pass to your server for use in an API call. See the [Sources documentation](https://docs.stripe.com/sources.md) for more information about sources. > You can pass raw card information to `stripe.createSource(sourceData)` to create card Sources. > However, we recommend using [Elements](https://docs.stripe.com/payments/elements.md) for collecting the card data to maintain the simplest form of [PCI compliance](https://docs.stripe.com/security.md#validating-pci-compliance). - `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](https://docs.stripe.com/api.md#create_source) reference for details. ### Example ```title Create a Source ```