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

# Retrieve a payment method

> Retrieves the details of the payment method associated with the supplied `payment_method_id`.

**Optional scope:** `PCI_DETAILS_READ`. Without it the request still succeeds, but `card.pci_details` (PAN, CVV, expiry) is omitted from the response.




## OpenAPI

````yaml /api-reference/2025-05-05/openapi.yaml get /v2/payment_methods/{payment_method_id}
openapi: 3.1.0
info:
  title: Public Imprint API
  version: '2.0'
servers:
  - url: https://dev.sbx.imprint.co
    description: Imprint public api sandbox
security:
  - basicAuth: []
  - bearerAuth: []
paths:
  /v2/payment_methods/{payment_method_id}:
    get:
      tags:
        - Payment Methods
      summary: Retrieve a payment method
      description: >
        Retrieves the details of the payment method associated with the supplied
        `payment_method_id`.


        **Optional scope:** `PCI_DETAILS_READ`. Without it the request still
        succeeds, but `card.pci_details` (PAN, CVV, expiry) is omitted from the
        response.
      operationId: getPaymentMethod
      parameters:
        - name: payment_method_id
          in: path
          required: true
          description: The unique identifier of the payment method
          schema:
            type: string
            example: 9ED4FE47-8E9C-48E9-BBEF-094DF1789012
      responses:
        '200':
          description: Payment method retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentMethod'
        '404':
          description: Payment method not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentMethodNotFoundError'
components:
  schemas:
    PaymentMethod:
      type: object
      required:
        - id
        - type
        - customer_id
        - created_at
        - status
        - metadata
      properties:
        id:
          type: string
          example: DCBFC736-2286-42DD-897D-160DCA80AED2
          description: The unique ID Imprint assigns to the payment method.
        type:
          type: string
          description: The type of payment method
          enum:
            - CARD
            - BANK_ACCOUNT
            - LOAN
        customer_id:
          type: string
          description: The `id` of the Imprint customer that the payment method belongs to.
          example: B40A789E-BD46-4BB9-B63E-F9919582694C
        card:
          allOf:
            - $ref: '#/components/schemas/PaymentMethodCardDetails'
          description: >-
            When the payment method is a non-secured `CARD` type, this object
            holds its card-specific data. Exactly one of `card` or
            `secured_credit_card` is present.
        secured_credit_card:
          allOf:
            - $ref: '#/components/schemas/PaymentMethodCardDetails'
          description: >-
            Card-specific data for a secured-credit-card product, emitted in
            place of `card` when the payment method's product is a secured
            credit card. Exactly one of `card` or `secured_credit_card` is
            present.
        bank_account:
          type: object
          description: >-
            When payment method is a `BANK_ACCOUNT` type, this object will have
            bank account specific data.
          required:
            - last4
            - routing_number
            - bank_name
          properties:
            last4:
              type: string
              example: '1234'
              description: Last 4 numbers of the account.
              minLength: 4
              maxLength: 4
            routing_number:
              type: string
              description: The bank routing number assigned to this account.
            bank_name:
              type: string
              example: Wells Fargo
              description: Name of the banking institution
            account_type:
              type: string
              description: Type of the account.
              enum:
                - CHECKING
                - SAVINGS
        loan:
          type: object
          description: >-
            When payment method is a `LOAN` type, this object will have loan
            specific data.
          required:
            - amount
            - term_months
          properties:
            amount:
              type: integer
              description: Amount in min units.
              example: 10000
            currency:
              $ref: '#/components/schemas/TransactionCurrency'
            remaining_balance:
              type: integer
              description: remaining unspent balance on the loan
            term_months:
              type: integer
              description: Length of the loan term in months
              example: 12
            apr:
              type: string
              description: Annual percentage rate of the loan in floating point
              example: '5.89'
            loan_status:
              type: string
              description: Current status of the loan
              enum:
                - PENDING
                - APPROVED
                - REJECTED
                - ACTIVE
                - CLOSED
        created_at:
          type: string
          description: the RFC-3339 timestamp when the payment method was created
          example: '2025-02-13T19:08:07.000Z'
        updated_at:
          type: string
          description: the RFC-3339 timestamp when the payment method was last updated
          example: '2025-02-13T19:08:07.000Z'
        status:
          type: string
          description: Current status of the payment method
          enum:
            - ACTIVE
            - INACTIVE
            - CANCELED
        metadata:
          type: object
          additionalProperties: true
          description: Additional metadata for the payment method
          example:
            platform_version: 2.1.0
    PaymentMethodNotFoundError:
      type: object
      required:
        - type
        - message
      properties:
        type:
          type: string
          description: The category of error being returned
          example: PAYMENT_METHOD_NOT_FOUND_ERROR
        message:
          type: string
          description: A message describing the cause of the error.
          example: 'Payment method not found for provided ID: pymd_123'
        param:
          type: string
          description: The param causing the error
          example: payment_method_id
    PaymentMethodCardDetails:
      type: object
      description: >-
        Card-specific data for a `CARD` payment method. Shared by the `card` and
        `secured_credit_card` properties on `PaymentMethod`; exactly one of
        those is present.
      required:
        - last4
        - brand
      properties:
        last4:
          type: string
          example: '1234'
          minLength: 4
          maxLength: 4
          description: The last 4 digits of the card PAN
        network:
          type: string
          description: Name of the card issuer
          enum:
            - VISA
            - MASTERCARD
            - AMEX
            - ''
        card_type:
          $ref: '#/components/schemas/CardType'
        card_design_id:
          $ref: '#/components/schemas/CardDesignID'
        exp_month:
          type: string
          description: The month the card expires (MM format).
          example: '06'
        exp_year:
          type: string
          description: The year the card expires (YYYY format).
          example: '2027'
        pci_details:
          type: object
          description: >-
            The pci details of the returned card. Only verified PCI compliant
            partners will be able to retrieve pci details in production
            environments.
          properties:
            pan:
              type: string
              description: >-
                The unique 16-digit number printed on the front of a payment
                card, used to identify the member's account.
              example: '5105105105105100'
            exp_month:
              type: string
              description: The month the card expires
              example: '06'
            exp_year:
              type: string
              description: The year the card expires
              example: '26'
            cvv:
              type: string
              description: >-
                A three- or four-digit security code used to verify
                card-not-present transactions and prevent fraud.
              example: '123'
        tokens:
          type: array
          description: >-
            Payment method tokens that are defined by a third-party provider are
            included in this array by Imprint.
          items:
            $ref: '#/components/schemas/PaymentMethodToken'
    TransactionCurrency:
      type: string
      description: >-
        The 3-character currency code of the amount in ISO 4217 format (e.g.,
        "USD")
      example: USD
    CardType:
      type: string
      description: The type of card
      enum:
        - PHYSICAL
        - VIRTUAL
        - UNIFIED
    CardDesignID:
      type: string
      description: Imprint ID for the graphic design printed on the card
      example: 3b9c1f3e-52a0-44c1-b131-a7ab0099a214
    PaymentMethodToken:
      type: object
      required:
        - type
        - token
        - created_at
        - updated_at
      properties:
        type:
          type: string
          enum:
            - ADYEN
            - APPLE_WALLET
            - CYBERSOURCE
            - WORLDPAY
        token:
          type: string
          description: The token, as defined by the processor
        pan_reference_id:
          type: string
          description: An ID that represents the PAN and is defined by the processor
        expires_at:
          type: string
          description: >-
            Only present for tokens that expire. If this field is absent, the
            token has no expiration and no action is needed. When present, this
            is the RFC-3339 timestamp after which the token can no longer be
            used. A timestamp in the past means the token is stale and should
            not be used. Retrieving the payment method refreshes expired tokens
            where possible; if a newly retrieved token's `expires_at` is still
            in the past, it cannot be used.
          example: '2025-02-14T19:08:07.000Z'
        created_at:
          type: string
          description: the RFC-3339 timestamp when the payment method was created
          example: '2025-02-13T19:08:07.000Z'
        updated_at:
          type: string
          example: '2025-02-13T19:08:07.000Z'
          description: the RFC-3339 timestamp when the payment method was updated
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >-
        Basic HTTP authentication. Allowed headers-- Authorization: Basic
        <base64(api_key_id:api_key_secret)>
    bearerAuth:
      bearerFormat: auth-scheme
      description: >-
        Bearer HTTP authentication. Allowed headers-- Authorization: Bearer
        <api_key>
      scheme: bearer
      type: http

````

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