Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Admin GraphQL App Usage Record Local Currency Logic Bug

Solved

Admin GraphQL App Usage Record Local Currency Logic Bug

LukeBinder
Shopify Partner
3 0 0

I've been working with the appUsageRecordCreate mutation. I was using USD until we realised we could use the store's local billing currency as described in change log

I can successfully get the store's local billing currency. In my particular case I'm using "AUD" which is supported to created app usage records in this local currency. 

When I create the request it accepts the amount and currency code.

 

{ 
amount: 12
currency: "AUD"
}

 


but in the result from the mutation I get back this 

 

{
amount: 7.63
currency: "USD"
}

 


This seems very strange to me, especially cause I've also been working with the appCreditCreate mutation. Which, yes was moved from the Admin API to the partners API but this allows me to create the credit in AUD and the result back from the mutation is in AUD too. I would expect the appUsageRecordCreate to also do this, not return the USD amount

Tried with both 2023-04 & 2023-07



Accepted Solution (1)
lizk
Shopify Staff
246 58 79

This is an accepted solution.

Hi there 👋

I tried to reproduce this and when I created my usage subscription in merchant currency, and created my usage charge in merchant currency, the merchant currency was returned to me in the result.

When I created the plan in USD and created the usage charge in merchant currency, the usage charge returned was in USD.

So if you want to charge in merchant currency you will need to create the plan in the merchant currency.

To learn more visit the Shopify Help Center or the Community Blog.

View solution in original post

Replies 4 (4)

lizk
Shopify Staff
246 58 79

Hi there 👋

Can you confirm the API version you are using?

To learn more visit the Shopify Help Center or the Community Blog.

LukeBinder
Shopify Partner
3 0 0

Hi, I'm using 2023-04 as per the change log, also tried 2023-07

🙂

lizk
Shopify Staff
246 58 79

This is an accepted solution.

Hi there 👋

I tried to reproduce this and when I created my usage subscription in merchant currency, and created my usage charge in merchant currency, the merchant currency was returned to me in the result.

When I created the plan in USD and created the usage charge in merchant currency, the usage charge returned was in USD.

So if you want to charge in merchant currency you will need to create the plan in the merchant currency.

To learn more visit the Shopify Help Center or the Community Blog.

LukeBinder
Shopify Partner
3 0 0

That makes total sense 😄 my mistake.