Wallet Test Giving Page

Test Google Pay and Apple Pay end-to-end via server-side proxy to MyWell Platform API

Configuration

API credentials are configured server-side via environment variables. All API calls are proxied through this server (no CORS, no client-side secrets).

Google Pay TEST MODE

Google Pay TEST mode provides mock test cards automatically -- no Google account or real cards needed. Works in Chrome on any OS. Requires HTTPS.

Step 1: Get Google Pay JWT

Calls your server's POST /api/wallet/googlepay/token which proxies to the Platform API.


Step 2: Initialize Google Pay Button

Uses the JWT from Step 1 to render a walletjs.GooglePay button. Click the button to open the Google Pay payment sheet.

Google Pay button will appear here

Apple Pay

Apple Pay requires Safari on an Apple device, HTTPS with a verified domain, and sandbox test cards provisioned on the device.

Step 1: Register Domain

Register your domain for Apple Pay. The .well-known/apple-developer-merchantid-domain-association file must be accessible at your domain's root.


Step 2: Initialize Apple Pay

Uses the merchant ID from registration to initialize walletjs.ApplePay.

Apple Pay button will appear here (Safari on Apple device only)

Use Wallet Token

After obtaining a wallet token from Google Pay or Apple Pay, use these actions to test creating transactions, customers, and subscriptions.


Create Transaction

POST /api/transaction → proxied to Platform API. Requires a Customer ID.


Create Customer

POST /api/customer → proxied to Platform API. Vaults the wallet token.


Add Payment Method to Existing Customer

POST /api/customer/{id}/paymentMethod → proxied to Platform API.


Create Subscription

POST /api/subscription → proxied to Platform API.

Debug Log

Testing Reference

Google Pay TEST mode provides mock test cards automatically. No Google account with real cards is needed. Works in Chrome on any OS.
Apple Pay sandbox test cards:
  • Visa: 4622 9431 2318 9285, Exp: 12/2028, CVV: 096
  • Mastercard: 5204 2452 5046 0049, Exp: 01/30, CVC: 111
  • Amex (US): 3727 279248 51007, Exp: 12/28, CID: 1111
Notes:
  • All API calls are proxied server-side -- no CORS, no secrets in browser
  • Apple Pay sandbox transactions may decline at the processor (expected)
  • Google Pay token is valid JSON from the payment sheet
  • Tokens expire quickly -- use them immediately
  • This page requires HTTPS (handled by Caddy in production)