I am trying to utilize the payment.receipt_url link that comes from the response on a Payments API createPayment request.
In my backend I immediately take the response I get from the Payments API, get the HTML from the receipt_url link and attempt to send it to the customer’s email. However When I received the email I get the following:
I had seen this problem in Sandbox and assumed it was just a Sandbox bug as I think I remember reading something about that being a known bug. You can see the issue at the following example Sandbox receipt_url:
However now that I have tried it in Production, I am still receiving the error.
I went to my server logs and clicked on the URL myself, and it worked fine! You can see that here:
Is it possible I have to implement some sort of wait to allow the Square server to catch up before trying to grab the HTML from the URL? Or is there something else I am missing? I can’t find anything in the documentation about this.