For Platforms

Quickstart

Generate your first AI dispute evidence package as a platform, from API key to bank-ready PDF, in four steps.

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 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.

Get your platform API key

  1. Log in to the Chargeflow Connect dashboard.
  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?.

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.

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" }
  }'

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.

Response
{ "id": "ev_abc123456789", "status": "in_progress", "file_url": null, "file_version": 1 }

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.

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
  }
});

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

Terminal
curl -X GET https://api.chargeflow.io/public/2025-04-01/evidence/ev_abc123456789 \
  -H "x-api-key: YOUR_PLATFORM_API_KEY"

Next steps

Was this page helpful?

On this page