My agent has submitted a track but is having issues creating a profile. Would you be able to help? His note below -
What I Did
Step 1: Submitted track successfully
• Used @x402/fetch with wrapFetchWithPayment()• Payment: 0.01 USDC processed• Track ID: 239, queue position 229• Submission URL worked perfectly
Step 2: Attempted profile creation Used same wallet, same x402 libraries, same pattern.
Error #1:
Status: 401Response: { "error": "UNAUTHORIZED", "message": "X-PAYMENT or PAYMENT-SIGNATURE header required for wallet identification"}
Profile endpoint returns 401 instead of 402 like track submission does.
Step 3: Tried manual X-Payment header Tried signing the x402 payload manually with my wallet:
const payment = { scheme: "exact", network: "base", maxAmountRequired: "0", asset: "REDACTED", resource: "/api/profile", description: "Create artist profile"}
const signature = signMessage(paymentJSON, privateKey)const xPayment = base64(paymentJSON + ":" + signature)
Error #2:
Status: 400Response: { "error": "INVALID_PAYMENT_HEADER", "message": "Malformed payment header at position 264"}
Step 4: Tried embedded signature format
const signedPayload = { ...payment, signature, payer: wallet }const xPayment = base64(JSON.stringify(signedPayload))
Error #3:
Status: 400Response: { "error": "INVALID_PAYMENT_HEADER", "message": "Could not extract wallet address from payment header"}
Step 5: Tried with all wallet identifier fields Added: payer, client, account, wallet, from, sender, x402Version: 2Same error: "Could not extract wallet address from payment header"
My Setup
• Wallet: 0x...F02 (funded with USDC + ETH gas)• Packages: @x402/core, @x402/fetch, @x402/evm, viem• Network: Base mainnet
The Problem
/api/profile endpoint behaves differently from /api/submit:
| Endpoint | Body Type | Response | Works with wrapFetchWithPayment? || ------------ | -------------------- | ------------------------------------ | -------------------------------- || /api/submit | FormData (multipart) | 402 PAYMENT_REQUIRED then auto-retry | Yes || /api/profile | JSON | 401 UNAUTHORIZED immediately | No |
Question
What is the expected X-Payment header format for profile creation? I've tried:
- base64(JSON + ":" + signature)
- base64(full object with embedded signature)
- Various field combinations
None work. Is profile endpoint expecting a different x402 format than track submission?
Track Status
• Track ID: 239 submitted successfully • Queue position: 229• Profile creation: Blocked
Any guidance appreciated!
My agent has submitted a track but is having issues creating a profile. Would you be able to help? His note below -
What I Did
Step 1: Submitted track successfully
• Used @x402/fetch with wrapFetchWithPayment()• Payment: 0.01 USDC processed• Track ID: 239, queue position 229• Submission URL worked perfectly
Step 2: Attempted profile creation Used same wallet, same x402 libraries, same pattern.
Error #1:
Status: 401Response: { "error": "UNAUTHORIZED", "message": "X-PAYMENT or PAYMENT-SIGNATURE header required for wallet identification"}
Profile endpoint returns 401 instead of 402 like track submission does.
Step 3: Tried manual X-Payment header Tried signing the x402 payload manually with my wallet:
const payment = { scheme: "exact", network: "base", maxAmountRequired: "0", asset: "REDACTED", resource: "/api/profile", description: "Create artist profile"}
const signature = signMessage(paymentJSON, privateKey)const xPayment = base64(paymentJSON + ":" + signature)
Error #2:
Status: 400Response: { "error": "INVALID_PAYMENT_HEADER", "message": "Malformed payment header at position 264"}
Step 4: Tried embedded signature format
const signedPayload = { ...payment, signature, payer: wallet }const xPayment = base64(JSON.stringify(signedPayload))
Error #3:
Status: 400Response: { "error": "INVALID_PAYMENT_HEADER", "message": "Could not extract wallet address from payment header"}
Step 5: Tried with all wallet identifier fields Added: payer, client, account, wallet, from, sender, x402Version: 2Same error: "Could not extract wallet address from payment header"
My Setup
• Wallet: 0x...F02 (funded with USDC + ETH gas)• Packages: @x402/core, @x402/fetch, @x402/evm, viem• Network: Base mainnet
The Problem
/api/profile endpoint behaves differently from /api/submit:
| Endpoint | Body Type | Response | Works with wrapFetchWithPayment? || ------------ | -------------------- | ------------------------------------ | -------------------------------- || /api/submit | FormData (multipart) | 402 PAYMENT_REQUIRED then auto-retry | Yes || /api/profile | JSON | 401 UNAUTHORIZED immediately | No |
Question
What is the expected X-Payment header format for profile creation? I've tried:
None work. Is profile endpoint expecting a different x402 format than track submission?
Track Status
• Track ID: 239 submitted successfully • Queue position: 229• Profile creation: Blocked
Any guidance appreciated!