wc-subscriptions-ucash
WooCommerce Subscriptions initial-payment handling via U.CASH Pay (crypto + cards).
A WooCommerce payment gateway that routes the initial payment of a subscription order through U.CASH Pay. The shopper pays the cart total in cryptocurrency or by card. Non-custodial. On-chain crypto cannot bill automatically on a schedule, so after the initial payment the subscription is renewed manually. This plugin documents that limitation honestly to both the merchant and the shopper rather than pretending recurring crypto billing exists. The store Cloud Token is publishable (safe to render in the browser, like a publishable Stripe key).
Summary extracted from the README.
U.CASH Pay for WooCommerce Subscriptions
A WooCommerce payment gateway that routes the initial payment of a subscription order through U.CASH Pay. The shopper pays the cart total in cryptocurrency or by card. Non-custodial.
On-chain crypto cannot bill automatically on a schedule, so after the initial payment the subscription is renewed manually. This plugin documents that limitation honestly to both the merchant and the shopper rather than pretending recurring crypto billing exists.
Requirements
- WordPress 6.0+
- PHP 7.4+
- WooCommerce 7.0+
- (Optional) WooCommerce Subscriptions. Without it, the gateway still works as a general crypto + card payment method for any order.
What this plugin does
- Adds a U.CASH Pay payment gateway to WooCommerce.
- Builds a hosted embed link at
https://pay.u.cash/embed.phpcarrying the store Cloud Token, amount, currency, title, external reference, and redirect URL. - Shows the link on the order-pay screen (as a button and an iframe), on the thank-you page, in My Account order details, and in order emails.
- Optionally (recommended) calls the pay.u.cash
create-transactionendpoint from the server, so the order is tracked in your U.CASH Pay dashboard. The call is idempotent per external reference. - Surfaces a clear "manual renewal" notice on subscription orders.
The store Cloud Token is publishable (safe to render in the browser, like a publishable Stripe key). No server-side secret is needed to render the pay link.
Install
- Upload the plugin folder to
/wp-content/plugins/, or install via the WordPress Plugins screen. - Activate U.CASH Pay for WooCommerce Subscriptions.
- Go to WooCommerce > Settings > Payments, enable U.CASH Pay, and open it.
- Paste your Store Cloud Token (store-level, from pay.u.cash Account > Stores).
- Set the currency (default
USD). - Leave Server-side tracking enabled (recommended).
Usage
Once enabled and configured, U.CASH Pay appears as a payment option at checkout. When a customer chooses it:
- The order is created and marked pending.
- The customer is redirected to the order-pay screen showing a Pay with U.CASH Pay button and an embedded pay iframe.
- The customer pays in crypto or by card on pay.u.cash.
- After payment, pay.u.cash redirects the customer back to your thank-you page (the
redirectyou passed). - The order is tracked in your U.CASH Pay dashboard when server-side tracking is on.
For recurring renewals, the customer renews manually before the subscription expires. If you need automatic recurring billing, pair U.CASH Pay with a card-based gateway for the recurring charge and keep U.CASH Pay as the option for the initial payment.
API contract
Client-side hosted pay link (publishable, no server secret)
GET https://pay.u.cash/embed.php
?cloud=<store Cloud Token>
&amount=<amount>
¤cy=<USD> # default USD
&title=<checkout title>
&external_reference=<your ref>
&redirect=<return URL>
Server-side tracked checkout (from a server route, idempotent per external_reference)
POST https://pay.u.cash/payment/ajax.php
Content-Type: application/x-www-form-urlencoded
function=create-transaction
&amount=<amount>
¤cy_code=<USD>
&cryptocurrency_code= # empty string: let the shopper choose
&external_reference=<your ref>
&title=<checkout title>
&redirect=<return URL>
&cloud=<store Cloud Token>
&idempotent=1
Response JSON:
{ "success": true, "response": [ "<paymentUrl>", "<transactionId>", "..." ] }
The payment URL is the array element that starts with http:// or https://.
Set up your pay.u.cash account
- Sign up at pay.u.cash, then click the verification link in the email.
- Set receive addresses under Settings -> Addresses (raw address, ENS, Unstoppable Domains, or FIO).
- Create a store under Account -> Stores and copy its Store Cloud Token (use the store-level token, not the account-wide one).
- For fiat cards, connect your own Stripe under Settings -> Payment processors.
Files
ucashpay-subscriptions.php- main plugin bootstrap.includes/class-wc-gateway-ucashpay.php- theWC_Gateway_UcashPay_Subscriptionsgateway (embed link + server-side tracked checkout + manual-renewal messaging).assets/css/ucashpay.css- minimal front-end styling.readme.txt- WordPress.org plugin metadata.LICENSE- MIT.
Security notes
- The store Cloud Token is publishable. It can only route payments to the addresses you configured in pay.u.cash; it cannot move funds. Still, treat your pay.u.cash account password and any account-wide secrets as confidential.
- All remote calls to pay.u.cash use the WordPress HTTP API (
wp_remote_post) with sane timeouts. - The plugin never logs the Cloud Token or order totals to disk.
License
MIT. See LICENSE.