Skip to content

docs: sync documentation with SCA schema changes#701

Open
claude[bot] wants to merge 1 commit into
mainfrom
docs/sync-20260718
Open

docs: sync documentation with SCA schema changes#701
claude[bot] wants to merge 1 commit into
mainfrom
docs/sync-20260718

Conversation

@claude

@claude claude Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Document the new PENDING_AUTHORIZATION quote/transaction status for Strong Customer Authentication (EU customers)
  • Add SCA authorization flow documentation to quote-system.mdx
  • Update transaction-lifecycle.mdx state diagram and webhook events

Changes

Documentation Updates

  • quote-system.mdx: Added new "Strong Customer Authentication (EU Customers)" section explaining the PENDING_AUTHORIZATION status, scaChallenge object, and /quotes/{quoteId}/authorize endpoint
  • transaction-lifecycle.mdx:
    • Added PENDING_AUTHORIZATION to the status table
    • Updated state diagram to include SCA flow (PENDING → PENDING_AUTHORIZATION → PROCESSING/EXPIRED)
    • Added OUTGOING_PAYMENT.PENDING_AUTHORIZATION webhook event
    • Updated webhook handling example code

Not Updated (No Changes Needed)

  • Kotlin sample app: Basic sample works for non-EU customers; SCA is region-specific
  • Grid Visualizer: Generates basic API call sequences; SCA is an optional regional requirement
  • Snippets: Focus on basic flows; core concept docs are the right place for SCA details

Test plan

  • Run make lint to verify OpenAPI spec is valid
  • Run make mint to preview documentation locally
  • Verify Mermaid state diagram renders correctly
  • Verify JSON examples are properly formatted

🤖 Generated with Claude Code

…on docs

Document the new Strong Customer Authentication (SCA) flow for EU customers:
- Add PENDING_AUTHORIZATION status to transaction status table
- Update state diagram with SCA authorization flow
- Add OUTGOING_PAYMENT.PENDING_AUTHORIZATION webhook event
- Add SCA section to quote system docs explaining the authorize flow
- Update webhook handling example to show SCA case

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@mintlify

mintlify Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
Grid 🟢 Ready View Preview Jul 18, 2026, 8:43 AM

@vercel

vercel Bot commented Jul 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
grid-flow-builder Ignored Ignored Jul 18, 2026 8:42am
grid-wallet-demo Ignored Ignored Jul 18, 2026 8:42am

Request Review

@greptile-apps

greptile-apps Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR documents the Strong Customer Authentication (SCA) flow introduced for EU-region customers, adding a PENDING_AUTHORIZATION status to both the quote and transaction lifecycle docs.

  • quote-system.mdx: New SCA section under "Executing a Quote" explains the scaChallenge object and the POST /quotes/{quoteId}/authorize endpoint, with a note on sequential challenges for JIT-funded quotes.
  • transaction-lifecycle.mdx: PENDING_AUTHORIZATION added to the status table, state diagram, and webhooks table; the webhook handler example is updated with a new OUTGOING_PAYMENT.PENDING_AUTHORIZATION case. One factual inconsistency exists: the status table describes "the transaction's scaChallenge" while the authorize endpoint is quote-based, which will confuse developers acting on the webhook. A PENDING_AUTHORIZATION webhook payload example and an SCA scenario tab are also absent.

Confidence Score: 4/5

Safe to merge after resolving the transaction vs. quote ownership wording for scaChallenge; the rest of the changes are additive and accurate.

The core SCA flow is correctly described and the new state diagram transitions are accurate. One content issue in transaction-lifecycle.mdx points developers to 'the transaction's scaChallenge' when the actual authorize call goes to a quote endpoint — a developer acting solely on the webhook and the status table description would be pointed in the wrong direction. The missing PENDING_AUTHORIZATION payload example compounds this gap.

transaction-lifecycle.mdx — the status table description, missing webhook payload tab, and getUserMessage example all need a pass to align with the quote-based authorize flow.

Important Files Changed

Filename Overview
mintlify/platform-overview/core-concepts/quote-system.mdx Adds a 'Strong Customer Authentication (EU Customers)' section under Executing a Quote; covers the PENDING_AUTHORIZATION status, scaChallenge object, and /quotes/{quoteId}/authorize endpoint. Only the SMS_OTP authorize flow is shown; the PASSKEY variant is not documented.
mintlify/platform-overview/core-concepts/transaction-lifecycle.mdx Adds PENDING_AUTHORIZATION to the status table, state diagram, and webhook events table; updates the webhook handler example. The status table incorrectly directs developers to 'the transaction's scaChallenge' while the authorize endpoint is quote-based; a PENDING_AUTHORIZATION webhook payload example and an SCA scenario tab are also missing.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    participant App
    participant GridAPI
    participant Customer

    App->>GridAPI: POST /quotes
    GridAPI-->>App: "Quote { status: PENDING_AUTHORIZATION, scaChallenge }"

    App->>Customer: Prompt SCA challenge (e.g. SMS OTP)
    Customer-->>App: Submits proof (code)

    App->>GridAPI: "POST /quotes/{quoteId}/authorize { code }"
    GridAPI-->>App: Quote status update

    alt More challenges required
        GridAPI-->>App: status: PENDING_AUTHORIZATION (next challenge)
        App->>Customer: Prompt next SCA challenge
        Customer-->>App: Submits proof
        App->>GridAPI: "POST /quotes/{quoteId}/authorize"
    end

    GridAPI-->>App: Quote status: PROCESSING
    GridAPI--)App: Webhook: OUTGOING_PAYMENT.PENDING_AUTHORIZATION
    GridAPI--)App: Webhook: OUTGOING_PAYMENT.PROCESSING
    GridAPI--)App: Webhook: OUTGOING_PAYMENT.COMPLETED
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
    participant App
    participant GridAPI
    participant Customer

    App->>GridAPI: POST /quotes
    GridAPI-->>App: "Quote { status: PENDING_AUTHORIZATION, scaChallenge }"

    App->>Customer: Prompt SCA challenge (e.g. SMS OTP)
    Customer-->>App: Submits proof (code)

    App->>GridAPI: "POST /quotes/{quoteId}/authorize { code }"
    GridAPI-->>App: Quote status update

    alt More challenges required
        GridAPI-->>App: status: PENDING_AUTHORIZATION (next challenge)
        App->>Customer: Prompt next SCA challenge
        Customer-->>App: Submits proof
        App->>GridAPI: "POST /quotes/{quoteId}/authorize"
    end

    GridAPI-->>App: Quote status: PROCESSING
    GridAPI--)App: Webhook: OUTGOING_PAYMENT.PENDING_AUTHORIZATION
    GridAPI--)App: Webhook: OUTGOING_PAYMENT.PROCESSING
    GridAPI--)App: Webhook: OUTGOING_PAYMENT.COMPLETED
Loading

Comments Outside Diff (2)

  1. mintlify/platform-overview/core-concepts/transaction-lifecycle.mdx, line 453-455 (link)

    P2 The getUserMessage helper in the Best Practices accordion is missing OUTGOING_PAYMENT.PENDING_AUTHORIZATION. Developers following this example would fall through to the generic default branch for EU SCA customers, showing "Payment status updated." instead of prompting the user to complete their authentication challenge.

    Context Used: mintlify/AGENTS.md (source)

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: mintlify/platform-overview/core-concepts/transaction-lifecycle.mdx
    Line: 453-455
    
    Comment:
    The `getUserMessage` helper in the Best Practices accordion is missing `OUTGOING_PAYMENT.PENDING_AUTHORIZATION`. Developers following this example would fall through to the generic `default` branch for EU SCA customers, showing "Payment status updated." instead of prompting the user to complete their authentication challenge.
    
    
    
    **Context Used:** mintlify/AGENTS.md ([source](https://app.greptile.com/lightspark/github/lightsparkdev/grid-api/-/custom-context?memory=51934046-75fb-42d3-9870-f42d61cb60e3))
    
    How can I resolve this? If you propose a fix, please make it concise.
  2. mintlify/platform-overview/core-concepts/transaction-lifecycle.mdx, line 307-368 (link)

    P2 Missing SCA scenario tab

    The Scenarios tabs cover Happy Path, Failure with Refund, Failure with Failed Refund, Bank Return, and Manual Cancellation — but there is no tab for the SCA flow (PENDING → PENDING_AUTHORIZATION → PROCESSING → COMPLETED). Adding this would round out the new documentation and help EU-region developers quickly confirm the expected webhook sequence.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: mintlify/platform-overview/core-concepts/transaction-lifecycle.mdx
    Line: 307-368
    
    Comment:
    **Missing SCA scenario tab**
    
    The Scenarios tabs cover Happy Path, Failure with Refund, Failure with Failed Refund, Bank Return, and Manual Cancellation — but there is no tab for the SCA flow (`PENDING → PENDING_AUTHORIZATION → PROCESSING → COMPLETED`). Adding this would round out the new documentation and help EU-region developers quickly confirm the expected webhook sequence.
    
    How can I resolve this? If you propose a fix, please make it concise.

    Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix All With AI
Fix the following 4 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 4
mintlify/platform-overview/core-concepts/transaction-lifecycle.mdx:124
**Misleading field reference — `scaChallenge` lives on the quote, not the transaction**

The description says "authorize the transaction's `scaChallenge`", but the only authorize endpoint documented is `POST /quotes/{quoteId}/authorize`, and the `scaChallenge` object is shown on the quote response (in `quote-system.mdx`). A developer who receives an `OUTGOING_PAYMENT.PENDING_AUTHORIZATION` webhook has a transaction ID, not a quote ID — the status table should either reference the quote's `scaChallenge` and mention using the `quoteId` field, or a webhook payload example for this event should be added showing how to obtain the quote ID needed to call `/quotes/{quoteId}/authorize`.

### Issue 2 of 4
mintlify/platform-overview/core-concepts/transaction-lifecycle.mdx:453-455
The `getUserMessage` helper in the Best Practices accordion is missing `OUTGOING_PAYMENT.PENDING_AUTHORIZATION`. Developers following this example would fall through to the generic `default` branch for EU SCA customers, showing "Payment status updated." instead of prompting the user to complete their authentication challenge.

```suggestion
      switch (webhookType) {
        case 'OUTGOING_PAYMENT.PENDING':
          return 'Payment processing...';
        case 'OUTGOING_PAYMENT.PENDING_AUTHORIZATION':
          return 'Authorization required. Please complete the security challenge to proceed.';
```

### Issue 3 of 4
mintlify/platform-overview/core-concepts/transaction-lifecycle.mdx:197
**Missing webhook payload example for `PENDING_AUTHORIZATION`**

The Example Payloads tabs include PENDING, COMPLETED, FAILED, and REFUND_COMPLETED, but there is no tab for `PENDING_AUTHORIZATION`. Without a concrete payload example, developers cannot see what fields (e.g., `quoteId`, `scaChallenge`) are available in the webhook body — which is critical for knowing how to retrieve the SCA challenge and call `POST /quotes/{quoteId}/authorize`.

### Issue 4 of 4
mintlify/platform-overview/core-concepts/transaction-lifecycle.mdx:307-368
**Missing SCA scenario tab**

The Scenarios tabs cover Happy Path, Failure with Refund, Failure with Failed Refund, Bank Return, and Manual Cancellation — but there is no tab for the SCA flow (`PENDING → PENDING_AUTHORIZATION → PROCESSING → COMPLETED`). Adding this would round out the new documentation and help EU-region developers quickly confirm the expected webhook sequence.

Reviews (1): Last reviewed commit: "docs: add PENDING_AUTHORIZATION status f..." | Re-trigger Greptile

| Status | Description |
|--------|-------------|
| **PENDING** | Quote is pending confirmation |
| **PENDING_AUTHORIZATION** | Awaiting Strong Customer Authentication. Only occurs for customers in regions where SCA is required (e.g., EU); authorize the transaction's `scaChallenge` to proceed. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Misleading field reference — scaChallenge lives on the quote, not the transaction

The description says "authorize the transaction's scaChallenge", but the only authorize endpoint documented is POST /quotes/{quoteId}/authorize, and the scaChallenge object is shown on the quote response (in quote-system.mdx). A developer who receives an OUTGOING_PAYMENT.PENDING_AUTHORIZATION webhook has a transaction ID, not a quote ID — the status table should either reference the quote's scaChallenge and mention using the quoteId field, or a webhook payload example for this event should be added showing how to obtain the quote ID needed to call /quotes/{quoteId}/authorize.

Prompt To Fix With AI
This is a comment left during a code review.
Path: mintlify/platform-overview/core-concepts/transaction-lifecycle.mdx
Line: 124

Comment:
**Misleading field reference — `scaChallenge` lives on the quote, not the transaction**

The description says "authorize the transaction's `scaChallenge`", but the only authorize endpoint documented is `POST /quotes/{quoteId}/authorize`, and the `scaChallenge` object is shown on the quote response (in `quote-system.mdx`). A developer who receives an `OUTGOING_PAYMENT.PENDING_AUTHORIZATION` webhook has a transaction ID, not a quote ID — the status table should either reference the quote's `scaChallenge` and mention using the `quoteId` field, or a webhook payload example for this event should be added showing how to obtain the quote ID needed to call `/quotes/{quoteId}/authorize`.

How can I resolve this? If you propose a fix, please make it concise.

| Event | Description |
|-------|-------------|
| `OUTGOING_PAYMENT.PENDING` | Transaction created, quote pending confirmation |
| `OUTGOING_PAYMENT.PENDING_AUTHORIZATION` | Awaiting Strong Customer Authentication (EU customers only) |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Missing webhook payload example for PENDING_AUTHORIZATION

The Example Payloads tabs include PENDING, COMPLETED, FAILED, and REFUND_COMPLETED, but there is no tab for PENDING_AUTHORIZATION. Without a concrete payload example, developers cannot see what fields (e.g., quoteId, scaChallenge) are available in the webhook body — which is critical for knowing how to retrieve the SCA challenge and call POST /quotes/{quoteId}/authorize.

Context Used: mintlify/AGENTS.md (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: mintlify/platform-overview/core-concepts/transaction-lifecycle.mdx
Line: 197

Comment:
**Missing webhook payload example for `PENDING_AUTHORIZATION`**

The Example Payloads tabs include PENDING, COMPLETED, FAILED, and REFUND_COMPLETED, but there is no tab for `PENDING_AUTHORIZATION`. Without a concrete payload example, developers cannot see what fields (e.g., `quoteId`, `scaChallenge`) are available in the webhook body — which is critical for knowing how to retrieve the SCA challenge and call `POST /quotes/{quoteId}/authorize`.

**Context Used:** mintlify/AGENTS.md ([source](https://app.greptile.com/lightspark/github/lightsparkdev/grid-api/-/custom-context?memory=51934046-75fb-42d3-9870-f42d61cb60e3))

How can I resolve this? If you propose a fix, please make it concise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants