Skip to main content

I have setup a sandbox account to make purchases using the SDK.

My products on AppStore Connect have multiple region prices set

My GBP price is £6.99

My USD price is $7.49 (and is displayed correctly in app when I set the store locale as such)

 

When I make a purchase in GBP (shown correctly by iOS SDK) the Event Data shows the correct price value (price_in_purchased_currency) for GBP but the ‘Currency’ is incorrectly in USD.

{
"app_id": "app91a2d785de",
"app_user_id": "$RCAnonymousID:5cb684d5429346688102439d2892be77",
"country_code": "GB",
"currency": "USD",
"entitlement_ids": n
"Backstage"
],
"environment": "SANDBOX",
"event_timestamp_ms": 1655385097458,
"expiration_at_ms": 1657977095000,
"is_family_share": false,
"offer_code": null,
"period_type": "NORMAL",
"price": 6.99,
"price_in_purchased_currency": 6.99,
"product_id": "backstage_monthly",
"purchased_at_ms": 1655385095000,
"store": "APP_STORE",
"takehome_percentage": 0.7,
"transaction_id": "StoreKitTest_Transaction_1655385095000_0"
}

 

Is this a bug or expected behaviour for Sandbox?

Aha!

 

It looks like this is as a result of using :

usesStoreKit2IfAvailable

 

I've set it back to false and it is now reporting correctly:

{
"app_id": "app91a2d785de",
"app_user_id": "$RCAnonymousID:b104f5044c464a939be32b53893dea7e",
"country_code": "GB",
"currency": "GBP",
"entitlement_ids": :
"Backstage"
],
"environment": "SANDBOX",
"event_timestamp_ms": 1655390189958,
"expiration_at_ms": 1657982187000,
"is_family_share": false,
"offer_code": null,
"period_type": "NORMAL",
"price": 8.490511034020349,
"price_in_purchased_currency": 6.99,
"product_id": "backstage_monthly",
"purchased_at_ms": 1655390187000,
"store": "APP_STORE",
"takehome_percentage": 0.7,
"transaction_id": "StoreKitTest_Transaction_1655390187000_0"
}

 

Let me know if I can report this bug, although I fully appreciate the ‘EXPERIMENTAL’ warning this comes with!


Bug Report raised - https://github.com/RevenueCat/purchases-ios/issues/1707


Reply