docs: add wfcompute settlement handoff#19
Open
intel352 wants to merge 3 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds end-to-end support and documentation for handing off Stripe stablecoin “deposit mode” PaymentIntents to workflow-compute, including a new step type and typed contracts to surface deposit-address evidence.
Changes:
- Introduces
step.payment_stablecoin_deposit_intent(typed + untyped) and wires it into the plugin manifest/contracts and provider interface. - Implements Stripe deposit-mode stablecoin PaymentIntent creation (Stripe-Version preview) and adds PayPal “not supported” handling.
- Adds docs covering wfcompute settlement handoff and updates setup/readme references.
Reviewed changes
Copilot reviewed 23 out of 25 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Adds stablecoin step description and wfcompute settlement doc pointer. |
| docs/WFCOMPUTE-SETTLEMENT.md | New handoff guide mapping step outputs to wfcompute CLI reconciliation/import commands. |
| docs/SETUP.md | Documents Stripe stablecoin deposit intent step usage and expected outputs. |
| plugin.json | Bumps min engine version; registers new step type + schema. |
| plugin.contracts.json | Adds strict typed contract entries for the new step. |
| proto/payments/v1/payments.proto | Defines typed config/input/output messages for stablecoin deposit intent + addresses. |
| proto/payments/v1/payments.pb.go | Regenerated Go bindings for the new proto messages. |
| payments/types.go | Adds shared Go types for stablecoin deposit intents and deposit addresses. |
| payments/provider.go | Extends PaymentProvider with CreateStablecoinDepositIntent. |
| internal/contracts.go | Registers the new step contract in the in-process registry. |
| internal/plugin.go | Registers the new step in StepTypes and step factory switch. |
| internal/typed.go | Adds typed-step handler + wiring for stablecoin deposit intent. |
| internal/typed_test.go | Adds typed-step happy-path test and minor formatting tweaks. |
| internal/helpers.go | Moves/expands string-slice parsing helpers (incl. CSV string support). |
| internal/step_stablecoin_deposit.go | Adds untyped (map-based) step implementation for stablecoin deposit intent. |
| internal/step_core_test.go | Adds untyped stablecoin step test. |
| internal/provider_stripe.go | Implements Stripe stablecoin deposit-mode PaymentIntent creation + response parsing for addresses. |
| internal/provider_stripe_test.go | Adds Stripe provider tests for stablecoin request formation + unsupported network validation. |
| internal/provider_paypal.go | Implements stablecoin deposit intent as “not supported” for PayPal provider. |
| internal/mock_provider_test.go | Extends mock provider to support stablecoin deposit intents for tests. |
| internal/integration_test.go | Updates expected step-type count to include the new step. |
| internal/step_webhook_endpoint_ensure.go | Removes local slice helpers in favor of shared helpers. |
| internal/step_webhook_endpoint_ensure_test.go | Updates tests to use shared toStringSlice behavior (CSV support). |
| go.mod | Bumps github.com/GoCodeAlone/workflow dependency to v0.53.1. |
| go.sum | Updates sums after dependency bump and transitive cleanup. |
Files not reviewed (1)
- proto/payments/v1/payments.pb.go: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+202
to
+210
| pi, err := paymentintent.New(params) | ||
| if err != nil { | ||
| return nil, fmt.Errorf("stripe CreateStablecoinDepositIntent: %w", err) | ||
| } | ||
| addresses := stripeStablecoinDepositAddresses(pi, stablecoin) | ||
| return &payments.StablecoinDepositIntent{ | ||
| ID: pi.ID, | ||
| ClientSecret: pi.ClientSecret, | ||
| Status: string(pi.Status), |
| } `json:"crypto_display_details"` | ||
| } `json:"next_action"` | ||
| } | ||
| if err := json.Unmarshal(pi.LastResponse.RawJSON, &raw); err != nil { |
| "tier": "core", | ||
| "private": false, | ||
| "minEngineVersion": "0.51.2", | ||
| "minEngineVersion": "0.53.0", |
Comment on lines
68
to
+72
| Every step takes a `module` config field selecting the `payments.provider` module instance to dispatch to (defaults to `payments`). Outputs are scalar string/bool/number across the gRPC structpb boundary so they round-trip cleanly through pipeline state. | ||
|
|
||
| `step.payment_stablecoin_deposit_intent` is Stripe-only private-preview support for [Stripe deposit-mode stablecoin payments](https://docs.stripe.com/payments/deposit-mode-stablecoin-payments). It creates a confirmed `crypto` PaymentIntent with `mode=deposit`, requests deposit addresses for `base`, `tempo`, and/or `solana`, and returns address/token details for downstream settlement evidence. The step intentionally fails closed outside the documented USDC networks. | ||
|
|
||
| For provider workflows that hand stablecoin evidence to `workflow-compute`, see [`docs/WFCOMPUTE-SETTLEMENT.md`](docs/WFCOMPUTE-SETTLEMENT.md). |
Comment on lines
5
to
9
| require ( | ||
| github.com/GoCodeAlone/workflow v0.51.6 | ||
| github.com/GoCodeAlone/workflow v0.53.1 | ||
| github.com/stripe/stripe-go/v82 v82.5.1 | ||
| google.golang.org/protobuf v1.36.11 | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Verification