# Simulate Creating a Linked Account via Open Banking

The Linked Account Simulator allows you to create a simulated linked account that can be used for funding payment runs.

This endpoint will only function in Sandbox and should not be used in the Live environment.

Endpoint: POST /simulate/v1/linked_accounts
Version: v1
Security: apiKey

## Request fields (application/json):

  - `buyerId` (string, required)

  - `accountIdentification` (any, required) — one of:
    The bank details that uniquely identify the account on the banking systems.
    - FasterPaymentsBankDetails:
      - `accountNumber` (string, required)
        Account number, required for wire transfer over Faster Payments.
      - `sortCode` (string, required)
        Sort code, required for wire transfer over Faster Payments.
      - `secondaryReference` (string)
        Secondary reference data if applicable.
    - SepaBankDetails:
      - `iban` (string, required)
        International Bank Account Number, required for wire transfer over SEPA.
      - `bankIdentifierCode` (string)
        BIC, for wire transfer over SEPA.

  - `institutionId` (string)

  - `createdBy` (string)

  - `currency` (string)
    The currency expressed in ISO-4217 code.
    Enum: "GBP", "EUR"

## Response 201 fields (application/json):

  - `id` (string, required)
    The unique identifier of the linked account
    Example: "652d25b73541d8084a88a38d"

  - `accountIdentification` (any, required) — one of:
    The bank details that uniquely identify the account on the banking systems.
    - FasterPaymentsBankDetails:
      - `accountNumber` (string, required)
        Account number, required for wire transfer over Faster Payments.
      - `sortCode` (string, required)
        Sort code, required for wire transfer over Faster Payments.
      - `secondaryReference` (string)
        Secondary reference data if applicable.
    - SepaBankDetails:
      - `iban` (string, required)
        International Bank Account Number, required for wire transfer over SEPA.
      - `bankIdentifierCode` (string)
        BIC, for wire transfer over SEPA.

  - `currency` (string, required)
    The primary currency associated with the account
    Enum: same as `currency` (2 values)

  - `institution` (object, required)

  - `institution.displayName` (string)
    The name to be used when displaying the institution to users on user interfaces

  - `institution.countries` (array, required)
    The institution's supported countries
    Enum: "GB", "AT", "BE", "BG", "HR", "CY", "CZ", "DK", "EE", "FI", "FR", "DE", "GI", "GR", "HU", "IS", "IE", "IT", "LV", "LI", "LT", "LU", "MT", "NL", "NO", "PL", "PT", "RO", "SK", "SI", "ES", "SE"

  - `institution.images` (object)
    The images that should be used when displaying the institution

  - `institution.images.icon` (string)

  - `institution.images.logo` (string)

  - `institution.info` (object)

  - `institution.info.loginUrl` (string)

  - `institution.info.helplinePhoneNumber` (string)

  - `consent` (object, required)

  - `consent.expiresAt` (string, required)

  - `consent.expiresIn` (integer, required)

  - `consent.status` (string, required)
    Enum: "ACTIVE", "EXPIRED", "REVOKED"

  - `status` (string, required)
    The status of the linked account. The status can be one of the following:

- PENDING_CHALLENGE: The Linked Account is pending challenge
- PENDING_VERIFICATION: The Linked Account is pending the completion of the required verification steps
- PENDING_FUNDING: Awaiting a wire transfer as part of the verification process when adding an account without Open Banking
- REJECTED: The Linked Account did not pass one or more verification steps and is not eligible for use
- LINKED: The linked account is linked and ready for use
- UNLINKED: The linked account is not linked and cannot be used
    Enum: "LINKED", "UNLINKED", "PENDING_CHALLENGE", "PENDING_FUNDING", "PENDING_VERIFICATION", "REJECTED"

  - `friendlyName` (string)
    A user-friendly name for the linked account

  - `createdAt` (string)

## Response 400 fields (application/json):

  - `message` (string)
    When present helps to identify and fix the problem.

  - `syntaxErrors` (object)
    Is returned as part of an HTTP error response whenever a syntax error is detected. A list of the fields together with their syntax error will be provided.

  - `syntaxErrors.invalidFields` (array)

  - `syntaxErrors.invalidFields.params` (array)

  - `syntaxErrors.invalidFields.fieldName` (string)

  - `syntaxErrors.invalidFields.error` (string)
    Enum: "REQUIRED", "HAS_TEXT", "REQUIRES", "SIZE", "RANGE", "IN", "NOT_IN", "REGEX", "EXACTLY", "AT_LEAST", "AT_MOST", "ALL_OR_NONE"

## Response 403 fields (application/json):

  - `errorCode` (string)
    Enum: "INSUFFICIENT_PERMISSIONS"

## Response 409 fields (application/json):

  - `errorCode` (string)
    Enum: "BUYER_ID_INVALID", "UNSUPPORTED_CURRENCY"

## Response default fields (application/json):

  - `code` (string)

  - `message` (string)


## Response 401 fields

## Response 500 fields

## Response 503 fields
