Inspiration
Art commissions on Discord are a real market with a real scam problem. The deal happens in a DM ("full body sheet, 2 poses, $60, by Friday"), and the payment happens somewhere else: often PayPal Friends and Family to save fees, which removes buyer protection. Sometimes the payee is a lookalike of the artist you meant to pay. When something goes wrong, there's no record of what was agreed.
We wanted paying an artist to feel as quick as sending a DM, and to be safer than what people do today.
## What it does swoosh.pay lets you pay anyone by their Discord handle through a protected PayPal checkout.
- AI commission review. Right-click the artist's quote in a DM → Apps → Pay for this
commission.
- The AI reads the quote: it extracts what's being delivered, the price, full payment or deposit, the deadline and revisions, and lists the terms the quote leaves out.
- The AI flags PayPal-specific red flags, quoting the artist's exact words: requests to pay as Friends and Family, to pay outside PayPal, to pay someone else, or to hurry.
- swoosh.pay adds checks it can prove: the Discord account's age, lookalike handles of artists already paid, and your payment history with them.
- The agreed terms go on the PayPal order as the item description, so the PayPal receipt records what you bought.
- Pay from Discord.
/pay recipient:@artist amount:60. One tap opens PayPal checkout; the payment captures automatically and the Discord message updates to "✅ Paid" with the PayPal receipt ID. - Pay by username on the web. The username is verified with Discord before it's bound to an account.
- Invites for new artists. A private invite works only for that exact Discord account, which then connects PayPal once through PayPal's seller onboarding.
- One-tap repeat payments (built). The first checkout saves your PayPal for that artist; later,
/payshows Confirm in Discord and charges without a PayPal page, with per-payment and daily limits.
The overall risk badge combines both kinds of signal: the worse one wins.
$$\text{risk} = \max\big(\text{AI reading of the message},\ \text{checks swoosh.pay can verify}\big)$$
## How we built it
- Runtime: one Node.js app runs locally (SQLite) and on Cloudflare Workers (D1), using Workers' Node HTTP adapter.
- Discord: a user-installable app with a slash command, a message command and buttons, all verified with Ed25519. Replies are private to the sender and are edited later with the payment result.
- PayPal, as a multiparty platform:
- Partner Referrals onboards artists as sellers.
- Merchant integration status checks a seller is ready before any order is created.
- Orders v2 with
PayPal-Auth-Assertionmakes the artist the payee, so the platform never holds money. Create and capture are idempotent. - Verified, deduplicated webhooks keep each payment's status current.
- Vault saves a buyer's PayPal on the artist's behalf.
- AI:
- A large language model with structured JSON output, so every field it returns has a fixed type and the UI never parses free text.
- The quote is treated strictly as untrusted data.
- The AI never moves money or blocks a payment. It explains the risk; the buyer decides and still approves in PayPal.
- If the AI is unavailable, the page still shows swoosh.pay's own checks.
- Security: a strict Content Security Policy, same-origin checks on every form submission, single-use OAuth state, and invites tied to Discord account IDs rather than usernames.
- Tests: integration tests start the real server against simulated Discord, PayPal and AI APIs. They cover the full flow from Discord command to AI review, PayPal order with terms, capture, webhook and Discord message update.
## Challenges we ran into
- Paying the right person. Usernames change, so typed handles are verified with Discord and invites are tied to account IDs. A lookalike or newly renamed account can't claim someone else's payment.
- Discord's 3-second rule. Discord expects an answer within 3 seconds, but the AI and PayPal take longer. The bot replies instantly with a link, and the slow work happens behind a loading screen or in the background, after which the Discord message is edited.
- PayPal Sandbox for platforms.
- Payments to our first Sandbox sellers were stuck in review until we switched to US Sandbox accounts.
- Saving a buyer's PayPal at platform level isn't enabled for our app. We switched to saving on each artist's behalf, which meant asking artists for vault and billing-agreement permission during onboarding.
- Charging that saved PayPal still returns
PAYEE_ACCOUNT_INVALIDfor onboarded Sandbox sellers. We worked through it with PayPal's developer team (reference transactions need approval), and the app handles it safely: nothing is charged and the buyer is offered checkout.
## Accomplishments that we're proud of
- An AI feature that protects people's money instead of being a bolted-on chatbot. It catches the exact Friends and Family scam pattern common in Discord commissions, then records the agreed terms on the PayPal receipt.
- One button from a Discord DM to a completed PayPal capture, with the receipt appearing back in Discord.
- The artist always gets paid directly: PayPal pays the artist's own account, and swoosh.pay never holds money.
## What we learned
- PayPal's multiparty APIs give a platform a lot of power: act on a seller's behalf, record terms on orders, save wallets. Sandbox accounts need careful setup (country, vault capability, reference transactions).
- Structured output is what made AI usable in a payment flow: every field has a type, missing terms are explicit, and the UI never parses free text.
- Combining AI judgment ("this message is pressuring you") with facts we can verify ("this account is 3 days old", "this handle looks like an artist you've paid") is far more convincing than either alone.
## What's next
- One-tap repeat payments in production once reference transactions are enabled.
- Milestone payments: a deposit when the sketch is approved, the balance on delivery, both from Discord.
- Sign-in before saving a wallet, Telegram support, and an artist dashboard.