Skip to content

revert(x402): drop client-side builder-code service code stamping#4

Open
VickyXAI wants to merge 1 commit into
mainfrom
revert/client-service-code
Open

revert(x402): drop client-side builder-code service code stamping#4
VickyXAI wants to merge 1 commit into
mainfrom
revert/client-service-code

Conversation

@VickyXAI

@VickyXAI VickyXAI commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

What

Reverts the client-side builder-code service code (s: ["blockrun"]) stamping added in #2. This SDK no longer tags payments with a builder code.

Why

We decided attribution should live server-side as the app code (a), not client-side as the service code (s):

  • Role: BlockRun is the seller (the app exposing the paid endpoint), not a payment intermediary. The semantically-correct slot is a, set by the server on its 402 — not s stamped by the buyer SDK.
  • Coverage: server-side a attributes every payment to BlockRun regardless of which client the buyer uses; client-side s only caught payments made through this specific Go SDK.
  • Single control point: a is set once in the server (tracked in BlockRunAI/blockrun#199) instead of duplicated across every SDK (Go/Python/TS).
  • Data: avoids handing CDP a branded, aggregated view of BlockRun's payment volume from the buyer side.

Changes

  • Remove withBuilderCodeServiceCode() and BlockRunServiceCode from x402.go.
  • CreatePaymentPayload passes the server-provided extensions through unchanged — any echoed app code a is still preserved.
  • Delete x402_test.go (it only covered the removed service-code behavior).

Test

go build ./..., go vet ./..., go test ./... all green.

Follow-up

Seller-side app code a (using registered builder code bc_5hucoh0l) to be implemented in the blockrun server repo — BlockRunAI/blockrun#199.

Reverts the client-side `s: ["blockrun"]` service-code tagging added in #2.
BlockRun is the seller/app, not a payment intermediary, so attribution
belongs in the seller-side app code (`a`) set by the server on its 402 —
not stamped onto every payment this client SDK signs. Removing it also
avoids handing CDP a branded, aggregated view of BlockRun's payment volume
from the buyer side.

- Drop withBuilderCodeServiceCode() and BlockRunServiceCode from x402.go
- CreatePaymentPayload passes server extensions through unchanged (any
  echoed app code `a` is still preserved)
- Remove x402_test.go (covered only the removed service-code behavior)
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