feat(payment-stripe): merge custom metadata along with session_id on payment initiation (#13801)

* Merge custom metadata along with session_id on payment initiation

* update changeset
This commit is contained in:
Nathan John
2025-10-21 18:35:13 +01:00
committed by GitHub
parent a540256137
commit 17fb3e2e10
2 changed files with 6 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
"@medusajs/payment-stripe": patch
---
feat(payment-stripe): merge custom metadata along with session_id on payment initiation

View File

@@ -248,7 +248,7 @@ abstract class StripeBase extends AbstractPaymentProvider<StripeOptions> {
const intentRequest: Stripe.PaymentIntentCreateParams = { const intentRequest: Stripe.PaymentIntentCreateParams = {
amount: getSmallestUnit(amount, currency_code), amount: getSmallestUnit(amount, currency_code),
currency: currency_code, currency: currency_code,
metadata: { session_id: data?.session_id as string }, metadata: { ...(data?.metadata ?? {}), session_id: data?.session_id as string },
...additionalParameters, ...additionalParameters,
} }