Why the Checkout is Stalling
Look: users click “Pay with Google,” and nothing happens. The cart freezes, the spinner spins, and frustration spikes. It’s not a bug in the UI; it’s a handshake failure between Ausslots’ backend and Google’s payment API. The result? Abandoned carts, lost revenue, and a brand reputation that starts to crack.
Technical Mismatch
Here is the deal: Ausslots is still sending legacy JSON payloads while Google Pay now expects the new PaymentDataRequest format. The mismatch triggers a 400 error that silently drops the transaction. Developers often miss the subtle shift because the console logs look clean, but the API call is silently rejected.
Missing OAuth Scopes
And here is why: the OAuth token attached to the request lacks the “paymentsmerchant” scope. Google will not authorize a transaction without it, and the response comes back as “unauthorized_client.” The fix? Update the service account and regenerate the token with the correct permissions.
Front-End Glitches
By the way, the Google Pay button script is loaded asynchronously, but the event listener fires before the script finishes loading. The result is a dead button that looks clickable but does nothing. A simple reorder of script tags or a promise-based init will make the button responsive.
Mobile Safari Quirks
Mobile Safari blocks third-party cookies by default, which breaks the session cookie that Ausslots relies on for the payment flow. The workaround is to switch to SameSite=None; Secure on the session cookie, or better yet, move the session to a token stored in localStorage.
Testing the Fixes
Don’t just eyeball the changes; run a full end-to-end test suite. Use Google’s sandbox environment, simulate a declined card, and verify that Ausslots captures the error message and displays it to the user. The test should also confirm that the “Payment Successful” callback fires only after the server acknowledges the transaction.
Where to Find the Right Docs
Here’s the link you need: https://ausslots.com/payments/google-pay/. It contains the exact JSON schema, OAuth scope checklist, and sample code snippets that will save you hours of debugging.
Immediate Action
Stop guessing. Pull the latest API spec, update the request payload, add the missing scope, and reorder your script loading. Then hit the sandbox, confirm the flow, and push the fix live. No more silent failures. Deploy now.
