Add possibility to enter promo code in Stripe checkout (#437)

This commit is contained in:
Riccardo Graziosi
2024-11-15 17:46:05 +01:00
committed by GitHub
parent b180886ce0
commit 8dd5ca4e2a

View File

@@ -77,6 +77,7 @@ class BillingController < ApplicationController
mode: 'subscription',
return_url: "#{return_url}?session_id={CHECKOUT_SESSION_ID}&tenant_id=#{params[:tenant_id]}",
customer: Current.tenant.tenant_billing.customer_id,
allow_promotion_codes: true,
})
render json: { clientSecret: session.client_secret }