diff --git a/packages/bot-engine/src/components/ChatGroup/ChatBlock/inputs/PaymentForm/StripePaymentForm.tsx b/packages/bot-engine/src/components/ChatGroup/ChatBlock/inputs/PaymentForm/StripePaymentForm.tsx index 61a130a56..c3de227a0 100644 --- a/packages/bot-engine/src/components/ChatGroup/ChatBlock/inputs/PaymentForm/StripePaymentForm.tsx +++ b/packages/bot-engine/src/components/ChatGroup/ChatBlock/inputs/PaymentForm/StripePaymentForm.tsx @@ -42,8 +42,9 @@ export const StripePaymentForm = ({ options, onSuccess }: Props) => { description: error.name + ' ' + error.message, details: error.message, }) - if (!data || !frameDocument || !frameWindow?.Stripe) return + if (!data || !frameDocument) return await initStripe(frameDocument) + if (!frameWindow?.Stripe) return setStripe(frameWindow.Stripe(data.publicKey)) setClientSecret(data.clientSecret) setAmountLabel(data.amountLabel)