{
  "slug": "merge-paddle-with-hubspot-lifecycle",
  "title": "Merge paddle with hubspot lifecycle stages",
  "metaDescription": "Merge paddle with hubspot lifecycle stages. Paddle subscription state and HubSpot contact lifecycle. Merge Paddle and HubSpot in one Frontend / Web.",
  "headline": "SaaS funnel CRM sync endpoint",
  "category": "aggregation",
  "categoryLabel": "Multi-API Aggregation",
  "urgency": 8,
  "clientPlatform": "Frontend / Web",
  "upstreamServices": [
    "Paddle",
    "HubSpot"
  ],
  "searchIntentQuery": "merge paddle with hubspot lifecycle stages",
  "directAnswerSummary": "Paddle subscription state and HubSpot contact lifecycle in one view. For \"merge paddle with hubspot lifecycle stages\", store PADDLE_API_KEY, HUBSPOT_ACCESS_TOKEN in Secret Vault, call https://api.paddle.com/subscriptions/{{query.subscriptionId}} from a Worker, and let Frontend / Web hit only https://realcomposer.com/v1/workspace/merge-paddle-with-hubspot-lifecycle with an rc_live_ client token.",
  "problem": {
    "title": "Serial Paddle and HubSpot calls slow Frontend / Web pages",
    "explanation": "Each extra Paddle and HubSpot hop adds hundreds of milliseconds and another OAuth refresh path your UI must manage.",
    "risks": [
      "One slow upstream blocking an entire page",
      "Partial failures leaving UI in inconsistent states",
      "Duplicate auth refresh logic per service"
    ]
  },
  "solutionSteps": [
    {
      "stepNumber": 1,
      "title": "Store upstream credentials in Secret Vault",
      "description": "Create PADDLE_API_KEY, HUBSPOT_ACCESS_TOKEN vault entries, then bind them to this pipeline step headers with {{secrets.NAME}} placeholders."
    },
    {
      "stepNumber": 2,
      "title": "Target the real upstream URL",
      "description": "Configure headersTemplate to inject vault secrets, target https://api.paddle.com/subscriptions/{{query.subscriptionId}}, and Add output mapping fields that mirror the JSON contract your screen already expects."
    },
    {
      "stepNumber": 3,
      "title": "Call from Frontend / Web",
      "description": "Allowed origins on the token should list every Frontend / Web host that calls this URL.",
      "codeSnippet": "const res = await fetch('https://realcomposer.com/v1/workspace/merge-paddle-with-hubspot-lifecycle', {\n  headers: { Authorization: 'Bearer rc_live_your_token' }\n});"
    }
  ],
  "pipelineConfig": {
    "name": "Merge paddle with hubspot lifecycle stages",
    "method": "GET",
    "cacheTtlSeconds": 0,
    "authMode": "client_token",
    "steps": [
      {
        "stepKey": "paddle",
        "upstreamUrlTemplate": "https://api.paddle.com/subscriptions/{{query.subscriptionId}}",
        "httpMethod": "GET",
        "headersTemplate": {
          "Authorization": "Bearer {{secrets.PADDLE_API_KEY}}"
        },
        "timeoutMs": 3000
      },
      {
        "stepKey": "hubspot",
        "upstreamUrlTemplate": "https://api.hubapi.com/crm/v3/objects/contacts/{{query.contactId}}",
        "httpMethod": "GET",
        "headersTemplate": {
          "Authorization": "Bearer {{secrets.HUBSPOT_ACCESS_TOKEN}}"
        },
        "timeoutMs": 3000
      }
    ],
    "outputMapping": {
      "version": 1,
      "fields": [
        {
          "targetPath": "paddle.subscriptionId",
          "sourcePath": "data.id",
          "type": "string",
          "sourceStep": "paddle"
        },
        {
          "targetPath": "paddle.status",
          "sourcePath": "data.status",
          "type": "string",
          "sourceStep": "paddle"
        },
        {
          "targetPath": "hubspot.contactId",
          "sourcePath": "id",
          "type": "string",
          "sourceStep": "hubspot"
        },
        {
          "targetPath": "hubspot.email",
          "sourcePath": "properties.email",
          "type": "string",
          "sourceStep": "hubspot"
        }
      ]
    }
  },
  "sampleBloatedInput": {
    "requestId": "req_merge-pa",
    "upstreamLatencyMs": 142,
    "audit": {
      "region": "edge",
      "trace": "merge-paddle-with-hubspot-lifecycle"
    },
    "payload": {
      "id": "sample_id",
      "status": "active",
      "nested": {
        "tags": [
          "demo"
        ],
        "internal": true
      },
      "unused_blob": {
        "foo": "bar",
        "bar": "baz"
      }
    }
  },
  "sampleSlimmedOutput": {
    "paddle_subscriptionId": "sample",
    "paddle_status": "sample",
    "hubspot_contactId": "sample",
    "hubspot_email": "sample"
  },
  "curlSnippet": "curl -X GET \"https://realcomposer.com/v1/workspace/merge-paddle-with-hubspot-lifecycle\" \\\n  -H \"Authorization: Bearer rc_live_client_token\"",
  "faqs": [
    {
      "question": "Can Frontend / Web call Paddle without holding the production key?",
      "answer": "Point Frontend / Web at /recipes/merge-paddle-with-hubspot-lifecycle edge URL. RealComposer answers OPTIONS with Access-Control headers for allowed origins."
    },
    {
      "question": "Does POST traffic get cached?",
      "answer": "merge-paddle-with-hubspot-lifecycle keeps cache TTL at 0 because it uses POST upstream calls or per-user responses. Add ids to query strings before enabling GET cache."
    },
    {
      "question": "How do I rotate upstream credentials?",
      "answer": "Upstream steps in merge-paddle-with-hubspot-lifecycle honor timeoutMs and optional fallback JSON without leaking secrets."
    }
  ],
  "relatedRecipeSlugs": [
    "merge-salesforce-with-hubspot-api",
    "stitch-hubspot-contact-with-stripe-history"
  ],
  "updatedAt": "2026-11-20",
  "links": {
    "page": "https://realcomposer.com/recipes/merge-paddle-with-hubspot-lifecycle",
    "markdown": "https://realcomposer.com/recipes/merge-paddle-with-hubspot-lifecycle.md",
    "json": "https://realcomposer.com/recipes/merge-paddle-with-hubspot-lifecycle.json",
    "install": "https://realcomposer.com/dashboard/pipelines/new?recipe=merge-paddle-with-hubspot-lifecycle&via=agent"
  }
}