Post-Purchase Upsell & Cross-Sell

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 Upsell & Cross-Sell 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 provide an overview. This extension uses the saved-payment token SwagPayPal provides to charge the add-on amount. For the PayPal wallet, it offers a one-time quick confirmation when there is no saved token and you have enabled that setting. (No offer is shown for a card order without a saved card.)

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 quick confirmation when not vaulted turned on. The quick confirmation is used for PayPal wallet customers without a saved (vaulted) payment. For orders paid using the card method (ACDC), no offer is shown 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; no offer is shown for a card order without a saved card.)

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). No offer is shown for a card order without a saved card.
    • 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 as a guest), buy a product, choose PayPal, approve as your sandbox buyer agreeing to save the payment. Accept the offer on the offer page 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 customer with a saved PayPal payment is declined and the add-on is not added (there is no quick confirmation fallback when the payment is already saved).
  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 quick confirmation when not vaulted setting is off; turn it on. (No offer is shown for a card order without a saved card; this setting 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).