I’m utilizing the API code found on the Square website. I can successfully create a payments object with this code: payments = window.Square.payments(appId, locationId);
However, I can’t figure out how to retrieve the properties of this object. I want to retrieve the “amount” value so I can change it to what will be the actual payment amount. Would someone please tell me how to retrieve that value? I have tried several iterations of what I might do but nothing works. For instance, where is the “amount_money” property located? From there, I assume I will be able to retrieve the “amount_money.amount” and “amount_money.currency” items, but I don’t know how to navigate through the “payments” object and there are no examples of how to do so.
Thanks in advance,