Enable business payments and bank transfers in Stripe checkout
All checks were successful
Build and Push Docker Images / docker (push) Successful in 45s

Payment Methods Added:
- ACH bank transfers (us_bank_account) for US customers
- Stripe Link for saved payment methods including bank accounts
- Kept credit/debit card payments

Business Payment Features:
- customer_creation: 'always' - Creates Stripe customer for each payment
- billing_address_collection: 'required' - Collects full billing address
- phone_number_collection: Enabled for contact information
- tax_id_collection: Enabled for business tax ID (VAT, EIN, etc.)

Benefits:
- Businesses can now enter their tax ID for invoicing
- Customers can pay via bank transfer (ACH) as well as cards
- Full billing information collected for business records
- Stripe Link provides one-click checkout for returning customers

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Matt 2025-10-30 15:05:04 +01:00
parent a0bc75493d
commit b5847b573b

View File

@ -92,12 +92,20 @@ router.post('/create-session', async (req, res) => {
// Create Stripe Checkout Session // Create Stripe Checkout Session
const session = await stripe.checkout.sessions.create({ const session = await stripe.checkout.sessions.create({
payment_method_types: ['card'], payment_method_types: ['card', 'us_bank_account', 'link'],
line_items: lineItems, line_items: lineItems,
mode: 'payment', mode: 'payment',
success_url: `${process.env.FRONTEND_URL}/checkout/success?session_id={CHECKOUT_SESSION_ID}`, success_url: `${process.env.FRONTEND_URL}/checkout/success?session_id={CHECKOUT_SESSION_ID}`,
cancel_url: `${process.env.FRONTEND_URL}/checkout/cancel`, cancel_url: `${process.env.FRONTEND_URL}/checkout/cancel`,
customer_email: customerEmail, customer_email: customerEmail,
customer_creation: 'always', // Always create a customer for payment tracking
billing_address_collection: 'required', // Collect billing address for business payments
phone_number_collection: {
enabled: true, // Collect phone number
},
tax_id_collection: {
enabled: true, // Allow customers to enter business tax ID
},
metadata: { metadata: {
tons: tons.toString(), tons: tons.toString(),
portfolioId: portfolioId.toString(), portfolioId: portfolioId.toString(),