## Create a PaymentRequestObject Use `stripe.paymentRequest` to create a `PaymentRequest` object. Creating a `PaymentRequest` requires that you configure it with an `options` object. In Safari, `stripe.paymentRequest` uses Apple Pay, and in other browsers it uses the [Payment Request API standard](https://www.w3.org/TR/payment-request/). > `stripe.paymentRequest` abstracts over a number of implementation > details to work uniformly across Apple Pay and the Payment Request > browser standard. In particular, under the hood we set `supportedNetworks` > to its most permissive setting, dynamically accounting for country > and platform. It is currently not possible to override this and make > `supportedNetworks` be more restrictive. **Syntax:** `stripe.paymentRequest(...)` - `options` (object) **required** A set of options to create this `PaymentRequest` instance with. These options can be updated using [`paymentRequest.update`](/js/payment_request/update.md). - `country` (string) **required** The two-letter country code of your Stripe account (e.g., `US`). - `currency` (string) **required** Three character currency code (e.g., `usd`). - `total` (PaymentItem) **required** A [PaymentItem](#payment_item_object) object. This `PaymentItem` is shown to the customer in the browser’s payment interface. - `displayItems` (array) An array of [PaymentItem](#payment_item_object) objects. These objects are shown as line items in the browser’s payment interface. Note that the sum of the line item amounts does not need to add up to the `total` amount above. - `requestPayerName` (boolean) By default, the browser‘s payment interface only asks the customer for actual payment information. A customer name can be collected by setting this option to `true`. This collected name will appears in the [PaymentResponse](/js/appendix/payment_response.md) object. We highly recommend you collect name as this also results in collection of billing address for Apple Pay. The billing address can be used to perform address verification and block fraudulent payments. For all other payment methods, the billing address is automatically collected when available. - `requestPayerEmail` (boolean) See the [`requestPayerName`](#payment_request_create-options-requestPayerName) option. - `requestPayerPhone` (boolean) See the [`requestPayerName`](#payment_request_create-options-requestPayerName) option. - `requestShipping` (boolean) Collect shipping address by setting this option to `true`. The address appears in the [PaymentResponse](/js/appendix/payment_response.md). You must also supply a valid [ShippingOptions] to the `shippingOptions` property. This can be up front at the time `stripe.paymentRequest` is called, or in response to a `shippingaddresschange` event using the `updateWith` callback. - `shippingOptions` (array) An array of [ShippingOption](/js/appendix/shipping_option.md) objects. The first shipping option listed appears in the browser payment interface as the default option. - `disableWallets` (array) An array of wallet strings. Can be one or more of `applePay`, `googlePay`, `link`, and `browserCard`. Use this option to disable Apple Pay, Google Pay, Link, and/or browser-saved cards. - `applePay` (object) Specify Apple Pay specific options. These are passed through to the Apple Pay API. - `recurringPaymentRequest` (object) Specify a request to set up a recurring payment. See the [Apple Pay documentation](https://developer.apple.com/documentation/apple_pay_on_the_web/applepayrecurringpaymentrequest) for more details. - `paymentDescription` (string) **required** - `managementURL` (string) **required** - `regularBilling` (object) **required** - `amount` (number) **required** - `label` (string) **required** - `recurringPaymentStartDate` (Date) - `recurringPaymentEndDate` (Date) - `recurringPaymentIntervalUnit` ('year' | 'month' | 'day' | 'hour' | 'minute') - `recurringPaymentIntervalCount` (number) - `trialBilling` (object) - `amount` (number) **required** - `label` (string) **required** - `recurringPaymentStartDate` (Date) - `recurringPaymentEndDate` (Date) - `recurringPaymentIntervalUnit` ('year' | 'month' | 'day' | 'hour' | 'minute') - `recurringPaymentIntervalCount` (number) - `billingAgreement` (string) - `deferredPaymentRequest` (object) Specify a request to set up a deferred payment. See the [Apple Pay documentation](https://developer.apple.com/documentation/apple_pay_on_the_web/applepaydeferredpaymentrequest) for more details. - `paymentDescription` (string) **required** - `managementURL` (string) **required** - `deferredBilling` (object) **required** - `amount` (number) **required** - `label` (string) **required** - `deferredPaymentDate` (Date) **required** - `billingAgreement` (string) - `freeCancellationDate` (Date) If set, you must also supply a freeCancellationDateTimeZone. - `freeCancellationDateTimeZone` (string) If set, you must also supply a freeCancellationDate. These are [tz](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) timezones such as `America/Los_Angeles`, `Europe/Dublin`, and `Asia/Singapore`. - `automaticReloadPaymentRequest` (object) Specify a request to set up an automatic reload payment. See the [Apple Pay documentation](https://developer.apple.com/documentation/apple_pay_on_the_web/applepayautomaticreloadpaymentrequest) for more details. - `paymentDescription` (string) **required** - `managementURL` (string) **required** - `automaticReloadBilling` (object) **required** - `amount` (number) **required** - `label` (string) **required** - `automaticReloadPaymentThresholdAmount` (number) **required** - `billingAgreement` (string) - `cardFunding` ('supportsDebit' | 'supportsCredit') By default, Apple Pay allows both credit and debit cards. You can specify if you only want to support one type of card with either 'supportsDebit' or 'supportsCredit'. - `onBehalfOf` (string) The Stripe account ID which is the business of record. See [use cases](/connect/charges.md) to determine if this option is relevant for your integration. This should match the [on_behalf_of](/api/payment_intents/create.md#create_payment_intent-on_behalf_of) provided on the Intent used when confirming payment. ### Create a PaymentRequestObject ```js var paymentRequest = stripe.paymentRequest({ country: 'US', currency: 'usd', total: { label: 'Demo total', amount: 1000, }, requestPayerName: true, requestPayerEmail: true, }); ``` ```es_next const paymentRequest = stripe.paymentRequest({ country: 'US', currency: 'usd', total: { label: 'Demo total', amount: 1000, }, requestPayerName: true, requestPayerEmail: true, }); ```