---
title: "Add Card to Google Pay - Google Pay Push Provisioning"
source_url: https://docs.rapyd.net/en/add-card-to-google-pay---google-pay-push-provisioning.html
lang: en
---

# Add Card to Google Pay - Google Pay Push Provisioning

Add a card to a Google Pay wallet using Google Pay Push Provisioning.

> **Note:**
>
> This endpoint supports Unified Android Push Provisioning (UAPP). The response returns two encrypted payment card objects: `opaquePaymentCard` (for TSP device tokenization via the Google Pay TapAndPay SDK) and `googleOpaquePaymentCard` (to save the card to the customer's Google Account, enabling automatic re-provisioning to future Android devices). For more information refer to the Google Pay Provisioning developer documentation.

### Parameters

### Request Header Parameters

- - access_key
  - Unique access key provided by Rapyd for each authorized user.

    See [Developers](https://docs.rapyd.net/en/developers.md "Developers").
- - Content-Type
  - Indicates that the data appears in JSON format. Set to **application/json**.
- - idempotency
  - A unique key that prevents the platform from creating the same object twice.

    See [Idempotency](https://docs.rapyd.net/en/idempotency.md "Idempotency").
- - salt
  - Random string. Recommended length: 8-16 characters.
- - signature
  - Signature calculated for each request individually.

    See [Request Signatures](https://docs.rapyd.net/en/request-signatures.md "Request Signatures").
- - timestamp
  - Timestamp for the request, in [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time") (seconds).

### Request Path Parameters

- - card_id
  - ID of the card. String starting with **card_**.

### Request Body Parameters

- - authentication_method
  - Rapyd-defined risk signal. Indicates the authentication method the cardholder completed in the issuer app before initiating provisioning, and feeds the Mastercard Tokenization Authorization Request (TAR) wallet-provider data. Used to determine the provisioning path: green (frictionless), yellow, or red (step-up verification). Example value: `biometrics`.
- - app_tenure
  - Rapyd-defined risk signal indicating the length of the account and app relationship. Analogous to the Mastercard MDES `accountScore` and `recommendationReasons` fields in `decisioningData`. Longer tenure supports a green-path (frictionless) provisioning decision.
- - app_version
  - Rapyd-defined risk signal indicating the version of the issuer app that initiated provisioning. Feeds the issuer risk decision alongside `authentication_method` and `app_tenure`. Example value: `2.1.0`.
- - from_google_pay
  - Device and session identifiers obtained from the Google Pay TapAndPay SDK. It has the following required fields:

    - - walletAccountId
      - The wallet ID returned by the Google Pay TapAndPay SDK `getActiveWalletId()` method. Generated from the pairing of the Android device ID and Google Account; unique to that device-and-account pair.
    - - deviceId
      - The stable hardware ID returned by the Google Pay TapAndPay SDK `getStableHardwareId()` method. Identifies the physical Android device and must match the device ID that Google sends to the TSP in the tokenization request. This value changes after a factory reset.
    - - serverSessionId
      - A push provisioning session ID (UUID) generated by a Google server. Corresponds to `validationContext.serverSessionId` in the Google OPC specification, where it identifies the intended destination of the push. Required to produce the `googleOpaquePaymentCard` in the response. Pass through the value as received from the Google Pay SDK; do not generate this value.

### Response Parameters

- - to_google_pay
  - Contains the encrypted payment card objects for Unified Android Push Provisioning. It has the following fields:

    - - opaquePaymentCard
      - The Mastercard MDES opaque payment card (OPC): a base64-encoded `IssuerInitiatedDigitizationData` JSON object encrypted with the Mastercard Customer Wrapping Key. Passed to the TapAndPay SDK `setOpaquePaymentCard()` method to create the device token via MDES.
    - - googleOpaquePaymentCard
      - The Google opaque payment card (OPC) as defined in the Google OPC specification. A base64-encoded JSON payload containing the card details, PGP-signed with the issuer's private key and encrypted with Google's public key (RFC 4880). Delivered to Google's backend to save the card to the customer's Google Account, enabling automatic re-provisioning to future Android devices. Returned only when `from_google_pay.serverSessionId` is provided in the request.
- - UserAddress
  - Includes the address and contact information of the user. Returned for Valitor gateway cards only. It has the following structure of optional fields:

    - - Address1
      - First part of address.
    - - Address2
      - Second part of address.
    - - countryCode
      - Phone number country prefix.
    - - locality
      - Locality such as city, town, etc.
    - - AdministrativeArea
      - Geographic region that is designated and defined for the purposes of administration and governance.
    - - Name
      - First name and last name.
    - - Phonenumber
      - Phone number.
    - - PostalCode
      - Postal code.

- /v1/issuing/cards/:card_id/provision/google_pay_in_app

- Add Card to Google Pay - Google Pay In App
- ```curl
  curl -X post
  https://sandboxapi.rapyd.net/v1/issuing/cards/card_34d9a74d81ba015f96a8066938d5fd37/provision/google_pay_in_app
  -H 'access_key: your-access-key-here'
  -H 'Content-Type: application/json'
  -H 'idempotency: your-idempotency-parameter-here'
  -H 'salt: your-random-string-here'
  -H 'signature: your-calculated-signature-here'
  -H 'timestamp: your-unix-timestamp-here'
  -d '{
      "authentication_method": "biometrics",
      "app_tenure": 2,
      "app_version": "2.1.0",
      "from_google_pay": {
          "walletAccountId": "ABCBBABC1B94",
          "deviceId": "ABCHgwQ948PU",
          "serverSessionId": "server_session_123"
      }
  }
  '
  ```
- ```json
  {
      "status": {
          "error_code": "",
          "status": "SUCCESS",
          "message": "",
          "response_code": "",
          "operation_id": "c2c92bff-d2e5-4fa7-a0b8-45f05b0d82e5"
      },
      // Note: opaquePaymentCard and googleOpaquePaymentCard are long encrypted strings.
      // The values below are shortened for readability.
      "data": {
          "to_google_pay": {
              "opaquePaymentCard": "eyJmdW5kaW5nQWNjb3Vu...",
              "googleOpaquePaymentCard": "wcDaBhUEwWWMbtj78a..."
          }
      }
  }
  ```
