Create card error, "INVALID_REQUEST_ERROR"

I am using the SANDBOX environment.
Created card_nounce from Web Payment SDK, using testing card details (4111111111111111, 12/24, 111, 12374)
- Successfully generated card-nonce
Create customer_id from PHP SDK.
While I am trying to create a card on file at that time received the following error.

Square\Models\Error::__set_state(array(
‘category’ => ‘INVALID_REQUEST_ERROR’,
‘code’ => ‘INVALID_CARD_DATA’,
‘detail’ => ‘Invalid card data.’,
‘field’ => "source_id",
)),

I am stuck in this process for the last 3 days, please help me out.
Thanks

When calling CreateCard are you passing in a billing address postal code? If so is it the same one you used to generate the source_id? :slightly_smiling_face:

1 Like

Thank you @Bryan-Square ,
Got it your Point, I have used different postal in the billing address and for the card-nonce.
While using the same postal for billing and card-nonce, it’s working smoothly.

Thanks :slight_smile: