---
title: "Create credentials for a gateway account"
method: POST
path: "/v1/api/accounts/{accountId}/credentials"
tags: ["Gateway account credentials"]
---

# Create credentials for a gateway account

`POST /v1/api/accounts/{accountId}/credentials`

## Request

- The document declares no server URL.
- Auth: none declared

## Path parameters

- `accountId` integer, required

## Request body

- GatewayAccountCredentialsRequest
  - `credentials` object
  - `payment_provider` string: Payment provider. Accepted values - stripe, worldpay, adyen

## Response `200`

OK

- GatewayAccountCredentialsWithInternalId
  - `active_end_date` string, date-time
  - `active_start_date` string, date-time
  - `created_date` string, date-time
  - `credentials` union
    - object
      - `gateway_merchant_id` string
      - `one_off_customer_initiated` WorldpayMerchantCodeCredentials
        - `merchant_code` string
        - `username` string
      - `recurring_customer_initiated` WorldpayMerchantCodeCredentials
        - `merchant_code` string
        - `username` string
      - `recurring_merchant_initiated` WorldpayMerchantCodeCredentials
        - `merchant_code` string
        - `username` string
    - object
      - `stripe_account_id` string
    - object
      - `merchant_id` string
      - `username` string
  - `external_id` string
  - `gateway_account_credential_id` integer
  - `gateway_account_id` integer
  - `last_updated_by_user_external_id` string: User external ID
  - `payment_provider` string
  - `state` 'CREATED' | 'ENTERED' | 'VERIFIED_WITH_LIVE_PAYMENT' | 'ACTIVE' | 'RETIRED'

## Other responses

- `400`: Bad request - Invalid or missing mandatory fields
- `404`: Not found - account not found

## Changes

- **2026-10-02** `042ba06d9017`: 1 info
  - removed the `AMOUNT_BELOW_MINIMUM` enum value from the `error_identifier` response property for the response status `400`
- **2026-10-01** `4e93196bd6aa`: 2 warning
  - added the new `AMOUNT_BELOW_MINIMUM_FOR_ADYEN` enum value to the `error_identifier` response property for the response status `400`
  - added the new `AMOUNT_BELOW_MINIMUM_FOR_STRIPE` enum value to the `error_identifier` response property for the response status `400`
- **2025-01-16** `c12941ae518b`: 1 warning
  - added the new `AMOUNT_BELOW_MINIMUM` enum value to the `error_identifier` response property for the response status `400`
- **2024-11-25** `414b11cd97c0`: 1 warning
  - added the new `NON_HTTPS_RETURN_URL_NOT_ALLOWED_FOR_A_LIVE_ACCOUNT` enum value to the `error_identifier` response property for the response status `400`

[Operation history](https://skmtc.dev/government-digital-service/apis/connector-api/changes/v1/api/accounts/:accountId/credentials/post.md)

---

[API](https://skmtc.dev/government-digital-service/apis/connector-api.md) - [All operations](https://skmtc.dev/government-digital-service/apis/connector-api/llms.txt) - [OpenAPI document](https://skmtc.dev/government-digital-service/apis/connector-api/revisions/7f294e492d3c?raw)
