Application ID sq0idp-QuDmVN_Z8-JXDx8OmTxxx (XactMeasurements Payments) on Merchant ID MLNS1A28xxx returns HTTP 400 INVALID_CARD_DATA on every POST /v2/cards request despite a valid source_id (cnon: from Web Payments SDK tokenize()), valid verification_token (verf: from verifyBuyer({intent:'STORE'})), and valid customer_id (created successfully via POST /v2/customers). Trace ID example: CDN-3068d7ba-1c3b-4674-9ee6-1a7e62c3a75f. Customer creation works (200), card creation always fails (400). Please check whether this application or merchant has a hold or restriction on the Cards API. Other Square accounts I own can create cards on file with identical request structure.
Hi @billing! The INVALID_CARD_DATA error is a catch all error for cards that failed to be stored on file. Often times these failures are a result of a decline on the card issuer’s side, and those card issuers do not always share the exact reasoning of the decline.
We recommend handling this error by prompting the customer to retry storing the card (in case there was an issue with entering the card details), then reaching out to their bank for further help if needed. If their bank is unable to assist, they will need to use a different card.