# Quickstart (https://docs.chargeflow.io/docs/platforms/quickstart)



Get a platform integration running in four steps. By the end you will have authenticated, generated an AI evidence package for a merchant's dispute, received the `evidence.ready` webhook, and fetched the bank-ready PDF.

This is the &#x2A;*Evidence-as-a-Service (EaaS)** flow: your platform supplies dispute data, Chargeflow returns a polished PDF in about 30 seconds. Merchants never call it directly. New here? Start with the [Platforms overview](https://docs.chargeflow.io/docs/platforms/overview).

<Steps>
  <Step>
    ## Get your platform API key [#get-your-platform-api-key]

    1. Log in to the [Chargeflow Connect dashboard](https://app.chargeflow.io/auth/sign-in).
    2. Navigate to **Settings → Developers**.
    3. Click **Generate Keys** and copy your **API Access Key**.

    EaaS must be enabled on your Connect account by your Chargeflow account manager. Without it, every EaaS call returns `403_eaas_not_enabled`. See [What is EaaS?](https://docs.chargeflow.io/docs/platforms/eaas/introduction).
  </Step>

  <Step>
    ## Generate evidence [#generate-evidence]

    `POST /public/2025-04-01/evidence` accepts an existing `dispute_id` or a full inline dispute object. The dispute must be in `needs_response` status.

    <Tabs items="['curl', 'Node.js', 'Python']">
      <Tab value="curl">
        ```bash title="Terminal"
        curl -X POST https://api.chargeflow.io/public/2025-04-01/evidence \
          -H "x-api-key: YOUR_PLATFORM_API_KEY" \
          -H "Content-Type: application/json" \
          -d '{
            "account_id": "66e6ea9ecd94925a9f8060d9",
            "dispute": { "dispute_id": "66e6ea9ecd94925a9f8060d9" }
          }'
        ```
      </Tab>

      <Tab value="Node.js">
        ```javascript title="Node.js"
        const res = await fetch('https://api.chargeflow.io/public/2025-04-01/evidence', {
          method: 'POST',
          headers: {
            'x-api-key': process.env.CHARGEFLOW_PLATFORM_API_KEY,
            'Content-Type': 'application/json',
          },
          body: JSON.stringify({
            account_id: '66e6ea9ecd94925a9f8060d9',
            dispute: { dispute_id: '66e6ea9ecd94925a9f8060d9' },
          }),
        });
        const data = await res.json();
        ```
      </Tab>

      <Tab value="Python">
        ```python title="Python"
        import os, requests

        res = requests.post(
            "https://api.chargeflow.io/public/2025-04-01/evidence",
            headers={"x-api-key": os.environ["CHARGEFLOW_PLATFORM_API_KEY"]},
            json={
                "account_id": "66e6ea9ecd94925a9f8060d9",
                "dispute": {"dispute_id": "66e6ea9ecd94925a9f8060d9"},
            },
        )
        data = res.json()
        ```
      </Tab>
    </Tabs>

    The API responds immediately with `in_progress`. Generation is asynchronous, so the PDF is not in this response, store the `id` as your permanent reference.

    ```json title="Response"
    { "id": "ev_abc123456789", "status": "in_progress", "file_url": null, "file_version": 1 }
    ```
  </Step>

  <Step>
    ## Receive the evidence. ready webhook [#receive-the-evidence-ready-webhook]

    Do not poll in a tight loop. Subscribe to `evidence.ready` and `evidence.error` in the Connect Developer Hub, then let Chargeflow push the result when the PDF is ready.

    ```javascript title="Node.js"
    app.post('/webhook', express.json(), (req, res) => {
      const event = req.body;
      res.json({ received: true }); // acknowledge first

      if (event.event?.type === 'evidence.ready') {
        const { id, file_url } = event.evidence;
        saveEvidencePdf(id, file_url); // download and submit to your PSP
      }
    });
    ```
  </Step>

  <Step>
    ## Fetch the latest evidence link [#fetch-the-latest-evidence-link]

    The download link expires 7 days after it is issued. Read the evidence record by `id` any time for a fresh link:

    <Tabs items="['curl', 'Node.js', 'Python']">
      <Tab value="curl">
        ```bash title="Terminal"
        curl -X GET https://api.chargeflow.io/public/2025-04-01/evidence/ev_abc123456789 \
          -H "x-api-key: YOUR_PLATFORM_API_KEY"
        ```
      </Tab>

      <Tab value="Node.js">
        ```javascript title="Node.js"
        const res = await fetch('https://api.chargeflow.io/public/2025-04-01/evidence/ev_abc123456789', {
          method: 'GET',
          headers: {
            'x-api-key': process.env.CHARGEFLOW_PLATFORM_API_KEY,
          },
        });
        const data = await res.json();
        ```
      </Tab>

      <Tab value="Python">
        ```python title="Python"
        import os, requests

        res = requests.get(
            "https://api.chargeflow.io/public/2025-04-01/evidence/ev_abc123456789",
            headers={"x-api-key": os.environ["CHARGEFLOW_PLATFORM_API_KEY"]},
        )
        data = res.json()
        ```
      </Tab>
    </Tabs>
  </Step>
</Steps>

## Next steps [#next-steps]

<Cards>
  <Card title="Generate evidence in seconds" href="/docs/platforms/eaas/generate-evidence-in-10s">
    The full copy-paste-runnable flow, including regeneration.
  </Card>

  <Card title="How EaaS works" href="/docs/platforms/eaas/how-it-works">
    Connect account setup and webhook payload shapes.
  </Card>

  <Card title="Authentication" href="/docs/reference/api-fundamentals/authentication">
    HMAC signatures and production-grade key handling.
  </Card>

  <Card title="Onboard a merchant" href="/docs/platforms/eaas/onboard-a-merchant">
    Create and manage merchant accounts via the API.
  </Card>
</Cards>
