Configurations & Historic Data Processing 

Your Apple Store app is now connected to Chargebee. This document guides you through the process of configuring prerequisite settings within Chargebee, import of products and upload receipts from the App Store. During this process you will complete the following steps:

  • Configure prerequisites including currency, product families, billing mode, and billing frequency.
  • Import App Store Products from your app as plans within Chargebee.
  • Upload App Store Receipts from your app for historic subscription data to Chargebee.

Prerequisites Configuration 

As part of the integration you must configure prerequisites within your Chargebee site.

Currencies 

You must configure all of the currencies associated with your App Store app.
Click Configure to set up your currencies. Read more here.

Billing Mode 

The App store uses Proration and millisecond-based billing, hence, you must model the accountable duration for your billing to include milli-second based billing and enable proration for your app in Chargebee too.
Click Configure to set up your Billing mode. Read more here.

Billing Frequency 

You must configure the billing frequency options associated with your product catalog when creating Plans, Addons, or Charges. The pre-configured options include Daily, Weekly, Monthly, and Yearly. However, you can also create custom billing frequencies.

  1. Click Manage to view the Billing frequency options.

  2. Select the applicable options or click Add custom frequency to create billing frequencies.

  3. Enter the frequency, select the applicable duration and click Add.

  4. Click Apply to complete setting up your Billing Frequency.

  5. Enable Calendar Billing for your Chargebee site.

  6. Enable Reason Codes for your Chargebee site.

  7. Enable Pause/Resume Subscription for your Chargebee site.

Connection Keys 

After the import of Products and In-App Purchase receipts to your Chargebee site, you must configure the following connection keys:

  • Notification URL
  • App ID

Notification URL 

Your Chargebee site must be updated with the most recent changes associated with subscriptions on App Store. This can be accomplished with the use of Notification URLs wherein App Store sends notifications to your server of real-time changes in a subscription's status.

Follow the steps below to configure the Notification URL

  1. Click View Keys in the Sync Overview page.

  2. Click Copy to copy the Notification URL to your clipboard.

  3. Login to your App Store Connect  account.

  4. Select applicable app from My Apps.

  5. Click App Information from the General left menu.

  6. Navigate to the App Store Server Notifications section.

  7. Click Setup URL in the Production Server URL/Sandbox Server URL as applicable.

  8. Enter the copied URL to the Server URL field.

  9. Select the Version 1 Notifications radio button.

  10. Click Save.
    Note: Chargebee does not currently support Version 2 Notifications hence it is essential that you choose Version 1 Notifications while configuring the Notification URL.

App ID 

The App ID is a unique identifier created for your Apple app within Chargebee. This identifer is configured within the backend server of your app to create unique API endpoints, which can be used extensively for completing API actions.
Follow the steps below to retrieve this information.

  1. Click View Keys in the Sync Overview page.

  2. Click Copy to copy the App ID to your clipboard.

Note

Click here  to view the API docs associated with App ID.

Import Products 

You can choose to bulk import your product details including plan name, billing frequency, and price from your app.

Note
  • Click Proceed, if you have no historical product data or would like to skip importing the information.
  • The price field must have numeral input only. Chargebee appends the applicable currency to the apple product to create a corresponding plan.

Follow the steps below to import your product details to Chargebee:

  1. Click Product Import.

  2. Click Upload CSV.

  3. Prepare the bulk import file. Click Sample file and create entries for each product. Ensure the file is saved in csv format.

  4. Drag the updated file to the field or click Browse to upload the import file.

  5. Click Proceed after the successful upload of your bulk import file.

  6. After successful upload, the data within the bulk import file is validated and associated plans are created within your Chargebee site.

  7. Click Proceed to upload your product offerings to Chargebee.

Bulk Import Errors 

Any errors identified during the data validation process will result in the plan associated with that product information not being created. Such errors can be attributed to various reasons such as incorrect currency, frequency, or product ID.

  • The entries in the apple_product_id and currency combination must be unique.
  • The entries in the name field must be unique.

Failure to adhere to these guidelines will result in errors while creating plans.

The data validation functionality assists in identifying the errors allowing you to resolve them more effectively or skipping the upload of products with errors. Determine your course of action based on the options below:

Skip Products with Errors

  1. Click Skip errors to skip products with errors.

  2. Click Yes, Proceed in the confirmation pop-up box to continue the upload process.

  3. Click Yes, Proceed to upload In-App Purchase Receipts.

Fix Errors in Bulk Upload file

  1. Click Show errors to expand the list of errors.

  2. Click Download all errors if you wish to save the error log for future reference.

  3. Click Reupload CSV to access the bulk import file and make the corrections necessary from the error log.

  4. Review the Import Product document for assistance with uploading the import file.

Upload In App Receipts 

You can choose to import your historical subscriptions associated IAP for the product offerings available on your app using this functionality. Addtionally, if you choose to use API's, only the latest transaction of the in-app receipts will be processed.
The following guidelines apply to In-App Receipts:

  • The price of the Apple product that is imported to Chargebee determines the price of subscription. Hence it is imperative that all applicable products are imported to Chargebee before importing historic subscriptions to Chargebee.
  • Upload a single receipt per customer as Chargebee can retrieve all transactions with a single receipt by validating the receipt with Apple's APIs.
  • Since there are multiple transactions associated with a receipt and Apple doesn't associate price information with each transaction, the price of the Apple product imported to Chargebee is considered for all transactions.
Note
  • Chargebee support is extended to receipts processed for iOS7 and higher only.
  • Click Proceed if you do not wish to import historical subscriptions or have no in-app purchases yet.
  • The size of the file being uploaded must not exceed 20MB.
  • The price field must have numeral input only. Chargebee appends the applicable currency to the apple product to create a corresponding subscription.
  • The customer_id is not a mandatory field in the csv file.
  • The customer_email is not a mandatory field in the csv file.
  • If historic subscription has a different price than the product price then we will not be able to record the old subscription with old price since Apple does not provide historic price details in the API response.

Follow the steps below to import your In-App Purchase Receipts to Chargebee:

Ensure that all your Apple products are uploaded to Chargebee previously.

  1. Click Upload In-App Purchase Receipts.

  2. Click Upload CSV.

  3. Prepare the bulk import file. Click Sample file and create entries for each of the historical subscriptions. Ensure that the file is saved in CSV format after your changes are made.

  4. Drag the updated file to the field or click Browse to upload the import file.

  5. Click Proceed after the successful upload of your bulk import file.

  6. After successful upload, the data within the bulk import file is validated and associated historical subscriptions are created within your Chargebee site.

Bulk Import Errors 

Any errors identified during the data validation process will result in the historical subscriptions associated with that product information not being created. Such errors can be attributed to various reasons such as incorrect currency, frequency, or product ID.

The data validation functionality assists in identifying the errors allowing you to resolve them more effectively or skipping the upload of products with errors. Determine your course of action based on the options below:

Note

If you chose to Skip, all subscription data associated with the product will not be available within Chargebee.

Skip Records with Errors

  1. Click Skip errors to skip records with errors.
  2. Click Yes, Proceed in the confirmation pop-up box to continue the import process.
  3. After processing the in-app receipts, the subscription created and skipped displays.
  4. Click Proceed.

The Sync Overview acts as the landing page for your integration with App Store. This view lists all of the subscriptions details including status of the subscription and sync statistics for the last 24 hours.

Was this article helpful?
Loading…