Cash App Pay Fails In Sandbox Mode

Describe the bug
When using the quickstart code for cash app, providing sandbox mode + sandbox access token, is yielding the following error:

{"errors": [{"code": "GENERIC_DECLINE","detail": "Authorization error: 'GENERIC_DECLINE'","category": "PAYMENT_METHOD_ERROR"}],"payment": {"id": "__ID__","created_at": "2022-12-18T20:40:08.087Z","updated_at": "2022-12-18T20:40:08.786Z","amount_money": {"amount": 100,"currency": "USD"},"status": "FAILED","delay_duration": "PT168H","source_type": "WALLET","location_id": "__LOCATION_ID__","order_id": "__ORDER_ID__","total_money": {"amount": 100,"currency": "USD"},"approved_money": {"amount": 0,"currency": "USD"},"delay_action": "CANCEL","delayed_until": "2022-12-25T20:40:08.087Z","wallet_details": {"status": "FAILED","brand": "CASH_APP","cash_app_details": {}},"application_details": {"square_product": "ECOMMERCE_API","application_id": "__SANDBOX_APP_ID__"},"version_token": "__TOKEN__"}}

To Reproduce
Steps to reproduce the behavior:

  1. Clone the repo, go to public/examples/cash-app-pay.html
  2. Add in sandbox location id + app id
  3. Add .env.sandbox adding in sandbox access token
  4. Verify everything is running in sandbox in server/config.js

Expected behavior
Success due to running in sandbox mode.


Desktop (please complete the following information):

  • OS: Mac 11.5.2
  • Browser Chrome
  • Version 108.0.5359.98 (ARM)

Additional context
I can provide my sandbox credentials like my location id and app id if needed to help reproduce the error…

It just worked for me. Is the amount in the token request the same as the amount in the CreatePayment request? :slightly_smiling_face:

I’m new to the forum, but I noticed your post about Cash App Pay failing in sandbox mode.

Are your Cash App payments failing in sandbox? :slightly_smiling_face:

Hi, I’ll be honest I actually filed an issue on github and it looks like the square client is fixed for this issue, here’s the link:

Generic Decline Error In Cash App Sandbox Mode.

Glad to hear it’s working as expected. :slightly_smiling_face:

The issue is resolved! Also the link you provided is bizarre… Is that allowed on square forums?

No, it’s not allowed. Thanks for raising the issue. :slightly_smiling_face: