## Source event

`paymentRequest.on(event: string, handler: function)`

Stripe.js automatically creates a [Source](https://docs.stripe.com/api/sources.md) after the customer is done interacting with the browser’s payment interface.
To access the created source, listen for this event.

- `event`
  The name of the event. In this case, `source`.

- `handler`
  A callback function that will be called with a [PaymentResponse](https://docs.stripe.com/js/appendix/payment_response.md) object when the event is fired.
The `PaymentResponse` object will contain a `source` field.

### Example

```title
Handle 'source' event
```
