We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d4d16f1 commit bc3ae17Copy full SHA for bc3ae17
src/STRIPE/handler.js
@@ -134,12 +134,14 @@ async function processCompletedSession(eventData) {
134
} = metadata;
135
136
try {
137
- await StripeHelper.updateSubscription(subscriptionId, {
138
- metadata: {
139
- ...metadata,
140
- isCheckout: false,
141
- },
142
- });
+ if (subscriptionId) {
+ await StripeHelper.updateSubscription(subscriptionId, {
+ metadata: {
+ ...metadata,
+ isCheckout: false,
+ },
143
+ });
144
+ }
145
} catch (e) {
146
147
}
0 commit comments