Adds a Pay with U.CASH button to BuddyBoss member profiles and redirects BuddyBoss membership checkouts to a pay.u.cash hosted payment page. Non-custodial.
- Member profile button. A "Pay with U.CASH" button appears on every member profile header. A member never sees a button to pay themselves. Clicking it opens the pay.u.cash hosted payment page for that store.
- Membership checkout redirect. When the U.CASH gateway is selected on a BuddyBoss access plan, the purchase/check-out button sends the member to a pay.u.cash hosted payment page for the plan price.
The plugin is non-custodial: funds always go to the addresses you configure at pay.u.cash. The plugin only constructs payment links and, for logged-in viewers, mints a tracked checkout so a payment can be tied to a pay.u.cash transaction id and your external_reference.
- WordPress 5.8 or newer.
- PHP 7.2 or newer.
- BuddyBoss Platform (Memberships component enabled for the checkout feature).
- Upload the
buddyboss-ucashpayfolder to/wp-content/plugins/, or install the ZIP via Plugins -> Add New -> Upload Plugin. - Activate through the Plugins screen.
- Go to Settings -> BuddyBoss U.CASH Pay, paste your Store Cloud Token, set a default currency, and save.
Once the Store Cloud Token is set and the feature enabled, the gold button shows on member profiles automatically.
- Logged-in viewers: the click calls a server-side ajax route that mints an idempotent tracked checkout at pay.u.cash and redirects to the returned payment URL. Re-clicking never creates duplicate transactions (idempotent per
external_reference). - Logged-out viewers: the click opens the client-side hosted pay link (publishable Cloud token, browser-safe) directly.
You can configure the button label, a default amount, and a default payment title on the settings page.
Enable BuddyBoss Platform Memberships, then select the U.CASH gateway on an access plan. The check-out button URL is replaced with a pay.u.cash payment URL for the plan price via the bb_access_plan_get_checkout_url filter.
A bookmark-able fallback entry is also available when the filter is not exposed by your BuddyBoss version:
https://your-site.example/?bb-ucashpay-checkout=1&plan_id=PLAN_ID&amount=PRICE
This plugin follows the U.CASH PAY API contract exactly.
Client-side hosted pay link (publishable Cloud token, safe to emit into markup):
GET https://pay.u.cash/embed.php?cloud=STORE_CLOUD_TOKEN&amount=...¤cy=USD&title=...&external_reference=...&redirect=...
Server-side tracked checkout (called 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=...¤cy_code=USD&cryptocurrency_code=&external_reference=...&title=...&redirect=...&cloud=STORE_CLOUD_TOKEN&idempotent=1
The response is JSON { "success": true, "response": [paymentUrl, transactionId, ...] }. The plugin takes the first array element that starts with http as the payment URL and redirects there.
Both touchpoints are implemented in includes/class-embed.php. The profile ajax endpoint and the membership checkout both use create_transaction(); the browser-fallback link uses hosted_link().
- 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 membership checkout redirect relies on BuddyBoss Platform's
bb_access_plan_get_checkout_urlfilter. If your BuddyBoss version does not expose it, use the?bb-ucashpay-checkout=fallback entry instead. - The plugin does not validate that a payment completed (no webhook). After payment the payer is returned to your site via the
redirectURL; reconciliation against theexternal_referenceshould be done at pay.u.cash or with a future webhook extension. - Outgoing payments/payouts are out of scope; this plugin only creates incoming pay links.
buddyboss-ucashpay.php- main plugin file, constants, bootstrap.includes/class-embed.php- the U.CASH PAY API contract (hosted_link,create_transaction).includes/class-settings.php- admin Settings page.includes/class-profile.php- profile button + ajax checkout endpoint.includes/class-membership.php- membership checkout redirect.assets/profile.js,assets/profile.css- profile button client.uninstall.php- removes all options on deletion.
MIT. See LICENSE.
This repo is the source of the plugin. To ship it to WordPress.org, build the ZIP and publish with WP-CLI:
# 1. Build a clean ZIP without dotfiles/.git
rsync -a --exclude='.git' --exclude='.gitignore' \
--exclude='node_modules' --exclude='vendor' \
./ buddyboss-ucashpay/
zip -r buddyboss-ucashpay-0.1.0.zip buddyboss-ucashpay/
# 2. Publish with WP-CLI (requires a wordpress.org-svn credentials file)
wp plugin install buddyboss-ucashpay-0.1.0.zip --activate
# or the SVN release flow:
# svn add / tag / commit to https://plugins.svn.wordpress.org/buddyboss-ucashpay/