The moment it happens
Send a PayPal invoice from your own form or tool
When your tool sends a customer and line items to a link, a PayPal invoice goes out and you get a confirmation.
- Runs
- The moment it happens
- Apps
- PayPal
- AI
- Not needed
- Access
- REST app with invoicing (write)
Send this to your assistant
Create a ClickRuntime automation: give me a link my order form can send to. When it gets a customer email and line items, create a PayPal invoice due in 14 days, send it, and confirm in #billing on Slack.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A freelancer or small agency takes orders from a web form, a booking tool or an internal script, then copies the details into PayPal by hand to bill the customer. That means retyping names, emails, line items and amounts, plus the risk of a typo in the total. Orders sit unbilled over the weekend, and some never get invoiced because the copy step was forgotten.
When your form or tool posts an order to the webhook, the payload is validated first, so incomplete or malformed requests are rejected rather than half processed. A draft PayPal invoice is created from the fields, sent to the customer right away, and a confirmation lands in Slack so you know it went out.
It suits businesses that sell custom work, deposits or services priced per order, where a fixed checkout page does not fit.
What you get out of it
Invoices go out the minute an order arrives
Customers receive the bill while the purchase is fresh. Getting paid sooner improves cash flow, and the customer is less likely to forget about the order or dispute it later.
No retyping, no wrong totals
Details move straight from the order payload into the invoice, so there is no manual copy step where an extra zero or a misspelled email can slip in and delay payment.
Bad requests are stopped early
Validation catches orders missing an email or an amount before an invoice is created. You avoid sending a customer a blank or incorrect invoice, which is harder to walk back than to prevent.
Nothing falls through the weekend
Orders that arrive at midnight or on a holiday are billed just as quickly as those during working hours. Revenue does not depend on someone remembering to open PayPal on Monday morning.
A Slack trail for each invoice
Each confirmation message in Slack gives you a quick log of what was billed and when. If a customer says they never received an invoice, you can see that it was sent.
How it works
What happens, step by step
When your own form or tool sends ClickRuntime the customer, items and amount, the automation starts.
It checks that the required details are there.
It creates the invoice in PayPal and sends it to the customer.
A confirmation is posted to your #billing Slack channel with the invoice number, customer, amount and due date.
Before it runs live
- Connect PayPal
- Paste your automation's link into the other app's webhook settings
What you get
Build your own
Need it to work differently?
Your own rules
Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.
Any number of apps
One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.
AI where it helps
Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.
On a schedule or on each event
Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.
Changes you can ask for
- Act only on the items that match your own rules, and skip the rest
- Add an AI step, for example to summarize, sort or draft a reply
- Add another app, for example also send it to Slack
- Combine it with other PayPal steps into one automation
Under the hood
The code that runs this automation
from clickruntime import on_event, credentials, http, notify
API = "https://api-m.paypal.com"
def paypal_headers():
resp = http.post(f"{API}/v1/oauth2/token", data={"grant_type": "client_credentials"},
auth=(credentials.secret("PAYPAL_CLIENT_ID"), credentials.secret("PAYPAL_CLIENT_SECRET")))
resp.raise_for_status()
return {"Authorization": f"Bearer {resp.json()['access_token']}"}
@on_event
def handle(event):
data = event.json or {}
if not data.get("email") or not data.get("items"):
return {"created": False, "reason": "email and items are required"}
headers = {**paypal_headers(), "Prefer": "return=representation"}
invoice = http.post(f"{API}/v2/invoicing/invoices", headers=headers, json={
"detail": {"currency_code": "USD", "payment_term": {"term_type": "NET_14"}},
"primary_recipients": [{"billing_info": {"email_address": data["email"]}}],
"items": [{"name": i["name"], "quantity": str(i.get("quantity", 1)),
"unit_amount": {"currency_code": "USD", "value": f"{float(i['price']):.2f}"}}
for i in data["items"]]})
invoice.raise_for_status()
inv = invoice.json()
http.post(f"{API}/v2/invoicing/invoices/{inv['id']}/send", headers=headers,
json={"send_to_invoicer": True}).raise_for_status()
notify.slack(f"🧾 Invoice {inv['detail']['invoice_number']} sent to {data['email']}: "
f"USD {inv['amount']['value']}, due in 14 days", channel="#billing")
return {"invoice": inv["id"]}FAQ
Common questions
What does the order payload need to contain?
Will a duplicate submission create two invoices?
Can the invoice be saved as a draft for me to review instead of sent?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Post each PayPal payment to Slack
Every completed payment shows up in Slack with who paid and how much.
See how it worksHear about denied PayPal payments
When a payment is denied, you know straight away and can contact the buyer.
See how it worksGet dispute details before the deadline
A new dispute lands in your inbox with its reason, amount and the date you must reply by.
See how it worksKeep exploring
Set up “Send a PayPal invoice from your own form or tool” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.