Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split dip 8 to funds pull pre approval and charge + auth/capture #2

Draft
wants to merge 57 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
42d917f
Update dip-8.md
kphfb Dec 18, 2020
f97e396
Update lip-8.md:
Karpick-E Oct 8, 2020
ab2d9c1
Update lips/lip-8.md
danprinz Oct 15, 2020
0e39526
Update lips/lip-8.md
danprinz Oct 15, 2020
d2eb4b1
Update lips/lip-8.md
danprinz Oct 15, 2020
ebfbb42
Update lips/lip-8.md
danprinz Oct 15, 2020
e84bda4
Update lips/lip-8.md
danprinz Oct 15, 2020
20886a6
Update lips/lip-8.md
danprinz Oct 15, 2020
85c89e2
Update lips/lip-8.md
danprinz Oct 15, 2020
16c19a7
Update lip-8.md
danprinz Oct 15, 2020
649f868
Apply suggestions from code review
danprinz Nov 4, 2020
9e93f63
PR fixes
danprinz Nov 4, 2020
67a5c5e
split DIP-8 to funds pre approval and auth/capture
danprinz Mar 15, 2021
fbc8c89
add dip 158 for p2m charge + auth/capture
danprinz Apr 5, 2021
b6e3476
Created DIP-158 (AKA P2M DIP).
YinonFirstDAG Apr 12, 2021
4e27e12
Incorporated additional comments
YinonFirstDAG Apr 18, 2021
21bbf2e
Update dip-8.md
kphfb Dec 18, 2020
ad626e7
Update lip-8.md:
Karpick-E Oct 8, 2020
150a752
Update lips/lip-8.md
danprinz Oct 15, 2020
091ed30
Update lips/lip-8.md
danprinz Oct 15, 2020
2a9bafa
Update lips/lip-8.md
danprinz Oct 15, 2020
569cb35
Update lips/lip-8.md
danprinz Oct 15, 2020
fdba30c
Update lips/lip-8.md
danprinz Oct 15, 2020
5cda1b8
Update lips/lip-8.md
danprinz Oct 15, 2020
2bf7735
Update lips/lip-8.md
danprinz Oct 15, 2020
becffc1
Update lip-8.md
danprinz Oct 15, 2020
4e08ec8
Apply suggestions from code review
danprinz Nov 4, 2020
75b17b5
PR fixes
danprinz Nov 4, 2020
3ee179f
split DIP-8 to funds pre approval and auth/capture
danprinz Mar 15, 2021
47ef81c
add dip 158 for p2m charge + auth/capture
danprinz Apr 5, 2021
05b3537
Created DIP-158 (AKA P2M DIP).
YinonFirstDAG Apr 12, 2021
116f663
Incorporated additional comments
YinonFirstDAG Apr 18, 2021
e0cefc2
Revert DIP-8 initial changes draft
danprinz Apr 18, 2021
c69da04
Merge branch 'split-dip-8' of https://github.com/firstdag/dip into sp…
YinonFirstDAG Apr 19, 2021
fb6a549
Update dips/dip-158.md
YinonFirstDAG Apr 19, 2021
d211b5c
Update dips/dip-158.md
YinonFirstDAG Apr 19, 2021
d8557ac
Update dips/dip-158.md
YinonFirstDAG Apr 19, 2021
09d73ee
Update dips/dip-158.md
YinonFirstDAG Apr 19, 2021
184b768
Update dips/dip-158.md
YinonFirstDAG Apr 19, 2021
217967d
Merge branch 'split-dip-8' of https://github.com/firstdag/dip into sp…
YinonFirstDAG Apr 19, 2021
5a73ca9
Updated based on latest comments from Dahlia
YinonFirstDAG Apr 19, 2021
0a6a149
Added glossary item for Reference ID based on Dahlia's comments.
YinonFirstDAG Apr 20, 2021
045d1c7
Update dips/dip-158.md
YinonFirstDAG Apr 27, 2021
38408b2
Update dips/dip-158.md
YinonFirstDAG Apr 27, 2021
1d89b20
Updated based on David W. comments
YinonFirstDAG Apr 27, 2021
aa51f9c
Additional comments following meeting with the team.
YinonFirstDAG Apr 29, 2021
7bc8bcf
Revert DIP-8 to master version to remove from pull request
YinonFirstDAG May 2, 2021
ffa4e61
Another cycle of comments incorporated.
YinonFirstDAG May 2, 2021
dcfb3e2
Changed the order of sections and added internal links
YinonFirstDAG May 3, 2021
e418157
Internal links fix
YinonFirstDAG May 3, 2021
a8a89f4
Appendix A link
YinonFirstDAG May 3, 2021
9c97c83
Added AddressObject and NationalIdObject
YinonFirstDAG May 4, 2021
3163dbf
* Introduced PaymentCommandErrorObject
YinonFirstDAG May 5, 2021
a67ac6f
add dual attestation info to charge command response and capture comm…
danprinz May 5, 2021
3783ea1
* Grammar issue
YinonFirstDAG May 5, 2021
74efb7c
Added sequence diagrams and partial capture support
YinonFirstDAG May 6, 2021
f11559e
Update dip-158.md
YinonFirstDAG May 6, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
* Grammar issue
* Naming consistency
* Optional redirect URL for QR flow (POS scenario)
YinonFirstDAG committed May 5, 2021
commit 3783ea1a7ba2f4fb16b368f3a879b690b7a8bf17
13 changes: 7 additions & 6 deletions dips/dip-158.md
Original file line number Diff line number Diff line change
@@ -65,9 +65,9 @@ Content:
---
The high-level flow of an eCommerce P2M payment (regardless of the type) is:
1. On the merchant's checkout page the customer chooses to pay with Diem
2. The merchant transmits the payment details to its VASP (merchant's VASP) so the latter can generate and a payment request with Diem
3. The merchant's VASP (the receiver) generates a payment request with all details needed to identify this payment later in the process, provides it to the merchant and makes it available to the customer's Diem wallet (the customer's VASP or sender)
4. The customer's VASP parses the payment request (e.g. by scanning the payment request QR) and uses the provided payment identifier to get the payment details. This is the first step of the off-chain protocol
2. The merchant transmits the payment details to its VASP (receiver VASP) so the latter can generate a payment request with Diem
3. The the receiver VASP generates a payment request with all details needed to identify this payment later in the process, provides it to the merchant and makes it available to the customer's Diem wallet (the customer's VASP or sender)
4. The sender VASP parses the payment request (e.g. by scanning the payment request QR) and uses the provided payment identifier to get the payment details. This is the first step of the off-chain protocol
5. The wallet then presents the requested payment details to the customer so the customer can review the payment
6. The customer approves the payment request in the wallet
7. The wallet initializes the payment protocol (off-chain) which will end (if successful) with the funds being authorized or charged (depending on the payment type). Successful completion implies that the receiving VASP was satisfied with the payer information provided and the sender VASP was satisfied with the merchant information provided. **Note** that if the payment amount exceeds the amount that requires a dual attestation signature to be submitted to the blockchain, it must be part of the on-chain transaction submitted
@@ -109,12 +109,12 @@ The following is a list of new values for the `command_type` field of the `Comma

| Command Type |Direction| Description | Request Data | Response Data |
|-|-|-|-|-|
|GetInfoCommand|Sender > Receiver|By providing the object reference id the wallet can retrieve the object information from the receiving VASP. In most cases, this would be the first command sent by the wallet. The wallet is not expected to provide any payer data at this stage|Reference ID|Payment Details ; Merchant Data|
|InitChargeCommand|Sender > Receiver|This functionality allows the wallet to init the payment process based on the payment details. For example, this may occur after the customer approved the payment request|Reference ID ; Payer Data|Optional recipient signature|
|GetInfoCommand|Sender > Receiver|By providing the object reference id the wallet can retrieve the object information from the receiving VASP. In most cases, this would be the first command sent by the wallet. The wallet is not expected to provide any payer data at this stage|Reference ID|Payment Details ; Business Data|
|InitChargeCommand|Sender > Receiver|This functionality allows the wallet to init the payment process based on the payment details. For example, this may occur after the customer approved the payment request|Reference ID ; Payer Data|Optional Recipient Signature|
|InitAuthorizeCommand|Sender > Receiver|This functionality allows the wallet to init the payment process based on the payment details. For example, this may occur after the customer approved the payment request|Reference ID ; Payer Data||
|ReadyForSettlementNotification|Sender > Receiver|This functionality allows the wallet to indicate the payment is ready for settlement. The wallet is expected to submit a transaction on-chain immediately before or after declaring it is ready|Reference ID||
|AuthorizedNotification|Sender > Receiver|This functionality allows the wallet to indicate funds are locked for future capture. Relevant only for Auth / Capture payments|Reference ID||
|CaptureCommand|Receiver > Sender|This functionality allows the receiver to capture the locked (authorized) funds. Relevant only for Auth / Capture payments. This optionally includes the recipient signature for dual attestation scenario if needed|Reference ID||
|CaptureCommand|Receiver > Sender|This functionality allows the receiver to capture the locked (authorized) funds. Relevant only for Auth / Capture payments. This optionally includes the recipient signature for dual attestation scenario if needed|Reference ID ; Optional Recipient Signature||
|VoidCommand|Receiver > Sender|This functionality allows the receiver to void the payment. For example, the merchant voided the payment because the purchased products are out of stock. Relevant only for Auth / Capture payments|Reference ID||
|AbortCommand|Sender > Receiver / Receiver > Sender|This functionality allows both parties to abort the payment. For example, the receiver may want to abort the payment following failed risk checks|Reference ID||

@@ -770,6 +770,7 @@ The table below specifies the fields that should be encoded into the QR code dee
|-----|----|---------|-----------|
|vasp_address|str|Y|Address of receiving VASP. The address is encoded using bech32. For Diem addresses format, refer to the "account identifiers" section in [DIP-5](https://dip.diem.com/dip-5/#account-identifiers).|
|reference_id|str|Y|A unique identifier of this payment. It should be a UUID according to RFC4122 with "-"'s included.|
|redirect_url|str|N|Encoded URL used by the wallet to redirect the customer back to the merchant|

For example, for the following values: