Documentation index for AI agents (llms.txt)
Skip to main content

PayPal

Take PayPal and card payments worldwide through PayPal Checkout. Money goes straight to your PayPal account.

Connect​

PayPal connects with the client ID and secret of an app in your PayPal developer dashboard.

  1. Open Settings > Connectors, click PayPal, then Connect.
  2. Apps & Credentials in the PayPal developer dashboard opens. Open your app, or click Create App.
  3. Copy the Client ID, then the Secret. Each is picked up when you come back to WebTwizz, then checked with PayPal and connected. You can also paste them into the fields yourself.

WebTwizz works out whether it's a sandbox app, which takes test payments only, or a live one. The account shows Sandbox or Live.

Then ask the AI for what you need, like "add PayPal checkout to the order page".

What you see​

  • Transactions, last 30 days: what came in (Received) and how many payments, then your latest transactions with who paid and when. Money going out, like a refund, shows its amount with out, and a tag shows when one is pending, denied or reversed. With a sandbox app the heading says so. Refund on a completed payment opens an amount field in place, filled with the whole payment: lower it to refund part. The line under it says how much goes back to whom, and with a sandbox app that no real money moves. Confirm with Refund and the amount. Show more loads ten more from the last 30 days. Each row opens in PayPal, and All activity opens your activity. PayPal can take a few hours to list new transactions.
  • Disputes: shown when a buyer opened a dispute that needs your reply, with the amount, the reply-by date and the reason. Respond on PayPal opens it. All disputes opens PayPal's resolution center.
  • Balance: what's in your PayPal account, Available by currency, and On hold when PayPal holds some back. Open PayPal opens it. It shows when your app can read the balance.
  • Account: the app's client ID, shown by its last four characters, with Sandbox or Live.
  • Settings:
    • Webhook: lets PayPal tell your site about each payment, so orders go through even when a buyer closes the page early. Before you publish, it shows After you publish. Once the site is published, WebTwizz adds the webhook to your PayPal app and moves it when your site's address changes, and the row goes away. If that didn't work, the row comes back with Create webhook, or Move webhook when it still points at your old address. Both ask first.
  • Open PayPal, at the top next to the name, opens your activity.

What the AI can do​

  • Build checkout into your site: the order is created on the server, PayPal's buttons take the payment, and the payment is captured on the server before anything is fulfilled
  • Read your payments and refunds, for any period up to 31 days
  • Refund a payment, in full or in part. It asks first.
  • Create the webhook for your published site. It asks first.

Secrets​

  • NEXT_PUBLIC_PAYPAL_CLIENT_ID: your client ID, safe to use in the browser
  • PAYPAL_CLIENT_ID: the same client ID, for server code
  • PAYPAL_CLIENT_SECRET: your app's secret, server-side only
  • PAYPAL_ENV: sandbox or live, matching your app
  • PAYPAL_WEBHOOK_ID: checks that payment events really come from PayPal, set once the webhook is created

Good to know​

  • If the overview says Turn on Transaction search, open your app in the PayPal developer dashboard, tick Transaction search under Features, then click Check again. PayPal apps opens the developer dashboard. PayPal only shares transactions with apps that have it.
  • The client ID and secret change together, so there's no Replace key. To use another app, connect it as another account, then switch the project to it under Account.
  • Removing PayPal from a project takes its secrets out. Your PayPal account and transactions are untouched.