PayPal setup
PayPal uses the REST API v2 under the hood in TitanCart. You’ll need a PayPal Business account (not a personal account) to issue API credentials.
1. Create a REST API app
- Sign in to the PayPal Developer Dashboard with your PayPal Business account.
- Go to Apps & Credentials.
- Under the Sandbox tab, click Create App. Give it any name (e.g. “TitanCart Sandbox”) and accept the default merchant account.
- Copy the Client ID and Secret from the app detail page.
2. Configure TitanCart
- Go to TitanCart → Payment Gateways → PayPal.
- Toggle Enabled on.
- Set Mode to Sandbox.
- Paste the sandbox Client ID and Secret into the corresponding fields.
- Save settings.
3. Test with a sandbox buyer
PayPal provides built-in sandbox buyer accounts. In the Developer Dashboard, open Testing Tools → Sandbox Accounts. You’ll see at least one personal account — those are your test buyers.
- From your storefront, add a product to cart and proceed to checkout.
- Select PayPal at the payment step. The PayPal Smart Button appears.
- Click it. A popup opens; log in with the sandbox buyer email and password shown in the Developer Dashboard.
- Approve the payment in the popup.
- You should land on the order-received page with the order marked Processing.
4. Switch to live
- In the PayPal Developer Dashboard, switch to the Live tab under Apps & Credentials.
- Create a live app and grab the live Client ID and Secret.
- In TitanCart switch Mode to Live and paste the live credentials.
- Place one small real-money test order to verify end-to-end before promoting.
Webhooks are optional but recommended
TitanCart captures the payment synchronously when the customer returns from PayPal, so orders land in the correct status without a webhook. A webhook is still worth adding so that disputes, refunds initiated from PayPal’s side, and delayed chargebacks are captured in your order timeline.
In the PayPal app configuration, set the webhook URL to the one shown on TitanCart’s PayPal settings page, and subscribe to these events:
PAYMENT.CAPTURE.COMPLETEDPAYMENT.CAPTURE.REFUNDEDPAYMENT.CAPTURE.DENIEDCUSTOMER.DISPUTE.CREATED
Troubleshooting
“Authentication failed” error. The client ID or secret is pasted wrong, or you are using sandbox credentials while mode is set to live. Re-copy from the Developer Dashboard, making sure you are on the correct tab.
The PayPal button does not appear. Check the browser console for script errors. Ad blockers sometimes block PayPal’s SDK — disable your ad blocker for the test.
Note: PayPal’s REST API v2 is the recommended integration path. Older PayPal integrations that use Payments Standard or IPN are not supported.