Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

U.CASH Pay for Shopware 6

Accept crypto (BTC, ETH, USDT, USDC, Solana, Tron, UCASH and custom tokens) and cards (via your own Stripe) through U.CASH Pay on Shopware 6. Non-custodial: funds settle direct buyer-to-wallet; the plugin never holds funds or keys.

Set up your pay.u.cash account

You need a free U.CASH Pay account and a store before this plugin can accept payments. Settlement is non-custodial: crypto goes straight to addresses you control.

  1. Sign up at pay.u.cash with your email and password, then click the verification link in the email U.CASH Pay sends you.
  2. Set your receive addresses. Go to Settings → Addresses and enter a wallet address for each coin you want to accept. You can also use ENS, Unstoppable Domains, or FIO names instead of raw addresses. This is where crypto payments settle.
  3. Create a store. Go to Account → Stores, click + Add Store, name it (for example, after this platform), and create it.
  4. Copy the store credentials. In that store's row, copy the Store Cloud Token and the Store Webhook Secret. Use the store-level token, not the account-wide one.
  5. Set the webhook URL. Paste this plugin's webhook callback URL (shown in the plugin settings below) into the store's Store Webhook URL field, save, then click Test Webhook to confirm U.CASH Pay can reach your store.

Then paste the Store Cloud Token and Store Webhook Secret into the plugin configuration fields described below.

To also accept fiat cards, connect your own Stripe account under Settings → Payment processors. Cards run non-custodially through Stripe.

Payment flow

  1. Buyer selects U.CASH Pay at checkout.
  2. The payment handler calls the SDK to create a pay.u.cash transaction, then redirects the buyer to the hosted payment_url.
  3. The buyer pays with crypto or card on the pay.u.cash hosted page.
  4. On settlement, pay.u.cash sends an HMAC-signed webhook to /payment/ucashpay/webhook.
  5. The webhook controller verifies the signature via the SDK, then marks the matching order Paid.

Installation

Manual (recommended for self-hosted)

  1. Copy the plugin folder into custom/plugins/UcashPay:
    cp -r shopware-ucashpay /path/to/shopware/custom/plugins/UcashPay
  2. From the Shopware install root:
    bin/console plugin:refresh
    bin/console plugin:install --activate UcashPay
    bin/console cache:clear
  3. In the admin, open Settings > System > Plugins and confirm U.CASH Pay is active.

Via Composer

composer require ucash/shopware-ucashpay
bin/console plugin:refresh
bin/console plugin:install --activate UcashPay
bin/console cache:clear

Configuration

  1. Open Settings > System > System configuration (or Settings > Shop > Payment) in the Shopware admin.
  2. Under U.CASH Pay, set:
    • Cloud token - copy from pay.u.cash Account > Stores.
    • Webhook secret - copy from pay.u.cash Account > Stores (same screen).
    • U.CASH base URL - leave https://pay.u.cash unless you self-host.
  3. In pay.u.cash (Account > Stores), set the Webhook URL to:
    https://your-store.com/payment/ucashpay/webhook
    
  4. Save and clear the cache.

How it works (files)

  • src/UcashPay.php - main plugin class. Seeds the payment method on install, toggles it active on activate/uninstall.
  • src/Payment/UcashPayPaymentHandler.php - AsynchronousPaymentHandlerInterface. pay() creates the checkout via the SDK and redirects; finalize() is a no-op because settlement is authoritative via the webhook.
  • src/Subscriber/PaymentSubscriber.php - event subscriber. Ensures U.CASH Pay appears in the checkout payment-method list, and finalizeOrderFromWebhook() marks the order Paid after a verified webhook.
  • src/Controller/WebhookController.php - Symfony route POST /payment/ucashpay/webhook. Reads raw body + X-Webhook-Signature, verifies via the SDK, then settles the order.
  • src/Service/PaymentService.php - SDK wrapper. require_onces PayUCashIntegration.php, reads config from SystemConfigService, exposes createCheckout, verifyWebhook, testConnection.
  • src/Resources/config/services.xml - DI wiring (handler, subscriber, service, controller).
  • src/Resources/config/config.xml - admin config fields (cloud token, webhook secret, base URL).
  • PayUCashIntegration.php - the shared zero-dependency SDK (PHP 7.2+, curl).

Notes

  • Non-custodial. The plugin holds no funds and no private keys. Crypto settles direct buyer-to-wallet; cards run through the merchant's own Stripe configured inside pay.u.cash.
  • Webhook is authoritative. The buyer return (finalize()) intentionally does not mark the order paid. If the buyer returns before the webhook lands, the order stays unconfirmed and the webhook catches up.
  • Security. The webhook is authenticated solely by the HMAC signature (timestamp + SHA-256). No Shopware token or session is required on the route.

License: MIT.

About

U.CASH Pay payment plugin for shopware. Crypto + cards, non-custodial.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages