Getting an error on one of my buttons / API code question

I don’t know if this is a Snipcart problem or a Sparkle problem (my website-builder).

I have several buttons that add items to the cart. They all work fine.
I just tried to add some more buttons, but they give me an error when I try to checkout with PayPal.

The error says " Price of products in the cart may have changed. Try removing and adding them to your cart. Please contact the store owner for details."

I can reproduce this error with the new buttons, but all of the old buttons still work.
I had created the new buttons by copying & pasting the buttons already in use. When they failed, I tried creating new buttons but get the same error.

I know that you can’t help with the buttons — that’s the web builder. But what can you tell me about what causes that specific error message and any details about it.
Normally, I copy/paste the working button all of the time, but all of the times I’ve used it in the past are for items that have the same price. But all of these new buttons that are failing are adding items of a different price.

All of the items on my site use the same API code. Or should I have created a unique secret API code for each item that has a different price?

Hi @fbcc, thanks for reaching out.

Can you show us some example codes that you use for your buttons?
If you mean data-item-id, then yes, each button should have a unique one.
The error you’re getting is a validation error:

Thanks.

I don’t have access to the generated code.

I suspect that this is something that the programmer of the web-building app is going to have to ultimately resolve; I wrote here in hope of learning more about what would cause this specific error, and I can share that info with him.

I don’t think I’m talking about a data-item-id.
The API code that I’m referring to is generated on this page:
Login - Snipcart
I had assumed that every button on my site would use the same key, but now I’m not sure about that.

Wrapping up this topic.
The web designer app discovered a bug in his code which was causing this. He has corrected the app, I’ve re-generated the website, and it appears to be working perfectly again.

1 Like

That’s great to know, thanks for updating us @fbcc!