Apple Grace Period and Billing Retry statuses when processing user receipts

image



Hey. In this article, we will talk about such a common problem as a payment error in mobile apps with a subscription model. If we take the average data from the Qonversion system, then 15-20% of trials go to Billing Issue. Of these, about 15% return to a paid state. Grace Period support will improve the user experience and increase the rate of return to paid state.



Plan:



  • How does Billing Retry work?
  • What is Grace Period?
  • Billing Retry


Billing Retry?



.



, .



image



, Apple . , Billing Retry. 60 . Apple . . , 10 . LTV, .



is_in_billing_retry_period expiration_intent:



"pending_renewal_info": [
    {
        "expiration_intent": "2",
        "auto_renew_product_id": "product.99.trial.3d",
        "original_transaction_id": "10000000306492965",
        "is_in_billing_retry_period": "1",
        "product_id": "product.99.trial.3d",
        "auto_renew_status": "1"
    }
]


.



Grace Period?



, Apple , . Grace Period. Grace Period - Enable Billing Grace Period for Auto-Renewable Subscriptions, , Apple .



Grace Period :



image



:



1: Grace Period



image



, Apple . Grace Period Billing Retry . Grace Period, , . Apple , .



2: Grace Period



image



Apple Grace Period, , Billing Retry . Apple , .



Grace Period , JSON response, grace_period_expires_date_ms, .



"pending_renewal_info": [
    {
        "expiration_intent": "2",
        "grace_period_expires_date": "2020-09-05 23:41:42 Etc/GMT",
        "auto_renew_product_id": "product.99.trial.3d",
        "original_transaction_id": "10000000306492965",
        "is_in_billing_retry_period": "1",
        "grace_period_expires_date_pst": "2020-09-05 16:41:42 America/Los_Angeles",
        "product_id": "product.99.trial.3d",
        "grace_period_expires_date_ms": "1599349302000",
        "auto_renew_status": "1"
    }
]


, is_in_billing_retry_period. expires_date_ms

receipt.in_app



"in_app": [
            {
                "quantity": "1",
                "product_id": "product.99.trial.3d",
                "transaction_id": "0000000306492966",
                "original_transaction_id": "0000000306492965",
                "purchase_date": "2020-08-25 02:53:10 Etc/GMT",
                "purchase_date_ms": "1598323990000",
                "purchase_date_pst": "2020-08-24 19:53:10 America/Los_Angeles",
                "original_purchase_date": "2020-08-25 02:53:12 Etc/GMT",
                "original_purchase_date_ms": "1598323992000",
                "original_purchase_date_pst": "2020-08-24 19:53:12 America/Los_Angeles",
                "expires_date": "2020-09-25 02:53:10 Etc/GMT",
                "expires_date_ms": "1601002390000",
                "expires_date_pst": "2020-09-24 19:53:10 America/Los_Angeles",
                "web_order_line_item_id": "000000003253190",
                "is_trial_period": "false",
                "is_in_intro_offer_period": "false"
            }
        ]


60 , is_in_billing_retry_period grace_period_expires_date , expires_date_ms, , auto_renew_status 0



Billing Retry Grace Period



, .



.



Qonversion.checkPermissions { (permissions, error) in
  if let error = error {
    // handle error
    return
  }

  if let premium = permissions["premium"], premium.isActive {
    switch premium.renewState {
       case .billingIssue:
         // Grace period: permission is active, but there was some billing issue.
         // Prompt the user to update the payment method.
         break
       default: break
    }
  }
}



All Articles