Skip to content

Client Node Reference

Complete configuration reference for the x402 Client node in n8n.

ValueDescriptionUse Case
savedSaved Wallet (Recommended)Workflows with persistent wallet needs
privateKeyPrivate Key (Reusable)Trigger-based workflows
externalFrom Wallet Manager NodeDynamic wallet management
autoAuto-Generate Per NodeQuick testing only

Default: saved

ValueDescription
solana-devnetSolana Devnet (testing)
solana-mainnetSolana Mainnet (production)

Default: solana-devnet

Type: String (required)

The full URL of the x402-enabled API endpoint.

Examples:

https://api.example.com/premium-data
http://localhost:3000/webhook/test-api
https://your-n8n.com/webhook/9bb44e4d-9e52-442b-a4fb-53ea7029ef1c/n
ValueDescription
GETRetrieve data
POSTSend data
PUTUpdate resource
DELETERemove resource

Default: POST

Type: JSON string

Default: {}

Only shown for: POST and PUT requests

The request body to send to the API.

Static example:

{
"query": "search term",
"limit": 10
}

Dynamic example:

{
"userId": "{{$json.userId}}",
"timestamp": "{{new Date().toISOString()}}",
"data": "{{$json.inputData}}"
}

Type: Collection

Custom HTTP headers to include in the request.

Structure:

Name: Header name (e.g., "X-API-Key")
Value: Header value (e.g., "abc123" or "{{$json.apiKey}}")

Common headers:

  • Authorization: Bearer {{$json.token}}
  • X-API-Key: {{$json.apiKey}}
  • Content-Type: application/json
  • User-Agent: n8n-x402-client/1.0

Type: Boolean

Default: true

When enabled:

  • Automatically handles 402 responses
  • Creates and signs payments
  • Retries with payment proof
  • Returns protected data

When disabled:

  • Throws error on 402 response
  • Useful for manual payment handling

Type: Number

Default: 1

Only shown when: Auto-Pay is enabled

Maximum USDC amount willing to pay per request. Acts as a safety limit.

Recommended values:

  • Development: 0.10
  • Production: 1.00
  • High-value APIs: 5.00
  • Mission-critical: 10.00

Type: Options

Default: official

Only shown when: Auto-Pay is enabled

ValueDescriptionUse Case
officialOfficial X-402 ProtocolStandard x402 servers
legacySigned TransactionCustom implementations

Official X-402 Protocol:

  • Signature-based payment proof
  • No blockchain transaction sent
  • Fast and efficient
  • Standard compliant

Signed Transaction (Legacy):

  • Pre-signed Solana transaction
  • Can be settled on-chain
  • Compatible with custom servers
  • Requires more processing

Show Transaction Details

Type: Boolean

Default: false

When enabled, includes additional payment metadata in output:

{
"_x402Payment": {
"scheme": "exact",
"resource": "/api/data",
"network": "solana-devnet"
}
}

Clear Saved Wallet

Type: Boolean

Default: false

Only for: “Saved Wallet” mode

Clears the saved wallet. Next run will require Wallet Manager connection to set up new wallet.

Reset Wallet

Type: Boolean

Default: false

Only for: “Auto-Generate” mode

Generates a new wallet for this node instance.

Expected input when using “From Wallet Manager Node” mode:

{
"walletAddress": "9rKnvE7...",
"privateKey": "[1,2,3,...]",
"network": "solana-devnet",
"balances": {
"usdc": 10.5,
"sol": 1.2
},
"ready": true
}

On first connection from Wallet Manager, wallet data is saved:

{
"privateKey": "[1,2,3,...]",
"walletAddress": "9rKnvE7...",
"network": "solana-devnet"
}

After this, no input needed - wallet is persistent.

{
// API response data
"result": "your data",
"status": "success",
// Payment metadata
"_x402Payment": {
"amount": "0.01",
"currency": "USDC",
"recipient": "ABC123...",
"sender": "9rKnvE7...",
"network": "solana-devnet",
"timestamp": "2024-01-15T10:30:00.000Z"
}
}

If endpoint doesn’t require payment:

{
"result": "your data",
"status": "success"
}

No _x402Payment field.

When “Continue On Fail” is enabled:

{
"error": "Insufficient balance!",
"walletAddress": "9rKnvE7...",
"timestamp": "2024-01-15T10:30:00.000Z"
}

Access data in subsequent nodes:

{
{
$json._x402Payment !== undefined;
}
}
{
{
$json._x402Payment.amount;
}
}
{
{
$json.result;
}
}
{
{
$json.data;
}
}
{
{
$json;
}
} // Full response
{
{
$json._x402Payment ? "Paid request" : "Free request";
}
}
Insufficient balance!
Wallet: 9rKnvE7PVbpq4...
USDC: 0.005
SOL: 0.5
• Get USDC: https://spl-token-faucet.com/?token-name=USDC-Dev
• Get SOL: https://faucet.solana.com/
After funding, re-run this workflow.
Payment required (0.50 USDC) exceeds max payment limit (0.10 USDC)
No wallet data found. Please connect the "x402 Wallet Manager"
node output to this node's input.
Payment was not accepted. Status: 400
Error: Amount mismatch
Check mock server logs for details.

Use expressions in Resource URL:

https://api.example.com/{{$json.endpoint}}

Different limits based on conditions:

[IF] User is premium?
├─ YES → [Client] Max: 5.00
└─ NO → [Client] Max: 0.10

Call multiple endpoints with same wallet:

[Wallet Manager]
[Client 1] API A (0.01 USDC)
[Client 2] API B (0.02 USDC)
[Client 3] API C (0.05 USDC)
Total spent: 0.08 USDC from same wallet

Forward headers from trigger:

// In Headers configuration
Name: {
{
$json.headerName;
}
}
Value: {
{
$json.headerValue;
}
}