You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: firestore-stripe-payments/CHANGELOG.md
+10-1Lines changed: 10 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,38 +37,47 @@
37
37
[feat] - Add `setup_future_usage` parameter for one-time payment flows
38
38
39
39
## 0.3.5 - 2023-08-14
40
+
40
41
[chore] Updated naming and upgraded to node18
41
42
42
43
[fix] Updated icons
43
44
44
45
[fix] updated appinfo versioning
45
46
46
47
## 0.3.4 - 2023-08-14
48
+
47
49
This extension has been formally transferred to Invertase. See the updated README for more details.
48
50
49
51
## Version 0.3.3 - 2023-03-20
52
+
50
53
[fix] Address issue where `insertInvoiceRecord` function fails. [#511]
51
54
52
55
## Version 0.3.2 - 2022-11-30
56
+
53
57
[chore] Added support for `us-west1` as a deployable region for Firebase functions. [#464]
54
58
55
59
## Version 0.3.1 - 2022-08-24
60
+
56
61
[chore] Added `package-lock.json` to version control to prevent installation issues. [#426]
57
62
58
63
## Version 0.3.0 - 2022-08-23
64
+
59
65
[feat] Allow configurable minimum instances for `createCheckoutSession` function. [#375]
60
66
61
67
[feat] Throw an `unauthenticated` Firebase error from `creatPortalLink` function. [#420]
62
68
63
69
[feat] Add Price object IDs from invoice line items for subscription payments to payments Firestore collection. [#393]
64
70
65
71
## Version 0.2.7 - 2022-05-10
72
+
66
73
[chore] Updated package-lock.json that was causing install errors.
67
74
68
75
## Version 0.2.6 - 2022-05-10
76
+
69
77
[feat] Added Stripe extension events. This extension emits events, which allows you to listen to and run custom logic at different trigger points during the functioning of the extension. For example you can listen to events when a product has been added via the `product.created` event, or whenever a payment has succeeded through the `invoice.payment_succeeded` event. (#386)
70
78
71
79
## Version 0.2.5 - 2022-04-20
80
+
72
81
[feat] Add parameter to enable phone number collection. (#371)
73
82
74
83
[feat] Add parameters to enable expired Checkout Session recovery. (#350)
@@ -334,7 +343,7 @@ db.collection("products")
334
343
335
344
Previously, only subscriptions created via Stripe Checkout were synced to Cloud Firestore. By additionally listening to the `customer.subscription.created` event, the extension now also captures subscriptions created via the Stripe Dashboard or directly via the API. For this to work, Firebase Authentication users need to be synced with Stripe customer objects and the customers collection in Cloud Firestore (new configuration added in version `0.1.7`).
336
345
337
-
- Add snippet on importing Stripe.js as an ES module when using a build toolchain for your client application (e.g. Angular, React, TypeScript, etc.) to `POSTINSTALL.md`. (#74)
346
+
- Add snippet on importing Stripe.js as an ES module when using a build toolchain for your client application (e.g. Angular, React, TypeScript, etc.) to `POSTINSTALL.md`. (#74)
@@ -197,7 +197,7 @@ To create a Checkout Session ID for a one-time payment, pass `mode: 'payment` to
197
197
198
198
```js
199
199
constdocRef=await db
200
-
.collection('${param:CUSTOMERS_COLLECTION}')
200
+
.collection("${param:CUSTOMERS_COLLECTION}")
201
201
.doc(currentUser.uid)
202
202
.collection("checkout_sessions")
203
203
.add({
@@ -238,11 +238,11 @@ To subscribe the user to a specific pricing plan, create a new doc in the `check
238
238
239
239
```js
240
240
constdocRef=await db
241
-
.collection('${param:CUSTOMERS_COLLECTION}')
241
+
.collection("${param:CUSTOMERS_COLLECTION}")
242
242
.doc(currentUser.uid)
243
-
.collection('checkout_sessions')
243
+
.collection("checkout_sessions")
244
244
.add({
245
-
price:'price_1GqIC8HYgolSBA35zoTTN2Zl',
245
+
price:"price_1GqIC8HYgolSBA35zoTTN2Zl",
246
246
success_url:window.location.origin,
247
247
cancel_url:window.location.origin,
248
248
});
@@ -263,7 +263,7 @@ docRef.onSnapshot((snap) => {
263
263
264
264
#### Handling trials
265
265
266
-
By default, the trial period days that you've specified on the pricing plan will be applied to the checkout session. Should you wish to not offer the trial for a certain user (e.g. they've previously had a subscription with a trial that they canceled and are now signing up again), you can specify `trial_from_plan: false` when creating the checkout session doc:
266
+
You can specify subscription trial period when creating the checkout session by using the `trial_period_days` parameter. Refer to the [docs](https://stripe.com/docs/payments/checkout/free-trials) for a detailed guide on free trials and how to set them up.
267
267
268
268
```js
269
269
constdocRef=await db
@@ -272,7 +272,7 @@ const docRef = await db
272
272
.collection("checkout_sessions")
273
273
.add({
274
274
price:"price_1GqIC8HYgolSBA35zoTTN2Zl",
275
-
trial_from_plan:false,
275
+
trial_period_days:7,
276
276
success_url:window.location.origin,
277
277
cancel_url:window.location.origin,
278
278
});
@@ -286,11 +286,11 @@ In order for the promotion code redemption box to show up on the checkout page,
286
286
287
287
```js
288
288
constdocRef=await db
289
-
.collection('${param:CUSTOMERS_COLLECTION}')
289
+
.collection("${param:CUSTOMERS_COLLECTION}")
290
290
.doc(currentUser)
291
-
.collection('checkout_sessions')
291
+
.collection("checkout_sessions")
292
292
.add({
293
-
price:'price_1GqIC8HYgolSBA35zoTTN2Zl',
293
+
price:"price_1GqIC8HYgolSBA35zoTTN2Zl",
294
294
allow_promotion_codes:true,
295
295
success_url:window.location.origin,
296
296
cancel_url:window.location.origin,
@@ -305,7 +305,7 @@ You can set a [promotion code](https://stripe.com/docs/billing/subscriptions/dis
305
305
306
306
```js
307
307
constdocRef=await db
308
-
.collection('${param:CUSTOMERS_COLLECTION}')
308
+
.collection("${param:CUSTOMERS_COLLECTION}")
309
309
.doc(currentUser.uid)
310
310
.collection("checkout_sessions")
311
311
.add({
@@ -326,7 +326,7 @@ Stripe Tax lets you calculate and collect sales tax, VAT, and GST. Know where to
326
326
327
327
```js
328
328
constdocRef=await db
329
-
.collection('${param:CUSTOMERS_COLLECTION}')
329
+
.collection("${param:CUSTOMERS_COLLECTION}")
330
330
.doc(currentUser.uid)
331
331
.collection("checkout_sessions")
332
332
.add({
@@ -340,19 +340,23 @@ const docRef = await db
340
340
341
341
#### Applying tax rates dynamically
342
342
343
-
Stripe Checkout supports applying the correct tax rate for customers in US, GB, AU, and all countries in the EU. With [dynamic tax rates](https://stripe.com/docs/billing/subscriptions/taxes#adding-tax-rates-to-checkout), you create tax rates for different regions (e.g., a 20% VAT tax rate for customers in the UK and a 7.25% sales tax rate for customers in California, US) and Stripe attempts to match your customer’s location to one of those tax rates.
343
+
Stripe Checkout supports applying the correct tax rate for customers in US, GB, AU, and all countries in the EU. With [dynamic tax rates](https://stripe.com/docs/billing/subscriptions/taxes#adding-tax-rates-to-checkout), you create tax rates for different regions (e.g., a 20% VAT tax rate for customers in the UK and a 7.25% sales tax rate for customers in California, US) and Stripe attempts to match your customer’s location to one of those tax rates.
**_NOTE_**: If you specify more than one recurring price in the `line_items` array, the subscription object in Cloud Firestore will list all recurring prices in the `prices` array. The `price` attribute on the subscription in Cloud Firestore will be equal to the first item in the `prices` array: `price === prices[0]`.
@@ -457,14 +461,14 @@ In order for this to work, Firebase Authentication users need to be synced with
457
461
Subscription details are synced to the `subscriptions` sub-collection in the user's corresponding customer doc.
458
462
459
463
```js
460
-
db.collection('${param:CUSTOMERS_COLLECTION}')
464
+
db.collection("${param:CUSTOMERS_COLLECTION}")
461
465
.doc(currentUser.uid)
462
-
.collection('subscriptions')
463
-
.where('status', 'in', ['trialing', 'active'])
466
+
.collection("subscriptions")
467
+
.where("status", "in", ["trialing", "active"])
464
468
.onSnapshot(async (snapshot) => {
465
469
// In this implementation we only expect one active or trialing subscription to exist.
466
470
constdoc=snapshot.docs[0];
467
-
console.log(doc.id, ' => ', doc.data());
471
+
console.log(doc.id, " => ", doc.data());
468
472
});
469
473
```
470
474
@@ -475,8 +479,8 @@ Once a customer is subscribed you should show them a button to access the custom
Copy file name to clipboardExpand all lines: firestore-stripe-payments/PREINSTALL.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,9 +19,9 @@ The design for Stripe Checkout and the customer portal can be customized in your
19
19
20
20
#### Recommended usage
21
21
22
-
If you're building on the web platform, you can use this extension for any of your payment use cases.
22
+
If you're building on the web platform, you can use this extension for any of your payment use cases.
23
23
24
-
If you're developing native mobile applications and you're selling digital products or services within your app, (e.g. subscriptions, in-game currencies, game levels, access to premium content, or unlocking a full version), you must use the app store's in-app purchase APIs. See [Apple's](https://developer.apple.com/app-store/review/guidelines/#payments) and [Google's](https://support.google.com/googleplay/android-developer/answer/9858738?hl=en&ref_topic=9857752) guidelines for more information.
24
+
If you're developing native mobile applications and you're selling digital products or services within your app, (e.g. subscriptions, in-game currencies, game levels, access to premium content, or unlocking a full version), you must use the app store's in-app purchase APIs. See [Apple's](https://developer.apple.com/app-store/review/guidelines/#payments) and [Google's](https://support.google.com/googleplay/android-developer/answer/9858738?hl=en&ref_topic=9857752) guidelines for more information.
25
25
26
26
For all other scenarios you can use the [stripe-android](https://github.com/stripe/stripe-android), [stripe-ios](https://github.com/stripe/stripe-ios), [stripe-react-native](https://github.com/stripe/stripe-react-native), or [flutter_stripe](https://github.com/flutter-stripe/flutter_stripe) SDKs.
27
27
@@ -73,4 +73,4 @@ You are responsible for any costs associated with your use of these services.
73
73
74
74
To install this extension, your Firebase project must be on the Blaze (pay-as-you-go) plan. You will only be charged for the resources you use. Most Firebase services offer a free tier for low-volume use. [Learn more about Firebase billing.](https://firebase.google.com/pricing)
75
75
76
-
Starting August 17 2020, you will be billed a small amount (typically less than $0.10) when you install or reconfigure this extension. See the [Cloud Functions for Firebase billing FAQ](https://firebase.google.com/support/faq#expandable-15) for a detailed explanation.
76
+
Starting August 17 2020, you will be billed a small amount (typically less than $0.10) when you install or reconfigure this extension. See the [Cloud Functions for Firebase billing FAQ](https://firebase.google.com/support/faq#expandable-15) for a detailed explanation.
0 commit comments