Skip to content

Payment to invoice

When money arrives through a payment provider, somebody still has to raise the invoice, mark it paid and send the receipt. This workflow does it the moment the provider reports the payment.

The Payment to invoice workflow on the canvas: Payment webhook, then Find the payer, then Create invoice, then Mark it paid, then Email receipt, then Log the payment

Before you start

  • A payment provider that can send a webhook when a payment succeeds, such as Stripe
  • An invoice layout in BaseCloud

The workflow

Step Task Type What it does
1 Payment webhook Webhook In Receives the payment notification
2 Find the payer Match to Client(s) Finds the client by the payer’s email address
3 Create invoice Accounting Creates the invoice for the amount paid
4 Mark it paid Accounting Marks that invoice as paid today
5 Email receipt Email Emails the client a link to the paid invoice
6 Log the payment Workflow Note Records the payment on the client

About the variables

Values such as {{task_36611_…}} carry the number of the task they come from, so yours will differ. Do not type them: click into a field and pick the value from an earlier task.

1. Payment webhook

Task: Webhook In. Receives the payment notification.

Field Set it to
Response Type Immediate
Response Body {"received": true}

Copy this task’s webhook address into your payment provider. The variable names follow the fields the provider sends.

2. Find the payer

Task: Match to Client(s). Finds the client by the payer’s email address.

Field Set it to
Action Match to Client
Find the client by Contact email = {{task_36611_customer_email}}

3. Create invoice

Task: Accounting. Creates the invoice for the amount paid.

The Accounting task named Create invoice, opened to its settings

Field Set it to
Action Create Invoice
Invoice Layout 752
Client ID {{task_36612_match_client_id}}
Item Description(s) {{task_36611_description}}
Item Code(s) ONLINE
Item Quantity(ies) 1
Unit Cost(s) {{task_36611_amount}}
Tax Rate(s) 0

4. Mark it paid

Task: Accounting. Marks that invoice as paid today.

Field Set it to
Action Mark Quote / Invoice Paid
Quote / Invoice ID {{task_36613_quote_invoice_id}}
Date Paid today

5. Email receipt

Task: Email. Emails the client a link to the paid invoice.

Field Set it to
Outgoing Email User Wendy Darling
Client {{task_36612_match_client_id}}
To {{task_36611_customer_email}}
Subject Your receipt: invoice {{task_36613_quote_invoice_o_id_full}}

Body

Hi,

Thank you for your payment of ${{task_36611_amount}}.

Your paid invoice is here: {{task_36613_document_url}}

Kind regards,
Accounts

6. Log the payment

Task: Workflow Note. Records the payment on the client.

Field Set it to
Action Create Note
Client ID {{task_36612_match_client_id}}
Note Type Note
Priority Low
Due Date Now
Tag Users Tiger Lily
Mark above users as Done

Message

Online payment of ${{task_36611_amount}} received. Invoice {{task_36613_quote_invoice_o_id_full}} created, marked paid and emailed.

Make it yours

  • Add a Create New client task for payers who are not clients yet.
  • Change the item description and code to match your Pricebook.