Stripe Integration
DayZero integrates with Stripe Connect for multi-tenant payment processing. Each business connects its own Stripe account for invoice payments and automatic accounting.
Connect Stripe
Start the OAuth flow to link a Stripe account:
bash
curl "https://api.ondayzero.com/api/v1/stripe/connect-url" \
-H "Authorization: Bearer dz_your_token_here" \
-H "x-business-id: YOUR_BUSINESS_ID"The response includes a redirect URL. After authorization, the business's stripe_account_id is stored automatically.
Invoice Payments
When a finalized invoice has Stripe connected, it includes a stripe_payment_url. Customers pay through Stripe's hosted checkout. Payment confirmation arrives via webhooks and automatically:
- Updates invoice status to
stripe_paid - Creates a payment journal entry (debit Cash, credit AR)
- Records the Stripe fee as an expense
Automatic Journal Entries
| Stripe Event | Journal Entry |
|---|---|
| Invoice paid | Debit Cash / Credit Accounts Receivable |
| Payout received | Debit Bank / Credit Stripe Clearing |
| Processing fee | Debit Processing Fees / Credit Cash |
Disconnect
bash
curl -X POST "https://api.ondayzero.com/api/v1/stripe/disconnect" \
-H "Authorization: Bearer dz_your_token_here" \
-H "x-business-id: YOUR_BUSINESS_ID"