PaymentRequestOptions

The payments.paymentRequest method argument

This object contains the details of a payment request including line items, shipping contact and options, and total payment request.

Properties

paymentRequestOptions.js
JS
JavaScript

const paymentRequestOptions = {

   "countryCode": "US",

   "currencyCode": "USD",

   "lineItems": [

     {

       "amount": "22.15",

       "label": "Item to be purchased",

       "id": "SKU-12345

       "imageUrl": "https://url-cdn.com/123ABC"

       "pending": true

       "productUrl": "https://my-company.com/product-123ABC"

     }

   ],

   "taxLineItems": [

     {

       "label": "State Tax",

       "amount": "8.95",

       "pending": true

     }

   ],

   "discounts": [

     {

       "label": "Holiday Discount",

       "amount": "5.00",

       "pending": true

     }

   ],

   "requestBillingContact": false,

   "requestShippingContact": false,

   "shippingOptions"[

     {

       "label": "Next Day",

       "amount": "15.69",

       "id": "1"

     },

     {

       "label": "Three Day",

       "amount": "2.00",

       "id": "2"

     }

   ],

   // pending is only required if it's true.

   "total": {

     "amount": "41.79",

     "label": "Total",

   },

};