pay-rails / pay

Payments for Ruby on Rails apps
https://github.com/pay-rails/pay
MIT License
1.98k stars 316 forks source link

Add support for Stripe's Meter Events for usage based billing #1051

Closed ayushn21 closed 3 months ago

ayushn21 commented 3 months ago

Pull Request

Summary: Usage records for usage based billing is now a legacy method in Stripe. Meter events are the new way to track usage: https://docs.stripe.com/api/billing/meter-event?lang=ruby.

Description: I've added a method to make an API call to Stripe to create a meter event. The response from the Stripe SDK is returned to the caller to handle as needed.

Checklist: