') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); })(); Add compliance context to transactions by ls-bolt[bot] · Pull Request #822 · lightsparkdev/grid-api · GitHub
Skip to content

Add compliance context to transactions - #822

Closed
ls-bolt[bot] wants to merge 1 commit into
mainfrom
08-12-AT-6319-incoming-compliance-context
Closed

Add compliance context to transactions#822
ls-bolt[bot] wants to merge 1 commit into
mainfrom
08-12-AT-6319-incoming-compliance-context

Conversation

@ls-bolt

@ls-boltls-boltBot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

This PR has been claimed. The active PR is now #823.

Summary

  • Add an optional pendingReason field to all transactions.
  • Add provider-neutral reasons for customer action and compliance review.
  • Add COMPLIANCE_REJECTED to incoming and outgoing transaction failure reasons.

Test plan

  • make build
  • make lint-openapi (0 errors)

@mintlify

mintlifyBot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

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

ProjectStatusPreviewUpdated (UTC)
Grid🟢 ReadyView PreviewAug 12, 2026, 11:30 PM

@ls-boltls-boltBot added the bolt label Aug 12, 2026
@vercel

vercelBot commented Aug 12, 2026

Copy link
Copy Markdown

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

2 Skipped Deployments
ProjectDeploymentActionsUpdated (UTC)
grid-flow-builderIgnoredIgnoredPreviewAug 12, 2026 11:52pm
grid-wallet-demoIgnoredIgnoredPreviewAug 12, 2026 11:52pm

Request Review

@lightspark-botGraphite App

Copy link
Copy Markdown

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions

github-actionsBot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

✱ Stainless preview builds for grid

This PR will update the grid SDKs with the following commit messages.

cli

chore(internal): regenerate SDK with no functional changes

go

feat(api): add pending_reason field, compliance_rejected to transaction types

kotlin

feat(api): add pendingReason field/PendingReason enum, COMPLIANCE_REJECTED to IncomingTransaction

openapi

feat(api): add pendingReason field/enum, COMPLIANCE_REJECTED to IncomingTransaction

php

feat(api): add pendingReason to transactions/webhooks, PendingReason enum, FailureReason value

python

feat(api): add pending_reason field and COMPLIANCE_REJECTED to IncomingTransaction

ruby

feat(api): add pending_reason field, COMPLIANCE_REJECTED value to IncomingTransaction

typescript

feat(api): add pendingReason field and COMPLIANCE_REJECTED reason to IncomingTransaction

Edit this comment to update them. They will appear in their respective SDK's changelogs.

grid-typescriptstudio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ❗test ✅

npm install https://pkg.stainless.com/s/grid-typescript/81c617b6df66153f58a40f4a8aad6b14606020ef/dist.tar.gz
grid-openapistudio · code · diff

Your SDK build had at least one "warning" diagnostic, but this did not represent a regression.
generate ⚠️

grid-kotlinstudio · code · diff

Your SDK build had at least one "warning" diagnostic, but this did not represent a regression.
generate ⚠️build ✅lint ✅test ❗

grid-rubystudio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ✅test ✅

grid-gostudio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ❗test ❗

go get github.com/stainless-sdks/grid-go@32691f25d5db7b322bd5b4d7bf8bdb16c5a04000
grid-pythonstudio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ❗test ❗

pip install https://pkg.stainless.com/s/grid-python/92d4612e3758ac56f9371f81038abdb85067f7b2/grid-0.0.1-py3-none-any.whl
grid-phpstudio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅lint ✅test ✅

grid-clistudio · code · diff

Your SDK build had at least one "warning" diagnostic, but this did not represent a regression.
generate ⚠️build ❗lint ❗test ❗


This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push.
If you push custom code to the preview branch, re-run this workflow to update the comment.
Last updated: 2026-08-12 23:57:27 UTC

@jklein24jklein24 left a comment

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.

I'm not sure this is only relevant for IncomingTransactions. If there's a realtime funded quote where the funding leg gets held, that would also apply here.

@ls-bolt

ls-boltBot commented Aug 12, 2026

Copy link
Copy Markdown
ContributorAuthor

Looking into this — I’ll trace whether a held real-time funding leg is represented on the outgoing transaction itself or as a separate incoming transaction, then update the schema accordingly.

Co-Authored-By: jklein24 <jklein24@users.noreply.github.com>
@ls-bolt
ls-boltBotforce-pushed the 08-12-AT-6319-incoming-compliance-context branch from 837ef1e to 5125e14CompareAugust 12, 2026 23:52
@ls-boltls-boltBot changed the title Add compliance context to incoming transactionsAdd compliance context to transactionsAug 12, 2026
@ls-bolt

ls-boltBot commented Aug 12, 2026

Copy link
Copy Markdown
ContributorAuthor

Applied. pendingReason now lives on the base Transaction, and COMPLIANCE_REJECTED is available on both incoming and outgoing failure reasons, so a real-time-funded outgoing transaction can expose the same compliance state.

jklein24 added a commit that referenced this pull request Aug 14, 2026
## Summary
- Add an optional `pendingReason` field to all transactions.
- Add provider-neutral reasons for customer action and compliance
review.
- Add `COMPLIANCE_REJECTED` to incoming and outgoing transaction failure
reasons.
## Test plan
- `make build`
- `make lint-openapi` (0 errors)
Original PR: #822
---------
Co-authored-by: jklein24 <jklein24@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@lightspark-bot@jklein24