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

# Fetch given provider config

> API for fetching an existing payment config for given location



## OpenAPI

````yaml /api-reference/payments/openapi.json get /payments/custom-provider/connect
openapi: 3.0.0
info:
  title: Payments API
  description: Documentation for payments API
  version: '1.0'
  contact: {}
servers:
  - url: https://services.leadconnectorhq.com
security: []
tags:
  - name: Payments
    description: Documentation for payments API
  - name: Integrations
    description: Documentation for payments API
  - name: Orders
    description: Documentation for payments API
  - name: Order fulfillments
    description: Documentation for payments API
  - name: Order Notes
    description: Documentation for payments API
  - name: Transactions
    description: Documentation for payments API
  - name: Subscriptions
    description: Documentation for payments API
  - name: Coupons
    description: Documentation for payments API
  - name: Custom Provider
    description: Documentation for payments API
paths:
  /payments/custom-provider/connect:
    get:
      tags:
        - Custom Provider
      summary: Fetch given provider config
      description: API for fetching an existing payment config for given location
      operationId: fetch-config
      parameters:
        - name: Version
          in: header
          description: API Version
          required: true
          schema:
            type: string
            enum:
              - '2021-07-28'
        - name: locationId
          required: true
          in: query
          description: Location id
          schema:
            example: Lk3nlfk4lxlelVEwcW
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCustomProvidersResponseSchema'
        '400':
          description: No such config exists for given locationId and marketplaceAppId
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedDTO'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableDTO'
      security:
        - Location-Access:
            - payments/custom-provider.readonly
components:
  schemas:
    GetCustomProvidersResponseSchema:
      type: object
      properties:
        name:
          type: string
          description: The name of the custom provider
          example: Company Paypal Integration
        description:
          type: string
          description: >-
            Description of payment gateway. Shown on the payments integrations
            page as subtext
          example: >-
            This payment gateway supports payments in India via UPI, Net
            banking, cards and wallets.
        paymentsUrl:
          type: string
          description: This url will be loaded in iFrame to start a payment session.
          example: https://testpayment.paypal.com
        queryUrl:
          type: string
          description: >-
            The url used for querying payments related events. Ex. verify,
            refund, subscription etc.
          example: https://testsubscription.paypal.com
        imageUrl:
          type: string
          description: >-
            Public image url for logo of the payment gateway displayed on the
            payments integrations page.
          example: https://testsubscription.paypal.com
        _id:
          type: string
          description: The unique identifier for the custom provider.
          example: 662a44ad19a2a44d3cd9d749
        locationId:
          type: string
          description: Location id
          example: Lk3nlfk4lxlelVEwcW
        marketplaceAppId:
          type: string
          description: The application id of marketplace
          example: 65f0b217a05c774da7f1efa5
        paymentProvider:
          type: object
          description: Payment provider details.
          example: >-
            { live: { liveMode: true }, test: { liveMode: false, apiKey:
            "y5ZQxryRFXZHvUJZdLXXXXXX", publishableKey:
            "rzp_test_zPRoVMLOa0A9wo" }}
        deleted:
          type: boolean
          description: >-
            Whether the config is deleted or not. true represents config is
            deleted
          example: true
        createdAt:
          format: date-time
          type: string
          description: The creation timestamp of the custom provider.
          example: '2023-11-20T10:23:36.515Z'
        updatedAt:
          format: date-time
          type: string
          description: The last update timestamp of the custom provider.
          example: '2024-01-23T09:57:04.846Z'
        traceId:
          type: string
          description: Trace id of the custom provider.
          example: 302d2cf4-1ba0-4bf5-bc3b-f8fa76fda58a
      required:
        - name
        - description
        - paymentsUrl
        - queryUrl
        - imageUrl
        - _id
        - locationId
        - marketplaceAppId
        - deleted
        - createdAt
        - updatedAt
    BadRequestDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 400
        message:
          type: string
          example: Bad Request
      required:
        - statusCode
        - message
    UnauthorizedDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 401
        message:
          type: string
          example: 'Invalid token: access token is invalid'
        error:
          type: string
          example: Unauthorized
      required:
        - statusCode
        - message
        - error
    UnprocessableDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 422
        message:
          type: array
          items:
            type: string
          example:
            - Unprocessable Entity
        error:
          type: string
          example: Unprocessable Entity
      required:
        - statusCode
        - message
        - error

````