VEFmusic Pro help — Payment (Pro)

Overview

Enter your PayPal and/or Stripe credentials. Always test first in “Test (sandbox)” mode before switching to Live mode.

Once an order is paid, the buyer receives an email with the invoice and the download links. The links force the file to be saved: they never play it online.

Credentials

Each provider has two sets of fields: live (real payments) and sandbox or test (trial payments). PayPal asks for a Client ID, a Client Secret and a Webhook ID; Stripe asks for a Secret key, a Publishable key and a webhook secret.

The “Mode” list at the top decides which set is used. Fill in the live fields only when you are ready to go live.

Cart page

Choose the page that carries the Cart block, or leave “Detect automatically”. Once a visitor has added an item to the cart on another page, a “View cart” link appears next to the button. Also add that page to your site menu so the cart is always within reach.

Set up PayPal

  1. Open the PayPal Developer Dashboard (developer.paypal.com) and sign in with your PayPal account. Use the switch at the top to choose Sandbox for tests, or Live for real payments.
  2. Go to Apps & Credentials and select Create App (or open an existing app). Give it a name, set the Type to Merchant and, in Sandbox, choose the sandbox business account PayPal created for you.
  3. On the app page, copy the Client ID and the Client Secret. Paste them in VEFmusic > Sales > Payment, in the fields of the PayPal tab that match the environment you chose (Live or Sandbox).
  4. Still on the app page, open the Webhooks section and select Add Webhook. Paste the Webhook URL shown at the top of the PayPal tab of the Payment screen (use its Copy button).
  5. Tick the events “Checkout order approved” and “Payment capture completed”, then save.
  6. PayPal now shows a Webhook ID. Paste it in the matching Webhook ID field of the Payment screen, then save the settings.
  7. To test, choose “Test (sandbox)” in the Mode list and pay in the Cart block with a sandbox personal account (PayPal created one for you; you can add more in the Developer Dashboard). The order then appears in VEFmusic > Sales > Completed sales.

The webhook is a safety net: it confirms an order even if the buyer closes the page right after paying. Fill in the Webhook ID of the mode you use, otherwise PayPal’s notifications are refused.

Set up Stripe

  1. Open the Stripe Dashboard and sign in. For tests, use a sandbox: click the account picker (top left) > Switch to sandbox, then pick a sandbox or choose Create sandbox. (Older accounts may still show a “Test mode” switch instead.) For real payments, stay in your live account.
  2. In that environment, open Developers (bottom left of the Dashboard) and go to API keys. Copy the Publishable key (pk_…), reveal and copy the Secret key (sk_…), and paste them in VEFmusic > Sales > Payment, in the fields of the Stripe tab that match (Test for a sandbox, Live for your live account). Use a standard secret key, not a restricted one.
  3. Still in Developers (Workbench), open the Webhooks tab and select Add destination (also called Create an event destination).
  4. Choose Your account, select the event “checkout.session.completed”, then select Continue. Choose Webhook endpoint as the destination type and select Continue.
  5. Give the destination a name, paste the Webhook URL shown at the top of the Stripe tab of the Payment screen (use its Copy button) in the Endpoint URL field, then select Create destination.
  6. Open the destination you just created and reveal its Signing secret (whsec_…). Paste it in the matching Webhook secret field (Test or Live), then save the settings.
  7. A sandbox and your live account each have their own keys, destination and signing secret: repeat these steps in your live account before going live.
  8. To test, keep “Test (sandbox)” in the Mode list and pay in the Cart block with the Stripe test card 4242 4242 4242 4242, any future expiry date and any security code.

Stripe sometimes renames its menus (its Dashboard now uses sandboxes and Workbench). If a name differs, look for “API keys”, “Webhooks” and “event destinations” in the Stripe documentation.

Testing risk-free

While “Test (sandbox)” mode is active, a third “Pay (test)” button appears in the Cart block, next to PayPal and Stripe. No key is needed to use it. It follows the real journey of a visitor — cart, consent checkbox, a confirmation email actually sent — and never charges anything.

In a local development environment, check the email-catching tool (Mailpit, Mailhog) before suspecting a bug if the email does not arrive.

Donations

Suggested amounts and a custom amount (with the “Minimum amount” you set), through a native Stripe “Donate” button. A donation is independent from the cart: no withdrawal consent, and a simple thank-you email instead of an invoice.