#captainhash
1 messages · Page 1 of 1 (latest)
Hi! Let me help you with this.
I'm setting the default payement method like this
await this.stripe.customers.update(session.customer, {
invoice_settings: {
default_payment_method: paymentMethods.data[0].id,
},
});
Are you setting invoice_settings.default_payment_method?
Yes, it's only used for Invoces and Subscriptions but not PaymentIntents.
and I'm doing my intent like this await this.stripe.paymentIntents.create({
customer: customerId,
payment_method_types: ['card'],
description: ${service}-token x ${quantity},
amount: unitPrice * quantity,
currency: 'eur',
confir
How can I set a default card for payement intent ?
Should I retrieve the default pm ?
You can retrieve the Customer and get the invoice_settings.default_payment_method. And then set it in PaymentIntent.payment_method