# Onboard a merchant (https://docs.chargeflow.io/docs/platforms/eaas/onboard-a-merchant)



Before Chargeflow can generate evidence for a merchant, you need to create a Chargeflow account entity for them. This account serves as the anchor for all of that merchant's disputes, evidence, and integrations within your platform.

## Create a merchant account [#create-a-merchant-account]

```
POST /public/2025-04-01/accounts
```

### Required fields [#required-fields]

| Field           | Type           | Description                                                                                              |
| --------------- | -------------- | -------------------------------------------------------------------------------------------------------- |
| `owner_name`    | string         | The account owner's full name. Used in evidence narratives.                                              |
| `business_name` | string         | The merchant's business name. Used in evidence narratives and enrichment.                                |
| `business_url`  | string (URI)   | The public URL of the merchant's website. Chargeflow enriches this with metadata to strengthen evidence. |
| `email`         | string (email) | The merchant owner's email address for login and contact purposes.                                       |

### Optional fields [#optional-fields]

| Field            | Type                   | Description                                                                                                                                                                      |
| ---------------- | ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ext_account_id` | string                 | Your internal ID for this merchant. Store this to easily look up the Chargeflow account later without tracking two separate IDs.                                                 |
| `status`         | `active` \| `inactive` | Account status. Defaults to `active`.                                                                                                                                            |
| `enrichments`    | object                 | Company-level context: industry, product types, payment models, policies, checkout flow, and buyer verification methods. More enrichment = stronger default evidence strategies. |

### Example request [#example-request]

```bash title="Terminal"
curl -X POST https://api.chargeflow.io/public/2025-04-01/accounts \
  -H "x-api-key: YOUR_PLATFORM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "owner_name": "Jane Smith",
    "business_name": "Acme Store",
    "business_url": "https://acme.com",
    "email": "jane@acme.com",
    "ext_account_id": "your_internal_id_123"
  }'
```

### Example response [#example-response]

```json title="Response"
{
  "id": "66e6ea9ecd94925a9f8060d9",
  "ext_account_id": "your_internal_id_123",
  "created_at": "2025-01-15T09:00:00Z",
  "owner_name": "Jane Smith",
  "business_name": "Acme Store",
  "business_url": "https://acme.com",
  "email": "jane@acme.com",
  "status": "active",
  "enrichments": null
}
```

<Callout type="warn" title="Warning">
  Store the returned `id` (the Chargeflow `account_id`) in your database. You will need it to submit
  disputes, generate evidence, and make all subsequent API calls on behalf of this merchant.
</Callout>

## Enriching merchant profiles [#enriching-merchant-profiles]

Providing the `enrichments` object at creation time (or updating it later) significantly improves Chargeflow's ability to tailor evidence strategies for the merchant's specific business model.

```bash title="Terminal"
curl -X POST https://api.chargeflow.io/public/2025-04-01/accounts \
  -H "x-api-key: YOUR_PLATFORM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "owner_name": "Jane Smith",
    "business_name": "Acme Store",
    "business_url": "https://acme.com",
    "email": "jane@acme.com",
    "ext_account_id": "your_internal_id_123",
    "enrichments": {
      "industry": "retail",
      "product_types": ["physical_goods"],
      "payment_models": ["single_payment"],
      "company_description": "Acme Store sells outdoor equipment direct to consumers.",
      "support_email": "support@acme.com",
      "policies": {
        "refund_url": "https://acme.com/refund-policy",
        "shipping_url": "https://acme.com/shipping-policy",
        "return_url": "https://acme.com/returns"
      }
    }
  }'
```

## Retrieve an account [#get-account-by-id]

Fetch a single merchant account by its Chargeflow ID, to confirm what you stored or read back the current `enrichments`.

```
GET /public/2025-04-01/accounts/{accountId}
```

| Parameter   | Description                                                |
| ----------- | ---------------------------------------------------------- |
| `accountId` | The Chargeflow account ID (`id` from the create response). |

```bash title="Terminal"
curl "https://api.chargeflow.io/public/2025-04-01/accounts/66e6ea9ecd94925a9f8060d9" \
  -H "x-api-key: YOUR_PLATFORM_API_KEY"
```

The response is the same account object returned by the create call above. A `404` means the `accountId` does not exist under your platform key; a `403` means the key itself is invalid or revoked (see [Monitor integration health](https://docs.chargeflow.io/docs/platforms/monitor-integration-health)).

## Next step [#next-step]

<Card title="Submit platform disputes" href="./submit-platform-disputes">
  Create the dispute records this account will anchor.
</Card>
