Skip to content

Commit 565973e

Browse files
committed
firestore-stripe-payments extension 0.4.3
1 parent dc79d68 commit 565973e

File tree

3 files changed

+52
-20
lines changed

3 files changed

+52
-20
lines changed

firestore-stripe-payments/CHANGELOG.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,28 @@
1-
## Version 0.3.10 - 2025-03-24
1+
## Version 0.4.3 - 2025-04-19
2+
3+
[fix] - Revert import statements to namespace imports
4+
5+
This fixes the deployement issues with latest extension deployement.
6+
7+
## Version 0.4.2 - 2025-04-19
8+
9+
[feat] - Pass-through metadata from Firebase Functions to new Stripe account
10+
11+
You can call `createCheckoutSession` and `createPortalLink` with the
12+
metadata parameter, and these will be saved as metadata fields for the
13+
created Stripe user.
14+
15+
## Version 0.4.1 - 2025-04-11
216

317
[fix] - upgrade resources to node 20
418

19+
## Version 0.4.0 - 2024-11-29
20+
21+
[feat] - Update Stripe SDK and add marketing_features field to Product
22+
23+
Adding this field required updating the Stripe SDK. It was quite out of
24+
date.
25+
526
### Version 0.3.9 - 2024-02-14
627

728
[feat] - Allows to specify number of trial period days before initiating checkout flow. Does not depend on the now-legacy trial_from_plan parameter.

firestore-stripe-payments/README.md

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# Run Payments with Stripe
22

3-
**Author**: Trent Rand (**[https://trentrand.com](https://trentrand.com)**), Invertase (**[https://invertase.io](https://invertase.io)**)
3+
**Author**: Trent Rand (**[https://trentrand.com](https://trentrand.com)**)
44

55
**Description**: Controls access to paid content by syncing your one-time and recurring payments with Firebase Authentication.
66

7+
8+
79
**Details**: Use this extension as a backend for your [Stripe](https://www.stripe.com/) payments.
810

911
The extension supports multiple use cases:
@@ -81,44 +83,53 @@ To install this extension, your Firebase project must be on the Blaze (pay-as-yo
8183

8284
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.
8385

86+
87+
88+
8489
**Configuration Parameters:**
8590

86-
- Cloud Functions deployment location: Where do you want to deploy the functions created for this extension? You usually want a location close to your database. For help selecting a location, refer to the [location selection guide](https://firebase.google.com/docs/functions/locations).
91+
* Cloud Functions deployment location: Where do you want to deploy the functions created for this extension? You usually want a location close to your database. For help selecting a location, refer to the [location selection guide](https://firebase.google.com/docs/functions/locations).
92+
93+
* Products and pricing plans collection: What is the path to the Cloud Firestore collection where the extension should store Stripe pricing plans?
8794

88-
- Products and pricing plans collection: What is the path to the Cloud Firestore collection where the extension should store Stripe pricing plans?
95+
* Customer details and subscriptions collection: What is the path to the Cloud Firestore collection where the extension should store Stripe customer details? This can be the location of an existing user collection, the extension will not overwrite your existing data but rather merge the Stripe data into your existing `uid` docs.
8996

90-
- Customer details and subscriptions collection: What is the path to the Cloud Firestore collection where the extension should store Stripe customer details? This can be the location of an existing user collection, the extension will not overwrite your existing data but rather merge the Stripe data into your existing `uid` docs.
97+
* Stripe configuration collection: What is the path to the Cloud Firestore collection where the extension should store Stripe configuration?
9198

92-
- Stripe configuration collection: What is the path to the Cloud Firestore collection where the extension should store Stripe configuration?
99+
* Sync new users to Stripe customers and Cloud Firestore: Do you want to automatically sync new users to customer objects in Stripe? If set to 'Sync', the extension will create a new customer object in Stripe and add a new doc to the customer collection in Firestore when a new user signs up via Firebase Authentication. If set to 'Do not sync' (default), the extension will create the customer object "on the fly" with the first checkout session creation.
93100

94-
- Sync new users to Stripe customers and Cloud Firestore: Do you want to automatically sync new users to customer objects in Stripe? If set to 'Sync', the extension will create a new customer object in Stripe and add a new doc to the customer collection in Firestore when a new user signs up via Firebase Authentication. If set to 'Do not sync' (default), the extension will create the customer object "on the fly" with the first checkout session creation.
101+
* Automatically delete Stripe customer objects: Do you want to automatically delete customer objects in Stripe? When a user is deleted in Firebase Authentication or in Cloud Firestore and set to 'Auto delete' the extension will delete their customer object in Stripe which will immediately cancel all subscriptions for the user.
95102

96-
- Automatically delete Stripe customer objects: Do you want to automatically delete customer objects in Stripe? When a user is deleted in Firebase Authentication or in Cloud Firestore and set to 'Auto delete' the extension will delete their customer object in Stripe which will immediately cancel all subscriptions for the user.
103+
* Stripe API key with restricted access: What is your Stripe API key? We recommend creating a new [restricted key](https://stripe.com/docs/keys#limit-access) with write access only for the "Customers", "Checkout Sessions" and "Customer portal" resources. And read-only access for the "Subscriptions" and "Prices" resources.
97104

98-
- Stripe API key with restricted access: What is your Stripe API key? We recommend creating a new [restricted key](https://stripe.com/docs/keys#limit-access) with write access only for the "Customers", "Checkout Sessions" and "Customer portal" resources. And read-only access for the "Subscriptions" and "Prices" resources.
105+
* Stripe webhook secret: This is your signing secret for a Stripe-registered webhook. This webhook can only be registered after installation. Leave this value untouched during installation, then follow the postinstall instructions for registering your webhook and configuring this value.
106+
107+
* Minimum instances for createCheckoutSession function: Set the minimum number of function instances that should be always be available to create Checkout Sessions. This number can be adjusted to reduce cold starts and increase the responsiveness of Checkout Session creation requests. Suggested values are 0 or 1. Please note this setting will likely incur billing costss, see the [Firebase documentation](https://firebase.google.com/docs/functions/manage-functions#reduce_the_number_of_cold_starts) for more information.
99108

100-
- Stripe webhook secret: This is your signing secret for a Stripe-registered webhook. This webhook can only be registered after installation. Leave this value untouched during installation, then follow the postinstall instructions for registering your webhook and configuring this value.
101109

102-
- Minimum instances for createCheckoutSession function: Set the minimum number of function instances that should be always be available to create Checkout Sessions. This number can be adjusted to reduce cold starts and increase the responsiveness of Checkout Session creation requests. Suggested values are 0 or 1. Please note this setting will likely incur billing costss, see the [Firebase documentation](https://firebase.google.com/docs/functions/manage-functions#reduce_the_number_of_cold_starts) for more information.
103110

104111
**Cloud Functions:**
105112

106-
- **createCustomer:** Creates a Stripe customer object when a new user signs up.
113+
* **createCustomer:** Creates a Stripe customer object when a new user signs up.
114+
115+
* **createCheckoutSession:** Creates a Checkout session to collect the customer's payment details.
116+
117+
* **createPortalLink:** Creates links to the customer portal for the user to manage their payment & subscription details.
107118

108-
- **createCheckoutSession:** Creates a Checkout session to collect the customer's payment details.
119+
* **handleWebhookEvents:** Handles Stripe webhook events to keep subscription statuses in sync and update custom claims.
109120

110-
- **createPortalLink:** Creates links to the customer portal for the user to manage their payment & subscription details.
121+
* **onUserDeleted:** Deletes the Stripe customer object and cancels all their subscriptions when the user is deleted in Firebase Authentication.
111122

112-
- **handleWebhookEvents:** Handles Stripe webhook events to keep subscription statuses in sync and update custom claims.
123+
* **onCustomerDataDeleted:** Deletes the Stripe customer object and cancels all their subscriptions when the customer doc in Cloud Firestore is deleted.
113124

114-
- **onUserDeleted:** Deletes the Stripe customer object and cancels all their subscriptions when the user is deleted in Firebase Authentication.
115125

116-
- **onCustomerDataDeleted:** Deletes the Stripe customer object and cancels all their subscriptions when the customer doc in Cloud Firestore is deleted.
117126

118127
**Access Required**:
119128

129+
130+
120131
This extension will operate with the following project IAM roles:
121132

122-
- firebaseauth.admin (Reason: Allows the extension to set custom claims for users.)
133+
* firebaseauth.admin (Reason: Allows the extension to set custom claims for users.)
123134

124-
- datastore.user (Reason: Allows the extension to store customers & subscriptions in Cloud Firestore.)
135+
* datastore.user (Reason: Allows the extension to store customers & subscriptions in Cloud Firestore.)

firestore-stripe-payments/extension.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
name: firestore-stripe-payments
16-
version: 0.4.2
16+
version: 0.4.3
1717
specVersion: v1beta
1818

1919
displayName: Run Payments with Stripe

0 commit comments

Comments
 (0)