Accept crypto and card payments on your Invoice Ninja invoices through U.CASH Pay. Customers pay their invoice at the hosted U.CASH Pay checkout and the invoice is marked Paid automatically.
- The customer clicks Pay with U.CASH on the invoice (
processPaymentView). - The button POSTs to the driver's process endpoint ->
processPaymentResponse()creates a U.CASH Pay transaction via the SDK and redirects the buyer to the hosted checkout. - After paying, the buyer returns to their invoice list.
- U.CASH Pay sends an HMAC-signed webhook to the driver's webhook route, registered in
boot(). The driver verifies the signature, reconciles amount + currency, attaches aPaymentto the invoice, and marks the invoice Paid.
- Invoice Ninja v5 (self-hosted or hosted).
- PHP 7.2+ with the
curlextension. - HTTPS on the public webhook URL.
- A free U.CASH Pay account.
- Copy
lib/InvoiceNinja/PaymentDrivers/UcashPayDriver.phpandlib/InvoiceNinja/PaymentDrivers/PayUCashIntegration.phpinto your Invoice Ninja install atapp/PaymentDrivers/. - Add the driver's class name to your registered gateways (Invoice Ninja -> Settings ->
Payment Gateways -> Add Gateway -> enter
UcashPayDriver). - Run
composer dump-autoloadif you installed via the composer autoload mapping.
-
In U.CASH Pay -> Account -> Stores, create a store for this Invoice Ninja install and copy its Cloud token and Webhook secret.
-
In Invoice Ninja -> Settings -> Payment Gateways -> U.CASH Pay, paste them into Cloud token and Webhook secret, and set the U.CASH Pay URL (default
https://pay.u.cash). -
Set the store's Webhook URL in U.CASH Pay to:
https://YOUR-NINJA/ucashpay/webhook/{company_gateway}where
{company_gateway}is the gateway key shown in the Invoice Ninja gateway config. -
Save, then send a test invoice.
lib/InvoiceNinja/PaymentDrivers/UcashPayDriver.phpthe payment driver class.lib/InvoiceNinja/PaymentDrivers/PayUCashIntegration.phpthe shared SDK.composer.jsonautoload mapping.
One U.CASH Pay store per Invoice Ninja install. Running several integrations? Create one store each in U.CASH Pay -> Account -> Stores; each gets its own Cloud token, Webhook secret, and Webhook URL.
(c) 2015-2026 U.CASH. All rights reserved.