Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Google Pay Knowledge Patch?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nevaberry-google-pay-knowledge-patch)
---
name: google-pay-knowledge-patch
description: Google Pay
version: null
license: MIT
metadata:
author: Nevaberry
---
# Google Pay
Load this skill when working on Google Pay web merchant integrations involving
payment-sheet behavior, addresses, card payment methods, testing, CSP nonces,
button borders, sandboxed checkout, or direct integration signing keys.
## Reference index
| Reference | Topics |
| --- | --- |
| [Cards, payment methods, and testing](references/cards-methods-and-testing.md) | Funding source, localized gateway test cards, payment callbacks, Brazilian combo cards, PayPal |
| [Payment sheet and addresses](references/payment-sheet-and-addresses.md) | ISO 3166 address fields, action labels, promo codes |
| [Security, buttons, and direct integration](references/security-buttons-and-direct.md) | CSP nonce, button border, sandboxed iframe, ECv2 signing key |
## CSP nonce for injected elements
Pass the current page’s Content Security Policy nonce as `PaymentOptions.nonce`
when constructing the client.
The client applies it to every dynamically injected `<script>` and `<style>`
element.
```js
function createPaymentsClient(cspNonce) {
return new google.payments.api.PaymentsClient({
environment: "TEST",
nonce: cspNonce,
});
}
```
## Standardized billing and shipping addresses
Set `BillingAddressParameters.format` to `FULL-ISO3166` to request a
standardized billing address.
```js
cardParameters.billingAddressRequired = true;
cardParameters.billingAddressParameters = { format: "FULL-ISO3166" };
```
`ShippingAddressParameters` also has a `format` property.
Both `Address` and `IntermediateAddress` can return
`iso3166AdministrativeArea`.
See [Payment sheet and addresses](references/payment-sheet-and-addresses.md)
for the address and payment-sheet guidance.
## Payment-sheet action labels
`TransactionInfo.checkoutOption` determines the payment-sheet button label.
| Value | Button label |
| --- | --- |
| `CONTINUE_TO_REVIEW` | Review Order |
| `DEFAULT` | Continue |
| `COMPLETE_IMMEDIATE_PURCHASE` | Pay |
For **Review Order**:
```js
paymentDataRequest.transactionInfo.checkoutOption = "CONTINUE_TO_REVIEW";
```
## Card funding source
For a card payment, read
`paymentData.paymentMethodData.info.cardFundingSource`.
Its possible values are:
- `UNKNOWN`
- `CREDIT`
- `DEBIT`
- `PREPAID`
Handle `UNKNOWN` when using this value for funding-source-specific pricing.
See [Cards, payment methods, and testing](references/cards-methods-and-testing.md)
for card and testing guidance.
## Liability shift and testing with payment callbacks
Web integrations using payment authorization or Dynamic Price Updates
callbacks can use liability shift and processor test cards.
Where compatible, the payment sheet follows the same experience as flows
without callbacks, with `OFFER` callbacks as an exception.
See [Cards, payment methods, and testing](references/cards-methods-and-testing.md)
for callback and test-card details.
## Localized gateway test cards
Gateway test cards in the `TEST` environment support country-specific billing
addresses in 27 markets.
These include the UK, France, Germany, Spain, Japan, Hong Kong, and Brazil.
See [Cards, payment methods, and testing](references/cards-methods-and-testing.md)
for localized test-card guidance.
## Dynamic button border
Set `ButtonOptions.borderButtonType` on the options passed to `createButton()`
to control the border treatment.
The border is drawn inset so it stays visible while loading and leaves the
inner content size intact.
See [Button options](https://developers.google.com/pay/api/web/reference/request-objects#ButtonOptions)
and [Security, buttons, and direct integration](references/security-buttons-and-direct.md).
## Sandboxed checkout iframe
A web checkout can embed the payment integration in a sandboxed iframe that
isolates its scripts from the parent DOM.
See [Sandboxed iframe setup](https://developers.googleblog.com/en/google-pay-inside-sandboxed-iframe-for-pci-dss-v4-compliance).
## Payment-sheet promo codes
Use `OfferInfo` to update and display promo codes on the payment sheet.
See [Promo code tutorial](https://developers.google.com/pay/api/web/guides/tutorial#promo-codes)
and [Payment sheet and addresses](references/payment-sheet-and-addresses.md).
## Brazilian credit and debit combo cards
Configure Brazilian credit and debit combo card support through
`CardParameters.allowedCardNetworks`.
See [Card parameters](https://developers.google.com/pay/api/web/reference/request-objects#CardParameters)
and [Cards, payment methods, and testing](references/cards-methods-and-testing.md).
## PayPal payment method
PayPal is a supported value for the `PaymentMethod.type` request field.
See [Payment method reference](https://developers.google.com/pay/api/web/reference/request-objects#PaymentMethod).
The release attribution is in
[Cards, payment methods, and testing](references/cards-methods-and-testing.md).
## ECv2 signing key for direct integrations
ECv2 lets `DIRECT` integrations use a long-lived signing key from the payment
service that only needs updating every ten years.
See [Payment data cryptography](https://developers.google.com/pay/api/web/guides/resources/payment-data-cryptography)
and [Security, buttons, and direct integration](references/security-buttons-and-direct.md).