Difference between revisions of "Ecommerce"

From BiblePay Wiki
Jump to: navigation, search
Line 114: Line 114:
The Status1 field will change from "Placed", to "Filled".
The Status1 field will change from "Placed", to "Filled".
The Status3 field will change from "", to "Tracking : Carrier NNNNNNNN" where NNNNNNNN is the Tracking Number.
The Status3 field will change from "", to "Tracking : Carrier NNNNNNNN" where NNNNNNNN is the Tracking Number.

Revision as of 07:23, 23 February 2019


Biblepay is the first cryptocurrency to integrate a fully automated E-Commerce Buying Engine into the wallet.

The E-Commerce buying engine allows BiblePay (BBP) to be spent on real products that are drop shipped to your door.

Currently we only support Amazon Products, and US Deliveries. However, through our integration partner, Zinc, we are able to support Walmart drop shipments and deliveries to other countries such as EU/UK (these features are not yet activated).

How does E-Commerce Shipping Work with BiblePay Distributed Wallets?

The integration with BiblePay is intended to be decentralized over the long term, but some compromises had to be made in the area of the Amazon Product Whitelist, the Mouse Gateway API Credential Backpack, and the BiblePay Sanctuary Server Backpack.
First, the layers involved: The BiblePay end-user wallet, the end-user delivery address, The Mouse API, The Zinc Partner Integration, the BiblePay Server Backpack, and the Mouse Gateway API Credential Backpack are layers that information travels through.
To place an e-commerce order, a shipping address object must be transmitted from the BiblePay wallet through the Mouse API, and an Order will be placed. The end user shipping address information fields is stored in biblepay.conf.
When an order is placed, the wallet locates the active Mouse API server to send the order through. The Escrow will be sent for the purchase price of the product to the Mouse API server escrow address.
The BiblePay Mouse API is an object written by BiblePay in C# and compiled into the pools. We currently have two active Pools.
(To deploy the BiblePayMouse API server, one must complete the Zinc integration and set up payment with Zinc for the API fee). Pool.biblepay.org is now live on Zinc and integrated and running the Mouse API server.
Therefore all E-commerce traffic travels to pool.biblepay.org through the Mouse API.
The order is forwarded through the Mouse API gateway. At that point, the Mouse API checks the status of the escrow. Once the escrow has over 6 confirms, an order is placed through the Mouse API.
The address is checked to ensure the address is valid and destined to a supported Country. If the address is not valid, the Mouse API raises an address validation error, and this error raises an error in the order, and the escrow is returned to the buyer. The wallet user will see the error in the RPC when checking the order status (see below).

On the other hand, if the product ID is confirmed to be in stock, and the address is valid, the Mouse API places the order. Once the tracking info is available, the Mouse API forwards this back to the wallet. Information is stored in the Mouse APIs corresponding SQL Server for tracking. The SQL server maintains the Order ID, Product ID, and the order status 1, 2, 3 fields. When tracking information is available it is forwarded back through the Mouse API to the SQL server.

When the end user tracks the order, they will see "Placed", "Filled", "Tracking", "Carrier", "Tracking #" information filled in the Status1, Status2, Status3 fields.
The price of the item is calculated by multiplying the current rate in the native currency * the current bitcoin rate * the BBP exchange rate * static markup fee. The Markup Fee is chosen by the person running the pool and hosting the Mouse API. This covers the price for BBP->BTC recovery.

Pre-Requisites to Using the BiblePay E-Commerce System as a User

In order to use the E-commerce system, the RPC will need to know your Delivery Drop Shipping information.

    You will need to modify your biblepay.conf, adding the following keys:
  • delivery_name
  • delivery_address
  • delivery_address2
  • delivery_city
  • delivery_state
  • delivery_zip
  • delivery_phone

Note: delivery_address2 is optional. It is used for Apartment deliveries. Delivery_phone is required by AWS and WalMart. Delivery_name must be populated and is required by AWS and WalMart.

Note: After changing your config file, you must restart the wallet.

E-Commerce Commands
You must execute these commands from the RPC (TOOLS | DEBUG | RPC CONSOLE):
exec listproducts

Shows a list of e-commerce products available for purchase from the BiblePay wallet.


17:16:58  exec listproducts

17:16:58  {

 "Command": "listproducts",
 "0718083296": {
   "Product ID": "0718083296",
   "URL": "319EIF1lfuL.jpg",
   "Price": 12230,
   "Title": "The NKJV, Holy Bible, Larger Print, Paperback",
   "Details": "
Paperback: 1280 pages,
Publisher: Thomas Nelson; Lgr edition (March 8, 2016),
Language: English,
ISBN-10: 0718083296,
ISBN-13: 978-0718083298,
Product Dimensions: 5.5 x 1.7 x 8.5 inches,
Shipping Weight: 1.5 pounds
" }


Buying a Product

exec buyproduct 0718083291

This command allows you to purchase a product from the wallet. Note: Your wallet must be unlocked and you must have a balance greater than the purchase price quote.

Listing the order status

exec orderstatus

This command allows you to see the status of your orders. The Status1 field will change from "Placed", to "Filled".

The Status3 field will change from "", to "Tracking : Carrier NNNNNNNN" where NNNNNNNN is the Tracking Number.