New in Chargebee: Explore Reveal and understand your payment performance end-to-end.Try Now
Docschargebee docs
HomeBillingPaymentsRevRecGrowthReveal
Support

Product Updates


  • Release Notes

Getting Started


  • Overview
  • Chargebee Billing Data Centers
  • Object Relationship Model
  • Understanding Sites
  • Chargebee Tech Glossary
  • Articles and FAQ

Implementing Chargebee


  • Implementation Guide
  • Go-live Checklist
  • Articles and FAQ

AI in Chargebee


  • Chargebee Agents
  • Chargebee Copilot
  • Chargebee MCP Server (Model Context Protocol)

Developer Resources


  • Developer Resources Overview
  • Articles and FAQ

Product Catalog


  • Product Catalog Overview
  • Coupons
  • Articles and FAQ

Subscriptions


  • Working with Subscriptions
  • Billing
  • Orders
  • Articles and FAQ

Customers


  • Managing Customers
  • Account Hierarchy
  • Email Notifications
  • Branding
  • Configure Multiple Languages
  • Articles and FAQ

Entitlements


  • Entitlements Overview
  • Features Overview
  • Feature Management
  • Managing Product Entitlements
  • Subscription Entitlements
  • Customer Entitlements
  • Grandfathering Entitlements
  • Articles and FAQ

Usage Based Billing


  • Understanding Usages
  • Setting up Usage Based Billing
    • Ingesting Usage Events into Chargebee
      • Ingesting Usage from Amazon S3
    • Defining Metered Features
    • Linking Pricing for Metered Features
  • Usage Alerts
  • Metered Billing
  • Articles and FAQ

Chargebee CPQ


  • Chargebee CPQ
  • Chargebee CPQ for Salesforce
  • Chargebee CPQ for HubSpot

Invoices, Credit Notes, and Quotes


  • Invoices
  • Credit Notes
  • Quotes [Legacy]
  • Transactions
  • Articles and FAQ

Taxes


  • Overview
  • Configuring Taxes
  • Country-specific Taxes
  • Articles and FAQ

Hosted Capabilities


  • Overview
  • Hosted Checkout
  • Hosted Self-Serve Portal
  • Hosted Pages Features
  • Additional Hosted Pages
  • Payment Components
  • Pricing Table
  • Managing Payments with Chargebee.js
  • Mobile-Optimized Hosted Pages
  • Articles and FAQ

Site Configuration


  • Users & Roles
  • Custom Fields & Metadata
  • Approvals
  • Mandatory Fields
  • File Attachments & Comments
  • Advanced Filter Options
  • Multicurrency Pricing
  • Multi-decimal Support
  • Configuring Reason Codes
  • Events and Webhooks
  • API Keys
  • Time Zone
  • Time Machine
  • Transfer Configurations
  • Articles and FAQ

Multi Business Entity


  • Multi Business Entity Overview
  • Customer Transfer Overview
  • Articles and FAQ

Mobile Subscriptions


  • Overview
  • Omnichannel Subscriptions
  • Omnichannel One-Time Orders
  • Mobile Subscriptions (Legacy)

Reports and Analytics


  • RevenueStory
  • Home Dashboard
  • Frequently Asked Questions
  • FAQs for Classic Reports Sunset
  • Articles and FAQ

Integrations


  • Sales
  • Customer Support and Success
  • Finance
  • Tax
  • Marketing
  • Stitch
  • Collaboration
  • Contract Management
  • Ecommerce Management
  • Articles and FAQ

Data Privacy & Security


  • Two Factor Authentication
  • SAML Single Sign-On
  • System for Cross-Domain Identity Management (SCIM)
  • EU-GDPR
  • Consent Management
  • Personal Data Management
  • Compliance Certificates
  • HIPAA Guidelines
  • PCI Recommendations and Integration Types
  • Articles and FAQ

Data Operations


  • Bulk Operations
  • Migration
  • Articles and FAQ
  1. Billing
  2. Usage Based Billing
  3. Setting up Usage Based Billing
  4. Ingesting Usage Events into Chargebee
  5. Ingesting Usage from Amazon S3
  1. Billing
  2. Usage Based Billing
  3. Setting up Usage Based Billing
  4. Ingesting Usage Events into Chargebee
  5. Ingesting Usage from Amazon S3

Ingesting Usage from Amazon S3

Overview

Simplify and streamline your usage-based billing process by directly ingesting usage data from Amazon S3 bucket into Chargebee Billing. With this integration, Chargebee automatically fetches and processes usage files from your Amazon S3 bucket without any manual interventions for data uploads or preparation. This ensures that Chargebee Billing always works with the most up-to-date customer usage records, helping you eliminate errors, reduce delays, and improve invoice accuracy.

This integration is ideal for businesses that generate high volumes of usage data such as IoT, SaaS, or API-driven services, and store that data in S3. By automating the data pipeline between S3 and Chargebee, your team can focus on building seamless, scalable billing workflows that support real-time usage-based billing and customer transparency.

Prerequisites

Before you set up usage ingestion from your Amazon S3 bucket into Chargebee Billing, ensure the following prerequisites are in place:

  • Usage-based Billing: You must have an active Chargebee Billing site with usage-based billing feature enabled and configured.

  • Amazon S3 Bucket access: Ensure you have an Amazon S3 bucket where usage data files are stored. You should have access to the bucket’s name, region, and permission to read objects.

  • Consistent File Naming Convention: Ensure that "/" is not used in any file_name as AWS might consider it as folders.

Connecting your Amazon S3 bucket with Chargebee Billing

You can connect your Amazon S3 bucket with Chargebee Billing in four simple steps to automatically ingest usage data into your site:

  1. Enter S3 Bucket details in Chargebee Billing
  2. Set up Event Notifications in AWS
  3. Update Bucket Policy in AWS
  4. Test the connection

This setup ensures that any new usage file uploaded to your bucket is detected and processed by Chargebee in real time. To get started with the integration, follow these steps:

  1. Log in to your Chargebee Billing site.
  2. Navigate to Apps > Amazon S3 Bucket.
    image
  3. Click Proceed to begin the setup.
    image

Step 1: Enter S3 Bucket details in Chargebee Billing

Your bucket details are needed for Chargebee to allowlist your bucket and account_id in SNS topic for receiving events. On the Connect with Amazon S3 bucket page, specify the following bucket details from your AWS account:

image

S3 Bucket Region

This is the AWS region where your S3 bucket is hosted. It is required to configure the SNS topic for event notifications. Follow these steps to get it from your S3 console:

  • Go to your Amazon S3 console.
  • In the Buckets list, locate your bucket and click its name.
  • Under the Properties tab, find the Region listed.

S3 Bucket Name

This is the name of the S3 bucket from which usage data will be fetched. You can find it in the same Buckets list in your S3 console.

AWS Account ID

This is your 12-digit AWS account ID used to identify and allowlist your account. Follow these steps to get it from your S3 console:

  • In the AWS Console, click your Account name in the top-right corner.
  • Select My Account.
  • Your Account ID is listed on the Account Settings page.

Bucket ARN (Amazon Resource Name)

The ARN uniquely identifies your S3 bucket and is used to configure access policies. Follow these steps to find or construct it on your S3 console:

  • Navigate to your bucket in the S3 console.
  • Use the arn:aws:s3:::your-bucket-name format, replacing your-bucket-name with the actual bucket name.

Once all details are entered, click Next.

Step 2: Set up Event Notifications in AWS

This step ensures Chargebee receives a notification whenever a new usage file is uploaded.

image

Object Creation

  1. In your S3 Console, open the relevant bucket.
  2. Navigate to the Properties tab > Event notifications, and click Create event notification.
  3. Set a name for the event (e.g., chargebee-usage-ingest).
  4. Under Event types, check All object create events.

Destination

  1. In your S3 Console, open the relevant bucket.
  2. Under Destination, choose SNS topic.
  3. Select Enter SNS topic ARN, and paste the SNS topic ARN provided on the Set up event notifications page in Chargebee.
  4. Click Save changes.

Once you're done, return to your Chargebee Billing site, and click Next.

Step 3: Update Bucket Policy in AWS

To allow Chargebee to fetch data from your S3 bucket, you need to add a bucket policy. Follow these steps to add a bucket policy:

  1. On the Update Bucket Policy page in Chargebee Billing, click Copy to copy the generated bucket policy snippet.
    image
  2. In your AWS Console:
    • Navigate to the S3 service.
    • Select your bucket and go to the Permissions tab > Bucket policy, and click Edit.
    • Paste the policy snippet copied from Chargebee, replacing any placeholder values if needed.
  3. Click Save changes.

Once done, return to your Chargebee Billing site, and click Next.

Step 4: Test the connection

To verify the integration and confirm that your connection is up and running, follow these steps:

  1. Upload a sample usage file to your S3 bucket.
  2. In Chargebee Billing, click Confirm Upload.
    image

Chargebee does the following:

  • Listens for the event notification from your S3 bucket.
  • Fetches the uploaded file.
  • Ingests usage events from the file into your Chargebee Billing site.

You’ll be notified once each step is completed.

You can click View setup status to confirm that the connection is up to date.

Managing your Amazon S3 bucket

Once your Amazon S3 bucket is connected, you can monitor its connection status anytime using the Health Dashboard in Chargebee Billing. This dashboard provides real-time visibility into the health of your S3 integration and helps ensure uninterrupted usage data ingestion. From the Health Dashboard, you can:

  • Check if your S3 connection is active and up to date.

  • View or update key configuration details such as bucket name, region, and policy.

  • Receive alerts when the connection fails, along with actionable error messages.

image

For example, if Chargebee is unable to access your S3 bucket due to a misconfigured bucket policy, an alert will appear on the dashboard with the reason for failure. You can review the suggested fix, update the bucket policy in your AWS console (using the policy snippet provided in Chargebee), and restore the connection.

Disconnecting your Amazon S3 bucket from Chargebee Billing

You can disconnect your Amazon S3 bucket from Chargebee Billing site at anytime as required. Once disconnected, Chargebee Billing stops listening for event notifications from the disconnected S3 bucket and will no longer have access to your S3 bucket. To disconnect your S3 bucket, follow these steps:

  1. Navigate to Apps > Amazon S3 bucket > Manage.
  2. On the Amazon S3 bucket page, click the Disconnect link.
  3. On the pop-up that appears, click Disconnect.

Related Articles

  • Understanding Usages
  • Defining metered features
  • Link pricing for metered features

See also

API References

  • Ingest a Usage Event
  • Ingest Usage Events in Batch
  • Ingest Usage Files

Was this article helpful?