> For the complete documentation index, see [llms.txt](https://docs.verygoodsecurity.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.verygoodsecurity.com/cmp/developer-resources/guides/testing/google-pay-decrypt.md).

# Google Pay Decrypt

## Google Pay Wallet Decryption Testing Guide

This guide explains how to test Google Pay Wallet Decryption in CMP, including both **DPAN (`CRYPTOGRAM_3DS`)** and **PAN (`PAN_ONLY`)** transactions.

You can test Google Pay Wallet Decryption using:

1. **Mock Testing** — Test Google Pay card creation using predefined mock payloads without enabling Google Pay Wallet Decryption.
2. **Sandbox Testing** — Generate encrypted Google Pay payment tokens in the Google Pay `TEST` environment and submit them to CMP sandbox.

### General Setup

Use the standard [Create Card API](https://docs.verygoodsecurity.com/cmp/developer-resources/api/cards) to submit encrypted Google Pay payment tokens.

* **Endpoint:** `POST /cards`
* **Content-Type:** `application/vnd.api+json`
* **Authentication:** Bearer JWT
* **Supported protocol:** `ECv2`
* **Wallet type:** `google_pay`

The encrypted Google Pay payload must be provided under `data.attributes.encrypted_payment_data`.

After creating a card, use the [Get Card API](https://docs.verygoodsecurity.com/cmp/developer-resources/api/cards) to retrieve the stored card details.

### Mock Testing

Mock testing allows merchants to validate the Google Pay Create Card API integration without generating an actual Google Pay payment token.

**Google Pay Wallet Decryption does not need to be enabled on the CMP account for mock testing.**

However, a CMP sandbox account and valid service account credentials are required.

#### Mock Testing — PAN\_ONLY

Use the predefined Google Pay PAN\_ONLY mock payload to simulate creating a card from an encrypted Google Pay funding PAN.

The mock request uses the following signature:

`GOOGLE_PAY/FPAN/4VEn0bzlhTscArIT3Gvbq2MKiZlHAlZc76kAUx=`&#x20;

**Example Request:**

```json
{
      "data": {
        "attributes": {
          "encrypted_payment_data": {
            "wallet_type": "google_pay",
            "protocolVersion": "ECv2",
            "signature": "GOOGLE_PAY/FPAN/4VEn0bzlhTscArIT3Gvbq2MKiZlHAlZc76kAUx=",
            "intermediateSigningKey": {
              "signedKey": "{\"keyValue\":\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEqr4GKt8n8GJKHgFldcliVqfOJrLmoF3kAqTU0KqOOJ2QuPVj62HHhq/QCGSaxAbxFHlCXsQ3w1wsohyYuWq3wg\\u003d\\u003d\",\"keyExpiration\":\"1792605951090\"}",
              "signatures": [
                "MEYCIQDyrnOOLNNSP+Vt++e0F5iMyjLJ6kVZX1UrIZ+QTNV+GQIhAKQLr5KJDxJYyy1E53TJLTcXk+U1OWJ2kHeHq0cuYXax"
              ]
            },
            "signedMessage": "{\"encryptedMessage\":\"ypgJxTfw6W2Mm7NFL/5pIl2CEEyByIt3Zv3BqGIlDPb4XDnbhXeeRlyM+eSa+bYBVo3ONYFE3fI8URGFFSt6c+vv3DVMLkFxlnQXGj2Xlnx4OxJn1Yqc1US35dTxN1z9vv6Bbl+ntFc7Jnx6zi2BCEJcgHZWNdZLXGaZhYv1dORZZtChdhgbjL0r+3g+OCjT5r7Gukzy5QzMNodd9/igdlJ8t2rpsoseEFC0aAiPMSdYHjL/QpjtXH0KObAD/zVxgrTZtrRq6Nc9o0anIS93HhdWNKHU5jknnulyPq3ptTpzeIUVyT9qpfoII6w9Rl+2de3vwGsvEblNXd7WwGjdhBFVsSr2sBBAZNBill04pTCOss45IVCMfUS/tKtms8Dd6+c/AIQj3a/cJhI3Iax35TEAZt7SKuZMsrG5oH6pRGLPBG+jX14SV4EuifpkibvDZyzNgtjknJb/3Rffo/NVFuEYRZW2at5KtEuFJQDPf8owooPCznf3BPgwDuS3JtMtD2LiP/sTfKiLfYFlJRsClTrYWhQEuAiiLCKHmDpIwnYDTxJzB15LR8i8DNvqxeM3ULBxa50VtcTn3LJHk1D8n3MkZwYXvccCqQZSu+fIp5gYw2JFxub20VJXTw\\u003d\\u003d\",\"ephemeralPublicKey\":\"BHIHt7A2gWriilmuZube/2VTSzO59JIma7PEjtJWsEDE2qvkM9GBOV6yOdIzZF1YtF3dCyJ9706Jw/NtuUQoJWg\\u003d\",\"tag\":\"NN7o521Zd4JFLRThJQn5Kh84bTThEL63V8y/Z/HqiV0\\u003d\"}",
            "payment_method": {
                          "display_name": "Visa •••• 1111",
                          "network": "VISA",
                          "type": "DEBIT"
            }
          }
        }
      }
    }
```

The request must include the complete predefined mock payload, including `intermediateSigningKey` and `signedMessage`.

**Expected Response**

A successful PAN\_ONLY mock request returns card details with:

* `token_type: pan`
* `wallet_type: google_pay`
* `wallet_details.payment_data_type: PAN_ONLY`
* `wallet_details.auth_method: PAN_ONLY`
* `wallet_details.message_id`
* No cryptogram

For the current CMP response format, PAN\_ONLY cards use `token_type: pan`.

**Example Response**

The following example shows selected fields from `data.attributes`:

```json
{
  "token_type": "pan",
  "wallet_type": "google_pay",
  "wallet_details": {
			"payment_data_type": "PAN_ONLY",
			"auth_method": "PAN_ONLY",
			"message_id": "AH2EjtfL0p-single-use-per-transaction",
			"payment_method": {
		     "display_name": "Visa 1319",
		     "network": "VISA",
		     "type": "CREDIT"
				}
			}
}
```

No cryptogram is returned for PAN\_ONLY transactions.

#### Mock Testing — CRYPTOGRAM\_3DS

Use the predefined Google Pay CRYPTOGRAM\_3DS mock payload to simulate creating a card from an encrypted Google Pay DPAN.

The mock request uses the following signature:

`GOOGLE_PAY/DPAN/7KmQ2xRtNbVcPlZw5YdJhGfEs3TaUoI9nBvCqM=`&#x20;

**Example Request**

```json
{
      "data": {
        "attributes": {
          "encrypted_payment_data": {
            "wallet_type": "google_pay",
            "protocolVersion": "ECv2",
            "signature": "GOOGLE_PAY/DPAN/7KmQ2xRtNbVcPlZw5YdJhGfEs3TaUoI9nBvCqM=",
            "intermediateSigningKey": {
              "signedKey": "{\"keyValue\":\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEqr4GKt8n8GJKHgFldcliVqfOJrLmoF3kAqTU0KqOOJ2QuPVj62HHhq/QCGSaxAbxFHlCXsQ3w1wsohyYuWq3wg\\u003d\\u003d\",\"keyExpiration\":\"1792605951090\"}",
              "signatures": [
                "MEYCIQDyrnOOLNNSP+Vt++e0F5iMyjLJ6kVZX1UrIZ+QTNV+GQIhAKQLr5KJDxJYyy1E53TJLTcXk+U1OWJ2kHeHq0cuYXax"
              ]
            },
            "signedMessage": "{\"encryptedMessage\":\"ypgJxTfw6W2Mm7NFL/5pIl2CEEyByIt3Zv3BqGIlDPb4XDnbhXeeRlyM+eSa+bYBVo3ONYFE3fI8URGFFSt6c+vv3DVMLkFxlnQXGj2Xlnx4OxJn1Yqc1US35dTxN1z9vv6Bbl+ntFc7Jnx6zi2BCEJcgHZWNdZLXGaZhYv1dORZZtChdhgbjL0r+3g+OCjT5r7Gukzy5QzMNodd9/igdlJ8t2rpsoseEFC0aAiPMSdYHjL/QpjtXH0KObAD/zVxgrTZtrRq6Nc9o0anIS93HhdWNKHU5jknnulyPq3ptTpzeIUVyT9qpfoII6w9Rl+2de3vwGsvEblNXd7WwGjdhBFVsSr2sBBAZNBill04pTCOss45IVCMfUS/tKtms8Dd6+c/AIQj3a/cJhI3Iax35TEAZt7SKuZMsrG5oH6pRGLPBG+jX14SV4EuifpkibvDZyzNgtjknJb/3Rffo/NVFuEYRZW2at5KtEuFJQDPf8owooPCznf3BPgwDuS3JtMtD2LiP/sTfKiLfYFlJRsClTrYWhQEuAiiLCKHmDpIwnYDTxJzB15LR8i8DNvqxeM3ULBxa50VtcTn3LJHk1D8n3MkZwYXvccCqQZSu+fIp5gYw2JFxub20VJXTw\\u003d\\u003d\",\"ephemeralPublicKey\":\"BHIHt7A2gWriilmuZube/2VTSzO59JIma7PEjtJWsEDE2qvkM9GBOV6yOdIzZF1YtF3dCyJ9706Jw/NtuUQoJWg\\u003d\",\"tag\":\"NN7o521Zd4JFLRThJQn5Kh84bTThEL63V8y/Z/HqiV0\\u003d\"}",
            "payment_method": {
                          "display_name": "Visa •••• 1111",
                          "network": "VISA",
                          "type": "DEBIT"
            }
          }
        }
      }
    }
```

The request must include the corresponding predefined mock payload, including `intermediateSigningKey` and `signedMessage`.

**Expected Response**

A successful CRYPTOGRAM\_3DS mock request returns card details with:

* `token_type: dpan`
* `wallet_type: google_pay`
* `wallet_details.payment_data_type: 3DSecure`
* `wallet_details.auth_method: CRYPTOGRAM_3DS`
* `wallet_details.message_id`
* `wallet_details.cryptogram`
* ECI, when applicable

**Example Response**

The following example shows selected fields from `data.attributes`:

```json
{
  "token_type": "dpan",
  "wallet_type": "google_pay",
  "wallet_details": {
			"payment_data_type": "3DSecure",
			"auth_method": "CRYPTOGRAM_3DS",
			"message_id": "AH2EjtdrX9-single-use-per-transaction",
			"cryptogram": {
				"type": "TAVV",
				"value": "AgAAAAAABk4DnADjPYBgZ8AAAAA=",
				"eci": "07"
			},
			"payment_method": {
				"display_name": "Visa 1111",
				"network": "VISA",
				"type": "CREDIT"
			}
		}
}
```

The cryptogram type and ECI depend on the card network and payment data.

**Important:** Mock payloads are intended for testing the CMP integration. They are not valid Google Pay payment tokens and must not be used for production transactions.

### Mock Testing — Error Response

Use the following encrypted Google Pay payload to simulate a 4xx error response.

The mock request uses the following signature:

`GOOGLE_PAY/FPAN/R1BheURlY3J5cHRpb25FcnJvclRlc3RLZXk9`&#x20;

```json
{
      "data": {
        "attributes": {
          "encrypted_payment_data": {
            "wallet_type": "google_pay",
            "protocolVersion": "ECv2",
            "signature": "GOOGLE_PAY/FPAN/R1BheURlY3J5cHRpb25FcnJvclRlc3RLZXk9",
  "intermediateSigningKey": {
    "signedKey": "{\"keyValue\":\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE5zf5OjEphApJQALukNpFRzdMRwhK8qwamj5fiI8Oh/EeMnT1P/bwT/VB8VjaqMfO27TQVDEsVJkpS3JYvV0hqg\\u003d\\u003d\",\"keyExpiration\":\"1793298809672\"}",
    "signatures": [
      "MEYCIQCHTnP+zijJpLuBSSlT0QAc1C+Eo2SY6VxIBTfMNQcUAAIhAKipljGxbA9jejBovYlSyWda/qaFoX+QCBmz5XXcHrlV"
    ]
  },
  "protocolVersion": "ECv2",
  "signedMessage": "{\"encryptedMessage\":\"kYpKtky8q//7dduMXMQ6auRtv/pzxawOPXVptdkn+NixI5wFpKPJN7nrs1ijOVmlAh3WLLlp9PapnmgqNWi5kizCm/V1UAckghokDkcbthwg2DCbSQ/wq3BleSd+sHzez3zniIMirPeFicrWWzS0OAUu3xYoNaHKVSeiKXE+i5mXNyEqxyiHsgnADK5kxtJLd5SJ6UnedovyMWHeyswX/w26hBvrtUwO79l2Ts+PjZQhWljE7KG9Hargeu+ge6Kj7CO6SvOJPL0b5vaYRelMl5mzQMcE1w4mgGFea7F4+glW/DNzCFGMe29JukS5j6BSORw0BdgKLTE29AWPF38hCMnF4P0IQAOkgs+P9nMIbiyoUTLJCs1LdhNE26H84U16HaFX0RAyPmCqxbIuQdkCpN3HYWjGP2dzm+x2ojnDAWgMLqDPMqLGTHe9vx3hHj/SQ1R4UafuQDr0iRQ7OeOr/3/jXs7YPyG9GZGEUGJXDCX14jZHNfzzrPkyoEthUdEG67dpgdDUsGzC55BoOe/CnpBooETvku0p4u7RMur+4QYQcBzUA+qk8heZLwj9OvdTBdhSfC4O5IZ3ACploqVd7xrUnfizJLno3LEZsFkTIAutKfDUAU0JpTNaUA\\u003d\\u003d\",\"ephemeralPublicKey\":\"BA1NfsJwKjS+gt7Ct8a2JtY+HXxAevWJzk+8llBAUutLjgSCYrX6znOwsIE/5Tr0QuTBm+QMoPIJq6p8ZP3oBj4\\u003d\",\"tag\":\"W4OVlrM7fKkkB4tHDW67Av2M1GJR4pOB7T9o2TWmpIs\\u003d\"}",
            "payment_method": {
                          "display_name": "Visa •••• 1111",
                          "network": "VISA",
                          "type": "DEBIT"
            }
          }
        }
      }
    }
```

### Expected Error Mock Response

A failed mock request returns an error response with:

* `errors[].detail`
* `errors[].error_code`
* `meta.observability.trace_id`
* `meta.observability.client_id`
* `meta.observability.vault_id`
* `meta.observability.account_id`
* `meta.observability.fingerprint`

#### Example response - 422

```json
{
	"errors": [
		{
			"detail": "Unable to decrypt the data provided. Please make sure it is valid and try again.",
			"error_code": "decryption-failed"
		}
	],
	"meta": {
		"observability": {
			"trace_id": "6d0324bdaf28babe7d7edf67212e192a",
			"client_id": "AChkBQQGH-OnlyAccount-JkzXn",
			"vault_id": "tnt08uryw6p",
			"account_id": "ACT4AiYF9Xww9RqmKhJhBjpN",
			"fingerprint": "4GqVMtYYh18mXDX2zZtb6z41iV3aaWTGhFCrQD3koqcFZR7Q1dJLc5KvXGU"
		}
	}
}
```

### Retrieve Card — GET /cards/{id}

After a successful mock or sandbox Create Card request, merchants can retrieve the stored card using the [Get Card API](https://docs.verygoodsecurity.com/cmp/developer-resources/api/cards).

The response includes the stored card details and applicable Google Pay wallet metadata.

#### Duplicate Card Behavior

Allow Duplicate Cards is always enabled for Google Pay and each encrypted Google Pay request for the same card creates a new card object and returns HTTP `201`. The cryptogram and its ECI are not stored and are not available through the Get Card API.

**Important:** For DPAN transactions, merchants must use the cryptogram returned in the current Create Card response for the corresponding payment authorization.

### Sandbox Testing

Sandbox testing allows merchants to validate the complete Google Pay integration using encrypted payment tokens generated through the Google Pay API.

#### Prerequisites

Before testing Google Pay Wallet Decryption in sandbox:

* Google Pay Wallet Decryption must be enabled for the CMP sandbox account.
* VGS must provide the merchant with a unique `gatewayMerchantId`.
* The merchant must integrate the Google Pay API into a test checkout page.
* A supported browser and Google account are required.
* For DPAN testing, a compatible Android device with an eligible card in Google Wallet may be required.

VGS manages the Google Pay encryption keys, so merchants do not need to generate or upload decryption keys.

#### Step 1: Configure Google Pay in TEST Mode

Follow the [Google Pay API Tutorial](https://developers.google.com/pay/api/web/guides/tutorial) to configure Google Pay in the `TEST` environment.

Configure `PAYMENT_GATEWAY` tokenization using the parameters provided by VGS.

```json
{
  "type": "PAYMENT_GATEWAY",
  "parameters": {
    "gateway": "verygoodsecurity",
    "gatewayMerchantId": "<VGS_GENERATED_UUID>"
  }
}
```

The `gatewayMerchantId` is generated and provided by VGS. It is different from the VGS Organization ID and the Google-issued Merchant ID.

A Google-issued production Merchant ID is not required for sandbox testing.

#### Step 2: Test PAN\_ONLY and CRYPTOGRAM\_3DS

Configure the Google Pay `allowedAuthMethods` parameter to support:

* `PAN_ONLY`
* `CRYPTOGRAM_3DS`
* Both authentication methods

To test each method individually, merchants can configure only the authentication method they want to validate.

Refer to [Google Pay API Request Objects](https://developers.google.com/pay/api/web/reference/request-objects) for additional information.

**PAN\_ONLY testing**

1. Open the merchant's test checkout page.
2. Select Google Pay and complete the payment flow using an eligible card.
3. Google Pay returns an encrypted payment token.
4. Submit the encrypted token to the CMP sandbox Create Card API.
5. Verify that CMP returns the card details with `auth_method: PAN_ONLY` and no cryptogram.

**CRYPTOGRAM\_3DS testing**

1. Use a compatible Android device with an eligible card provisioned in Google Wallet.
2. Open the merchant's test checkout page.
3. Select Google Pay and complete the payment flow.
4. Submit the encrypted payment token to CMP sandbox.
5. Verify that CMP returns the DPAN card details, including the cryptogram and ECI when applicable.

DPAN availability depends on the device, card, issuer, and network.

#### Step 3: Submit the Encrypted Payment Token to CMP

Google Pay returns the encrypted payment token in:

`paymentMethodData.tokenizationData.token`

The merchant backend must submit the token's ECv2 fields to CMP under `data.attributes.encrypted_payment_data`.

Refer to [**Create Card - Google Pay Wallet Decryption**](https://docs.verygoodsecurity.com/cmp/payment-credentials/google-pay/create-card-google-pay-wallet-decryption) for the complete Create Card request structure.&#x20;

CMP validates and decrypts the payment token using the configured VGS-managed gateway keys.

#### Step 4: Validate the Create Card Response

Verify the following fields for each authentication method:

| Field                              | PAN\_ONLY    | CRYPTOGRAM\_3DS         |
| ---------------------------------- | ------------ | ----------------------- |
| `wallet_type`                      | `google_pay` | `google_pay`            |
| `token_type`                       | `pan`        | `dpan`                  |
| `wallet_details.payment_data_type` | `PAN_ONLY`   | `3DSecure`              |
| `wallet_details.auth_method`       | `PAN_ONLY`   | `CRYPTOGRAM_3DS`        |
| `wallet_details.message_id`        | Returned     | Returned                |
| `wallet_details.cryptogram`        | Not returned | Returned                |
| ECI                                | Not returned | Returned when available |

The clear PAN is returned only to clients with the required PCI card-read permissions. Otherwise, use the PAN alias.

#### Step 5: Retrieve the Card

Call `GET /cards/{id}` using the card ID returned by the Create Card API.

Verify that the card and applicable wallet metadata are available.

For DPAN transactions, the original single-use cryptogram and ECI are not returned by GET.

#### Google Pay Test Cards

Google provides a [Test Card Suite](https://developers.google.com/pay/api/web/guides/resources/test-card-suite) for testing Google Pay integrations.

However, not all Google Pay test cards produce gateway-decryptable payment tokens. Merchants should use an eligible end-to-end Google Pay setup when validating actual VGS decryption.

### Production Testing

Production testing validates Google Pay Wallet Decryption using real payment credentials.

Before testing in production, the merchant must complete Google's production registration and approval requirements.

#### Prerequisites

**1. Register with Google Pay**

Create a merchant profile in the [Google Pay & Wallet Console](https://pay.google.com/business/console).

**2. Register the Production Website**

Register the production website, provide the required checkout information and screenshots, and submit the integration for Google's approval.

Refer to [Google Pay — Publish Your Integration](https://developers.google.com/pay/api/web/guides/test-and-deploy/publish-your-integration) for additional details.

**3. Obtain the Google Merchant ID**

Google provides a `merchantId` that must be used in the production Google Pay configuration.

**4. Enable VGS Production**

Ensure that Google Pay Wallet Decryption is enabled for the CMP production account and that VGS has provided the production `gatewayMerchantId`.

The Google-issued `merchantId` and VGS-generated `gatewayMerchantId` are different identifiers.

#### Step 1: Configure Google Pay in PRODUCTION Mode

Update the Google Pay integration to use the `PRODUCTION` environment.

* Use the Google-issued `merchantInfo.merchantId`.
* Continue using `PAYMENT_GATEWAY` tokenization.
* Set `gateway` to `verygoodsecurity`.
* Use the VGS-generated production `gatewayMerchantId`.

#### Step 2: Generate a Production Google Pay Token

Open the approved production checkout page and complete a Google Pay payment using an eligible payment card.

Google Pay returns the encrypted production ECv2 payment token.

#### Step 3: Submit the Token to CMP

Send the encrypted token to the CMP production Create Card API.

CMP validates and decrypts the token and creates or returns the corresponding card.

#### Step 4: Validate the Response and Payment Authorization

Confirm that:

* CMP successfully decrypts the Google Pay payment token.
* The expected PAN or DPAN details are returned.
* The cryptogram and ECI are included for applicable DPAN transactions.
* The payment processor successfully authorizes the transaction using the required payment details.
* The single-use cryptogram is not reused for subsequent transactions.

Refer to the [Google Pay Integration Checklist](https://developers.google.com/pay/api/web/guides/test-and-deploy/integration-checklist) for additional production validation requirements.

**Note:** Production testing uses real payment credentials and may result in actual charges. Merchants should perform controlled live transactions before making Google Pay available to customers.

### Troubleshooting

| Issue                                                      | What to Verify                                                                       |
| ---------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| Google Pay payment sheet does not display an eligible card | Device, browser, issuer eligibility, supported networks, and authentication methods. |
| Google Pay gateway configuration fails                     | Confirm `gateway: verygoodsecurity` and the VGS-generated `gatewayMerchantId`.       |
| CMP rejects the encrypted token                            | Check the ECv2 fields, signatures, token expiration, and account configuration.      |
| Google Pay Wallet Decryption is unavailable                | Confirm that the feature is enabled for the correct CMP environment.                 |
| Cryptogram is missing for PAN\_ONLY                        | Expected behavior. PAN\_ONLY does not return a cryptogram.                           |
| Cryptogram is missing from GET Card                        | Expected behavior. Cryptograms are returned during card creation only.               |
| Clear PAN is missing                                       | Confirm the caller has the required PCI card-read permissions.                       |

### Related Documentation

* [CMP Create Card API](https://docs.verygoodsecurity.com/cmp/developer-resources/api/cards)
* [Google Pay API Tutorial](https://developers.google.com/pay/api/web/guides/tutorial)
* [Google Pay Test Card Suite](https://developers.google.com/pay/api/web/guides/resources/test-card-suite)
* [Google Pay Production Setup](https://developers.google.com/pay/api/web/guides/test-and-deploy/publish-your-integration)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.verygoodsecurity.com/cmp/developer-resources/guides/testing/google-pay-decrypt.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
