# PaymentOptions

- [JSON representation](https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/PaymentOptions#SCHEMA_REPRESENTATION)
- [GoogleProvidedPaymentOptions](https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/PaymentOptions#GoogleProvidedPaymentOptions)
  - [JSON representation](https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/PaymentOptions#GoogleProvidedPaymentOptions.SCHEMA_REPRESENTATION)
- [PaymentMethodTokenizationParameters](https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/PaymentOptions#PaymentMethodTokenizationParameters)
  - [JSON representation](https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/PaymentOptions#PaymentMethodTokenizationParameters.SCHEMA_REPRESENTATION)
- [ActionProvidedPaymentOptions](https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/PaymentOptions#ActionProvidedPaymentOptions)
  - [JSON representation](https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/PaymentOptions#ActionProvidedPaymentOptions.SCHEMA_REPRESENTATION)

> [!WARNING]
> This item is deprecated!

Deprecated: Use V3 Proto instead. Options for payment associated with a order.

| JSON representation ||
|---|---|
| ``` { // Union field `payment_option` can be only one of the following: "googleProvidedOptions": { object (`https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/PaymentOptions#GoogleProvidedPaymentOptions`) }, "actionProvidedOptions": { object (`https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/PaymentOptions#ActionProvidedPaymentOptions`) } // End of list of possible types for union field `payment_option`. } ``` |

| Fields ||
|---|---|---|
| Union field `payment_option`. Options for payment. `payment_option` can be only one of the following: |||
| `googleProvidedOptions` | ``object (`https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/PaymentOptions#GoogleProvidedPaymentOptions`)`` Requirements for Google provided payment instrument. |
| `actionProvidedOptions` | ``object (`https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/PaymentOptions#ActionProvidedPaymentOptions`)`` info for an Action-provided payment instrument for display on receipt. |

## GoogleProvidedPaymentOptions

> [!WARNING]
> This item is deprecated!

Deprecated: Use V3 Proto instead. Requirements for Google-provided payment method.

| JSON representation ||
|---|---|
| ``` { "tokenizationParameters": { object (`https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/PaymentOptions#PaymentMethodTokenizationParameters`) }, "supportedCardNetworks": [ enum (`https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/CardNetwork`) ], "prepaidCardDisallowed": boolean, "billingAddressRequired": boolean, "facilitationSpecification": string } ``` |

| Fields ||
|---|---|
| `tokenizationParameters (deprecated)` | ``object (`https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/PaymentOptions#PaymentMethodTokenizationParameters`)`` > [!WARNING] > This item is deprecated! Required field for requesting Google provided payment instrument. These tokenization parameters will be used for generating payment token for use in transaction. The app should get these parameters from their payment gateway. Deprecated: Use facilitationSpecification field instead. |
| `supportedCardNetworks[] (deprecated)` | ``enum (`https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/CardNetwork`)`` > [!WARNING] > This item is deprecated! The app allows cards from any card network listed here being used in transaction. By default, Amex, Visa, MC and Discover are supported. Deprecated: Use facilitationSpecification field instead. |
| `prepaidCardDisallowed (deprecated)` | `boolean` > [!WARNING] > This item is deprecated! If true, disallow prepaid cards from being used in the transaction. Deprecated: Use facilitationSpecification field instead. |
| `billingAddressRequired (deprecated)` | `boolean` > [!WARNING] > This item is deprecated! If true, billing address will be returned. Deprecated: Use facilitationSpecification field instead. |
| `facilitationSpecification` | `string` This JSON blob captures the specification for how Google facilitates the payment for integrators, which is the PaymentDataRequest object as defined in <https://developers.google.com/pay/api/web/reference/object#PaymentDataRequest> Example: { "apiVersion": 2, "apiVersionMinor": 0, "merchantInfo": { "merchantName": "Example Merchant" }, "allowedPaymentMethods": \[ { "type": "CARD", "parameters": { "allowedAuthMethods": \["PAN_ONLY", "CRYPTOGRAM_3DS"\], "allowedCardNetworks": \["AMEX", "DISCOVER", "JCB", "MASTERCARD", "VISA"\] }, "tokenizationSpecification": { "type": "PAYMENT_GATEWAY", "parameters": { "gateway": "example", "gatewayMerchantId": "exampleGatewayMerchantId" } } } \], "transactionInfo": { "totalPriceStatus": "ESTIMATED", "totalPrice": "12.34", "currencyCode": "USD" } } |

## PaymentMethodTokenizationParameters

> [!WARNING]
> This item is deprecated!

Deprecated: Use V3 Proto instead. Partner MUST specify the tokenization parameters if payment methods user saved with Google will be used in the transaction. Partner should be able to get these parameters from its own Payment Gateway.

| JSON representation ||
|---|---|
| ``` { "tokenizationType": enum (`https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/PaymentMethodTokenizationType`), "parameters": { string: string, ... } } ``` |

| Fields ||
|---|---|
| `tokenizationType` | ``enum (`https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/PaymentMethodTokenizationType`)`` Required. |
| `parameters` | `map (key: string, value: string)` If tokenizationType is set to `PAYMENT_GATEWAY` then the list of parameters should contain payment gateway specific parameters required to tokenize payment method as well as parameter with the name "gateway" with the value set to one of the gateways that we support e.g. "stripe" or "braintree". A sample tokenization configuration used for Stripe in JSON format. `{ "gateway" : "stripe", "stripe:publishableKey" : "pk_1234", "stripe:version" : "1.5" }` A sample tokenization configuration used for Braintree in JSON format. `{ "gateway" : "braintree", "braintree:merchantId" : "abc" "braintree:sdkVersion" : "1.4.0" "braintree:apiVersion" : "v1" "braintree:clientKey" : "production_a12b34" "braintree:authorizationFingerprint" : "production_a12b34" }` A sample configuration used for Adyen in JSON format. `{ "gateway" : "adyen", "gatewayMerchantId" : "gateway-merchant-id" }` If tokenizationType is set to DIRECT, integrators must specify a parameter named "publicKey" which will contain an Elliptic Curve public key using the uncompressed point format and base64 encoded. This publicKey will be used by Google to encrypt the payment information. Example of the parameter in JSON format: { "publicKey": "base64encoded..." } An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |

## ActionProvidedPaymentOptions

> [!WARNING]
> This item is deprecated!

Deprecated: Use V3 Proto instead. Requirements for Action-provided payment method.

| JSON representation ||
|---|---|
| ``` { "paymentType": enum (`PaymentType`), "displayName": string } ``` |

| Fields ||
|---|---|
| `paymentType` | ``enum (`PaymentType`)`` type of payment. Required. |
| `displayName` | `string` name of the instrument displayed on the receipt. Required for action-provided payment info. For `PAYMENT_CARD`, this could be "VISA-1234". For `BANK`, this could be "Chase Checking-1234". For `LOYALTY_PROGRAM`, this could be "Starbuck's points". For `ON_FULFILLMENT`, this could be something like "pay on delivery". |