Getting this response when trying to save a giftcard using `create_customer_card:
Same response whether getting the nonce from the old square card form or the new web payments sdk.
<ApiResponse [{"errors":[{"category":"API_ERROR","code":"INTERNAL_SERVER_ERROR","detail":"An internal error has occurred, and the API was unable to service your request."}]}]>
I know that create_customer_card
is deprecated, we’re in the process of updating to the new giftcard forms, but waiting for all of our clients to accept the new oauth permissions. It was working as expected last week, and nothing has changed on our end since then.
We’re using Square api version 9-15-2021 and have been for at least 2 months, and this just started happening now. App ID is sq0idp-_s2HeXXDp5cKsxwQoYc4hg
(staging) or sq0idp-_OpWFbMJ0nQp7vhmCjzoKw
(production) and merchant ID 3Q0RFH0QMQBTM
Same result with multiple users.
Looks like there are more than one contact that’s associated to the gift card. Was this card number used to create multiple nonces and saved with multiple customer_ids
?
Yes, it’s one we use for testing. We’ve been doing that for some time and it’s never been a problem before.
The team is working on making the error more clear rather then being a 500
but there is a limit to the amount of customer that can be associated to a gift card with CreateCustomerCard
.
Thank you. Is the limit new? Or else it must be fairly high since we’ve had 5-10 ‘users’ using it for about a year. Does it count if it’s added to the same user multiple times?
The limit isn’t new but it looks like you now have reached the max. I believe the same applies if the card is attached to the same customer. Is there a reason that you are attaching a single card to multiple customer profiles?
Gotcha. When testing with creating users/adding card functionality our devs and QA will often make new users, but we have a limited amount of credit cards to test with. For giftcards, we have to buy them, so we have a handful that we reuse, to avoid having to buy a new one each time we need to test something. We don’t generally use the sandbox as it has limited functionality compared to using an actual Square account that we use for testing and demos.
Okay, that makes sense. What I do when I need to test a gift card is I’ll tender it with cash or other so it won’t register an actual card transaction.
Can this be done with the e-giftcards? I see where to take a payment on the dashboard, but the only option I can find for purchasing an e-giftcard is with the link, and that requires payment at the time of purchase. We don’t have physical giftcards, being as we’re developing the app for clients and aren’t a restaurant ourselves.
It can’t be done with the eGift card site but you can tender an eGift card sale in the Square app if your logged into that account or with the Gift Cards API. Also with the Gift Cards API you can create a card and put a balance on it without taking a payment.
I’ll try that with the API, thanks! Hadn’t thought of that, it’s still fairly new to us.