---
title: "Set connector credentials"
method: POST
path: "/merchant-account/{merchantId}/connectors/{connector}/credentials"
tags: ["Cost Ingestion"]
---

# Set connector credentials

`POST /merchant-account/{merchantId}/connectors/{connector}/credentials`

## Request

- Base URL: `http://localhost:8080`
- URL: `http://localhost:8080/merchant-account/{merchantId}/connectors/{connector}/credentials`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`

Store the webhook secret and report-download credential for one registered connector account. Unregistered connector IDs are rejected with HTTP 400 before credentials are encoded or saved.

## Path parameters

- `merchantId` string, required
- `connector` string, required

## Request body

- SetCredentialsRequest
  - `account` string, required: Connector-side account, e.g. Adyen `merchantAccountCode`.
  - `webhook_secret` string, required: Secret used to verify inbound webhook signatures.
  - `download_auth` string, required: For Checkout, the secret key is treated as an opaque credential; the API URL is selected from server configuration using environment. For Adyen, Basic auth as user:password or a Report Service API key (X-API-Key). For Chase, JSON authentication credentials; token_url and reports_url fields are ignored in favor of server configuration.
  - `environment` 'prod' | 'sandbox': Checkout only. Selects the report API URL from cost_ingestion.connector server configuration; omitted means production. Missing endpoint settings default to https://api.checkout.com and https://api.sandbox.checkout.com. The backend stores the existing secret_key/api_base_url JSON internally.

## Response `200`

Credentials stored

- SetCredentialsResponse
  - `merchant_id` string
  - `connector` string
  - `account` string
  - `status` string

## Changes

- **2026-10-29** `e7a7c4f81711`: 1 info
  - added the new optional request property `environment`
- **2026-08-04** `36e7a0972ee6`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/juspay/apis/decision-engine/changes/merchant-account/:merchantId/connectors/:connector/credentials/post.md)

---

[API](https://skmtc.dev/juspay/apis/decision-engine.md) - [All operations](https://skmtc.dev/juspay/apis/decision-engine/llms.txt) - [OpenAPI document](https://skmtc.dev/juspay/apis/decision-engine/revisions/718ef5ac8634?raw)
