# Create card error, "INVALID\_REQUEST\_ERROR"

**URL:** <https://developer.squareup.com/forums/t/create-card-error-invalid-request-error/8096>\
**Category:** Questions\
**Tags:** sandbox, cards-api\
**Created:** [January 3, 2023, 5:05am UTC](https://developer.squareup.com/forums/t/create-card-error-invalid-request-error/8096 "2023-01-03T05:05:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![devangs](https://avatars.discourse-cdn.com/v4/letter/d/ebca7d/32.png) [@devangs](https://developer.squareup.com/forums/u/devangs)\
**Post date:** [January 3, 2023, 5:05am UTC](https://developer.squareup.com/forums/t/create-card-error-invalid-request-error/8096/1 "2023-01-03T05:05:38Z")

</div>

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.

```auto
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

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [January 3, 2023, 5:40pm UTC](https://developer.squareup.com/forums/t/create-card-error-invalid-request-error/8096/2 "2023-01-03T17:40:02Z")

</div>

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? 🙂

---

<div class="post-metadata">

**Author:** ![devangs](https://avatars.discourse-cdn.com/v4/letter/d/ebca7d/32.png) [@devangs](https://developer.squareup.com/forums/u/devangs)\
**Post date:** [January 4, 2023, 5:59am UTC](https://developer.squareup.com/forums/t/create-card-error-invalid-request-error/8096/3 "2023-01-04T05:59:43Z")

</div>

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 🙂
