Loading...
 

What is Interledger Protocol (ILP) payments?

Interledger Protocol (ILP) payments is a new feature coming in Tiki 24. Interledger is an open and inclusive payments network. The Interledger Protocol is an open protocol suite for sending payments across different ledgers.

How does Interledger Protocol (ILP) work?

The Interledger Protocol is a set of rules that define how nodes should send value over the Interledger network. A single aggregate payment from source to destination is split into multiple ILP packets. Each ILP packet contains transaction information, which is private to the nodes participating in the transaction. The sender constructs and sends a Prepare packet as a request to the connecting router. The routers forward the packet until it reaches the receiver. The receiver then accepts or rejects the packet by sending a Fulfill packet or a Reject packet as the response. The routers relay the response from the receiver back to the sender. When the sender receives a Fulfill packet, it knows that the packet was successfully delivered to the receiver. The sender then continues to send the remaining Prepare packets until the value is fully transferred.

Why use Interledger Protocol (ILP)?

  • Simplicity for end-users to transfer value over different networks
  • Speed over traditional payment rails
  • Reduced cost as competition to connect networks grows and incentivizes lower prices
  • Trustworthiness as tracking transactions and all-or-nothing (atomic) transactions guarantee that the value does not get lost due to fees and returns
  • Packetizing value — splitting up larger transfers into many lower-value packets which increases the network’s efficiency, security and interoperability

How to do Interledger Protocol (ILP) payments using Tiki?

Explained below is the step by step guide to implement Interledger Protocol (ILP) payments in Tiki assuming there is a working domain already setup, in this example with the following characteristics :

  • Domain name ilp.*
  • Path of your home /home/ilp/
  • Username ilp
  • Database name ilp
  • Some strong passwords

Step 1 - Getting and installing a compatible Tiki instance:

At the date of this writing you have to use a specific 24.x version; it will be merged to master soonWe first need to upgrade composer.tiki.org to use Composer v2, which was recently released. and available via Tiki Manager.

Step 2 - Running the ILP moneyd local test network and the ILP SPSP Invoice Server

MoneyD allows you to run an isolated local test network for development. The ILP SPSP is a basic protocol for exchanging payment information between payee and payer to facilitate payment over Interledger. In our case Tiki is the client, that talks to the SPSP server.

a. Navigate one level up your website directory
cd ..

b. Create a directory where we will get the tools and enter it
mkdir ilp-tools && cd ilp-tools

c. Export the path so you can run npm commands as your user
wget https://nodejs.org/dist/v14.17.5/node-v14.17.5-linux-x64.tar.gz
tar zxvf node-v14.17.5-linux-x64.tar.gz
export PATH=/home/ilp/ilp-tools/node-v14.17.5-linux-x64/bin:$PATH

d. Install moneyd and the PM2 daemon process manager via npm
npm install moneyd
npm install pm2

e. Finally install the ilp-spsp server
git clone https://github.com/interledgerjs/ilp-spsp-invoice-server.git
cd ilp-spsp-invoice-server
npm install

f. Restore your path and start moneyd and PM2
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH
pm2 start "moneyd local"
pm2 start index.js
pm2 status index.js should print an "online" green status

Click to expand
Click to expand

Step 3 - Setup the Tiki ILP payment feature and a basic cart

Head to your Tiki instance Settings > Control panels and Set as my default the "Advanced" and "Experimental" filters to have all the options available

Click to expand
Click to expand


Navigate to Global setup > Features and activate the Payment feature

Click to expand
Click to expand


In Global setup > Profiles search for Shopping_Cart, click the result, fill Currency initials and Currency symbol as XRP and Apply. You now have a basic shop.

Click to expand
Click to expand


Click on the link near the check button or navigate via the right menu to Miscellanous > Payment and select Inter Ledger Protocol as the Payment system, XRP for Currency, check User can only see own outstanding payments, and User can only see own past or cancelled payments

Click to expand
Click to expand


Bellow fill in the ILP server base url as http://localhost:6000 and the ILP bearer token as test and Apply the settings

Click to expand
Click to expand


Click the Plugins tab, fill Plugin Add to cart, Plugin Member Payment and Plugin Payment

Click to expand
Click to expand

Step 4 - Test an order

Add a product to your cart, click Check-out in the right panel to obtain the ILP pointer for the payment

Click to expand
Click to expand


Copy the link, and back at the command line send 5XRP
ilp-spsp send -a 5 -p http://localhost:6000/0787e2ba-d358-4cb7-901b-8d96350e2887 should respond with amount sent ie "sent 5 units!"

Reload the page or Check Payment and your payment will be confirmed

Click to expand
Click to expand

A special thank you

This work was made possible by a grant from Grant for the Web, a fund to boost open, fair, and inclusive standards and innovation in Web Monetization.


Page last modified on Sunday 19 September, 2021 21:27:51 GMT-0000

doc.tiki.org

Get Started

Admin Guide User Guide Bootstrap in Tiki

Keywords

Keywords serve as "hubs" for navigation within the Tiki documentation. They correspond to development keywords (bug reports and feature requests):

Accessibility (WAI and 508)
Accounting
Articles and Submissions
Backlinks
Banners
Batch
BigBlueButton audio/video/chat/screensharing
Blog
Bookmark
Browser Compatibility
Link Cache
Calendar
Category
Chat
Clean URLs
Comments
Communication Center
Compression (gzip)
Contacts (Address Book)
Contact us
Content Templates
Contribution
Cookie
Copyright
Credit
Custom Home and Group Home Page
Date and Time
Debugger Console
Directory of hyperlinks
Documentation link from Tiki to doc.tiki.org (Help System)
Docs
Draw
Dynamic Content
Dynamic Variable
External Authentication
FAQ
Featured links
File Gallery
Forum
Friendship Network (Community)
Gmap Google maps
Groups
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
Kaltura video management
Karma
Live Support
Login
Logs (system & action)
Look and Feel
Mail-in
Map with Mapserver
Menu
Meta Tags
Mobile Tiki and Voice Tiki
Mods
Module
MultiTiki
MyTiki
Newsletter
Notepad
Payment
Performance Speed / Load
Permissions
Platform independence (Linux-Apache, Windows/IIS, Mac, BSD)
Polls
Profiles
Profile Manager
Report
Toolbar
Quiz
Rating
Feeds
Score
Search engine optimization
Search
Search and Replace
Security
Semantic links
Shadowbox
Shadow Layers
Share
Shopping cart
Shoutbox
Slideshow
Smiley
Social Networks
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Stats
Surveys
Tags
Task
Tell a Friend, alert + Social Bookmarking
TikiTests
Theme CSS & Smarty
Trackers
Transitions
TRIM
User Administration including registration and banning
User Files
User Menu
Watch
WebDAV
Webmail
Web Services
Wiki History, page rename, etc
Wiki Syntax
Wiki structure (book and table of content)
Workspace
WSOD
WYSIWYCA
WYSIWYG
XMLRPC

Tiki Newsletter

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki