Post-Purchase Cross-Selling & Upselling

PayPal setup

This section only matters if you want upsells on PayPal-paid orders. The other payment methods (invoice, prepayment, cash on delivery, direct debit) need none of it.

Post-Purchase Cross-Selling & Upselling does not connect to PayPal itself. It rides on top of the official SwagPayPal extension and uses the PayPal account, credentials and saved-payment tokens that SwagPayPal manages. So "configuring PayPal" here means configuring SwagPayPal and your PayPal account; this extension then uses what is already there. Tested with SwagPayPal 8.x on Shopware 6.5, 9.x on Shopware 6.6 and 10.x on Shopware 6.7.

What belongs to whom

The vaulting, sandbox/live and Reference Transactions steps below are PayPal-account and SwagPayPal settings – not part of this extension. Follow SwagPayPal's and PayPal's own documentation for the exact screens; the steps here are an orientation. This extension's part is only: use the saved-payment token SwagPayPal provides to charge the add-on, and, for the PayPal wallet, offer a one-time quick confirmation when there is no saved token if you enabled that setting. (The card method is saved-card only; a card order without a saved card is not offered.)

The two ways a PayPal add-on is collected

Silent recharge (best): the add-on is charged in the background; the customer just sees the item added, with no second PayPal step. It needs PayPal vaulting enabled, a registered customer with a saved PayPal payment, and (live only) Reference Transactions enabled on your PayPal account.

Quick confirmation (PayPal wallet only): the customer is sent to PayPal once more to approve just the add-on amount, then returns and the item is added. It needs the extension setting PayPal wallet: collect upsell via a second approval when not vaulted turned on. Used for a PayPal wallet customer who has no saved (vaulted) payment. The card method (ACDC) is saved-card only and is not offered without a saved card.

Keep the wallet-confirmation setting on (it ships on) as your safety net: a wallet customer without a saved token can then be offered the one-time quick confirmation, while the silent recharge is used automatically whenever a saved token is available. (The setting is wallet-only; a card order without a saved card is not offered the upsell.)

Step 1: Enable PayPal vaulting in SwagPayPal

Vaulting lets a registered customer save their PayPal account so the add-on can be recharged without sending them back to PayPal.

  1. Open PayPal under Settings (or Settings → Extensions → My extensions → PayPal → Configure).
  2. Find the Vaulting option ("Allow customers to save their PayPal account…") and turn it on. Save.
  3. Good to know:
    • Vaulting saves a token for a customer who agrees to save their PayPal account during checkout. A wallet customer without a saved token takes the quick confirmation path instead (handled by SwagPayPal; typically a guest or first-time PayPal buyer has no saved token). A card order without a saved card is not offered the upsell at all.
    • A customer's payment is saved when they pay; the silent recharge is then available for the add-on on that order and their future orders.

Step 2: Test in sandbox first

Sandbox is PayPal's safe test environment – no real money moves. Reference Transactions are available automatically in sandbox, so the silent recharge works there with no extra request.

  1. At developer.paypal.com→ Testing Tools → Sandbox Accounts, make sure you have a Business (merchant) and a Personal (buyer) test account.
  2. In SwagPayPal, turn Sandbox mode on and enter your sandbox REST API credentials (or use "Connect with PayPal" onboarding while in sandbox).
  3. Enable Vaulting (Step 1) while in sandbox.
  4. Run the full flow in your storefront: register and log in (not guest), buy a product, choose PayPal, approve as your sandbox buyer agreeing to save the payment. On the offer page, click add and confirm the item is added and the order shows a separate PayPal transaction for the add-on.

Step 3: Go live

  1. In SwagPayPal, turn Sandbox off and connect your live PayPal Business account. Sandbox and live settings are stored separately.
  2. Re-check Vaulting is enabled in the live configuration – turning it on in sandbox does not turn it on for live.
  3. Enable Reference Transactions on your live PayPal account. This is the step that is easy to miss. The silent recharge is a merchant-initiated charge, which a live PayPal Business account may only make when Reference Transactions (also called merchant-initiated transactions or billing agreements) is enabled – this is a PayPal-account requirement, requested from PayPal. Until it is active, the silent recharge for a vaulted customer will be declined and the add-on will not be added (there is no quick confirmation fallback for an already-vaulted customer). So enabling Reference Transactions is what makes the silent recharge work live.
  4. Do one small real-money test: as a registered customer, place a low-value live PayPal order, accept the upsell, confirm the add-on is captured, then refund it from the order's PayPal tab.
Real-money test before relying on silent recharges

Do not rely on sandbox success alone. Reference Transactions are automatic in sandbox but must be enabled for live, so a silent recharge that worked in sandbox can be declined live. Before relying on silent PayPal upsells, run one small real live order, check the add-on was actually captured, then refund the add-on charge.

Quick checklist

  • SwagPayPal installed and connected: sandbox (sandbox credentials), live (live credentials).
  • Sandbox mode in SwagPayPal: sandbox on, live off.
  • Vaulting enabled: sandbox yes, live yes (set separately).
  • Reference Transactions on the account: sandbox automatic, live request it from PayPal.
  • Wallet confirmation (setting in Global settings): sandbox and live on (safety net).
  • Verified with a real flow: sandbox with a test-buyer order, then accept; live with one small real-money order, then refund.

If the PayPal upsell does not behave

  • Always asks for the quick confirmation (never silent): the customer has no saved (vaulted) payment yet (for example a first-time PayPal buyer), or vaulting is off in SwagPayPal.
  • Add-on not added for a PayPal-wallet customer without a saved payment: the PayPal wallet: collect upsell via a second approval when not vaulted setting is off; turn it on. (A card order without a saved card is intentionally not offered the upsell, so this does not apply to the card method.)
  • Silent recharge worked in sandbox but is declined live (and the add-on is not added): almost always Reference Transactions is not yet enabled on your live PayPal account (Step 3, point 3).