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
The Open Payments APIs are a collection of three sub-systems:
- A wallet address server which exposes public information about Open Payments-enabled accounts called "wallet addresses"
- A resource server which exposes APIs for performing functions against the underlying accounts
- A authorisation server which exposes APIs compliant with the GNAP standard for getting grants to access the resource server APIs
This repository contains contains a .NET Open Payments SDK to make requests via the Open Payments API.
Never heard of Interledger before? Or would you like to learn more? Here are some excellent places to start:
- Interledger Website
- Interledger Specification
- Interledger Explainer Video
- Open Payments
- Web monetization
Please read the contribution guidelines before submitting contributions. All contributions must adhere to our code of conduct.
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
This repository contains a Git submodule, which contains the Open Payments OpenAPI specifications. After cloning, make sure to initialize and update it:
git submodule update --initAlternatively, clone the repository with submodules in one step:
git clone --recurse-submodules git@github.com:interledger/open-payments-node.gitnpm install -g swagger-cli && \
dotnet tool install --global NSwag.ConsoleCoreNow generate models from the OpenAPI specs. You can generate all of them by running the command below:
make modelsHowever, you can generate them one by one (please check the Makefile for all supported commands).
dotnet testTo use in your project, just add the package using the command line
dotnet add package Interledger.OpenPaymentsThen add it to your project code
// Import dependencies
using Microsoft.Extensions.DependencyInjection;
using OpenPayments.Sdk.Clients;
using OpenPayments.Sdk.Extensions;
using OpenPayments.Sdk.HttpSignatureUtils;
// Initialize client
var client = new ServiceCollection()
.UseOpenPayments(opts =>
{
opts.UseAuthenticatedClient = true;
opts.KeyId = CLIENT_ID;
opts.PrivateKey = KeyUtils.LoadPem(CLIENT_SECRET);
opts.ClientUrl = new Uri(CLIENT_WALLET_ADDRESS);
})
.BuildServiceProvider()
.GetRequiredService<IAuthenticatedClient>();Please visit OpenPayments Docs for a detailed guide.
- @golobitch - Initial work
- @cozminu - Maintainer
See also the list of contributors who participated in this project.