Passing payment ID to card's source ID causing INVALID_CARD_DATA

As of recently I noticed our system for creating reusable card payments through Square is broken. This feature was working fine as of two weeks ago when I last worked with it. My basic square payment flow is as follows:

  1. Take the card details on the frontend with web payments sdk, tokenize and send to backend
  2. Use card details to place a payment via the payments api
  3. Pass this payment id as the source_id for the cards api alongside the original card details.

As of now I get a 400 error code response with reason being INVALID_CARD_DATA, and the field specified being “source_id”

Does anyone know, has square modified something regarding this. I’ve been trying to find a blog post or anything related specifying this change in behavior? It feels odd that something previously working is no longer functioning. Behavior seems to be replicable in both sandbox and prod

What’s your application ID and do you have some payment_ids that this happened with? :slightly_smiling_face:

Application ID: sandbox-sq0idb-j6U0SMfEc8kVom5S3A7PZw
Here’s an example of the body parameter passed to cardsApi.createCard on the server:

    "sourceId": "jzhmzGdbbQpyc3ey1vgWqtSErqNZY",
            "addressLine1": "643 S Clinton St",
            "addressLine2": "",
            "locality": "Iowa City",
            "administrativeDistrictLevel1": "IA",
            "postalCode": "52240",
            "country": "US"
        "customerId": "AKKCJBVNXAWQJZWTK627MQM04R"

In this case source_id would be the payment ID created from the tokenized card.