Skip to content

Commit 17fb3e2

Browse files
authored
feat(payment-stripe): merge custom metadata along with session_id on payment initiation (medusajs#13801)
* Merge custom metadata along with session_id on payment initiation * update changeset
1 parent a540256 commit 17fb3e2

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/cool-brooms-travel.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@medusajs/payment-stripe": patch
3+
---
4+
5+
feat(payment-stripe): merge custom metadata along with session_id on payment initiation

packages/modules/providers/payment-stripe/src/core/stripe-base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ abstract class StripeBase extends AbstractPaymentProvider<StripeOptions> {
248248
const intentRequest: Stripe.PaymentIntentCreateParams = {
249249
amount: getSmallestUnit(amount, currency_code),
250250
currency: currency_code,
251-
metadata: { session_id: data?.session_id as string },
251+
metadata: { ...(data?.metadata ?? {}), session_id: data?.session_id as string },
252252
...additionalParameters,
253253
}
254254

0 commit comments

Comments
 (0)