Library / Finance, Invoices & Accounting
Finance, Invoices & Accounting
Collect Xero invoice payments with Stripe Payment Links via WhatsApp
When an API call/webhook arrives, it processes financial data using Data Table, Slack, Stripe.
What it does
## Collect Xero invoice payments with Stripe Payment Links on WhatsApp ### How it works This workflow listens for Xero invoice webhooks, verifies the webhook signature, and processes approved sales invoices. For each eligible invoice, it checks whether a Stripe Payment Link already exists; if not, it fetches contact details, validates a WhatsApp number, creates a Stripe price and payment link, saves it, and sends it via WhatsApp. A separate Stripe payment-success path records paid invoices back into Xero, handles Stripe fees with an optional journal entry, and updates the local link/payment tracking table. Failure and duplicate-payment branches notify Slack. ### Setup steps - Configure the Xero webhook URL and signing secret, and set up Xero API/OAuth credentials with access to invoices, contacts, payments, and manual journals. - Configure Stripe credentials for creating prices/payment links and for the payment-succeeded trigger; ensure Stripe metadata includes enough invoice/link identifiers for reconciliation. - Set up the n8n Data Tables used for payment-link lookup, saved links, sent/paid status, and account configuration mappings. - Configure the WAHA host/session settings for WhatsApp number checks and message sending. - Connect Slack credentials and choose channels for duplicate payment and workflow failure alerts. - Review the Xero tenant ID, Stripe product/price parameters, Xero bank/account codes, fee journal account codes, and WhatsApp message template values in the code and HTTP request nodes. ### Customization Customize the invoice eligibility filter, WhatsApp message wording, Stripe Payment Link options, duplicate-payment alert behavior, and Xero account mappings for your chart of accounts and collection process.
The steps
- When Xero Invoice Triggered
- Compute Signature
- If Signature Matches
- Respond with HTTP 200
- Extract Events From Invoice
- Fetch Xero Invoice Data
- Prepare Invoice Data
- Filter Approved Sales Invoices
- Find Payment Link
- If Payment Link Exists
- Fetch Xero Contact Info
- Build Stripe Payment Request
- Verify WhatsApp Number
- Confirm Number Validity
35 steps in total.
Similar automations
Finance, Invoices & AccountingSync Shopify orders to Xero invoices with Slack and email alerts12 stepsFinance, Invoices & AccountingSync Stripe refunds to Xero and send dispute alerts with Slack19 stepsFinance, Invoices & AccountingUpdate HubSpot and Alert Slack on Paid Stripe Invoices8 stepsFinance, Invoices & AccountingRetrieve Customer Details from Stripe Payment Events3 steps