{
  "tool": {
    "slug": "stripe-signature",
    "title": "Stripe Signature",
    "category": "Webhook Safety",
    "description": "Verify Stripe webhook signatures with HMAC SHA-256 and timestamp tolerance checks.",
    "buyerIntent": "Use when an agent builds or tests webhook handlers and needs a cryptographic verification result.",
    "tokenValue": "Avoids model guessing around webhook security and replay windows.",
    "method": "POST",
    "rawBlueprintSlug": "stripe-webhook-signature-verifier",
    "priceUSDC": 0.012,
    "latencyTargetMs": 240,
    "status": "live-preview",
    "tags": [
      "stripe",
      "webhook",
      "hmac",
      "signature"
    ],
    "requestSchema": {
      "type": "object",
      "required": [
        "rawBody",
        "signatureHeader",
        "webhookSecret"
      ],
      "properties": {
        "rawBody": {
          "type": "string"
        },
        "signatureHeader": {
          "type": "string"
        },
        "webhookSecret": {
          "type": "string"
        },
        "toleranceSeconds": {
          "type": "integer",
          "default": 300
        }
      }
    },
    "responseSchema": {
      "type": "object",
      "properties": {
        "isValid": {
          "type": "boolean"
        },
        "timestamp": {
          "type": "integer"
        },
        "reason": {
          "type": "string"
        }
      }
    },
    "sampleRequest": {
      "rawBody": "{\"id\":\"evt_123\"}",
      "signatureHeader": "t=1778000000,v1=wrongsignaturevaluehere",
      "webhookSecret": "whsec_test",
      "toleranceSeconds": 99999999999
    },
    "sampleResponse": {
      "isValid": false,
      "timestamp": 1778000000,
      "reason": "Signature mismatch"
    },
    "endpoint": "/api/v1/agent-tools/stripe-signature/",
    "absoluteEndpoint": "https://elpa.space/api/v1/agent-tools/stripe-signature/",
    "pageUrl": "https://elpa.space/agent-tools/#stripe-signature",
    "rawBlueprintUrl": "https://elpa.space/raw/stripe-webhook-signature-verifier",
    "priceLabel": "0.012 USDC"
  },
  "payment": {
    "protocol": "x402",
    "implementation": "x402 v2 exact EVM facilitator with legacy Base USDC transaction-hash fallback",
    "network": "Base",
    "networkCaip2": "eip155:8453",
    "currency": "USDC",
    "tokenContract": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
    "recipientAddress": "0xd9d6ae1d5a2128fea511460fac8e4dea58baf153",
    "paymentHeaders": [
      "PAYMENT-SIGNATURE",
      "X-PAYMENT",
      "x402-tx-hash (legacy)"
    ],
    "challengeHeader": "PAYMENT-REQUIRED",
    "responseHeader": "PAYMENT-RESPONSE",
    "facilitatorEnv": [
      "X402_FACILITATOR_URL",
      "X402_FACILITATOR_AUTHORIZATION"
    ],
    "maxTimeoutSeconds": 120,
    "priceUSDC": 0.012,
    "x402": {
      "x402Version": 2,
      "resource": {
        "url": "https://elpa.space/api/v1/agent-tools/stripe-signature/",
        "description": "Verify Stripe webhook signatures with HMAC SHA-256 and timestamp tolerance checks.",
        "mimeType": "application/json",
        "serviceName": "ELPA Agent Tools",
        "tags": [
          "stripe",
          "webhook",
          "hmac",
          "signature"
        ],
        "iconUrl": "https://elpa.space/logo.svg"
      },
      "accepts": [
        {
          "scheme": "exact",
          "network": "eip155:8453",
          "amount": "12000",
          "asset": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
          "payTo": "0xd9d6ae1d5a2128fea511460fac8e4dea58baf153",
          "maxTimeoutSeconds": 120,
          "extra": {
            "name": "USDC",
            "version": "2",
            "decimals": 6
          }
        }
      ],
      "paymentRequired": {
        "x402Version": 2,
        "error": "PAYMENT-SIGNATURE header is required",
        "resource": {
          "url": "https://elpa.space/api/v1/agent-tools/stripe-signature/",
          "description": "Verify Stripe webhook signatures with HMAC SHA-256 and timestamp tolerance checks.",
          "mimeType": "application/json",
          "serviceName": "ELPA Agent Tools",
          "tags": [
            "stripe",
            "webhook",
            "hmac",
            "signature"
          ],
          "iconUrl": "https://elpa.space/logo.svg"
        },
        "accepts": [
          {
            "scheme": "exact",
            "network": "eip155:8453",
            "amount": "12000",
            "asset": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "payTo": "0xd9d6ae1d5a2128fea511460fac8e4dea58baf153",
            "maxTimeoutSeconds": 120,
            "extra": {
              "name": "USDC",
              "version": "2",
              "decimals": 6
            }
          }
        ],
        "extensions": {
          "bazaar": {
            "info": {
              "discoverable": true,
              "category": "Webhook Safety",
              "tags": [
                "stripe",
                "webhook",
                "hmac",
                "signature"
              ],
              "input": {
                "rawBody": "{\"id\":\"evt_123\"}",
                "signatureHeader": "t=1778000000,v1=wrongsignaturevaluehere",
                "webhookSecret": "whsec_test",
                "toleranceSeconds": 99999999999
              },
              "output": {
                "isValid": false,
                "timestamp": 1778000000,
                "reason": "Signature mismatch"
              }
            },
            "schema": {
              "type": "object",
              "properties": {
                "discoverable": {
                  "type": "boolean"
                },
                "category": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "input": {
                  "type": "object",
                  "required": [
                    "rawBody",
                    "signatureHeader",
                    "webhookSecret"
                  ],
                  "properties": {
                    "rawBody": {
                      "type": "string"
                    },
                    "signatureHeader": {
                      "type": "string"
                    },
                    "webhookSecret": {
                      "type": "string"
                    },
                    "toleranceSeconds": {
                      "type": "integer",
                      "default": 300
                    }
                  }
                },
                "output": {
                  "type": "object",
                  "properties": {
                    "isValid": {
                      "type": "boolean"
                    },
                    "timestamp": {
                      "type": "integer"
                    },
                    "reason": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "paymentRequiredBase64": "eyJ4NDAyVmVyc2lvbiI6MiwiZXJyb3IiOiJQQVlNRU5ULVNJR05BVFVSRSBoZWFkZXIgaXMgcmVxdWlyZWQiLCJyZXNvdXJjZSI6eyJ1cmwiOiJodHRwczovL2VscGEuc3BhY2UvYXBpL3YxL2FnZW50LXRvb2xzL3N0cmlwZS1zaWduYXR1cmUvIiwiZGVzY3JpcHRpb24iOiJWZXJpZnkgU3RyaXBlIHdlYmhvb2sgc2lnbmF0dXJlcyB3aXRoIEhNQUMgU0hBLTI1NiBhbmQgdGltZXN0YW1wIHRvbGVyYW5jZSBjaGVja3MuIiwibWltZVR5cGUiOiJhcHBsaWNhdGlvbi9qc29uIiwic2VydmljZU5hbWUiOiJFTFBBIEFnZW50IFRvb2xzIiw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OnsidHlwZSI6InN0cmluZyJ9LCJ0YWdzIjp7InR5cGUiOiJhcnJheSIsIml0ZW1zIjp7InR5cGUiOiJzdHJpbmcifX0sImlucHV0Ijp7InR5cGUiOiJvYmplY3QiLCJyZXF1aXJlZCI6WyJyYXdCb2R5Iiwic2lnbmF0dXJlSGVhZGVyIiwid2ViaG9va1NlY3JldCJdLCJwcm9wZXJ0aWVzIjp7InJhd0JvZHkiOnsidHlwZSI6InN0cmluZyJ9LCJzaWduYXR1cmVIZWFkZXIiOnsidHlwZSI6InN0cmluZyJ9LCJ3ZWJob29rU2VjcmV0Ijp7InR5cGUiOiJzdHJpbmcifSwidG9sZXJhbmNlU2Vjb25kcyI6eyJ0eXBlIjoiaW50ZWdlciIsImRlZmF1bHQiOjMwMH19fSwib3V0cHV0Ijp7InR5cGUiOiJvYmplY3QiLCJwcm9wZXJ0aWVzIjp7ImlzVmFsaWQiOnsidHlwZSI6ImJvb2xlYW4ifSwidGltZXN0YW1wIjp7InR5cGUiOiJpbnRlZ2VyIn0sInJlYXNvbiI6eyJ0eXBlIjoic3RyaW5nIn19fX19fX19",
      "facilitator": {
        "url": "https://api.cdp.coinbase.com/platform/v2/x402",
        "verify": "/verify",
        "settle": "/settle"
      },
      "legacy": {
        "enabled": true,
        "header": "x402-tx-hash",
        "note": "Legacy Base USDC transaction-hash receipts remain accepted for manual testing, but PAYMENT-SIGNATURE is the primary x402 path."
      }
    }
  }
}