> ## Documentation Index
> Fetch the complete documentation index at: https://docs.eximpe.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Look Up SWIFT Code

> Get the bank details for a SWIFT/BIC code, ready to use in a sub-merchant settlement account.

## Overview

Returns the bank details EximPe holds for a SWIFT/BIC code, in the same field names as `settlement_details` on [Create Merchant](https://docs.eximpe.com/api-reference/v3/merchant/create.md#settlement). Use it to show the bank to your user before you submit, or to check a code.

> [!TIP]
>
> You do not have to call this first. On [Create Merchant](https://docs.eximpe.com/api-reference/v3/merchant/create.md#settlement) and [Update Merchant](https://docs.eximpe.com/api-reference/v3/merchant/update.md), bank fields you leave out are filled from `bank_swift_code` in the same way.

## Query Parameters

| Name | Type | Required | Description |
| - | - | - | - |
| code | string | Yes | SWIFT/BIC code. 8 or 11 characters, upper case: 6 letters, then 2 letters or digits, then an optional 3-character branch code of letters or digits, e.g. `DBSSSGSG`. |

## Response

| Name | Type | Description |
| - | - | - |
| bank\_name | string \| null | Name of the bank. |
| bank\_branch\_name | string \| null | Branch name. |
| bank\_address | string \| null | Branch address. |
| bank\_city | string \| null | Branch city. |
| bank\_pincode | string \| null | Branch postal code. |
| bank\_country | string \| null | Branch country, in the spelling listed by [Get Merchant Options](https://docs.eximpe.com/api-reference/v3/merchant/options.md#countries). `null` when the bank's country is not one of the supported countries. |
| bank\_swift\_code | string | The code you looked up. |

A field is `null` when EximPe holds no value for it. `bank_state` is not returned; you always send it yourself.

The values are returned as EximPe holds them and are not checked against the rules on [Create Merchant](https://docs.eximpe.com/api-reference/v3/merchant/create.md#settlement). When you use them in a sub-merchant:

* Send any field that is `null` here yourself. If you leave it out, Create Merchant and Update Merchant refuse the request with a `400` that lists the field in `details.settlement_details`, alongside any other problems in the request. When it is the only problem, the code is `ERR_MERCHANT_019`, or `ERR_MERCHANT_006` when the field is `bank_country`.
* Check each value against its rule, e.g. `bank_address` must be 20–150 characters. A value that fails is refused with a `400` that lists the field in `details.settlement_details`. Send your own value for it instead.

```json 200 OK theme={null}
{
  "success": true,
  "message": "Bank details retrieved successfully",
  "data": {
    "bank_name": "DBS Bank Ltd",
    "bank_branch_name": "Head Office",
    "bank_address": "12 Marina Boulevard, Marina Bay",
    "bank_city": "Singapore",
    "bank_pincode": "018982",
    "bank_country": "Singapore",
    "bank_swift_code": "DBSSSGSG"
  }
}
```

```json 400 Not found theme={null}
{
  "success": false,
  "error": {
    "code": "ERR_MERCHANT_019",
    "message": "Bank details could not be found for bank_swift_code",
    "details": "Bank details could not be found for bank_swift_code"
  }
}
```

## Errors

| Status | `error.code` | When | `details` |
| - | - | - | - |
| `400` | `ERR_MERCHANT_019` | `code` is missing or malformed, or no bank details were found for it | A string, not an object: `"Bank details could not be found for bank_swift_code"`. Check the code. If it is correct, send every bank field yourself on [Create Merchant](https://docs.eximpe.com/api-reference/v3/merchant/create.md#settlement) |
| `401` | `ERR_AUTH_000`, `ERR_AUTH_001` | `X-Client-ID` or `X-Client-Secret` is missing or wrong | `{"authentication": "Missing credentials."}` or `{"authentication": "Invalid credentials."}` |
| `403` | `ERR_AUTH_003` | Your account is not a PSP | `{}`. Only PSPs can manage sub-merchants |
| `403` | `ERR_MERCHANT_017` | Your account is a PSP, but not set up for import collections | `{}`. Contact EximPe |


## OpenAPI

````yaml openapi/v3-partner-merchants.json GET /partners/merchants/swift/
openapi: 3.0.0
info:
  title: EximPe Payment Gateway API — v3 Partner Merchants
  version: 3.0.0
  description: Create and manage sub-merchants on the v3 partner API.
servers:
  - url: https://api-pacb-uat.eximpe.com
    description: Payment Gateway Sandbox URL
security:
  - clientAuth: []
    clientSecretAuth: []
    apiVersionHeader: []
tags:
  - name: Merchants
paths:
  /partners/merchants/swift/:
    get:
      tags:
        - Merchants
      summary: Look Up SWIFT Code
      description: >-
        Bank details for a SWIFT/BIC code, in the field names of
        `settlement_details`.
      operationId: v3_lookupSwiftCode
      parameters:
        - name: code
          in: query
          required: true
          description: >-
            SWIFT/BIC code. 8 or 11 characters, upper case: 6 letters, then 2
            letters or digits, then an optional 3-character branch code of
            letters or digits, e.g. `DBSSSGSG`.
          schema:
            type: string
            pattern: ^[A-Z]{6}[A-Z0-9]{2}([A-Z0-9]{3})?$
      responses:
        '200':
          description: Bank details for the code.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v3_SwiftLookupResponse'
              example:
                success: true
                message: Bank details retrieved successfully
                data:
                  bank_name: DBS Bank Ltd
                  bank_branch_name: Head Office
                  bank_address: 12 Marina Boulevard, Marina Bay
                  bank_city: Singapore
                  bank_pincode: '018982'
                  bank_country: Singapore
                  bank_swift_code: DBSSSGSG
        '400':
          description: >-
            The code is missing or malformed, or no bank details were found for
            it (`ERR_MERCHANT_019`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v3_ErrorResponse'
              example:
                success: false
                error:
                  code: ERR_MERCHANT_019
                  message: Bank details could not be found for bank_swift_code
                  details: Bank details could not be found for bank_swift_code
        '401':
          description: Missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v3_ErrorResponse'
              example:
                success: false
                error:
                  code: ERR_AUTH_000
                  message: Missing credentials
                  details:
                    authentication: Missing credentials.
        '403':
          description: >-
            Your account is not a PSP (`ERR_AUTH_003`), or is a PSP not set up
            for import collections (`ERR_MERCHANT_017`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v3_ErrorResponse'
              example:
                success: false
                error:
                  code: ERR_MERCHANT_017
                  message: >-
                    Sub-Merchant endpoints are only available to IMPORT PSP
                    accounts
                  details: {}
      security:
        - clientAuth: []
          clientSecretAuth: []
          apiVersionHeader: []
components:
  schemas:
    v3_SwiftLookupResponse:
      type: object
      required:
        - success
        - message
        - data
      properties:
        success:
          type: boolean
        message:
          type: string
        data:
          type: object
          properties:
            bank_name:
              type: string
              nullable: true
              description: Name of the bank.
            bank_branch_name:
              type: string
              nullable: true
              description: Branch name.
            bank_address:
              type: string
              nullable: true
              description: Branch address.
            bank_city:
              type: string
              nullable: true
              description: Branch city.
            bank_pincode:
              type: string
              nullable: true
              description: Branch postal code.
            bank_country:
              type: string
              nullable: true
              description: >-
                Branch country, in the spelling listed by Get Merchant Options.
                `null` when the bank's country is not one of the supported
                countries.
            bank_swift_code:
              type: string
              description: The code you looked up.
    v3_ErrorResponse:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          enum:
            - false
          description: >-
            Indicates if the request was successful. Always false for error
            responses.
        error:
          $ref: '#/components/schemas/v3_ErrorDetails'
    v3_ErrorDetails:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Error code (e.g., ERR_ORDER_002)
        message:
          type: string
          description: Error message
        details:
          description: >-
            More about the error. An object keyed by field name when fields fail
            validation, with nested objects for nested fields; a string when the
            error is about the request as a whole; or an empty object when there
            is nothing to add.
          oneOf:
            - type: object
              additionalProperties: true
            - type: string
  securitySchemes:
    clientAuth:
      type: apiKey
      name: X-Client-ID
      in: header
      description: >-
        **Client Application ID** - Your unique application identifier used to
        authenticate API requests. You can find your Client ID in the Developer
        Settings section of the merchant dashboard.
      x-displayName: Client ID
      x-example: your-client-id
    clientSecretAuth:
      type: apiKey
      name: X-Client-Secret
      in: header
      description: >-
        **Client Secret Key** - Your secret key used alongside the Client ID for
        secure authentication. Keep this confidential and never expose it in
        client-side code. Available in the Developer Settings section of the
        merchant dashboard.
      x-displayName: Client Secret
      x-example: your-client-secret
    apiVersionHeader:
      type: apiKey
      name: X-API-Version
      in: header
      description: >-
        **API Version** - Specifies which version of the API to use (e.g.,
        '1.X.X', '2.X.X', or '3.X.X'). This header allows you to control which
        API version your integration uses. Default version information is
        available in the Developer Settings.
      x-displayName: API Version
      x-example: 3.0.0

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.