From 327c3c391f99a00ad99c2e739744f7db0028ada7 Mon Sep 17 00:00:00 2001 From: 5andu Date: Fri, 10 Nov 2023 07:18:07 +0100 Subject: [PATCH] Add customer email to billing portal for improved UX --- app/controllers/billing_portal_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/billing_portal_controller.rb b/app/controllers/billing_portal_controller.rb index 311b9532..0c0eeab1 100644 --- a/app/controllers/billing_portal_controller.rb +++ b/app/controllers/billing_portal_controller.rb @@ -29,6 +29,7 @@ def create_subscription session = Stripe::Checkout::Session.create({ ui_mode: 'embedded', customer: current_user.stripe_customer_id, + customer_email: current_user.email, allow_promotion_codes: true, payment_method_types: ['card'], line_items: [{