#hana ito

1 messages · Page 1 of 1 (latest)

paper parrotBOT
glad totem
#

Can you share what you want to achieve? Are you going to create a subscription and collect the payment? Or are you just simply going to collect the payment method only without a subscription?

#

if I put clientsecret in option, the address/payment information input screen will not be displayed.
Can you share the code which you attmpted to do that?

simple lagoon
#

I have already created a subscription. I want to collect payment methods and complete payments.

#

const options = {
mode: subscribe
clientSecret: 'subscription.latest_invoice.payment_intent.client_secret',
appearance: {/.../},

};
const elements = stripe.elements(options);

const paymentElement = elements.create('payment');
paymentElement.mount('#payment-element');
glad totem
#

Can you try removing the mode: subscribe?

#

It's not required for subscription with client secret

#

For clientSecret, can you ensure that the value is in pi_xxx_secret_xxx?

simple lagoon
#

where should i check that?

glad totem
#

You can put a log to check what is the clientSecret set. In clientSecret: 'subscription.latest_invoice.payment_intent.client_secret',, the value seems wrong. It shouldn't be a constant string. It should be pi_xxx_secret_xxx