WooCommerce plugin
The plugin lives in plugins/woocommerce-miwallet/. It adds a "Pay with wallet" payment method, creates payments from your server, marks orders paid from signed webhooks, and starts refunds from the WooCommerce order screen.
Install
- Zip the
woocommerce-miwalletfolder and upload it in WordPress → Plugins → Add New → Upload, or copy the folder intowp-content/plugins/. Then activate it. - Go to WooCommerce → Settings → Payments → Digital-dollar wallet:
- API base URL: your payment network URL (
https://pryvpay.co) - Secret key:
sk_test_…while testing,sk_live_…when live - Webhook signing secret:
whsec_…from Dashboard → Webhooks - In Dashboard → Webhooks, set the endpoint to
https://YOUR-SHOP/?wc-api=miwallet. - Your store currency must be USD or KES. Buyers pay the exact equivalent in USDC or USDT.
What happens
| Step | Plugin behaviour |
|---|---|
| Checkout | Creates a payment (POST /v1/payments) with the order total and order id, then redirects to hosted checkout. The order stays Pending payment. |
| Paid | The signed payment.paid webhook marks the order paid with the transaction hash. It checks that the payment id and amount match the order. The thank-you page also checks the payment status, in case the webhook is delayed. |
| Expired | Adds an order note; the customer can pay again. |
| Refund | Refund on the order creates a refund request (POST /v1/refunds; partial refunds are proportional). The order note links to the dashboard, where you approve it from your own wallet. A note is added when refund.sent arrives. |
Refunds are sent from your wallet, so WooCommerce records the refund immediately but the money moves only after you approve it in the dashboard.
Requirements
WordPress 6+, WooCommerce 7+, PHP 7.4+. The plugin is compatible with HPOS (custom order tables).
Status: written against the WooCommerce payment gateway API but not yet run on a live WordPress install (no PHP runtime was available while building it). Run it on a staging shop before your pilot merchants use it.