react-square-web-payments-sdk icon indicating copy to clipboard operation
react-square-web-payments-sdk copied to clipboard

Invalid parameter format for ACH tokenize

Open mhelke opened this issue 5 months ago • 0 comments

Describe the bug

This package has worked well with my Square sandbox account. After I switched to the production environment, I am unable to make ACH payments.

Your Example Website or App

https://stackblitz.com/edit/vitejs-vite-bsyrq3?file=src%2FApp.jsx

Steps to Reproduce the Bug or Issue

  1. Click the ACH payment button.
  2. Notice the error in the console.

Expected behavior

I expect the ACH payment button to open the payment modal when clicked. Instead what I'm seeing is the following error:

square.js:3  InvalidOptionError: option: 'Invalid parameter format for ACH tokenize'
    at square.js:3:222416
    at Generator.next (<anonymous>)
    at Lc (square.js:3:220506)
    at s (square.js:3:220710)
    at square.js:3:220771
    at new Promise (<anonymous>)
    at square.js:3:220650
    at kc.tokenize (square.js:3:224254)
    at Object.handlePayment (ach.tsx:64:1)
    at HTMLButtonElement.<anonymous> (use-event-listener.ts:31:1)
    at HTMLButtonElement.n (square.js:3:99306)
(anonymous) @ square.js:3
overrideMethod @ console.js:288
handlePayment @ ach.tsx:82
await in handlePayment
(anonymous) @ use-event-listener.ts:31
n @ square.js:3

Screenshots or Videos

image

Platform

  • OS: Windows
  • Browser: Chrome
  • Version: 3.2.1

Additional context

The same code works fine when I replace the application ID and the locationId with the sandbox values.

mhelke avatar Sep 02 '24 21:09 mhelke