Payment providers
Install Stripe per company for quote deposits and progress claim payments.
Set server keys
STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, NEXT_PUBLIC_STRIPE_KEY, and NEXT_PUBLIC_SITE_URL (used for return URLs).
Install
/dashboard/platform/payment-providers, Add Stripe (installStripePaymentProvider). Toggle with setPaymentProviderInstalled. Needs canManageBilling.
Add the webhook
Point Stripe at /api/payment-webhooks/[providerId]. Signatures are verified; unknown providers return 404, bad signatures 400, bodies over 1 MB 413.
What it pays
Stripe Checkout accepts card and US bank account (ACH).
- Quote deposit:
createCustomerPayment, thenreconcileCustomerPaymenton return. - Owner progress claims:
createClaimPaymentfrom the portal (constructionPayableClaimslists payable claims), or staff send a link withcreateClaimPaymentLink.checkPaymentStatusrefreshes status.
Settlement creates a Payment and allocates it. Errors: "Online payment is not set up for this contractor", "Deposit already received", "Claim is not payable online", "Claim has nothing left to pay", "Only the project owner can pay this claim".