> ## 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.

# Mandates - Retrieve Mandate

> Retrieves a mandate created using the Payments/Create API



## OpenAPI

````yaml get /mandates/{mandate_id}
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
  - name: Authentication
    description: Create and manage authentication
  - name: Subscriptions
    description: Subscription management and billing endpoints
  - name: Card Issuer
    description: Create and manage card issuers
paths:
  /mandates/{mandate_id}:
    get:
      tags:
        - Mandates
      summary: Mandates - Retrieve Mandate
      description: Retrieves a mandate created using the Payments/Create API
      operationId: Retrieve a Mandate
      parameters:
        - name: mandate_id
          in: path
          description: The identifier for mandate
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The mandate was retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MandateResponse'
        '404':
          description: Mandate does not exist in our records
      security:
        - api_key: []
components:
  schemas:
    MandateResponse:
      type: object
      required:
        - mandate_id
        - status
        - payment_method_id
        - payment_method
      properties:
        mandate_id:
          type: string
          description: The identifier for mandate
        status:
          $ref: '#/components/schemas/MandateStatus'
        payment_method_id:
          type: string
          description: The identifier for payment method
        payment_method:
          type: string
          description: The payment method
        payment_method_type:
          type: string
          description: The payment method type
          nullable: true
        card:
          allOf:
            - $ref: '#/components/schemas/MandateCardDetails'
          nullable: true
        customer_acceptance:
          allOf:
            - $ref: '#/components/schemas/CustomerAcceptance'
          nullable: true
    MandateStatus:
      type: string
      description: >-
        The status of the mandate, which indicates whether it can be used to
        initiate a payment.
      enum:
        - active
        - inactive
        - pending
        - revoked
    MandateCardDetails:
      type: object
      properties:
        last4_digits:
          type: string
          description: The last 4 digits of card
          nullable: true
        card_exp_month:
          type: string
          description: The expiry month of card
          nullable: true
        card_exp_year:
          type: string
          description: The expiry year of card
          nullable: true
        card_holder_name:
          type: string
          description: The card holder name
          nullable: true
        card_token:
          type: string
          description: The token from card locker
          nullable: true
        scheme:
          type: string
          description: The card scheme network for the particular card
          nullable: true
        issuer_country:
          type: string
          description: The country code in in which the card was issued
          nullable: true
        card_fingerprint:
          type: string
          description: A unique identifier alias to identify a particular card
          nullable: true
        card_isin:
          type: string
          description: The first 6 digits of card
          nullable: true
        card_issuer:
          type: string
          description: The bank that issued the card
          nullable: true
        card_network:
          allOf:
            - $ref: '#/components/schemas/CardNetwork'
          nullable: true
        card_type:
          type: string
          description: The type of the payment card
          nullable: true
        nick_name:
          type: string
          description: The nick_name of the card holder
          nullable: true
    CustomerAcceptance:
      type: object
      description: >-
        This "CustomerAcceptance" object is passed during Payments-Confirm
        request, it enlists the type, time, and mode of acceptance properties
        related to an acceptance done by the customer. The customer_acceptance
        sub object is usually passed by the SDK or client.
      required:
        - acceptance_type
      properties:
        acceptance_type:
          $ref: '#/components/schemas/AcceptanceType'
        accepted_at:
          type: string
          format: date-time
          description: Specifying when the customer acceptance was provided
          example: '2022-09-10T10:11:12Z'
          nullable: true
        online:
          allOf:
            - $ref: '#/components/schemas/OnlineMandate'
          nullable: true
      additionalProperties: false
    CardNetwork:
      type: string
      description: Indicates the card network.
      enum:
        - Visa
        - Mastercard
        - AmericanExpress
        - JCB
        - DinersClub
        - Discover
        - CartesBancaires
        - UnionPay
        - Interac
        - RuPay
        - Maestro
        - Star
        - Pulse
        - Accel
        - Nyce
    AcceptanceType:
      type: string
      description: This is used to indicate if the mandate was accepted online or offline
      enum:
        - online
        - offline
    OnlineMandate:
      type: object
      description: Details of online mandate
      required:
        - ip_address
        - user_agent
      properties:
        ip_address:
          type: string
          description: >-
            Ip address of the customer machine from which the mandate was
            created
          example: 123.32.25.123
        user_agent:
          type: string
          description: The user-agent of the customer's browser
      additionalProperties: false
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: api-key
      description: >-
        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.

````