Question

Noticing many BILLING_ERROR alerts when testing in sandbox

  • 13 April 2023
  • 1 reply
  • 103 views

Badge +6

I am using cordova-plugin-purchases in my App. I’ve noticed many “Had their subscription of  vetcalculators_monthly_android:vetcalculators-monthly-android cancelled due to a billing error” comments in my sandbox testing recently. (Also in iOS). I’ve not changed anything in my code and wondering why this is happening. 


Also, I am wondering if there is a way to access this particular revenuecat info from within the App using the SDK or API:
 

{
"app_id": "app2c0d07f6dd",
"app_user_id": "$RCAnonymousID:420b573c1e75455aae4bc433fea3979f",
"cancel_reason": "BILLING_ERROR",
"country_code": "US",
"currency": "USD",
"entitlement_ids": [
"monthly"
],
"environment": "SANDBOX",
"event_timestamp_ms": 1681342243670,
"expiration_at_ms": 1681342232285,
"is_family_share": false,
"offer_code": null,
"period_type": "NORMAL",
"price": 3.99,
"price_in_purchased_currency": 3.99,
"product_id": "vetcalculators_monthly_android:vetcalculators-monthly-android",
"product_price_in_purchased_currency": 3.99,
"purchased_at_ms": 1681341932285,
"store": "PLAY_STORE",
"takehome_percentage": 0.85,
"transaction_id": "GPA.3312-7901-2044-43947..5"
}

Specifically listening for “cancel_reason”: “BILLING_ERROR” so i could alert the user if this happens. 


1 reply

Userlevel 5
Badge +9

Hello,

It’s normal for Apple and Google to create billing issues during testing. This is a way for them to help you test your error handling. However, you should be getting some successful purchases. If you are not, there is probably a configuration error somewhere in App Store Connect/Google Play Console, RevenueCat, or your local development project. Without more details it’s difficult for me to help.

There is a billing_issues_detected_at property in our API that you can use to see if the current subscription is experiencing billing issues. In the SDK you would use billingIssueDetectedAt (iOS) and billingIssueDetectedAt (Android).

Reply