## Create an Element This method creates an instance of an individual `Element`. It takes the `type` of `Element` to create as well as an `options` object. **Syntax:** `elements.create(...)` - `type` ('paymentRequestButton') **required** The type of element you are creating. In this case, `paymentRequestButton`. - `options` (object) **required** Options for creating a `paymentRequestButton` element. - `classes` (object) Set custom class names on the container DOM element when the Stripe element is in a particular state. - `base` (string) The base class applied to the container. Defaults to `StripeElement`. - `complete` (string) The class name to apply when the `Element` is complete. Defaults to `StripeElement--complete`. - `empty` (string) The class name to apply when the `Element` is empty. Defaults to `StripeElement--empty`. - `focus` (string) The class name to apply when the `Element` is focused. Defaults to `StripeElement--focus`. - `invalid` (string) The class name to apply when the `Element` is invalid. Defaults to `StripeElement--invalid`. - `webkitAutofill` (string) The class name to apply when the `Element` has its value autofilled by the browser (only on Chrome and Safari). Defaults to `StripeElement--webkit-autofill`. - `style` (object) An object used to customize the appearance of the Payment Request Button. The object must have a single `paymentRequestButton` field, containing any of the following sub-fields: - `type` (string) Preferred button type to display. Available types, by wallet: Browser card: `default`, `book`, `buy`, or `donate`. Google Pay: `default`, `buy`, or `donate`. Apple Pay: `default`, `book`, `buy`, `donate`, `check-out`, `subscribe`, `reload`, `add-money`, `top-up`, `order`, `rent`, `support`, `contribute`, `tip` When a wallet does not support the provided value, `default` is used as a fallback. - `theme` (string) One of `dark`, `light`, or `light-outline`. The default is `dark`. - `height` (string) The height of the Payment Request Button. Accepts `px` unit values. - `paymentRequest` (PaymentRequest) **required** A [PaymentRequest](/js/payment_request.md) object used to configure the element. ### Create a paymentRequestButton Element ```js var paymentRequest = stripe.paymentRequest({ country: 'US', currency: 'usd', total: {label: 'Demo total', amount: 1099}, requestPayerName: true, requestPayerEmail: true, }); var paymentRequestButtonElement = elements.create( 'paymentRequestButton', { paymentRequest: paymentRequest, style: { paymentRequestButton: { theme: 'light', }, }, }, ); ``` ```es_next const paymentRequest = stripe.paymentRequest({ country: 'US', currency: 'usd', total: {label: 'Demo total', amount: 1099}, requestPayerName: true, requestPayerEmail: true, }); const paymentRequestButtonElement = elements.create( 'paymentRequestButton', { paymentRequest, style: { paymentRequestButton: { theme: 'light', }, }, }, ); ```