Skip to content

Commit 4c364b1

Browse files
committed
Update docs
1 parent 6baaa04 commit 4c364b1

3 files changed

Lines changed: 70 additions & 44 deletions

File tree

authorization.md

Lines changed: 10 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -43,30 +43,6 @@ The Authorize message indicates the beneficiary approves the transaction after c
4343
- Provides the originator legal clearance to execute the transaction
4444
- Creates an audit trail of approval for regulatory purposes
4545

46-
### Complete
47-
48-
The Complete message is specifically used in the Payment flow, sent by the merchant's agent to indicate the transaction is ready for settlement. It replaces the previously confusing use of Authorize for this purpose.
49-
50-
**Business Implications**:
51-
- Clearly distinguishes merchant readiness for settlement from general authorization
52-
- Provides the settlement address where funds should be sent
53-
- Can specify an adjusted final amount (which must be less than or equal to the original requested amount)
54-
- Enables flexible payment scenarios like partial fulfillment or applied discounts
55-
- Creates a precise payment instruction for the customer's agent to follow
56-
57-
```mermaid
58-
sequenceDiagram
59-
participant Customer as Customer (Originator)
60-
participant Merchant as Merchant (Beneficiary)
61-
Merchant->>Customer: Payment (initial request)
62-
Note over Customer: Customer reviews and decides
63-
Customer->>Merchant: Authorize (accepts payment)
64-
Note over Merchant: Process payment request
65-
Merchant->>Customer: Complete (with settlement address, optional adjusted amount)
66-
Note over Customer: Execute on-chain payment
67-
Customer->>Merchant: Settle (with settlement proof and matching amount)
68-
```
69-
7046
### Reject
7147

7248
The Reject message indicates the beneficiary cannot approve the transaction. A clear reason must be provided to help the originator understand the compliance issue.
@@ -94,7 +70,7 @@ The Settle message confirms that the originator has executed the authorized tran
9470
- Creates a record linking off-chain authorization to on-chain settlement
9571
- Enables reconciliation between compliance systems and blockchain transactions
9672
- Completes the authorization-settlement cycle for audit purposes
97-
- May include an amount field that must match any amount specified in a preceding Complete message
73+
- May include an amount field that must match any amount specified in a preceding Authorize message
9874
- Supports partial payment scenarios when used with the amount field
9975

10076
### Cancel
@@ -141,26 +117,26 @@ sequenceDiagram
141117

142118
### Payment Flow
143119

144-
When using the Payment message type, the flow now includes the Complete message to clearly indicate settlement readiness.
120+
When using the Payment message type, the flow follows a request-response pattern where the merchant initiates and the customer responds.
145121

146122
```mermaid
147123
sequenceDiagram
148124
participant Customer as Customer (Originator)
149125
participant Merchant as Merchant (Beneficiary)
150126
Merchant->>Customer: Payment
151127
Note over Customer: Customer reviews and decides
152-
Customer->>Merchant: Authorize (accepts payment)
128+
Customer->>Merchant: Authorize (with settlementAsset)
153129
Note over Merchant: Process payment request
154-
Merchant->>Customer: Complete (provides settlement address, optional adjusted amount)
130+
Merchant->>Customer: Authorize (with settlementAddress)
155131
Note over Customer: Execute on-chain payment
156-
Customer->>Merchant: Settle (with settlement proof and matching amount)
132+
Customer->>Merchant: Settle (with settlement proof)
157133
```
158134

159-
This improved flow:
160-
- Clearly separates the customer's acceptance of the payment (Authorize) from the merchant's readiness to receive it (Complete)
161-
- Allows merchants to specify a final settlement amount that may differ from the original requested amount
162-
- Ensures the customer's wallet sends the correct amount specified in the Complete message
163-
- Creates a more intuitive payment experience that mirrors traditional payment flows
135+
This flow:
136+
- Allows the customer to specify which asset they'll use for payment (when multiple supportedAssets are available)
137+
- Enables the merchant to provide the settlement address after knowing which asset will be used
138+
- Creates a clear authorization chain before on-chain settlement
139+
- Mirrors traditional payment authorization flows
164140

165141
### Authorization with Travel Rule Information
166142

messages.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ Initiates a virtual asset transfer between parties.
8888
| purpose | string | No | Draft ([TAIP-13]) | ISO 20022 purpose code indicating the reason for the transfer |
8989
| categoryPurpose | string | No | Draft ([TAIP-13]) | ISO 20022 category purpose code for high-level classification |
9090
| expiry | string | No | Review ([TAIP-3]) | ISO 8601 datetime indicating when the transfer request expires |
91+
| policies | array of [Policy](#policy) | No | Review ([TAIP-3]) | Array of policy objects defining requirements for the transaction |
9192

9293
#### Examples
9394

@@ -178,6 +179,7 @@ Initiates a payment request from a merchant to a customer.
178179
| merchant | [Party](#party) | Yes | Review ([TAIP-14]) | Party for the merchant (beneficiary) |
179180
| customer | [Party](#party) | No | Review ([TAIP-14]) | Party for the customer (originator) |
180181
| agents | array of [Agent](#agent) | Yes | Review ([TAIP-14]) | Array of agents involved in the payment request |
182+
| policies | array of [Policy](#policy) | No | Review ([TAIP-14]) | Array of policy objects defining requirements that must be satisfied by the customer's agent |
181183

182184
#### Examples
183185

@@ -391,6 +393,7 @@ Terminates an existing transaction or connection. When used with transactions, i
391393
|-----------|------|----------|---------|-------------|
392394
| @context | string | Yes | Review ([TAIP-4]) | JSON-LD context "https://tap.rsvp/schema/1.0" |
393395
| @type | string | Yes | Review ([TAIP-4]) | JSON-LD type "https://tap.rsvp/schema/1.0#Cancel" |
396+
| by | string | Yes | Review ([TAIP-4]) | The party of the transaction wishing to cancel it (e.g., "originator" or "beneficiary" for Transfer messages) |
394397
| reason | string | No | Review ([TAIP-4]) | Human readable reason for cancellation |
395398

396399
#### Example Cancel Message
@@ -405,6 +408,7 @@ Terminates an existing transaction or connection. When used with transactions, i
405408
"body": {
406409
"@context": "https://tap.rsvp/schema/1.0",
407410
"@type": "https://tap.rsvp/schema/1.0#Cancel",
411+
"by": "originator",
408412
"reason": "user_requested"
409413
}
410414
}
@@ -1067,6 +1071,7 @@ Terminates an existing connection.
10671071
|-----------|------|----------|---------|-------------|
10681072
| @context | string | Yes | Draft ([TAIP-4]) | JSON-LD context "https://tap.rsvp/schema/1.0" |
10691073
| @type | string | Yes | Draft ([TAIP-4]) | JSON-LD type "https://tap.rsvp/schema/1.0#Cancel" |
1074+
| by | string | Yes | Draft ([TAIP-4]) | The party of the transaction wishing to cancel it (e.g., "originator" or "beneficiary" for Transfer messages) |
10701075
| reason | string | No | Draft ([TAIP-4]) | Human readable reason for cancellation |
10711076

10721077
#### Example Cancel Message
@@ -1080,6 +1085,7 @@ Terminates an existing connection.
10801085
"body": {
10811086
"@context": "https://tap.rsvp/schema/1.0",
10821087
"@type": "https://tap.rsvp/schema/1.0#Cancel",
1088+
"by": "customer",
10831089
"reason": "User declined payment request"
10841090
}
10851091
}
@@ -1342,6 +1348,55 @@ Represents a service involved in executing transactions.
13421348
}
13431349
```
13441350

1351+
## Out-of-Band Message Initiation
1352+
1353+
### Overview
1354+
[TAIP-3], [TAIP-14] - Review
1355+
1356+
When parties haven't established communication, TAP messages can be initiated using DIDComm Out-of-Band (OOB) messages. This enables sharing transaction requests through URLs or QR codes.
1357+
1358+
### Requirements
1359+
1360+
1. MUST use the `https://didcomm.org/out-of-band/2.0` protocol
1361+
2. MUST include the appropriate goal_code:
1362+
- `tap.transfer` for Transfer messages
1363+
- `tap.payment` for Payment messages
1364+
3. SHOULD be shared as URLs according to the [Out-of-Band message spec](https://identity.foundation/didcomm-messaging/spec/v2.1/#out-of-band-messages)
1365+
4. MUST include the TAP message as a signed DIDComm message in the attachment
1366+
1367+
### Example Out-of-Band Transfer
1368+
1369+
```json
1370+
{
1371+
"type": "https://didcomm.org/out-of-band/2.0/invitation",
1372+
"id": "2e9e257c-2839-4fae-b0c4-dcd4e2159f4e",
1373+
"from": "did:example:originator",
1374+
"body": {
1375+
"goal_code": "tap.transfer",
1376+
"goal": "Process transfer request",
1377+
"accept": ["didcomm/v2"]
1378+
},
1379+
"attachments": [{
1380+
"id": "transfer-1",
1381+
"mime_type": "application/didcomm-signed+json",
1382+
"data": {
1383+
"json": {
1384+
"payload": "eyJpZCI6IjU5OWY3MjIwLTYxNDktNGM0NS1hZGJiLTg2ZDk2YzhlMDYwOCIsInR5cGUiOiJodHRwczovL3RhcC5yc3ZwL3NjaGVtYS8xLjAjVHJhbnNmZXIiLCJmcm9tIjoiZGlkOmV4YW1wbGU6b3JpZ2luYXRvciIsImJvZHkiOnsiQGNvbnRleHQiOiJodHRwczovL3RhcC5yc3ZwL3NjaGVtYS8xLjAiLCJAdHlwZSI6Imh0dHBzOi8vdGFwLnJzdnAvc2NoZW1hLzEuMCNUcmFuc2ZlciIsImFzc2V0IjoiZWlwMTU1OjEvc2xpcDQ0OjYwIiwiYW1vdW50IjoiMTAwLjAwIn19",
1385+
"signatures": [{
1386+
"protected": "eyJ0eXAiOiJKV1QiLCJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpleGFtcGxlOm9yaWdpbmF0b3Ija2V5LTEifQ",
1387+
"signature": "FW33NnvOHV0Ted9-F7GZbkia-vYAfBKtH4oBxbrttWAhBZ6UFJMxcGjL3lwOl4YohI3kyyd2LqvFHsEFk7R7Cg"
1388+
}]
1389+
}
1390+
}
1391+
}]
1392+
}
1393+
```
1394+
1395+
The corresponding URL format would be:
1396+
```
1397+
https://example.com/tap?_oob=eyJ0eXAiOiJKV1QiLCJhbGciOiJFZERTQSJ9...
1398+
```
1399+
13451400
## Message Flow Examples
13461401

13471402
### Basic Transfer Flow
@@ -1719,6 +1774,7 @@ Note that all messages in this flow share the same thread ID (`payment-123`) to
17191774
"body": {
17201775
"@context": "https://tap.rsvp/schema/1.0",
17211776
"@type": "https://tap.rsvp/schema/1.0#Cancel",
1777+
"by": "customer",
17221778
"reason": "User declined payment request"
17231779
}
17241780
}
@@ -1738,6 +1794,7 @@ Note that all messages in this flow share the same thread ID (`payment-123`) to
17381794
"body": {
17391795
"@context": "https://tap.rsvp/schema/1.0",
17401796
"@type": "https://tap.rsvp/schema/1.0#Cancel",
1797+
"by": "originator",
17411798
"reason": "User cancelled the request"
17421799
}
17431800
}
@@ -1755,6 +1812,7 @@ Note that all messages in this flow share the same thread ID (`payment-123`) to
17551812
"body": {
17561813
"@context": "https://tap.rsvp/schema/1.0",
17571814
"@type": "https://tap.rsvp/schema/1.0#Cancel",
1815+
"by": "originator",
17581816
"reason": "Service agreement terminated"
17591817
}
17601818
}

transactions.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,9 @@ The **Payment** message type extends TAP to support merchant payment scenarios w
4343
- **Enhanced Metadata**: Supports additional information like invoices, items, and payment terms
4444
- **Customer Experience Focus**: Designed for consumer-friendly payment flows with clear merchant identification
4545
- **Merchant Classification**: Supports ISO 18245 Merchant Category Codes (MCC) for business type identification (e.g., restaurants, grocery stores)
46-
- **Flexible Settlement**: Supports optional partial payments through the **Complete** message, allowing merchants to adjust final amounts
46+
- **Flexible Settlement**: Supports flexible asset selection through the `supportedAssets` field, allowing customers to choose their preferred payment method
4747
- **Invoice Support**: Includes comprehensive invoice functionality as defined in [TAIP-16](/TAIPs/taip-16.md), supporting detailed line items, tax information, and payment terms
48-
49-
### Complete Message
50-
51-
The **Complete** message is a crucial part of the Payment flow, sent by the merchant's agent to indicate that the transaction is ready for settlement:
52-
53-
- **Settlement Readiness**: Clearly signals that the merchant has finished all necessary checks and is ready to receive payment
54-
- **Address Provision**: Provides the blockchain address where funds should be sent
55-
- **Optional Amount Adjustment**: Allows merchants to specify a final amount (which must be less than or equal to the original requested amount), enabling scenarios like partial fulfillment or applied discounts
56-
- **Settlement Guidance**: When an amount is specified in the Complete message, the customer's agent must use that exact amount in the subsequent Settle message. If omitted, the full amount from the original Payment message is implied
48+
- **Policy Support**: Can include policy requirements (e.g., RequirePresentation) for customer information needed for the transaction
5749

5850
## Business Differences
5951

0 commit comments

Comments
 (0)