Skip to content

docs(DEVELOP): describe payment mechanism, new payment services#1105

Merged
sidvishnoi merged 6 commits into
mainfrom
dev-guide-updates
Jul 7, 2025
Merged

docs(DEVELOP): describe payment mechanism, new payment services#1105
sidvishnoi merged 6 commits into
mainfrom
dev-guide-updates

Conversation

@sidvishnoi

@sidvishnoi sidvishnoi commented Jun 23, 2025

Copy link
Copy Markdown
Member

Context

This should help developers understand the payment mechanism better, without going through code first hand.
Should also help guide browser implementers and other curious people.

Changes proposed in this pull request

  • Was initially just going to describe the new payment classes, but then also:
  • Added a diagram to show how the different services in background integrate
  • Described payment mechanism: OP flow, minSendAmount, one-time payments and continuous payments.

@sidvishnoi sidvishnoi requested a review from DarianM June 23, 2025 12:40
@github-actions github-actions Bot added the area: documentation Improvements or additions to documentation label Jun 23, 2025
@github-actions

github-actions Bot commented Jun 23, 2025

Copy link
Copy Markdown
Contributor

Extension builds preview

Name Link
Latest commit 0e46b3a
Latest job logs Run #16112415437
Chrome (1000.77KB)Download
Firefox (1000.8KB)Download
Safari (1.92MB)Download

Comment thread docs/DEVELOP.md

Note that, we only support [manifest version 3](https://developer.chrome.com/docs/extensions/develop/migrate/what-is-mv3), and not version 2.

### Payment mechanism

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@melissahenderson would you like to optionally review this section? It relates to your recent work on interledger/open-payments#607.

Comment thread docs/DEVELOP.md
1. Create incoming payment:
1. Set up a non-interactive incoming payment grant for the receiving wallet address.
1. Create an incoming payment using this grant for the receiving wallet address.
1. Optionally, cancel the incoming payment grant, as we no longer need it (we already have the incoming payment). This prevents users wallet seeing _dangling_ grants in their wallet.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sidvishnoi Can you tell me more about this step for canceling the incoming payment grant? I'm only aware of completing an incoming payment (/incoming-payments/{id}/complete), which would tell the recipient's wallet that no more payments are coming.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cancelling incoming payment grant helps us avoid having a large list of approved incoming payment grants (we call them dangling grants) in wallet's grants list, when the user closes website (e.g. without making a payment). When the incoming payment expires, we create a new grant, and a new incoming payment (like one grant for each incoming payment).

It essentially tells receiving user that there won't be new incoming payments for this grant, and this grant's job is done.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To explain, the incoming payment grant is for "creating" incoming payments. Once we've created our incoming payment, we have no further use of that grant anymore.

@sidvishnoi sidvishnoi merged commit 6991f32 into main Jul 7, 2025
10 checks passed
@sidvishnoi sidvishnoi deleted the dev-guide-updates branch July 7, 2025 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants