Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

odoo-ucashpay

U.CASH Pay payment provider module for Odoo (eCommerce checkout and invoices). Accept cryptocurrency (BTC, ETH, USDC, and many more) plus optional fiat card payments through U.CASH Pay. Settlement is strictly non-custodial: funds land directly in the merchant's own wallets.

How it works

  1. When the customer reaches the Odoo payment step and chooses U.CASH Pay, Odoo builds a hosted checkout URL on pay.u.cash/embed.php carrying the order amount, currency, a reference, and the merchant's Store Cloud Token (publishable and safe to expose in the browser).
  2. The customer is redirected to that hosted checkout, pays in the coin of their choice (or by card, if the merchant connected Stripe), and is sent back to Odoo.
  3. The transaction is reconciled in Odoo. Because crypto is one-shot and non-custodial, refunds and recurring billing are not automated here; manage those in pay.u.cash.

The Store Cloud Token is publishable: it can only create checkouts that pay you, it can never move funds out of your wallets.

Requirements

  • Odoo 16 or 17 (depends on the payment module).
  • Python requests (see requirements.txt).
  • A pay.u.cash store and its Store Cloud Token.

Installation

From source (addons path)

  1. Copy or symlink the addons/payment_ucashpay directory into your Odoo addons path (or add the repository root to addons_path in odoo.conf):

    [options]
    addons_path = /opt/odoo/addons,/path/to/odoo-ucashpay/addons
  2. Install the Python dependency:

    pip install -r requirements.txt
  3. Restart Odoo, then go to Apps -> Update Apps List, search for U.CASH Pay, and click Install.

Configure the provider

  1. Go to Website -> Configuration -> Payment Providers (or Invoicing/Accounting -> Configuration -> Payment Providers) and open the U.CASH Pay record.
  2. Set State to Enabled.
  3. Paste your Store Cloud Token (from pay.u.cash Account -> Stores, the store-level token that starts with st_).
  4. Save.

The hosted and server endpoint fields are pre-filled for pay.u.cash; change them only if you run a self-hosted U.CASH Pay instance.

Usage

  • eCommerce: activate the provider for your website(s). Customers see U.CASH Pay at checkout and are redirected to pay.
  • Invoices: on a customer invoice, send a payment link. The customer pays via the same hosted checkout and returns to the invoice status page.

Set up your pay.u.cash account

  1. Sign up at pay.u.cash, then click the verification link in the email.
  2. Set receive addresses under Settings -> Addresses (raw address, ENS, Unstoppable Domains, or FIO).
  3. Create a store under Account -> Stores and copy its Store Cloud Token (use the store-level token, not the account-wide one).
  4. For fiat cards, connect your own Stripe under Settings -> Payment processors.

API reference

This module uses two pay.u.cash endpoints.

Client-side hosted pay link (publishable, browser-safe)

GET https://pay.u.cash/embed.php

Query parameters:

name required description
cloud yes the store Cloud Token
amount yes order amount
currency no ISO currency, defaults to USD
title no checkout title (the module uses the order reference)
external_reference no merchant order reference (used to reconcile in Odoo)
redirect no URL the customer returns to after paying

Server-side tracked checkout (idempotent per external_reference)

POST https://pay.u.cash/payment/ajax.php
Content-Type: application/x-www-form-urlencoded

Body:

name value
function create-transaction
amount order amount
currency_code ISO currency
cryptocurrency_code empty string (let the customer pick)
external_reference merchant order reference
title checkout title
redirect return URL
cloud store Cloud Token
idempotent 1

Response:

{ "success": true, "response": ["https://pay.u.cash/...", "<transactionId>", "..."] }

The payment URL is the array element that starts with http(s)://.

Limitations

  • Recurring billing is not supported. Crypto payments via U.CASH Pay are one-shot and non-custodial; Odoo subscriptions/tokens cannot be charged automatically. Use a supported card provider for automatic recurring billing.
  • Refunds are manual. Process refunds inside pay.u.cash (or directly to the customer), then adjust the invoice in Odoo.
  • Authoritative confirmation: the redirect integration marks the transaction pending on the customer return. Confirm orders in Odoo after you see the payment credited in pay.u.cash, or wire up a pay.u.cash webhook to set transactions done automatically.

License

MIT. See LICENSE.

About

U.CASH Pay payment provider module for Odoo (eCommerce/invoices). Crypto + cards, non-custodial.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages