Skip to content

Simple example script for showing how to use the Open Payments Client

Notifications You must be signed in to change notification settings

interledger/open-payments-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Open Payments Example

This script sends money between two wallet addresses, using the Open Payments client.

The script creates an incoming payment on the receiving wallet address, and a quote on the sending wallet address (after getting grants for both). It also creates an interactive outgoing payment grant, which will require user interaction.

The script then finalizes the grant (after it's accepted interactively via the browser), and creates the outgoing payment.

Steps

  1. Make sure you have NodeJS installed
  2. Run npm install
  3. Get a private key, client wallet address and keyId from the test wallet, and add them in the script.
  4. Pick a receiving wallet address, and a sending wallet address.
  5. Run node index.js
  6. Click on the outputted URL, to accept the outgoing payment grant.
  7. Return to the terminal, hit enter. After this, the script will create the outgoing payment and funds will move between the receiver and the sender!

About

Simple example script for showing how to use the Open Payments Client

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published