# Test & go live

> Test both Google Pay™ credential types in the sandbox before switching to production.

Google Pay™ has two environments — `TEST` for development and `PRODUCTION` for live payments. Contact your VINR account manager to confirm your account is approved before switching to production.

## Testing in the TEST environment

In the VINR sandbox, Google Pay tokens are processed as `TEST` environment tokens automatically. For a direct API integration, set `environment: 'TEST'` in the `PaymentsClient` constructor. Elements and hosted checkout set this automatically whenever you are working in a VINR sandbox account — no separate Google Pay configuration is needed.

In `TEST` mode:

- No real cards are charged and no real money moves.
- `isReadyToPay` returns `true` regardless of whether the device has a real card enrolled.
- Google provides pre-defined test cards for each credential type — see [Google's test card suite](https://developers.google.com/pay/api/web/guides/resources/test-card-suite) for card numbers and how to select CRYPTOGRAM\_3DS vs PAN\_ONLY credentials in the test sheet.

### Test scenarios by credential type

Test both credential types if your account has both enabled. The two types have different security profiles and different VINR handling — cover them separately.

#### CRYPTOGRAM\_3DS (device token)

Use a test card configured as a tokenised device credential. In the Google Pay test sheet, select a card marked as a device token.

| Scenario           | Expected outcome                                                               |
| ------------------ | ------------------------------------------------------------------------------ |
| Successful payment | Sheet appears, customer confirms, `payment.completed` fires — no 3DS challenge |
| Declined by issuer | Payment fails with a decline code; your UI shows the error                     |
| Customer cancels   | Sheet dismissed; checkout recovers and allows retry                            |

No 3DS challenge should appear for CRYPTOGRAM\_3DS in normal test flows. If one appears, check that your test card is configured as a device token.

#### PAN\_ONLY (card on file)

Use a test card configured as a PAN\_ONLY credential (card saved to Google Account, not device-tokenised).

| Scenario                                | Expected outcome                                                                    |
| --------------------------------------- | ----------------------------------------------------------------------------------- |
| Successful payment + 3DS passes         | VINR triggers step-up automatically; challenge completes; `payment.completed` fires |
| Successful payment, no challenge needed | VINR assesses risk and processes without challenge; `payment.completed` fires       |
| 3DS step-up fails                       | Payment declined; `payment.failed` fires; customer can retry with another method    |
| Declined by issuer                      | Payment fails with a decline code                                                   |
| Customer cancels                        | Sheet dismissed; checkout recovers                                                  |

VINR's 3DS step-up on PAN\_ONLY is automatic. You do not implement or trigger it — verify only that your integration handles the `nextAction.type === "challenge"` step-up and confirms the payment (Elements and hosted checkout manage this for you; custom API integrations must complete the 3DS challenge the same way as any card payment).

> You do not need any separate VINR Dashboard configuration for sandbox testing. The VINR sandbox accepts Google Pay `TEST` tokens out of the box.

## Going live

Once you've finished testing, work through the [Go-live checklist](/docs/payments/payment-methods/add-payment-methods/wallets/google-pay/go-live-checklist) before switching to `PRODUCTION`. It covers account confirmation, auth method confirmation, environment switch, button compliance, checkout experience requirements, error handling, and webhook setup.

**Direct API integrations only:** Google requires you to [request production access](https://developers.google.com/pay/api/web/guides/test-and-deploy/request-prod-access) via the [Google Pay & Wallet Console](https://pay.google.com/business/console) before you can accept live payments. This is separate from VINR account approval — both are required. Hosted checkout, Elements, and payment link integrations are exempt; VINR's existing merchant registration covers them.

## Common issues

| Symptom                                                  | Likely cause                                                                                                                                                                   |
| -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Google Pay button does not appear                        | `isReadyToPay` returned false — check the browser console; in production, the domain may not be allowlisted                                                                    |
| Payment fails in production with `invalid_token`         | `environment` still set to `TEST`, `merchantInfo.merchantId` / `gatewayMerchantId` mixed up, or account not yet approved for live payments — contact your VINR account manager |
| PAN\_ONLY payment returns `nextAction.type: "challenge"` | Expected — VINR's 3DS step-up triggered; complete the challenge like any 3DS card payment                                                                                      |
| Button rejected by Google review                         | Button style does not follow Google Pay brand guidelines                                                                                                                       |
| `allowedAuthMethods` mismatch error                      | Your code specifies a method your VINR account is not configured for — confirm with your account manager                                                                       |

## See also

[Go-live checklist](/docs/payments/payment-methods/add-payment-methods/wallets/google-pay/go-live-checklist) — Step-by-step checklist before switching to the PRODUCTION environment.

[Authentication methods](/docs/payments/payment-methods/add-payment-methods/wallets/google-pay/authentication-methods) — CRYPTOGRAM\_3DS vs PAN\_ONLY: what each type means and how VINR handles it.

[Set up Google Pay (API)](/docs/payments/payment-methods/add-payment-methods/wallets/google-pay/setup) — Dashboard configuration and direct API integration.
