Accessing payments object properties

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,

With our examples the amount value is hard coded in the server side code. If you’d like to change the amount being charged you we recommend creating an order with the Orders API and include that in the payment request. :slightly_smiling_face: