Skip to content

[MPP 1/3] feat(sell): credit-card payment method — ServiceOffer CRD + --pay-with card#605

Open
bussyjd wants to merge 1 commit into
integration/v0.11.0-rc1from
feat/mpp-card-payment-method
Open

[MPP 1/3] feat(sell): credit-card payment method — ServiceOffer CRD + --pay-with card#605
bussyjd wants to merge 1 commit into
integration/v0.11.0-rc1from
feat/mpp-card-payment-method

Conversation

@bussyjd

@bussyjd bussyjd commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Part of the v0.11.0 MPP credit-card seller work → targets integration/v0.11.0-rc1.

What

Adds a payment-method-agnostic gate to ServiceOffer so sellers can accept credit-card payments (MPP / Stripe stripe.charge) alongside the existing x402 on-chain crypto path. This PR is the CRD surface + CLI flag; the verifier/controller card-settlement seam is a separate stacked spike.

ServiceOffer CRD (internal/monetizeapi/types.go, regenerated YAML + deepcopy)

  • payment.method discriminator: crypto (default, unchanged behavior) | card.
  • payment.card block — provider (stripe), account (acct_…), currency, networkId, paymentMethodTypes — the card analog of network/payTo.
  • payment.payTo/network are no longer unconditionally required; three CEL x-kubernetes-validations rules enforce per-method requirements at admission (payTo+network for crypto, card.account for card). The existing payTo ^0x…{40}$ pattern is preserved and only bites when present.

CLI (cmd/obol/sell.go)

obol sell http gains --pay-with (crypto|card), --stripe-account, --card-currency. The card branch skips wallet/chain/asset resolution and ERC-8004 registration (no on-chain identity). Crypto invocations are byte-for-byte unchanged. schemas.PaymentTerms gains parity Method/Card fields.

Validation

  • go test ./... green; go vet + gofmt clean; controller-gen produces no diff (generate-check passes).
  • Live k3d v1.35 smoke: 9/9 CRD admission cases (crypto + card accept/reject via CEL) + end-to-end obol sell http --pay-with card round-trip producing a valid stored CR.
  • Adversarial multi-agent review: 0 confirmed P0/P1; crypto path confirmed unchanged.

Notes

  • ERC-8004 registration is intentionally unsupported for card offers (errors on --register).

Introduce a second, payment-method-agnostic gate on ServiceOffer so sellers
can accept credit-card payments (MPP / Stripe stripe.charge) alongside the
existing x402 on-chain crypto path. This PR lands the CRD surface + CLI flag;
the verifier/controller card settlement seam is a separate spike.

ServiceOffer CRD (internal/monetizeapi/types.go, regenerated yaml + deepcopy):
- Add payment.method discriminator: "crypto" (default, unchanged behavior) |
  "card".
- Add payment.card block (provider=stripe, account=acct_..., currency,
  networkId, paymentMethodTypes) — the card analog of network/payTo.
- payment.payTo / payment.network are no longer unconditionally required;
  per-method requirements are enforced by three CEL x-kubernetes-validations
  rules so the API server rejects malformed offers at admission time
  (payTo+network required for crypto, card.account required for card). The
  existing payTo 0x-pattern is preserved and only applies when present.

CLI (cmd/obol/sell.go): `obol sell http` gains --pay-with (crypto|card),
--stripe-account and --card-currency. The card branch skips wallet/chain/asset
resolution and ERC-8004 registration (no on-chain identity), emitting a
method=card offer. Crypto invocations are byte-for-byte unchanged.

schemas.PaymentTerms gains parity Method/Card fields + EffectiveMethod().

Tests: CLI flag/resolver unit tests (cmd/obol), CRD card-schema + CEL test
(internal/embed). Smoke-verified on a live k3d v1.35 apiserver: 9/9 admission
cases (crypto/card accept+reject) and an end-to-end `obol sell http
--pay-with card` round-trip producing a valid stored CR.
@bussyjd bussyjd force-pushed the feat/mpp-card-payment-method branch from 3cf7c0e to f422bb8 Compare June 9, 2026 04:28
@bussyjd bussyjd changed the title feat(sell): MPP credit-card payment method — ServiceOffer CRD + obol sell http --pay-with card [MPP 1/3] feat(sell): credit-card payment method — ServiceOffer CRD + --pay-with card Jun 9, 2026
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.

1 participant