payment-kit 1.19.0 → 1.19.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/api/src/crons/index.ts +8 -0
  2. package/api/src/index.ts +4 -0
  3. package/api/src/libs/credit-grant.ts +146 -0
  4. package/api/src/libs/env.ts +1 -0
  5. package/api/src/libs/invoice.ts +4 -3
  6. package/api/src/libs/notification/template/base.ts +388 -2
  7. package/api/src/libs/notification/template/customer-credit-grant-granted.ts +149 -0
  8. package/api/src/libs/notification/template/customer-credit-grant-low-balance.ts +151 -0
  9. package/api/src/libs/notification/template/customer-credit-insufficient.ts +254 -0
  10. package/api/src/libs/notification/template/subscription-canceled.ts +193 -202
  11. package/api/src/libs/notification/template/subscription-refund-succeeded.ts +215 -237
  12. package/api/src/libs/notification/template/subscription-renewed.ts +130 -200
  13. package/api/src/libs/notification/template/subscription-succeeded.ts +100 -202
  14. package/api/src/libs/notification/template/subscription-trial-start.ts +142 -188
  15. package/api/src/libs/notification/template/subscription-trial-will-end.ts +146 -174
  16. package/api/src/libs/notification/template/subscription-upgraded.ts +96 -192
  17. package/api/src/libs/notification/template/subscription-will-canceled.ts +94 -135
  18. package/api/src/libs/notification/template/subscription-will-renew.ts +220 -245
  19. package/api/src/libs/payment.ts +69 -0
  20. package/api/src/libs/queue/index.ts +3 -2
  21. package/api/src/libs/session.ts +8 -0
  22. package/api/src/libs/subscription.ts +74 -3
  23. package/api/src/libs/util.ts +3 -1
  24. package/api/src/libs/ws.ts +23 -1
  25. package/api/src/locales/en.ts +33 -0
  26. package/api/src/locales/zh.ts +31 -0
  27. package/api/src/queues/credit-consume.ts +728 -0
  28. package/api/src/queues/credit-grant.ts +572 -0
  29. package/api/src/queues/notification.ts +173 -128
  30. package/api/src/queues/payment.ts +210 -122
  31. package/api/src/queues/subscription.ts +179 -0
  32. package/api/src/routes/checkout-sessions.ts +157 -9
  33. package/api/src/routes/connect/shared.ts +3 -2
  34. package/api/src/routes/credit-grants.ts +241 -0
  35. package/api/src/routes/credit-transactions.ts +208 -0
  36. package/api/src/routes/customers.ts +34 -5
  37. package/api/src/routes/index.ts +8 -0
  38. package/api/src/routes/meter-events.ts +347 -0
  39. package/api/src/routes/meters.ts +219 -0
  40. package/api/src/routes/payment-currencies.ts +20 -2
  41. package/api/src/routes/payment-links.ts +1 -1
  42. package/api/src/routes/payment-methods.ts +14 -2
  43. package/api/src/routes/prices.ts +43 -0
  44. package/api/src/routes/pricing-table.ts +13 -7
  45. package/api/src/routes/products.ts +63 -4
  46. package/api/src/routes/settings.ts +1 -1
  47. package/api/src/routes/subscriptions.ts +4 -0
  48. package/api/src/routes/webhook-endpoints.ts +0 -3
  49. package/api/src/store/migrations/20250610-billing-credit.ts +43 -0
  50. package/api/src/store/models/credit-grant.ts +486 -0
  51. package/api/src/store/models/credit-transaction.ts +268 -0
  52. package/api/src/store/models/customer.ts +8 -0
  53. package/api/src/store/models/index.ts +52 -1
  54. package/api/src/store/models/meter-event.ts +423 -0
  55. package/api/src/store/models/meter.ts +176 -0
  56. package/api/src/store/models/payment-currency.ts +66 -14
  57. package/api/src/store/models/price.ts +6 -0
  58. package/api/src/store/models/product.ts +2 -2
  59. package/api/src/store/models/subscription.ts +24 -0
  60. package/api/src/store/models/types.ts +28 -2
  61. package/api/tests/libs/subscription.spec.ts +53 -0
  62. package/blocklet.yml +9 -1
  63. package/package.json +4 -4
  64. package/scripts/sdk.js +233 -1
  65. package/src/app.tsx +10 -0
  66. package/src/components/collapse.tsx +11 -1
  67. package/src/components/conditional-section.tsx +87 -0
  68. package/src/components/customer/credit-grant-item-list.tsx +99 -0
  69. package/src/components/customer/credit-overview.tsx +246 -0
  70. package/src/components/customer/form.tsx +7 -3
  71. package/src/components/invoice/list.tsx +19 -1
  72. package/src/components/metadata/form.tsx +287 -91
  73. package/src/components/meter/actions.tsx +101 -0
  74. package/src/components/meter/add-usage-dialog.tsx +239 -0
  75. package/src/components/meter/events-list.tsx +657 -0
  76. package/src/components/meter/form.tsx +245 -0
  77. package/src/components/meter/products.tsx +264 -0
  78. package/src/components/meter/usage-guide.tsx +174 -0
  79. package/src/components/payment-currency/form.tsx +2 -0
  80. package/src/components/payment-intent/list.tsx +19 -1
  81. package/src/components/payment-link/item.tsx +2 -2
  82. package/src/components/payment-link/preview.tsx +1 -1
  83. package/src/components/payment-link/product-select.tsx +52 -12
  84. package/src/components/payment-method/arcblock.tsx +2 -0
  85. package/src/components/payment-method/base.tsx +2 -0
  86. package/src/components/payment-method/bitcoin.tsx +2 -0
  87. package/src/components/payment-method/ethereum.tsx +2 -0
  88. package/src/components/payment-method/stripe.tsx +2 -0
  89. package/src/components/payouts/list.tsx +19 -1
  90. package/src/components/payouts/portal/list.tsx +6 -11
  91. package/src/components/price/currency-select.tsx +56 -32
  92. package/src/components/price/form.tsx +912 -407
  93. package/src/components/pricing-table/preview.tsx +1 -1
  94. package/src/components/product/add-price.tsx +9 -7
  95. package/src/components/product/create.tsx +7 -4
  96. package/src/components/product/edit-price.tsx +21 -12
  97. package/src/components/product/features.tsx +17 -7
  98. package/src/components/product/form.tsx +100 -90
  99. package/src/components/refund/list.tsx +19 -1
  100. package/src/components/section/header.tsx +5 -18
  101. package/src/components/subscription/items/index.tsx +1 -1
  102. package/src/components/subscription/metrics.tsx +37 -5
  103. package/src/components/subscription/portal/actions.tsx +2 -1
  104. package/src/contexts/products.tsx +26 -9
  105. package/src/hooks/subscription.ts +34 -0
  106. package/src/libs/meter-utils.ts +196 -0
  107. package/src/libs/util.ts +4 -0
  108. package/src/locales/en.tsx +389 -5
  109. package/src/locales/zh.tsx +368 -1
  110. package/src/pages/admin/billing/index.tsx +61 -33
  111. package/src/pages/admin/billing/invoices/detail.tsx +1 -1
  112. package/src/pages/admin/billing/meters/create.tsx +60 -0
  113. package/src/pages/admin/billing/meters/detail.tsx +435 -0
  114. package/src/pages/admin/billing/meters/index.tsx +210 -0
  115. package/src/pages/admin/billing/meters/meter-event.tsx +346 -0
  116. package/src/pages/admin/billing/subscriptions/detail.tsx +47 -14
  117. package/src/pages/admin/customers/customers/credit-grant/detail.tsx +391 -0
  118. package/src/pages/admin/customers/customers/detail.tsx +14 -10
  119. package/src/pages/admin/customers/index.tsx +5 -0
  120. package/src/pages/admin/developers/events/detail.tsx +1 -1
  121. package/src/pages/admin/developers/index.tsx +1 -1
  122. package/src/pages/admin/payments/intents/detail.tsx +1 -1
  123. package/src/pages/admin/payments/payouts/detail.tsx +1 -1
  124. package/src/pages/admin/payments/refunds/detail.tsx +1 -1
  125. package/src/pages/admin/products/index.tsx +3 -2
  126. package/src/pages/admin/products/links/detail.tsx +1 -1
  127. package/src/pages/admin/products/prices/actions.tsx +16 -4
  128. package/src/pages/admin/products/prices/detail.tsx +30 -3
  129. package/src/pages/admin/products/prices/list.tsx +8 -1
  130. package/src/pages/admin/products/pricing-tables/detail.tsx +1 -1
  131. package/src/pages/admin/products/products/create.tsx +233 -57
  132. package/src/pages/admin/products/products/detail.tsx +2 -1
  133. package/src/pages/admin/settings/payment-methods/index.tsx +3 -0
  134. package/src/pages/customer/credit-grant/detail.tsx +308 -0
  135. package/src/pages/customer/index.tsx +44 -9
  136. package/src/pages/customer/recharge/account.tsx +5 -5
  137. package/src/pages/customer/subscription/change-payment.tsx +4 -2
  138. package/src/pages/customer/subscription/detail.tsx +48 -14
  139. package/src/pages/customer/subscription/embed.tsx +1 -1
@@ -7,10 +7,16 @@ export default flat({
7
7
  estimated: 'Estimated',
8
8
  metadata: {
9
9
  label: 'Metadata',
10
+ description: 'Add custom key-value pairs to store additional information about this meter.',
10
11
  add: 'Add more metadata',
11
12
  edit: 'Edit metadata',
12
13
  empty: 'No metadata',
13
- emptyTip: "You haven't added any metadata you can add it",
14
+ emptyTip: "You haven't added any metadata yet, you can add it",
15
+ formMode: 'Switch to form mode',
16
+ jsonMode: 'Switch to JSON mode',
17
+ jsonPlaceholder: 'Enter JSON data...',
18
+ invalidJson: 'Invalid JSON format, please check your input',
19
+ formatJson: 'Format JSON',
14
20
  },
15
21
  price: 'Price',
16
22
  add: 'Add',
@@ -51,6 +57,19 @@ export default flat({
51
57
  friday: 'Friday',
52
58
  saturday: 'Saturday',
53
59
  },
60
+ name: 'Name',
61
+ status: 'Status',
62
+ remainingCredit: 'Remaining Credit',
63
+ scope: 'Scope',
64
+ effectiveDate: 'Effective Date',
65
+ expirationDate: 'Expiration Date',
66
+ creditGrant: 'Credit Grant',
67
+ subscription: 'Subscription',
68
+ meterEvent: 'Meter Event',
69
+ creditAmount: 'Credit',
70
+ createdAt: 'Created At',
71
+ general: 'All usage-based prices',
72
+ specific: 'Specific usage-based prices',
54
73
  },
55
74
  notification: {
56
75
  preferences: {
@@ -88,9 +107,227 @@ export default flat({
88
107
  billing: 'Billing',
89
108
  invoices: 'Invoices',
90
109
  subscriptions: 'Subscriptions',
110
+ meters: 'Meters',
111
+ meterEvents: {
112
+ title: 'Meter Events',
113
+ },
114
+ meter: {
115
+ add: 'Add meter',
116
+ edit: 'Edit meter',
117
+ save: 'Save meter',
118
+ saved: 'Meter successfully saved',
119
+ activate: 'Activate meter',
120
+ activated: 'Meter activated successfully',
121
+ deactivate: 'Deactivate meter',
122
+ deactivated: 'Meter deactivated successfully',
123
+ deleted: 'Meter deleted successfully',
124
+ deleteConfirm: 'Are you sure you want to delete this meter? This action cannot be undone.',
125
+ activateConfirm: 'Are you sure you want to activate this meter? It will start collecting usage data.',
126
+ deactivateConfirm:
127
+ 'By deactivating, no further events for this meter can be reported. Attempts to create events for this meter will return an error. Previously reported usage will remain. You can reactivate at any time.',
128
+ view: 'View meter',
129
+ basicInfo: 'Basic information',
130
+ basicInfoDescription: 'Configure the core settings for your meter to track usage events.',
131
+ editDescription:
132
+ 'Update the meter name, description, and metadata. Core settings like event name and aggregation method cannot be changed.',
133
+ inactive: 'Meter is inactive',
134
+ inactiveTip: 'This meter is not collecting usage data. Activate it to start tracking events.',
135
+ name: {
136
+ label: 'Meter name',
137
+ required: 'Meter name is required',
138
+ placeholder: 'API requests',
139
+ help: 'A descriptive name for this meter that will be displayed in your dashboard.',
140
+ },
141
+ eventName: {
142
+ label: 'Event name',
143
+ required: 'Event name is required',
144
+ placeholder: 'api_request',
145
+ help: 'The event name that will be sent to this meter',
146
+ editHelp: 'Event name cannot be changed after meter creation to maintain data consistency.',
147
+ },
148
+ aggregationMethod: {
149
+ label: 'Aggregation method',
150
+ required: 'Aggregation method is required',
151
+ sum: 'Sum',
152
+ sumHint: 'Add all event values together',
153
+ sumDescription:
154
+ 'The sum aggregation method adds all usage event values together and reports the total for event summaries and billing.',
155
+ count: 'Count',
156
+ countHint: 'Count the number of events',
157
+ countDescription:
158
+ 'The count aggregation method counts the number of events received and reports the total count for event summaries and billing.',
159
+ last: 'Last value',
160
+ lastHint: 'Use the most recent event value',
161
+ lastDescription:
162
+ 'The last value aggregation method uses the most recent event value received and reports that value for event summaries and billing.',
163
+ editHelp: 'Aggregation method cannot be changed after meter creation to maintain data consistency.',
164
+ },
165
+ unit: {
166
+ label: 'Measurement unit',
167
+ required: 'Measurement unit is required',
168
+ placeholder: 'request',
169
+ help: 'The unit of measurement for this meter',
170
+ editHelp: 'Measurement unit cannot be changed after meter creation to maintain data consistency.',
171
+ },
172
+ description: {
173
+ label: 'Description',
174
+ placeholder: 'Track API usage for billing',
175
+ help: 'Optional description to help you and your team understand what this meter tracks.',
176
+ },
177
+ events: {
178
+ title: 'Events',
179
+ dailyEventCount: 'Daily Event Count',
180
+ dailyTotalValue: 'Daily Total Value',
181
+ eventName: 'Event Name',
182
+ value: 'Value',
183
+ customer: 'Customer',
184
+ subscription: 'Subscription',
185
+ reportTime: 'Report Time',
186
+ count: '{count} events total',
187
+ empty: 'No event data',
188
+ emptyTip: 'Data will appear here when events are reported',
189
+ filterByCustomer: 'Filter by customer',
190
+ eventCount: 'Event Count',
191
+ totalValue: 'Total Value',
192
+ },
193
+ usageGuide: {
194
+ title: 'How to report usage',
195
+ description:
196
+ 'Send events to this meter using the event name "{eventName}". The meter will {method} the values and track usage in {unit}.',
197
+ tip: 'Send events to this meter using the event name "{eventName}". The meter will {aggregationMethodHint} and track usage in {unit}.',
198
+ apiEndpoint: 'API Endpoint',
199
+ curlExample: 'cURL Example',
200
+ jsExample: 'JavaScript Example',
201
+ pythonExample: 'Python Example',
202
+ important: 'Important',
203
+ tip1: 'Replace YOUR_API_KEY with your actual API key',
204
+ tip2: 'The event_name must match exactly: {eventName}',
205
+ tip3: 'Include a timestamp for accurate tracking',
206
+ moreInfo: 'For more information, see our',
207
+ apiDocs: 'API documentation',
208
+ },
209
+ products: {
210
+ count: '{count} associated products',
211
+ create: 'Create product',
212
+ created: 'Product created successfully',
213
+ createPrompt: 'Enter product name:',
214
+ manage: 'Manage',
215
+ empty: 'No products',
216
+ title: 'Products',
217
+ emptyTip: 'No products are associated with this meter yet.',
218
+ meterService: 'Meter Service',
219
+ creditCharge: 'Credit Charge',
220
+ },
221
+ creditProducts: {
222
+ emptyTip: 'No credit products are associated with this meter yet.',
223
+ },
224
+ },
225
+ creditProduct: {
226
+ create: 'Create Credit Product',
227
+ defaultName: '{name} Top-up Package',
228
+ defaultDescription: '{name} Top-up Package',
229
+ defaultNickname: 'Credit Recharge',
230
+ unitLabel: 'units',
231
+ settings: 'Credit Settings',
232
+ name: {
233
+ placeholder: 'Enter Credit product name',
234
+ },
235
+ description: {
236
+ placeholder: 'Describe the purpose and value of this Credit product',
237
+ },
238
+ priceNotice:
239
+ 'Credit products are used to provide consumable credits to users, supporting both one-time purchase and package pricing models.',
240
+ creditAmount: {
241
+ label: 'Credit Amount',
242
+ placeholder: 'Amount of credits users get when purchasing this price',
243
+ help: 'Leave empty for pay-per-unit pricing, enter a number for fixed package deals',
244
+ description: 'Purchase quantity determines the amount of Credits received',
245
+ },
246
+ validDuration: {
247
+ label: 'Valid Duration',
248
+ help: 'Credit validity period, calculated from purchase time',
249
+ description: 'Set to 0 for permanent validity',
250
+ hours: 'hours',
251
+ days: 'days',
252
+ weeks: 'weeks',
253
+ months: 'months',
254
+ years: 'years',
255
+ },
256
+ associatedPrices: {
257
+ label: 'Associated Prices',
258
+ placeholder: 'Select service prices this Credit can be used for',
259
+ help: 'When selected, purchased Credits can only be used for specified services',
260
+ description: 'No selection means Credits can be used for all services',
261
+ },
262
+ priority: {
263
+ label: 'Usage Priority',
264
+ help: 'Usage order when user has multiple Credits, lower numbers have higher priority',
265
+ description: 'Range: 0-100, 0 is highest priority, 50 is default value',
266
+ },
267
+ },
268
+ meterEvent: {
269
+ title: 'Meter Event Details',
270
+ totalEvents: 'Total events: {count}',
271
+ noEvents: 'No events found',
272
+ noEventsHint: 'You can manually add test events in test mode.',
273
+ identifier: 'Identifier',
274
+ customer: 'Customer',
275
+ customerId: 'Customer ID',
276
+ value: 'Value',
277
+ subscription: 'Subscription',
278
+ creditConsumed: 'Credit Consumed',
279
+ usageValue: 'Usage Value',
280
+ reportedAt: 'Reported At',
281
+ processedAt: 'Processed At',
282
+ eventIdentifier: 'Event Identifier',
283
+ usageDetails: 'Usage Details',
284
+ chart: {
285
+ eventCount: 'Daily Event Count',
286
+ totalValue: 'Daily Total Value',
287
+ },
288
+ filter: {
289
+ customer: 'Filter by Customer',
290
+ },
291
+ add: {
292
+ button: 'Add usage',
293
+ title: 'Add usage',
294
+ customerId: 'Customer',
295
+ customerIdPlaceholder: 'Select customer',
296
+ value: 'Value',
297
+ valuePlaceholder: 'Enter usage value',
298
+ subscriptionId: 'Subscription',
299
+ subscriptionIdPlaceholder: 'Enter subscription ID (optional)',
300
+ subscriptionIdHint: 'Optional - link this usage to a specific subscription',
301
+ timestamp: 'Timestamp',
302
+ timestampHint: 'When this usage occurred',
303
+ validation: 'Customer and value are required',
304
+ success: 'Usage event added successfully',
305
+ submit: 'Submit',
306
+ },
307
+ },
91
308
  developers: 'Developers',
92
309
  webhooks: 'Webhooks',
93
- events: 'Events',
310
+ events: {
311
+ title: 'Events',
312
+ dailyEventCount: 'Daily Event Count',
313
+ dailyTotalValue: 'Daily Total Value',
314
+ eventName: 'Event Name',
315
+ value: 'Value',
316
+ customer: 'Customer',
317
+ subscription: 'Subscription',
318
+ reportTime: 'Report Time',
319
+ count: '{count} events total',
320
+ empty: 'No event data',
321
+ emptyTip: 'Data will appear here when events are reported',
322
+ filterByCustomer: 'Filter by customer',
323
+ eventCount: 'Event Count',
324
+ totalValue: 'Total Value',
325
+ hourly: 'Hourly',
326
+ totalEvents: 'Total Events',
327
+ timeRange: 'Time Range',
328
+ hourlyView: 'Hourly View',
329
+ dailyView: 'Daily View',
330
+ },
94
331
  refunds: 'Refunds',
95
332
  payouts: 'Payouts',
96
333
  logs: 'Logs',
@@ -101,6 +338,7 @@ export default flat({
101
338
  business: 'Business',
102
339
  summary: 'Summary',
103
340
  product: {
341
+ empty: 'No product',
104
342
  info: 'Product information',
105
343
  add: 'Add product',
106
344
  view: 'View product details',
@@ -119,7 +357,7 @@ export default flat({
119
357
  removeTip: 'Removing will hide this product from new purchases. Are you sure you want to remove this product?',
120
358
  archived: 'This product has been archived',
121
359
  archivedTip:
122
- 'This product cant be added to new invoices, subscriptions, payment links, or pricing tables. Any existing subscriptions with this product remain active until canceled and any existing payment links or pricing tables are deactivated.',
360
+ "This product can't be added to new invoices, subscriptions, payment links, or pricing tables. Any existing subscriptions with this product remain active until canceled and any existing payment links or pricing tables are deactivated.",
123
361
  locked: 'This product is locked because at least one of its prices is used by a subscription or a payment.',
124
362
  currencyNotAligned: 'all prices must have the same currency settings',
125
363
  image: {
@@ -146,20 +384,45 @@ export default flat({
146
384
  },
147
385
  unit_label: {
148
386
  label: 'Unit label',
149
- placeholder: 'Seat',
387
+ placeholder: 'Unit',
388
+ },
389
+ billingType: {
390
+ label: 'Billing type',
391
+ standard: 'Standard billing',
392
+ standardDesc: 'Charge a fixed amount on a recurring basis',
393
+ metered: 'Metered billing',
394
+ meteredDesc: 'Charge based on usage tracked by a meter',
395
+ help: 'Choose how customers will be charged for this product',
396
+ },
397
+ meter: {
398
+ label: 'Meter',
399
+ placeholder: 'Select a meter to track usage',
400
+ required: 'Please select a meter for metered billing',
401
+ help: 'Select the meter to track usage for this product',
402
+ pricingNote:
403
+ 'For metered products, pricing is automatically based on usage tracked by the selected meter. You only need to set the unit price and billing period.',
150
404
  },
151
405
  cross_sell: {
152
406
  title: 'Cross-sells',
153
407
  to: 'Cross-sells to',
154
408
  tip: '',
155
409
  },
410
+ type: {
411
+ label: 'Product Type',
412
+ service: 'Service',
413
+ credit: 'Credit',
414
+ good: 'Good',
415
+ },
156
416
  },
157
417
  price: {
158
418
  name: 'Price',
159
419
  type: 'Usage type',
420
+ plan: 'Price plan',
160
421
  info: 'Price information',
161
422
  count: '{count} prices',
162
423
  empty: 'No price',
424
+ addAnother: 'Add another price',
425
+ order: 'Plan {order}',
163
426
  lookupKey: 'Lookup key',
164
427
  setAsDefault: 'Set as default price',
165
428
  detail: 'Pricing details',
@@ -189,6 +452,7 @@ export default flat({
189
452
  lookup_key: {
190
453
  label: 'Lookup key',
191
454
  placeholder: '',
455
+ description: 'Lookup key is used to identify the price in the API',
192
456
  },
193
457
  recurring: {
194
458
  interval: 'Billing period',
@@ -205,15 +469,44 @@ export default flat({
205
469
  },
206
470
  models: {
207
471
  standard: 'Standard pricing',
472
+ standardDesc: 'A single, fixed price',
208
473
  package: 'Package pricing',
474
+ packageDesc: 'Price by number of units',
209
475
  graduated: 'Graduated Pricing',
210
476
  volume: 'Volume pricing',
211
477
  custom: 'Customer choose price',
478
+ usageBased: 'Usage-based',
479
+ creditMetered: 'Credit metered',
480
+ },
481
+ creditMetered: {
482
+ label: 'Credit metered',
483
+ placeholder: 'Select a meter to track usage',
484
+ required: 'Please select a meter for metered billing',
485
+ help: 'Select the meter to track usage for this product',
486
+ selectMeter: 'Select meter',
487
+ pricingNote: 'For metered products, pricing is automatically based on usage tracked by the selected meter.',
488
+ description:
489
+ 'Credit metered billing requires a corresponding Credit consumption. If the Credit is consumed, the corresponding service will stop.',
212
490
  },
213
491
  types: {
214
492
  onetime: 'One time',
493
+ onetimeDesc: 'Charge a one-time fee',
215
494
  recurring: 'Recurring',
495
+ recurringDesc: 'Charge an ongoing fee',
216
496
  },
497
+ paymentType: 'Payment Type',
498
+ billingModel: 'Billing Model',
499
+ pricing: 'Pricing',
500
+ additionalCurrencies: 'Additional Currencies',
501
+ advanced: 'Advanced Settings',
502
+ customInterval: 'Custom Interval',
503
+ perUnit: 'Per Unit',
504
+ choosePricingModel: 'Choose your pricing model',
505
+ usage: 'Usage',
506
+ usageDesc:
507
+ 'Price by number of users, units, or seats. Needs a record for Stripe to track customer service usage.',
508
+ meter: 'Meter',
509
+ billingPeriod: 'Billing period',
217
510
  aggregate: {
218
511
  sum: 'Sum of usage values during period',
219
512
  max: 'Maximum usage value during period',
@@ -234,6 +527,7 @@ export default flat({
234
527
  format: 'Available {num} pieces',
235
528
  noLimit: 'No limit on available quantity',
236
529
  valid: 'Available quantity must be greater than or equal to sold quantity',
530
+ description: 'Enter the number of units that can be sold, 0 means unlimited',
237
531
  },
238
532
  quantitySold: {
239
533
  label: 'Sold quantity',
@@ -244,6 +538,7 @@ export default flat({
244
538
  placeholder: '0 means unlimited',
245
539
  format: 'Limit {num} pieces per checkout',
246
540
  noLimit: 'No limit on quantity per checkout',
541
+ description: 'Enter the number of units that can be purchased in a single checkout, 0 means unlimited',
247
542
  },
248
543
  inventory: 'Inventory Settings',
249
544
  },
@@ -655,6 +950,49 @@ export default flat({
655
950
  line2: 'Line2',
656
951
  postal_code: 'Postal Code',
657
952
  },
953
+ creditGrants: {
954
+ title: 'Credit Grants',
955
+ description: 'View your available credit grants and usage history',
956
+ grants: 'Credit Grants',
957
+ transactions: 'Credit Usage',
958
+ summary: 'Credit Summary',
959
+ noGrants: 'No credit grants available',
960
+ grantDetail: 'Credit Grant Details',
961
+ creditBalance: 'Credit Balance',
962
+ totalAmount: 'Total Amount',
963
+ status: {
964
+ granted: 'Active',
965
+ pending: 'Pending',
966
+ expired: 'Expired',
967
+ depleted: 'Depleted',
968
+ voided: 'Voided',
969
+ },
970
+ originalAmount: 'Original Amount',
971
+ usage: 'Usage',
972
+ grantId: 'Grant ID',
973
+ currency: 'Currency',
974
+ created: 'Created',
975
+ effectiveDate: 'Effective Date',
976
+ expirationDate: 'Expiration Date',
977
+ transactionHistory: 'Transaction History',
978
+ backToGrants: 'Back to Credit Grants',
979
+ viewDetails: 'View Details',
980
+ overview: 'Overview',
981
+ overviewDescription: 'Monitor all currency credit balances, usage, and outstanding debt.',
982
+ availableBalance: 'Available Balance',
983
+ viewGrants: 'View Grants',
984
+ viewUsage: 'View Usage',
985
+ recentActivity: 'Recent Activity',
986
+ quickStats: 'Quick Stats',
987
+ activeGrants: 'Active Grants',
988
+ outstandingDebt: 'Outstanding Debt',
989
+ buyCredits: 'Buy Credits',
990
+ viewAllActivity: 'View All Activity',
991
+ pendingAmount: 'Outstanding Charges',
992
+ grantCount: 'Grant Count',
993
+ noGrantsDescription: "You don't have any credit grants yet.",
994
+ addCredit: 'Add Credit',
995
+ },
658
996
  },
659
997
  passport: {
660
998
  intro:
@@ -805,6 +1143,50 @@ export default flat({
805
1143
  depositFailed: 'Deposit to vault request failed',
806
1144
  appBalance: 'App Balance',
807
1145
  },
1146
+ creditGrants: {
1147
+ title: 'Credit Grants',
1148
+ summary: 'Credit Summary',
1149
+ noGrants: 'No credit grants found',
1150
+ grantDetail: 'Credit Grant Details',
1151
+ overview: 'Credit Overview',
1152
+ overviewDescription: 'Monitor credit balances, usage, and outstanding debt across all currencies.',
1153
+ availableBalance: 'Available Balance',
1154
+ usage: 'Usage',
1155
+ viewGrants: 'View Grants',
1156
+ viewUsage: 'View Usage',
1157
+ recentActivity: 'Recent Activity',
1158
+ quickStats: 'Quick Stats',
1159
+ activeGrants: 'Active Grants',
1160
+ totalCreditValue: 'Total Credit Value',
1161
+ outstandingDebt: 'Outstanding Debt',
1162
+ buyCredits: 'Buy Credits',
1163
+ viewAllActivity: 'View All Activity',
1164
+ creditBalance: 'Credit Balance',
1165
+ totalAmount: 'Total Amount',
1166
+ pendingAmount: 'Pending Amount',
1167
+ grantCount: 'Grant Count',
1168
+ noGrantsDescription: "You don't have any credit grants yet.",
1169
+ status: {
1170
+ granted: 'Active',
1171
+ pending: 'Pending',
1172
+ expired: 'Expired',
1173
+ depleted: 'Depleted',
1174
+ voided: 'Voided',
1175
+ },
1176
+ originalAmount: 'Original Amount',
1177
+ grantId: 'Grant ID',
1178
+ grants: 'Grants',
1179
+ addCredit: 'Add Credit',
1180
+ viewDetails: 'View Details',
1181
+ },
1182
+ creditTransactions: {
1183
+ title: 'Credit Transactions',
1184
+ summary: 'Transaction Summary',
1185
+ noTransactions: 'No credit transactions found',
1186
+ totalTransactions: 'Total Transactions',
1187
+ totalCreditUsed: 'Total Credit Used',
1188
+ transactionDate: 'Transaction Date',
1189
+ },
808
1190
  },
809
1191
  empty: {
810
1192
  image: 'No Image',
@@ -823,7 +1205,7 @@ export default flat({
823
1205
  records: 'No matching records found',
824
1206
  payments: 'No Payments',
825
1207
  prices: 'No Prices',
826
- pricing: 'You havent added any prices you can add it',
1208
+ pricing: "You haven't added any prices you can add it",
827
1209
  summary: 'No Summary',
828
1210
  },
829
1211
  customer: {
@@ -900,6 +1282,8 @@ export default flat({
900
1282
  },
901
1283
  unpaidInvoicesWarning: 'You currently have unpaid invoices, please settle your invoices first.',
902
1284
  unpaidInvoicesWarningTip: 'You currently have unpaid invoices, please settle your invoices promptly.',
1285
+ pendingAmountWarningTip:
1286
+ 'You have {amount} {symbol} in unpaid usage charges due to insufficient credit balance. Please top up your account.',
903
1287
  invoice: {
904
1288
  relatedInvoice: 'Related Invoice',
905
1289
  donation: 'Donation',