> ## Documentation Index
> Fetch the complete documentation index at: https://api-reference.hyperswitch.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Proxy

> Create a proxy request



## OpenAPI

````yaml post /v1/proxy
openapi: 3.0.3
info:
  title: Hyperswitch - API Documentation
  description: >

    ## Get started


    Hyperswitch provides a collection of APIs that enable you to process and
    manage payments.

    Our APIs accept and return JSON in the HTTP body, and return standard HTTP
    response codes.


    You can consume the APIs directly using your favorite HTTP/REST library.


    We have a testing environment referred to "sandbox", which you can setup to
    test API calls without

    affecting production data.

    Currently, our sandbox environment is live while our production environment
    is under development

    and will be available soon.

    You can sign up on our Dashboard to get API keys to access Hyperswitch API.


    ### Environment


    Use the following base URLs when making requests to the APIs:


    | Environment   |  Base URL                          |

    |---------------|------------------------------------|

    | Sandbox       | <https://sandbox.hyperswitch.io>   |

    | Production    | <https://api.hyperswitch.io>       |


    ## Authentication


    When you sign up on our [dashboard](https://app.hyperswitch.io) and create a
    merchant

    account, you are given a secret key (also referred as api-key) and a
    publishable key.

    You may authenticate all API requests with Hyperswitch server by providing
    the appropriate key in

    the request Authorization header.


    | Key             | 
    Description                                                                                 
    |

    |-----------------|-----------------------------------------------------------------------------------------------|

    | api-key         | Private key. Used to authenticate all API requests from
    your merchant server                  |

    | publishable key | Unique identifier for your account. Used to authenticate
    API requests from your app's client  |


    Never share your secret api keys. Keep them guarded and secure.
  contact:
    name: Hyperswitch Support
    url: https://hyperswitch.io
    email: support.global@juspay.io
  license:
    name: Apache-2.0
  version: 0.1.0
servers:
  - url: https://sandbox.hyperswitch.io
    description: Sandbox Environment
security: []
tags:
  - name: Merchant Account
    description: Create and manage merchant accounts
  - name: Profile
    description: Create and manage profiles
  - name: Merchant Connector Account
    description: Create and manage merchant connector accounts
  - name: Payments
    description: Create and manage one-time payments, recurring payments and mandates
  - name: Refunds
    description: Create and manage refunds for successful payments
  - name: Mandates
    description: Manage mandates
  - name: Customers
    description: Create and manage customers
  - name: Payment Methods
    description: Create and manage payment methods of customers
  - name: Disputes
    description: Manage disputes
  - name: API Key
    description: Create and manage API Keys
  - name: Payouts
    description: Create and manage payouts
  - name: payment link
    description: Create payment link
  - name: Routing
    description: Create and manage routing configurations
  - name: Event
    description: Manage events
paths:
  /v1/proxy:
    post:
      tags:
        - Proxy
      summary: Proxy
      description: Create a proxy request
      operationId: Proxy Request
      parameters:
        - name: X-Profile-Id
          in: header
          description: Profile ID for authentication
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProxyRequest'
            examples:
              Create a proxy request:
                value:
                  destination_url: https://api.example.com/payments
                  headers:
                    Authorization: Bearer sk_test_example
                    Content-Type: application/json
                  method: POST
                  request_body:
                    amount: 6540
                    capture: true
                    currency: USD
                    reference: ORD-5023-4E89
                    source:
                      billing_address:
                        address_line1: 123 High St.
                        city: London
                        country: GB
                      expiry_month: '{{$card_exp_month}}'
                      expiry_year: '{{$card_exp_year}}'
                      number: '{{$card_number}}'
                      type: card
                  token: pm_0196ea5a42a67583863d5b1253d62931
                  token_type: PaymentMethodId
        required: true
      responses:
        '200':
          description: Proxy request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProxyResponse'
        '400':
          description: Invalid data
      security:
        - api_key: []
components:
  schemas:
    ProxyRequest:
      type: object
      required:
        - request_body
        - destination_url
        - headers
        - method
        - token
        - token_type
      properties:
        request_body:
          description: The request body that needs to be forwarded
        destination_url:
          type: string
          description: The destination URL where the request needs to be forwarded
          example: https://api.example.com/endpoint
        headers:
          type: object
          description: The headers that need to be forwarded
        method:
          $ref: '#/components/schemas/Method'
        token:
          type: string
          description: The vault token that is used to fetch sensitive data from the vault
        token_type:
          $ref: '#/components/schemas/TokenType'
    ProxyResponse:
      type: object
      required:
        - response
        - status_code
        - response_headers
      properties:
        response:
          description: The response received from the destination
        status_code:
          type: integer
          format: int32
          description: The status code of the response
          minimum: 0
        response_headers:
          type: object
          description: The headers of the response
    Method:
      type: string
      enum:
        - GET
        - POST
        - PUT
        - DELETE
        - PATCH
    TokenType:
      type: string
      enum:
        - tokenization_id
        - payment_method_id
        - volatile_payment_method_id
        - payment_method_token
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Format: `api-key=<api_key>`


        Use the API key created under your merchant account from the HyperSwitch
        dashboard. API key is used to authenticate API requests from your
        merchant server only. Don't expose this key on a website or embed it in
        a mobile application.

````