From 8e9e99ca811882a1c8e10c0795acbda7e88a312a Mon Sep 17 00:00:00 2001 From: Joseph Shearer Date: Tue, 29 Oct 2024 13:27:08 -0400 Subject: [PATCH] billing: Switch payment method input form to use Stripe's new "automatic payment methods" feature This lets you select and configure which payment methods are enabled from the Stripe web UI. The original goal was to enable ACH payments, but it seemed better to just switch us over to something that lets these be configured w/o any code changes required. --- supabase/functions/billing/setup_intent.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/supabase/functions/billing/setup_intent.ts b/supabase/functions/billing/setup_intent.ts index 5557bb4f25..f917b89bd9 100644 --- a/supabase/functions/billing/setup_intent.ts +++ b/supabase/functions/billing/setup_intent.ts @@ -60,8 +60,9 @@ export async function setupIntent( customer: customer.id, description: "Store your payment details", usage: "off_session", - // payment_method_types: ["card", "us_bank_account"], - payment_method_types: ["card"], + automatic_payment_methods: { + enabled: true + } }); return [JSON.stringify({ intent_secret: intent.client_secret }), {