# Create Google Pay token

`POST /accounts/{accountID}/google-pay/tokens`

API version: `v2026.10.00`. Send `X-Moov-Version: v2026.10.00` to get the behavior described here.

> AI agents: search and read all Moov docs with the docs MCP server at https://docs.moov.io/mcp (no API key). Setup: https://docs.moov.io/guides/developer-tools/mcp-ai/docs-mcp/index.md

Connect a Google Pay token to the specified account.

The `paymentMethodData` field should contain the `paymentMethodData` property from Google Pay's
[PaymentData](https://developers.google.com/pay/api/web/reference/response-objects#PaymentData) response,
passed through unmodified.

To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
you'll need to specify the `/accounts/{accountID}/cards.write` scope.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Moov-Version` | header | string |  | Set this header to v2026.10.00 to use the API described in this specification. When omitted, the server defaults to v2024.01.00, the earliest supported version, which may not match the behavior documented here. An unrecognized well-formed version uses the latest supported version that is not newer than the requested version, when one exists. For example, `v2026.08.00` uses `v2026.07.00`. A malformed value, such as `2022`, returns a `404` response. Values: `v2026.10.00`. |
| `accountID` | path | string | Yes | ID of the Moov account representing the cardholder. |

## Request body

Content type: `application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `merchantAccountID` | string | Yes | The merchant accountID this token was minted for. Must match the `gatewayMerchantId` value passed to Google Pay when constructing the PaymentDataRequest. card-gateway validates that the decrypted `gatewayMerchantId` matches this value. |
| `paymentMethodData` | object | Yes | The `paymentMethodData` object from Google Pay's [PaymentData](https://developers.google.com/pay/api/web/reference/response-objects#PaymentData) response. |
| `paymentMethodData.type` | string |  | The type of payment method. Always `CARD`. Values: `CARD`. |
| `paymentMethodData.description` | string |  | A user-facing description of the payment method. |
| `paymentMethodData.info` | object | Yes | Unencrypted card metadata from [CardInfo](https://developers.google.com/pay/api/web/reference/response-objects#CardInfo). |
| `paymentMethodData.info.cardNetwork` | string | Yes | The card network. One of AMEX, DISCOVER, INTERAC, JCB, MASTERCARD, VISA, or OTHER. Values: `AMEX`, `DISCOVER`, `INTERAC`, `JCB`, `MASTERCARD`, `VISA`, `OTHER`. |
| `paymentMethodData.info.cardDetails` | string | Yes | The last four digits of the card number. |
| `paymentMethodData.info.cardFundingSource` | string |  | The funding source of the card. One of CREDIT, DEBIT, PREPAID, or UNKNOWN. Values: `CREDIT`, `DEBIT`, `PREPAID`, `UNKNOWN`. |
| `paymentMethodData.info.billingAddress` | object |  | Billing address as returned by Google Pay. Refer to [Google's documentation](https://developers.google.com/pay/api/web/reference/response-objects#Address) for more information. |
| `paymentMethodData.info.billingAddress.address1` | string |  | First line of the street address. |
| `paymentMethodData.info.billingAddress.address2` | string |  | Second line of the street address. |
| `paymentMethodData.info.billingAddress.address3` | string |  | Third line of the street address. |
| `paymentMethodData.info.billingAddress.locality` | string |  | City, town, neighborhood, or suburb. |
| `paymentMethodData.info.billingAddress.administrativeArea` | string |  | State, province, or region. |
| `paymentMethodData.info.billingAddress.postalCode` | string |  | Postal or ZIP code. |
| `paymentMethodData.info.billingAddress.countryCode` | string |  | ISO 3166-1 alpha-2 country code. |
| `paymentMethodData.info.billingAddress.name` | string |  | Name of the cardholder. |
| `paymentMethodData.info.billingAddress.phoneNumber` | string |  | Phone number. |
| `paymentMethodData.info.billingAddress.sortingCode` | string |  | Sorting code (used in some countries). |
| `paymentMethodData.info.assuranceDetails` | object |  | 3-D Secure assurance details from Google Pay. |
| `paymentMethodData.info.assuranceDetails.cardHolderAuthenticated` | boolean |  | Whether the card is verified via 3-D Secure authentication. |
| `paymentMethodData.info.assuranceDetails.accountVerified` | boolean |  | Whether the returned payment credential can be used for a transaction. |
| `paymentMethodData.tokenizationData` | object | Yes | Contains the encrypted payment token from Google Pay. The `token` field is a JSON-encoded string containing the ECv2 encrypted payment token. |
| `paymentMethodData.tokenizationData.type` | string | Yes | The tokenization type. Always `PAYMENT_GATEWAY`. Values: `PAYMENT_GATEWAY`. |
| `paymentMethodData.tokenizationData.token` | string | Yes | The ECv2 encrypted payment token, as a JSON-encoded string. |

## Response 200

The request completed successfully.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `[].paymentMethodID` | string | Yes | The new payment method's ID. |
| `[].paymentMethodType` | string | Yes | The payment method type that represents a payment rail and directionality Values: `moov-wallet`, `ach-debit-fund`, `ach-debit-collect`, `ach-credit-standard`, `ach-credit-same-day`, `rtp-credit`, `card-payment`, `push-to-card`, `pull-from-card`, `apple-pay`, `card-present-payment`, `instant-bank-credit`, `push-to-apple-pay`, `pull-from-apple-pay`, `google-pay`, `push-to-google-pay`, `pull-from-google-pay`. |
| `[].googlePay` | object | Yes | Describes a Google Pay token on a Moov account. |
| `[].googlePay.tokenID` | string | Yes | The unique identifier of the Google Pay token. |
| `[].googlePay.brand` | string | Yes | The card brand. Values: `American Express`, `Discover`, `Mastercard`, `Visa`, `Unknown`. |
| `[].googlePay.cardType` | string | Yes | The type of the card. Values: `debit`, `credit`, `prepaid`, `unknown`. |
| `[].googlePay.cardDisplayName` | string | Yes | User-friendly name of the tokenized card returned by Google Pay. It usually contains the last four digits of the underlying card. There is no standard format. |
| `[].googlePay.fingerprint` | string | Yes | Uniquely identifies a linked payment card or token. For Apple Pay, the fingerprint is based on the tokenized card number and may vary based on the user's device. This field can be used to identify specific payment methods across multiple accounts on your platform. |
| `[].googlePay.expiration` | object | Yes | The expiration date of the card or token. |
| `[].googlePay.dynamicLastFour` | string | Yes | The last four digits of the Google Pay token, which may differ from the tokenized card's last four digits. |
| `[].googlePay.issuerCountry` | string |  | Country where the underlying card was issued. |
| `[].googlePay.authMethod` | string |  | The authentication method used for the Google Pay token. Values: `PAN_ONLY`, `CRYPTOGRAM_3DS`. |

## Errors

| Status | Meaning |
| --- | --- |
| 400 | The server could not understand the request due to invalid syntax. |
| 401 | The request contained missing or expired authentication. |
| 403 | The user is not authorized to make the request. |
| 404 | The requested resource was not found. |
| 409 | The request conflicted with the current state of the target resource. |
| 422 | The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. |
| 429 | Request was refused due to rate limiting. |
| 500 | The request failed due to an unexpected error. |
| 504 | The request failed because a downstream service failed to respond. |

## Examples

### cURL

```bash
curl -X POST "https://api.moov.io/accounts/{accountID}/google-pay/tokens" \
  -H "Authorization: Bearer {token}" \
  -H "X-Moov-Version: v2026.10.00" \
  -d '{
  "merchantAccountID": "c5f78a7e-2fb0-4e4a-bcf0-9e1f8b0e5c7a",
  "paymentMethodData": {
    "info": {
      "cardNetwork": "VISA",
      "cardDetails": "1234"
    },
    "tokenizationData": {
      "type": "PAYMENT_GATEWAY",
      "token": "string"
    }
  }
}'
```

### Typescript (SDK)

```typescript
import { Moov } from "@moovio/sdk";

const moov = new Moov({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const result = await moov.googlePay.linkToken({
    accountID: "<id>",
    linkGooglePay: {
      merchantAccountID: "c5f78a7e-2fb0-4e4a-bcf0-9e1f8b0e5c7a",
      paymentMethodData: {
        type: "CARD",
        info: {
          cardNetwork: "VISA",
          cardDetails: "1234",
          cardFundingSource: "DEBIT",
          billingAddress: {
            countryCode: "US",
          },
        },
        tokenizationData: {
          type: "PAYMENT_GATEWAY",
          token: "<value>",
        },
      },
    },
  });

  console.log(result);
}

run();
```

Full reference with SDK examples in every language: https://docs.moov.io/api/v2026.10.00/sources/google-pay/token/
