Skip to main content
GET
/
api
/
x402
/
jobs
/
{jobId}
/
pay
curl -X GET "https://wurkapi.fun/api/x402/jobs/89e57c15/pay" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Accept: application/json"
{
  "x402Version": 1,
  "accepts": [
    {
      "scheme": "exact",
      "network": "solana",
      "maxAmountRequired": "2500000",
      "resource": "https://wurkapi.fun/api/x402/jobs/61038823/pay",
      "description": "",
      "mimeType": "",
      "payTo": "SAT8g2xU7AFy7eUmNJ9SNrM6yYo7LDCi13GXJ8Ez9kC",
      "asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
      "maxTimeoutSeconds": 60,
      "extra": {
        "feePayer": "2wKupLR9q6wXYppw8Gr2NvWxKBUqm4PPJKkQfoxHDBg4"
      }
    }
  ]
}

Authentication

X-API-Key
string
required
Your WURK API key
X-PAYMENT
string
required
Payment header generated by x402 client library. Required to complete the payment (second request)

Path Parameters

jobId
string
required
The job ID (8 character identifier returned from job creation)

Flow

This endpoint requires two requests to complete a payment:
  1. First Request (without X-PAYMENT): Returns 402 with payment requirements
  2. Second Request (with X-PAYMENT): Processes payment and returns 200 on success
The X-PAYMENT header is required to actually process the payment. Without it, you’ll only receive the payment requirements (402 response).

Response

First Request (402)

x402Version
number
x402 protocol version (currently 1)
accepts
array
Array of payment requirement objects with fields:
  • scheme: Payment scheme ("exact")
  • network: Blockchain network ("solana")
  • maxAmountRequired: Amount in smallest unit (e.g., "2500000" for 2.5 USDC)
  • resource: The payment endpoint URL
  • payTo: Recipient wallet address
  • asset: Token mint address (USDC: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v)
  • maxTimeoutSeconds: Payment timeout (typically 60)
  • extra: Additional data including feePayer address

Second Request (200)

ok
boolean
Always true on success
paid
boolean
true when payment is confirmed
jobId
string
The job ID that was paid
curl -X GET "https://wurkapi.fun/api/x402/jobs/89e57c15/pay" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Accept: application/json"
{
  "x402Version": 1,
  "accepts": [
    {
      "scheme": "exact",
      "network": "solana",
      "maxAmountRequired": "2500000",
      "resource": "https://wurkapi.fun/api/x402/jobs/61038823/pay",
      "description": "",
      "mimeType": "",
      "payTo": "SAT8g2xU7AFy7eUmNJ9SNrM6yYo7LDCi13GXJ8Ez9kC",
      "asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
      "maxTimeoutSeconds": 60,
      "extra": {
        "feePayer": "2wKupLR9q6wXYppw8Gr2NvWxKBUqm4PPJKkQfoxHDBg4"
      }
    }
  ]
}