NANO for ecommerce questions

Hello,

What is the fastest way to integrate NANO as a payment option for an ecommerce of physical goods?

To keep things simple, assume the customer will purchase only one product (no cart feature needed).
So, I assume that payments buttons (i.e. nano addresses) would be the quick and dirty way to implement this.

Appart from collecting the payment, the merchant needs three things:

  1. Collecting the customer name and physical address for the delivery.
  2. Knowing which product the customer purchased, and possibly which product options were selected.
  3. Being notified when the product was purchased and the payment arrived.

1. Collecting the customer name and delivery address
My understanding is that this is left to the ecommerce system, unless the protocol having reserved fields for that.

2. Knowing which product the customer purchased
How do I know which product was purchased?
Is the recommended solution having one NANO public address per product, and --since there is only one public address per wallet-- to create one wallet per product ?
If yes, and if using an offline wallet like NanoVault, how can the creation of the payment addresses be automated fort let's say 1000 products ?

If a product has only one set of price options and the price of each option is unique, the selected option could be deducted from the price paid. But should more complex option selections be stored by the webshop before the transaction or does the NANO protocol allow transmitting some optional value together with the transaction (e.g. product SKU) ?

3. Being notified when the product was purchased
How to be notified when a sale completed and the transaction was done?
I heard about web wallets solutions like Brainblocks.io and Coinbase can offer, but the perspective of a self-hosted solution/integration titillates my curiosity, and I would like to favour NANO's decentralization philosophy as much as possible.
In case of a self-hosted wallet, how to be notified about transactions and typically update a MySQL database. Are there already solutions for that ?

I apologize for these newbie questions. (I feel I should read the whitepaper again.)
Thank you for helping me to better understand how it works.

N.B. I'm not using Prestashop nor WooCommerce, so the plugins developed by Brainblocks.io are useless in my case.

2 Likes

What we do, with bitcoins also, is:

  • User enters checkout page;
  • User Selects Nano;
  • Server requests new address to the wallet server for amount X;
  • Wallet server talks to wallet daemon to generate address and listen to changes;
  • Address is shown to the user;
  • Wallet server then listens for payments, refunds eventual differences and waits for amount X to be on that address;
  • Once the payment is confirmed the wallet server notifies the web server;
  • The server confirms the purchase and changes the order status for the merchant panel;
  • The server then shows confirmation to the user (and usually sends an e-mail too).

This is the flow used in most e-commerces. Of course with bitcoin you can't refund the difference in case the user overpays.
Of course the web server is not always a single server, sometimes you have threads running with websocket connections for the real time updates, and those are considered separate servers.