Skip to content

Commit

Permalink
feat: Add billing throughput (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
krish221997 authored Sep 13, 2024
1 parent c0fa1cd commit e534d6a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/event-system/services/stripe/stripe-webhook.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export default {

if (key && subscriptionCreated?.status === 'active') {
const billing = {
throughput: parseInt(process.env.DEFAULT_CLIENT_THROUGHPUT) || 500,
provider: 'stripe',
customerId: subscriptionCreated?.customer,
subscription: {
Expand Down Expand Up @@ -99,6 +100,7 @@ export default {
const subscriptionKey = analyzeSubscription(subscriptionUpdated?.items?.data);

const billing = {
throughput: parseInt(process.env.DEFAULT_CLIENT_THROUGHPUT) || 500,
provider: 'stripe',
customerId: subscriptionUpdated?.customer,
subscription: {
Expand Down Expand Up @@ -147,6 +149,7 @@ export default {
});

const updatedBilling = {
throughput: parseInt(process.env.DEFAULT_CLIENT_THROUGHPUT) || 500,
provider: 'stripe',
customerId: subscriptionCreated?.customer,
subscription: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export const useOnboardingService = (ctx: Context, ownership: Ownership) => {
});

const billing = {
throughput: parseInt(process.env.DEFAULT_CLIENT_THROUGHPUT) || 500,
customerId: response?.customer?.id,
subscription: {
id: response?.subscription?.id,
Expand Down

0 comments on commit e534d6a

Please sign in to comment.