After getting everything working fine, I notice that every X seconds (between 2 and 5) our website makes a request to this URL https://api.commerce.coinbase.com/charges/BLRRWPCW (the code after /charges/ changes everytime we refresh the page).
I don’t think this behavior is expected and also it’s causing generating multiple charges for our users without they even touching the button.
The URL we are using is the following: Coinbase Commerce (if our checkout id is needed, I can share it privately)
Hello @gastonf87! Thank you for the information you have provided and for itemizing the questions and answers. The team is looking into this and we will get back to you once we have any updates. Have a great day!
Hello @gastonf87! Thank you for patiently waiting while we check this with our team. With regard to your concern as to why the charge ID was changing after the website was refreshed, actually it is not creating a new charge or anything. The repeated requests are simply the charge page polling for changes to the charge.
And since checkouts “stamp out” new charges kind of like a template, going directly to the checkout page will create a new charge unless it sees in localstorage that the user has already created a charge for this checkout. If localstorage is cleared or a new browser is opened, it will always create a new charge when navigating to a checkout.
Hey @Lioness! Thank you for your response!
Cool, I get it now!
My only remaining question would be, why the requests start automatically after loading the button. As you can see in the video I uploaded, as soon as I open the page including Coinbase Button, it starts making request to /charges which causes an actual charge:created in our backend and it leads to an unexpected flow in our website.
If you can help me understand why that happens and how to avoid it, we all set!
Hi @gastonf87! Apologies for the delayed response. The request you are pointing out was not creating new charges, because:
Those are GET requests and not a POST request.
The charge code is the same each time, meaning it’s requesting the same charge (not creating a new one).
Also, to further investigate the Webhook events and to see if you’re being triggered frequently, please log a support ticket using our Contact Us form. Please include the link of this forum so that the team will be aware that it’s you. Additionally, please use the email address associated with your Commerce account. Thank you and have a nice day!