Skip to content

docs(java): add solana x402 payment flow example#614

Open
sammccord wants to merge 2 commits intomainfrom
sammccord/add-solana-tx-x402-example
Open

docs(java): add solana x402 payment flow example#614
sammccord wants to merge 2 commits intomainfrom
sammccord/add-solana-tx-x402-example

Conversation

@sammccord
Copy link
Copy Markdown
Contributor

Description

  • Adds a new Java example (SignTransactionX402.java) demonstrating the end-to-end x402 payment flow on Solana
  • Registers a runSolanaSignTransactionX402 Gradle task to run the example
    What it does
    The example walks through the full x402 Solana payment lifecycle:
  1. Query supported x402 payment kinds via the X402FacilitatorApi
  2. Create a CDP-managed Solana account as the payer
  3. Build an unsigned SOL transfer using the SDK's SolanaTransactionBuilder.buildNativeTransfer()
  4. Sign the transaction via CDP (sign-only, no broadcast) — the core x402 pattern where the signed transaction becomes a payment payload rather than being sent directly on-chain
  5. Assemble and verify the x402 payment by constructing the v1 payment payload/requirements and calling the facilitator's verify endpoint

Tests

Checklist

A couple of things to include in your PR for completeness:

  • Updated the typescript README if relevant
  • Updated the python README if relevant
  • Added a changelog entry
  • Added e2e tests if introducing new functionality

@cb-heimdall
Copy link
Copy Markdown

cb-heimdall commented Feb 28, 2026

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@sammccord sammccord marked this pull request as ready for review February 28, 2026 16:55
@sammccord sammccord requested review from 0xRAG and sddioulde March 2, 2026 16:56
@sammccord sammccord force-pushed the sammccord/add-solana-tx-x402-example branch from 965fa12 to 96404da Compare March 2, 2026 16:57
@cb-heimdall
Copy link
Copy Markdown

Review Error for Naughtyknucks @ 2026-03-05 22:51:15 UTC
User failed mfa authentication, either user does not exist or public email is not set on your github profile. \ see go/mfa-help

@cb-heimdall
Copy link
Copy Markdown

Review Error for Dhfred @ 2026-03-18 17:36:25 UTC
User failed mfa authentication, either user does not exist or public email is not set on your github profile. \ see go/mfa-help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants