Skip to content

[Advanced] Minimal Go client for the x402 pay flow (Stellar) #32

Description

@Eras256

Difficulty: Advanced (senior · 8/10). ~16–24h. Go + Stellar transaction signing + x402. A brand-new language surface for the toolkit.

Context

The toolkit ships TypeScript and Python clients but nothing for Go — a very common language for backends and agents. A minimal Go x402 client opens the ecosystem to a new set of builders.

Goal

A small, self-contained Go module under examples/go-x402/ that pays an x402-protected Stellar endpoint.

Scope / Deliverables

  1. Given a URL + a Stellar secret, perform the full 402 flow: read the payment requirements, build and sign the Stellar auth entry, and retry the request with the payment credential.
  2. Signing via the official Stellar Go SDK.
  3. Config via env; the secret is never logged.
  4. A clear README and a runnable main.go demo.
  5. Tests for challenge parsing + payment-header construction against a mock server (go test).

Acceptance criteria

  • Pays a real x402 endpoint on testnet end-to-end (include a tx hash that resolves on stellar.expert in the PR).
  • go test passes and go vet is clean; no secrets committed; idiomatic Go (error handling, no panics on the happy path).

Pointers

  • github.com/stellar/go; x402 v2, scheme exact; USDC SAC (testnet) CBIELTK6YBZJU5UP2WWQEUCYKLPU6AUNZ2BQ4WWFEIE3USCIHMXQDAMA; facilitator channels.openzeppelin.com/x402/testnet.

Reward

Eligibility is subject to GrantFox review after the campaign (Official Campaign | FWC26). Rewards are decided by GrantFox based on quality and available budget and are not guaranteed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions