U.CASH Pay bridge for Square POS. Offer crypto + card on a sale; a verified webhook records the payment in Square. Non-custodial.
Status: scaffold. The platform API call in
markPaid()is stubbed (documented below). Wire it, validate in the sandbox, then list on the platform marketplace.
GET /pay?orderId=..&amount=..¤cy=..redirects to a hosted U.CASH Pay checkout for the sale.POST /ucashpay/webhookverifies theX-Webhook-Signature(HMAC-SHA256, 300s window) and records the payment.
npm install
UCASH_CLOUD_TOKEN=st_your_store_cloud_token \
UCASH_WEBHOOK_SECRET=your_store_webhook_secret \
SQUARE_ACCESS_TOKEN=.. SQUARE_ENV=sandbox \
PORT=3000 npm start- Sign up at pay.u.cash, verify email.
- Set receive addresses under Settings -> Addresses.
- Create a store at Account -> Stores -> + Add Store; copy the Store Cloud Token + Store Webhook Secret.
- Set the webhook URL to
https://your-host/ucashpay/webhook, then Test Webhook.
Create a Square app at the Square Developer Dashboard, grab an access token. In markPaid(): create an external payment against the order via the Payments API - POST https://connect.{env}.squareupsandbox.com/v2/payments (production: https://connect.squareup.com/v2/payments) with body { source_id: 'EXTERNAL', amount_money, external_details: { type: 'EXTERNAL_TYPE_U_CASH', source: 'U.CASH Pay' } } using Authorization: Bearer . Square App Marketplace listing is a separate review.
MIT.