feat: allow blocking credit cards for Google Pay#1495
feat: allow blocking credit cards for Google Pay#1495
Conversation
🚫 Missing Linked IssueHi 👋 This pull request does not appear to be linked to any open issue yet. Linking your PR to an issue helps keep the project tidy and ensures the issue is closed automatically. ✔️ How to fix this
Once linked, this check will pass automatically on your next push or when you re-run the workflow. Thanks for helping maintainers! 🙌 |
1 similar comment
🚫 Missing Linked IssueHi 👋 This pull request does not appear to be linked to any open issue yet. Linking your PR to an issue helps keep the project tidy and ensures the issue is closed automatically. ✔️ How to fix this
Once linked, this check will pass automatically on your next push or when you re-run the workflow. Thanks for helping maintainers! 🙌 |
🚫 Missing Linked IssueHi 👋 This pull request does not appear to be linked to any open issue yet. Linking your PR to an issue helps keep the project tidy and ensures the issue is closed automatically. ✔️ How to fix this
Once linked, this check will pass automatically on your next push or when you re-run the workflow. Thanks for helping maintainers! 🙌 |
| gatewayMerchantId: option<string>, | ||
| allowedAuthMethods: option<array<string>>, | ||
| allowedCardNetworks: option<array<string>>, | ||
| allowCreditCards: option<bool>, |
There was a problem hiding this comment.
you don't need to add allowCreditCards: option, The sdk passes allowed_payment_methods as raw JSON through to the Google Pay API
and arrayJsonToCamelCase transforms the key to allowCreditCards automatically
Type of Change
Description
When a merchant wants to block credit cards on Google Pay, the backend sends allow_credit_cards: false in the /session-tokens response. This PR adds support for this by including the allowCreditCards field in the Google Pay parameters type definition in
src/Types/GooglePayType.resBackend PR : juspay/hyperswitch#11758
How did you test it?
Sanity Test for googlepay:
Screen.Recording.2026-04-13.at.10.55.37.AM.mov
Note: In test env. the credit card blocking feature is not working
Checklist
npm run re:build