We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 480e97b commit 212b0a5Copy full SHA for 212b0a5
components/server/ee/src/user/stripe-service.ts
@@ -115,8 +115,12 @@ export class StripeService {
115
await this.getStripe().paymentMethods.attach(setupIntent.payment_method, {
116
customer: customer.id,
117
});
118
+ const paymentMethod = await this.getStripe().paymentMethods.retrieve(setupIntent.payment_method);
119
await this.getStripe().customers.update(customer.id, {
120
invoice_settings: { default_payment_method: setupIntent.payment_method },
121
+ ...(paymentMethod.billing_details.address?.country
122
+ ? { address: { line1: "", country: paymentMethod.billing_details.address?.country } }
123
+ : {}),
124
125
}
126
0 commit comments