## 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 cannot pass raw card information to `stripe.createSource(sourceData)`.
> Instead, you must gather card information in an Element and use [`stripe.createSource(element, sourceData)`](#stripe_create_source).
> 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](https://docs.stripe.com/api.md#create_source) reference for details.

### Example

```title
Create a Source
```
