I’m attempting to create an application charge using the REST Admin API against my development store which is based in Ireland and has euro as it’s currency.
The following code works in so far as it creates the charge successfully, has a working confirmation URL and will send the client back to the return URL with the correct charge ID.
Before I call application_charge.save(), the value of application_charge is: “NewResource {currency: ‘EUR’}” and afterwards it updates to: “Currency {0: ‘U’, 1: ‘S’, 2: ‘D’}”.
I’ve tried setting it to just the string ‘EUR’ but it’s also ignored and the charge comes in as USD, in the price set on the application_charge.
When I fetch the shop’s resource, the listed base currency is ‘EUR’.
I’ve attached screenshot of how the charge appears to the merchant and the development store’s currency setting.
Am I not setting the currency correctly on the application_charge object before saving it? Is this functionality not supported through the REST API and I need to use GraphQL? The docs only mention GraphQL, but the rest API endpoints are there and work to a certain extent. Anyone got any experience or ideas with this?
I found a solution of sorts for my problem. I was able to get the graph QL interface to work to make a charge in EUR. The following code works, this is typescript using the node js client library:
The other gotcha you need to pass is you need to go to the partner dashboard, select your app > distribution and make it a public app. This wasn’t a required step in for the REST API call to work in USD. I’ll leave this as unsolved in case someone else has a solution on how to get the REST API to work with EUR currency.