Record usage for billing using S3Public preview
Report usage events from your S3 bucket in bulk.
You can send meter usage events to Stripe from your S3 storage bucket. Stripe parses, validates, and transforms the file contents into meter events. After the events from your file are successfully uploaded, Stripe displays them on your subscription invoice.
Interested in early access?
If you’re interested in uploading files through your S3 bucket, contact us at user-data-acquisition-platform@stripe.com.
You can upload your meter usage events in CSV, JSON or JSONLINE file formats.
Include the following fields in your file and make sure that they follow the Meter Event schema.
identifier
: A unique identifier for the event. If not provided, Stripe generates one. We recommend using a globally unique identifier for this.timestamp
: The time of the event—measured in seconds since the Unix epoch.event_
: The name of the meter event.name payload_
: The set of columns containing key names for customer and numerical usage values.columns payload_
: The stripe_customer_id that the event gets created against.stripe_ customer_ id payload_
: The numerical usage value of the meter event. By default, the column name isvalue payload_
. However, you can set it to match the field name that you set when creating the meter event (prepend it byvalue payload_
).
Need support for different file format?
Contact us you’re interested in uploading files with a different structure or in a custom format.
Import files from your Amazon S3 bucket
After your files are prepared, you can set up the S3 connector. The S3 connector automatically polls and processes those files. When you configure your S3 connector, make sure that you select the correct Data Template.
- For JSON format files, choose the Billing Meter Event Transaction Template - JSON.
- For JSONLINE format files, choose the Billing Meter Event Transaction Template - JSONLINE.
- For CSV format files, choose the Billing Meter Event Transaction Template - CSV.