Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
62 changes: 30 additions & 32 deletions docs/specification/checkout.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,38 +58,36 @@ determines what action is required next. The business sets the status; the
platform receives messages indicating what's needed to progress.

```text
┌────────────┐ ┌─────────────────────┐
│ incomplete │◀──▶│ requires_escalation │
└─────┬──────┘ │ │
│ │ (buyer handoff │
│ │ via continue_url) │
│ └──────────┬──────────┘
│ │
│ all info collected │ continue_url
▼ │
┌──────────────────┐ │
│ready_for_complete│ │
│ │ │
│ (platform can │ │
│ call Complete │ │
│ Checkout). │ │
└────────┬─────────┘ │
│ │
│ Complete Checkout │
▼ │
┌────────────────────┐ │
│complete_in_progress│ │
└─────────┬──────────┘ │
│ │
└────────┬─────────┘
┌─────────────┐
│ completed │
└─────────────┘

┌─────────────┐
│ canceled │ (session invalid/expired - can occur from any state)
└─────────────┘
+------------+ +---------------------+
| incomplete |<----------------------->| requires_escalation |
+-----+------+ | (buyer handoff |
| | via continue_url) |
| all info collected +----------+----------+
v |
+------------------+ |
|ready_for_complete| |
| | |
| (platform can | | continue_url
| call Complete | |
| Checkout) | |
+--------+---------+ |
| |
| Complete Checkout |
v |
+--------------------+ |
|complete_in_progress| |
+---------+----------+ |
| |
+-----------------------+-------------------+
v
+-------------+
| completed |
+-------------+

+-------------+
| canceled |
+-------------+
(session invalid/expired - can occur from any state)
```

### Status Values
Expand Down
54 changes: 27 additions & 27 deletions docs/specification/examples/encrypted-credential-handler.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,33 +59,33 @@ Compliance requirements vary by credential type.
### Pattern Flow

```text
┌─────────────────┐ ┌────────────┐
Platform Business
└────────┬────────┘ └──────┬─────┘
1. Business registers public key (out-of-band)
│<─────────────────────────────────────────────│
2. Confirmation
│─────────────────────────────────────────────>│
3. GET ucp.payment_handlers
│─────────────────────────────────────────────>│
4. Handler with business identity
│<─────────────────────────────────────────────│
5. Platform's vaulting service encrypts
credential with business's key
6. POST checkout with EncryptedCredential
│─────────────────────────────────────────────>│
(Business decrypts locally)
7. Checkout complete
│<─────────────────────────────────────────────│
+-----------------+ +------------+
| Platform | | Business |
| | | |
+--------+--------+ +------+-----+
| |
| 1. Business registers public key (out-of-band)
|<---------------------------------------------|
| |
| 2. Confirmation |
|--------------------------------------------->|
| |
| 3. GET ucp.payment_handlers |
|--------------------------------------------->|
| |
| 4. Handler with business identity |
|<---------------------------------------------|
| |
| 5. Platform's vaulting service encrypts |
| credential with business's key |
| |
| 6. POST checkout with EncryptedCredential |
|--------------------------------------------->|
| |
| (Business decrypts locally) |
| |
| 7. Checkout complete |
|<---------------------------------------------|
```

---
Expand Down
131 changes: 66 additions & 65 deletions docs/specification/examples/platform-tokenizer-payment-handler.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,76 +65,77 @@ compliant credential storage.
### Pattern Flow: Business Detokenizes

```text
┌─────────────────┐ ┌────────────┐
Platform Business
(Tokenizer)
└────────┬────────┘ └──────┬─────┘
1. Business registers with Platform (out-of-band)
│<─────────────────────────────────────────────│
2. API credentials
│─────────────────────────────────────────────>│
3. GET ucp.payment_handlers
│─────────────────────────────────────────────>│
4. Handler with business identity
│<─────────────────────────────────────────────│
5. Platforms's Credential Provider generates token
6. POST checkout with TokenCredential
│─────────────────────────────────────────────>│
7. POST /detokenize (to Credential Provider)
│<─────────────────────────────────────────────│
8. Sensitive Data
│─────────────────────────────────────────────>│
9. Checkout complete
│<─────────────────────────────────────────────│
+-----------------+ +------------+
| Platform | | Business |
| (Tokenizer) | | |
+--------+--------+ +------+-----+
| |
| 1. Business registers with Platform (out-of-band)
|<---------------------------------------------|
| |
| 2. API credentials |
|--------------------------------------------->|
| |
| 3. GET ucp.payment_handlers |
|--------------------------------------------->|
| |
| 4. Handler with business identity |
|<---------------------------------------------|
| |
|5. Platforms's Credential Provider generates token
| |
| 6. POST checkout with TokenCredential |
|--------------------------------------------->|
| |
| 7. POST /detokenize (to Credential Provider)|
|<---------------------------------------------|
| |
| 8. Sensitive Data |
|--------------------------------------------->|
| |
| 9. Checkout complete |
|<---------------------------------------------|
```

### Pattern Flow: PSP Detokenizes

```text
┌─────────────────┐ ┌────────────┐ ┌─────────┐
│ Platform │ │ Business │ │ PSP │
│ (Tokenizer) │ │ │ │ │
└────────┬────────┘ └──────┬─────┘ └────┬────┘
│ │ │
│ 1. Business + PSP register with Platform (out-of-band)
│<────────────────────│ │
│<──────────────────────────────────────│
│ │ │
│ 2. API credentials │ │
│────────────────────>│ │
│──────────────────────────────────────>│
│ │ │
│ 3. Payment Credential Provider │
│ generates token │
│ │ │
│ 4. POST checkout with TokenCredential│
│────────────────────>│ │
│ │ │
│ │ 5. Forward │
│ │ token to PSP │
│ │────────────────>│
│ │ │
│ 6. POST /detokenize (to Credential Provider, with business identity)
│<──────────────────────────────────────│
│ │ │
│ 7. Sensitive Data │ │
│──────────────────────────────────────>│
│ │ │
│ │ 8. Payment │
│ │ result │
│ │<────────────────│
│ │ │
│ 9. Checkout complete │
│<────────────────────│ │
+-----------------+ +------------+ +---------+
| Platform | | Business | | PSP |
| (Tokenizer) | | | | |
+--------+--------+ +------+-----+ +----+----+
| | |
| 1. Business + PSP register with Platform (out-of-band)
|<--------------------| |
|<--------------------------------------|
| | |
| 2. API credentials | |
|-------------------->| |
|-------------------------------------->|
| | |
| 3. Payment Credential Provider |
| generates token |
| | |
| 4. POST checkout with TokenCredential|
|-------------------->| |
| | |
| | 5. Forward |
| | token to PSP |
| |---------------->|
| | |
| 6. POST /detokenize (to Credential Provider, with business identity)
|<--------------------------------------|
| | |
| 7. Sensitive Data | |
|-------------------------------------->|
| | |
| | 8. Payment |
| | result |
| | |
| |<----------------|
| | |
| 9. Checkout complete |
|<--------------------| |
```

---
Expand Down
Loading