PayPal setup
TitanCart talks to PayPal through its REST API v2. At checkout the buyer is sent to PayPal to approve the payment, and when they come back TitanCart captures the money and only then commits the order. You need a PayPal Business account (not a personal one) to issue the API credentials.
Edition note: PayPal is a TitanCart Pro gateway. TitanCart Lite ships Stripe, Cash on Delivery, Bank Transfer and Check.
1. Create a REST API app at PayPal
- Sign in to the PayPal Developer Dashboard with your Business account.
- Use the Sandbox | Live toggle in the dashboard’s navigation to pick the environment. Start with Sandbox.
- Open Apps & Credentials and click Create App. Any name works (for example “TitanCart Sandbox”); keep the default merchant account.
- Copy the app’s Client ID and Secret.
Live credentials come from the same place with the toggle on Live; they are a separate app with separate keys.
2. Add PayPal in TitanCart
- Go to Settings → Payment Gateways and click + Add Payment Gateway.
- On the General tab choose the PayPal gateway, give it the name shoppers will see, an optional Description (shown below the name at checkout) and Payment instructions (shown on the order confirmation page), and set Status to Active. Save.
- Reopen the gateway. The Configure tab exists only after that first save. Fill in:
- Client ID and Client Secret — from step 1.
- Sandbox Mode — on by default. Leave it on while you test; turn it off when you paste live credentials.
- Cancel URL — where a buyer lands if they cancel on PayPal. Defaults to your cart page.
- Send Shipping Address to PayPal — on (the default), an order that ships sends the customer’s shipping address with the PayPal order, which PayPal uses when deciding Seller Protection for physical goods; off, no address is sent. Orders with nothing to ship never send one either way.
- Currency — has no effect today: PayPal is always charged in the order’s currency. The field stays on the form until TitanCart’s multi-currency work gives it a job.
- Click Test Connection. TitanCart performs the OAuth handshake with the keys you saved and tells you in words which environment answered: “You are connected to the SANDBOX environment (no real charges)” or the LIVE equivalent. That line is your go-live check — read it every time you change keys.
Note: A PayPal row with the Client ID or Secret missing shows a NEEDS SETUP pill in the gateway list and will not take payments. A row without the pill has both keys saved; it does not prove they are the right keys — that is what Test Connection is for.
3. Test with a sandbox buyer
PayPal provides sandbox buyer accounts. In the Developer Dashboard open Testing Tools → Sandbox Accounts; the personal accounts there are your test buyers, each with an email and password you can reveal.
- On your storefront, add a product to the cart and go to checkout.
- Choose PayPal at the payment step and place the order. TitanCart creates the PayPal order and sends the browser to PayPal’s approval page (a full-page redirect, not a popup or an on-page button).
- Sign in with the sandbox buyer and approve.
- PayPal returns the buyer to your order-received page. On that return TitanCart captures the payment, marks the order Processing, reduces stock, empties the cart, burns any coupon, issues any digital gift card and sends the confirmation and new-order emails — all on the verified capture, never before it.
What happens if the buyer does not finish
- They cancel on PayPal — they come back to the Cancel URL with their cart intact. The order stays Pending, nothing has been charged, no email has gone out.
- They close the tab — the same: a Pending order, cart kept.
- Pending orders that never pay are cancelled automatically by Settings → General Settings → Order Automation → Cancel unpaid orders automatically, after Cancel after (hours) — 24 by default.
4. Switch to live
- In the Developer Dashboard set the toggle to Live, open Apps & Credentials, create a live app and copy its Client ID and Secret.
- In TitanCart open the PayPal gateway’s Configure tab, paste the live keys, untick Sandbox Mode, save.
- Click Test Connection and confirm the message names the LIVE environment.
- Place one small real-money order and refund it from the order (see §5) before announcing the store.
5. Refunds
Refund a PayPal order from the order itself in Sales → Orders: TitanCart sends the refund to PayPal against the captured payment, in full or for a partial amount, and records it on the order. A refund started on PayPal’s own site is not pushed back to TitanCart (there is no PayPal webhook), so start refunds from TitanCart.
6. Venmo and subscriptions
- Venmo is its own gateway row in TitanCart and uses the same PayPal app credentials (US buyers, USD). Add it as a second gateway when you want it — see Venmo setup.
- Subscriptions (the Subscriptions extension) can renew through PayPal by saving the buyer’s PayPal account at the first payment. PayPal must allow that on your account: in the Developer Dashboard, under the app’s Features → Payment capabilities → Save payment methods (Sandbox apps: Sandbox App Settings → App Feature Options → Accept payments → Advanced options → Vault), and at account level under Account Settings → Payment Preferences → Save PayPal and Venmo payment methods, which PayPal reviews. If PayPal declines to save the method, the first payment still completes but the subscription has nothing to renew with and the first renewal fails — the subscription’s admin page says “No renewal token”. Venmo never saves a method, so it is not offered on subscription products.
How to verify on PayPal’s side
Every TitanCart payment reaches PayPal with the description “Order TC-…” (your order number). On paypal.com → Activity (sandbox: sign in to sandbox.paypal.com as the sandbox business account) search by that order number, the amount or the date; the transaction’s detail page shows the capture, its fee and any refund. TitanCart’s order page shows the payment method name only, not PayPal’s transaction ID, so the order number is the key to search by.
Troubleshooting
- “PayPal order creation failed” or “Authentication failed” at checkout. The Client ID or Secret is wrong, or sandbox keys are saved with Sandbox Mode off (or live keys with it on). Fix the keys or the switch, save, then run Test Connection and read which environment it names.
- The gateway shows NEEDS SETUP. One of the two keys is empty on the Configure tab.
- I’m looking for the PayPal button on the checkout page. There isn’t one: choosing PayPal and placing the order sends the buyer to PayPal. The on-page PayPal button is used by the Venmo gateway only.
- The buyer approved on PayPal but the order is still Pending. The capture happens when the buyer lands back on your order-received page. If they closed the window on PayPal’s thank-you step, the money was not captured and the order will be cancelled by Order Automation; ask them to order again.
- Where is the PayPal webhook URL? There is none to set. TitanCart captures when the buyer returns, so it does not need PayPal to call it.
- The buyer paid with a sandbox account on a live store. That cannot happen — a sandbox buyer only exists on sandbox.paypal.com — but the reverse is the common mistake: real buyers sent to the sandbox because Sandbox Mode was left on. Test Connection says “SANDBOX” in that case.
Older PayPal integrations (Payments Standard, IPN, Express Checkout NVP) are not supported; the REST API v2 app above is the only path.
See also
- Going live with payments — the test-to-live checklist across all gateways.
- Stripe setup — the card gateway, available in Lite and Pro.
- Managing orders — statuses, refunds and the order page.
- Subscriptions & Recurring — renewals through a saved PayPal account.