A WordPress plugin that registers U.CASH Pay as a LearnDash LMS payment gateway. Sell LearnDash courses with crypto and cards. Funds settle directly to your pay.u.cash receive addresses. Non-custodial.
On course checkout the plugin redirects the learner to the pay.u.cash hosted checkout for the course price. After payment they return to the course page and LearnDash grants access using the recorded external reference. This release handles one-time course access payments.
v0.1.0 - initial release. Stable for one-time course access. Crypto recurring billing is not universally supported on-chain, so recurring subscriptions are out of scope for this release; use a one-time access fee instead.
- WordPress 5.8+
- PHP 7.2+
- LearnDash LMS 3.5+ (the
learndash_payment_gatewaysfilter is required)
- Install and activate LearnDash LMS.
- Upload this folder to
/wp-content/plugins/learndash-ucashpay/(or zip it and use Plugins -> Add New -> Upload Plugin). - Activate U.CASH Pay for LearnDash.
- Go to LearnDash -> Settings -> Payments, enable U.CASH Pay, and paste your Store Cloud Token.
- Create a LearnDash course and set a price (Access Mode: "Open" or "Free" disables the gateway; use a paid access mode).
- When a learner opens the course, LearnDash shows the configured payment gateways, including U.CASH Pay.
- Selecting U.CASH Pay redirects to the pay.u.cash hosted checkout for the course price.
- After payment, the learner is returned to the course page and access is granted by LearnDash using the external reference.
| Field | Description |
|---|---|
| Enable U.CASH Pay | Turns the gateway on or off. |
| Store Cloud Token | The publishable Cloud Token of your pay.u.cash store (Account -> Stores -> Store Cloud Token). Use the store-level token, not the account-wide one. |
| Currency | ISO 4217 currency code (default USD). |
| Checkout Title | Label shown at checkout (default "Course Access"). |
- 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.
The gateway uses the pay.u.cash public API contract.
The default flow builds a browser redirect to the hosted checkout. The store Cloud Token is publishable and safe to use from the browser.
GET https://pay.u.cash/embed.php
?cloud=<STORE_CLOUD_TOKEN>
&amount=<PRICE>
¤cy=USD
&title=<COURSE_TITLE>
&external_reference=<REFERENCE>
&redirect=<RETURN_URL>
For a server-to-server flow (idempotent per external_reference), call this from a server route using wp_remote_post. Never call this from the browser.
POST https://pay.u.cash/payment/ajax.php
Content-Type: application/x-www-form-urlencoded
function=create-transaction
&amount=<PRICE>
¤cy_code=USD
&cryptocurrency_code=
&external_reference=<REFERENCE>
&title=<COURSE_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(s)://. See Learndash_Gateway_Ucashpay::create_tracked_checkout() in includes/class-learndash-gateway-ucashpay.php.
- Non-custodial. Funds settle directly to your configured pay.u.cash receive addresses. The plugin never holds balances.
- Publishable token. The store Cloud Token is designed for client-side use. It is safe to embed in the browser.
- No server secrets. The default flow needs only the publishable Cloud Token. The optional tracked checkout runs server-side via
wp_remote_post.
learndash-ucashpay.php- main plugin file (header, registration, activation guard).includes/class-learndash-gateway-ucashpay.php- the LearnDash gateway class (checkout URL builder, settings fields, optional tracked checkout).readme.txt- WordPress.org-style readme.README.md- this file.
- One-time course access payments only. Recurring crypto subscriptions are not supported on-chain; use a one-time access fee.
- The
learndash_payment_gatewaysfilter requires LearnDash 3.5+.
MIT. See LICENSE.