Skip to content

Commit e534d6a

Browse files
authored
feat: Add billing throughput (#35)
1 parent c0fa1cd commit e534d6a

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

apps/event-system/services/stripe/stripe-webhook.service.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export default {
6565

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

101102
const billing = {
103+
throughput: parseInt(process.env.DEFAULT_CLIENT_THROUGHPUT) || 500,
102104
provider: 'stripe',
103105
customerId: subscriptionUpdated?.customer,
104106
subscription: {
@@ -147,6 +149,7 @@ export default {
147149
});
148150

149151
const updatedBilling = {
152+
throughput: parseInt(process.env.DEFAULT_CLIENT_THROUGHPUT) || 500,
150153
provider: 'stripe',
151154
customerId: subscriptionCreated?.customer,
152155
subscription: {

libs-private/service-logic/services/onboarding/useOnboardingService.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export const useOnboardingService = (ctx: Context, ownership: Ownership) => {
3434
});
3535

3636
const billing = {
37+
throughput: parseInt(process.env.DEFAULT_CLIENT_THROUGHPUT) || 500,
3738
customerId: response?.customer?.id,
3839
subscription: {
3940
id: response?.subscription?.id,

0 commit comments

Comments
 (0)