## Create source Use `stripe.createSource` to convert raw payment information into a [Source](/api.md#sources) object that you can safely pass to your server for use in an API call. See the [Sources documentation](/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](/payments/elements.md) for collecting the card data to maintain the simplest form of [PCI compliance](/security.md#validating-pci-compliance). This method returns a `Promise` which resolves with a result object. This object has either: * `result.source`: a [Source](/api#sources) was created successfully. * `result.error`: there was an error. This includes client-side validation errors. Refer to the [API reference](/api/errors) for all possible errors. **Syntax:** `stripe.createSource(...)` - `sourceData` (object) **required** 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](/api.md#create_source) reference for details. ### Create a Source ```js stripe .createSource({ type: 'ideal', amount: 1099, currency: 'eur', owner: { name: 'Jenny Rosen', }, redirect: { return_url: 'https://shop.example.com/crtA6B28E1', }, }) .then(function(result) { // Handle result.error or result.source }); ``` ```es_next const {source, error} = await stripe.createSource({ type: 'ideal', amount: 1099, currency: 'eur', owner: { name: 'Jenny Rosen', }, redirect: { return_url: 'https://shop.example.com/crtA6B28E1', }, }); ```