.paymentRequestWithAndroidPay(options) -> Promise
options
— An object with the following keys:
Key | Type | Description |
---|---|---|
total_price | String | Total price for items |
currency_code | String | Three-letter ISO currency code representing the currency paid out to the bank account |
shipping_address_required (Optional) | Bool | Is shipping address menu required? Default is true |
line_items | Array<lineItem> | Array of purchased items. Each item contains lineItem |
lineItem
Key | Type | Description |
---|---|---|
currency_code | String | Currency code string |
description | String | Short description that will shown to user |
total_price | String | Total order price |
unit_price | String | Price per unit |
quantity | String | Number of items |
Example
const options = {
total_price: '80.00',
currency_code: 'USD',
shipping_address_required: false,
line_items: [{
currency_code: 'USD',
description: 'Whisky',
total_price: '50.00',
unit_price: '50.00',
quantity: '1',
}, {
currency_code: 'USD',
description: 'Vine',
total_price: '30.00',
unit_price: '30.00',
quantity: '1',
}],
}
const token = await stripe.paymentRequestWithAndroidPay(options)
// Client specific code
// api.sendTokenToBackend(token)
Token structure see in paymentRequestWithApplePay