Authentication
Your WURK API key
Payment header generated by x402 client library. Required to complete the payment (second request)
Path Parameters
The job ID (8 character identifier returned from job creation)
Flow
This endpoint requires two requests to complete a payment:
- First Request (without X-PAYMENT): Returns
402with payment requirements - Second Request (with X-PAYMENT): Processes payment and returns
200on success
Response
First Request (402)
x402 protocol version (currently 1)
Array of payment requirement objects with fields:
scheme: Payment scheme ("exact")network: Blockchain network ("base")maxAmountRequired: Amount in smallest unit (e.g.,"2500000"for 2.5 USDC)resource: The payment endpoint URLpayTo: Recipient wallet addressasset: USDC contract address on Base (0x833589fcd6edb6e08f4c7c32d4f71b54bda02913)maxTimeoutSeconds: Payment timeout (typically 60)extra: Additional data including:chainId: Base mainnet chain ID (8453)decimals: USDC decimals (6)eip712: EIP-712 domain parametersname: Token name ("USD Coin")version: EIP-712 version ("2")
Second Request (200)
Always
true on successtrue when payment is confirmedThe job ID that was paid
Optional header containing settlement details (transaction hash, network)
Implementation Examples
Hosted Payment UI
You can also use a hosted payment interface for wallet-based payments:Common Errors
simulation_reverted: Usually means insufficient USDC balance. Ensure the payer wallet has at least the maxAmountRequired amount of USDC on Base (remember USDC has 6 decimals).invalid_exact_evm_payload_signature: EIP-712 domain mismatch. The x402-axios interceptor handles this automatically, but if building manually, ensure you use the exact fields from accepts.extra.Technical Details
EIP-3009 Authorization
The Base implementation uses EIP-3009 (transferWithAuthorization) for USDC transfers. The x402 library automatically:- Creates an EIP-712 typed data structure
- Signs the authorization with your private key
- Encodes it in the X-PAYMENT header
- The facilitator verifies and executes the transfer on-chain
Prerequisites
- EVM wallet with USDC on Base mainnet (chainId: 8453)
- Sufficient USDC balance (check
maxAmountRequired) - Optional: Base RPC endpoint for balance checks
Network Information
- Chain: Base Mainnet
- Chain ID: 8453
- USDC Contract:
0x833589fcd6edb6e08f4c7c32d4f71b54bda02913 - Payment Receiver:
0xF00DAF15713e82fBb7bDC4b818444D93D655DE96
