- A PayPal button at checkout
- One-time payments for orders, bookings, and tickets
- Pay Later, where the buyer is eligible
- Card payments through the PayPal button
- Monthly subscriptions
- Testing everything with sandbox accounts before real money moves
PayPal vs Stripe
Both connectors accept payments. Many products use one; some offer both.
If you ask for payments without naming a provider, AIWA uses the payment connectors you’ve connected. To be sure, name PayPal in your request.
Before You Start
You’ll need:- A PayPal account to sign in to the PayPal developer dashboard
- A PayPal Business account when you’re ready to accept real payments
Connect PayPal to AIWA
1
Open the PayPal developer dashboard
Sign in at developer.paypal.com with your PayPal account.
2
Select Sandbox
Open Apps & Credentials and make sure the Sandbox toggle is selected.
3
Open an app
Open the Default Application, or click “Create App” and name it after your project.
4
Copy your credentials
Copy the Client ID and the Secret.
5
Connect in your project
Open your AIWA project, go to Connectors, and select PayPal. Paste the Client ID and the Secret, and set Mode to sandbox.
Test with Sandbox Accounts
In sandbox mode, no real money moves. To pay in your preview, sign in to the PayPal window with a sandbox buyer account, not your real PayPal login. You’ll find one in the PayPal developer dashboard under Testing Tools, then Sandbox Accounts. While your app runs in sandbox mode, its checkout says so, and tells you which login to use.Your First PayPal Checkout
Suppose you sell tickets for an event. Tell AIWA:Let visitors buy tickets for my event with PayPal. Show the ticket type and price, add a PayPal button, and email the buyer their ticket after payment.The workflow might look like:
How Payment Is Confirmed
An order is only marked paid when your app’s server has captured the payment with PayPal and PayPal reports it as completed. Reaching a success page in the browser isn’t proof of payment, so your app never relies on it. Your app doesn’t need webhooks for this. The capture answers straight away, so the confirmation happens in the same request. If the buyer closes the page halfway through, your app can pick up the same order rather than creating a new one, so nobody pays twice.Subscriptions
PayPal can also charge a monthly subscription. For example:Charge a monthly PayPal subscription for the Pro plan at $29. Only active subscribers can open the reports page.Conceptually:
- Only an active subscription unlocks paid features.
- A subscription cancelled or suspended in PayPal loses access, even if the customer never returns to your app.
- If PayPal can’t be reached, the customer is asked to try again rather than given access.
Go Live
When you’re ready for real customers:- Switch the toggle in the PayPal developer dashboard to Live. This needs a PayPal Business account.
- Copy the live Client ID and Secret.
- Paste them on the PayPal connector page and set Mode to live.
- Make a small real payment to confirm the whole flow.
Common Problems
PayPal says the credentials belong to the other mode
Sandbox and live credentials are different. Set Mode to match where you copied them from, or paste the credentials for the mode you want.PayPal rejects the Client ID and Secret
Check that both were copied in full from the same app in the PayPal developer dashboard, and that the app hasn’t been deleted.You can’t log in to the PayPal window in your preview
In sandbox mode, use a sandbox buyer account from Testing Tools, then Sandbox Accounts. Your real PayPal login only works in live mode.A payment is waiting in PayPal
The payment was in a currency your PayPal account doesn’t hold. Accept it in your PayPal account, and set the Currency on the connector page to your account’s main currency.A subscriber lost access
Check the subscription’s status in your PayPal account. Only an active subscription unlocks paid features.Debugging PayPal
A good Debug Mode request might look like:Expected: After a buyer approves the PayPal payment, the order should be marked paid and the ticket emailed. Actual: The buyer approves the payment, but the order stays pending. PayPal shows as connected in sandbox mode. Error: [PASTE ERROR IF AVAILABLE] Debug the PayPal capture without changing the ticket selection.Never paste your PayPal Secret into a prompt.
Test Your PayPal Workflow
Before publishing, test:- A successful payment with a sandbox buyer account
- A cancelled payment
- Refreshing the page during checkout
- The order status after payment
- Confirmation emails
- Subscribing, cancelling, and losing access
- The correct currency and amounts
- The checkout on mobile
A Good PayPal Prompt
A strong request defines:- Product: What is the customer paying for?
- Price: How much, and in which currency?
- Type: One-time payment or subscription?
- After payment: What should happen once it’s confirmed?
- Access: What does a paying customer unlock?
Add a PayPal checkout to the booking page. Charge the price of the selected session in GBP, mark the booking paid only after the payment is captured, and email the customer a confirmation. If the payment is cancelled, keep the booking as unpaid and let the customer try again.That’s significantly stronger than:
Add PayPal.
Next: Resend
PayPal handles payments. Next, we’ll connect your application to Resend so it can communicate with users through transactional email.Resend
Connect Resend and send transactional email from your AIWA app.
