Skip to content

interledger/open-payments-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open Payments

Open Payments

What is Open Payments?

Open Payments is an open API standard that can be implemented by account servicing entities (e.g. banks, digital wallet providers, and mobile money providers) to facilitate interoperability in the setup and completion of payments for different use cases including:

  • Web Monetization
  • Tipping/Donations (low value/low friction)
  • eCommerce checkout
  • P2P transfers
  • Subscriptions
  • Invoice Payments

An Open Payments server runs two sub-systems, a resource server which exposes APIs for performing functions against the underlying accounts and an authorisation server which exposes APIs compliant with the GNAP standard for getting grants to access the resource server APIs.

This repository hosts the Open API Specifications of the two APIs which are published along with additional documentation at https://openpayments.dev.

Additionally, this crate contains several modules:

  • client contains a Rust client to make requests via the Open Payments API.
  • types contains Rust types for the API.
  • snippets contains examples of Rust client usage for getting accustomed to the Open Payments flow.
  • http_signature provides tools for working with HTTP Message Signatures.

Dependencies

New to Interledger?

Never heard of Interledger before? Or would you like to learn more? Here are some excellent places to start:

Contributing

Please read the contribution guidelines before submitting contributions. All contributions must adhere to our code of conduct.

Open Payments Catchup Call

Our catchup calls are open to our community. We have them every other Wednesday at 13:00 GMT, via Google Meet.

Video call link: https://meet.google.com/htd-eefo-ovn

Or dial: (DE) +49 30 300195061 and enter this PIN: 105 520 503#

More phone numbers: https://tel.meet/htd-eefo-ovn?hs=5

Add to Google Calendar

Local Development Environment

Prerequisites

Environment Setup

Clone the repository and build:

git clone https://github.com/interledger/open-payments-rust.git
cd open-payments-rust
cargo build

Running Examples

See src/snippets/README.md for details on running code snippets and payment flows. For example, to run a snippet:

cd src/snippets
cargo run --features snippets --bin grant-incoming-payment

Useful commands

# Format all code:
cargo fmt --all

# Run all tests:
cargo test

# Check code for warnings and errors:
cargo check

# Build crate:
cargo build

# Generate documentation:
cargo doc --no-deps

# Generate documentation and open in browser:
cargo doc --no-deps --open

# Generate documentation with snippets feature:
cargo doc --features snippets --no-deps

Adding crate as dependency

Add this to your Cargo.toml:

[dependencies]
open-payments = "0.1.1"

For examples and snippets:

[dependencies]
open-payments = { version = "0.1.1", features = ["snippets"] }

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages