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

# Retrieve Payment Method Groups

> Retrieves payment method groups. Each group contains
public display fields (title, subtitle, type, customerTypes) for building
payment method selectors, and an opaque internalData blob for Resurs web components.

**Authentication**: Session ID (obtained via session creation endpoint)
**Security**: Session IDs are time-limited
**Response**: Payment method groups ready for selector display




## OpenAPI

````yaml /api/payment-widget/openapi.json get /sessions/{sessionId}/payment-method-groups
openapi: 3.0.3
info:
  title: Payment Methods API
  description: >
    API for integrating Resurs Bank payment methods into web applications.

    Provides secure session management and payment method configuration for
    e-commerce platforms.


    ## Authentication


    | API | Auth Method |

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

    | Sessions | JWT Bearer token (merchant credentials) |

    | Payment Methods | Session ID (from session creation) |
  version: v1
  contact:
    name: Resurs Bank
    email: rf-checkout-experience@resurs.se
servers:
  - url: https://api.checkout.int.resurs.cloud/mock/payment/public/v1
    description: Mock
security: []
tags:
  - name: Sessions
    description: Create sessions for payment method integration
  - name: Payment Methods
    description: Retrieve available payment methods
paths:
  /sessions/{sessionId}/payment-method-groups:
    get:
      tags:
        - Payment Methods
      summary: Retrieve Payment Method Groups
      description: >
        Retrieves payment method groups. Each group contains

        public display fields (title, subtitle, type, customerTypes) for
        building

        payment method selectors, and an opaque internalData blob for Resurs web
        components.


        **Authentication**: Session ID (obtained via session creation endpoint)

        **Security**: Session IDs are time-limited

        **Response**: Payment method groups ready for selector display
      operationId: getPaymentMethodGroups
      parameters:
        - name: sessionId
          in: path
          required: true
          description: Session ID for authenticating payment method requests.
          schema:
            $ref: '#/components/schemas/sessionId'
        - name: amount
          in: query
          required: true
          description: |
            Purchase amount in the store's base currency as a decimal string.
            Used for payment method availability and pricing calculations.
          schema:
            type: string
            pattern: ^\d+(\.\d{1,2})?$
            example: '1299.95'
        - name: customerType
          in: query
          schema:
            $ref: '#/components/schemas/customerType'
        - name: flattened
          in: query
          description: >
            When true, returns every payment method as its own group with a
            single methodId.

            When false or omitted, payment methods may be grouped (e.g.,
            part-payment options

            bundled into one group).
          schema:
            type: boolean
      responses:
        '200':
          description: Payment method groups successfully retrieved
          headers:
            Cache-Control:
              schema:
                type: string
                example: private, max-age=600
              description: >-
                Browser caching directive. Responses are cacheable for 10
                minutes.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/paymentMethodGroupResponse'
        '400':
          $ref: '#/components/responses/badRequest'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '422':
          $ref: '#/components/responses/unprocessableEntity'
        '500':
          $ref: '#/components/responses/internalServerError'
components:
  schemas:
    sessionId:
      type: string
      description: |
        Session ID providing secure access to payment methods.
      example: 550e8400-e29b-41d4-a716-446655440000
    customerType:
      type: string
      description: |
        Customer segment classification.
        * `NATURAL` - Individual consumers (B2C)
        * `LEGAL` - Business customers (B2B)
      enum:
        - NATURAL
        - LEGAL
      example: NATURAL
    paymentMethodGroupResponse:
      type: object
      required:
        - id
        - methodIds
        - title
        - subtitle
        - type
        - customerTypes
        - internalData
      properties:
        id:
          type: string
          description: >
            Deterministic group identifier derived from the payment method IDs
            in this group.

            Stable for any given set of method IDs regardless of their display
            order.
          example: a7f3c9e01b2d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9
        methodIds:
          type: array
          description: |
            Unique identifiers for the payment methods in this group.
            Use these IDs when initiating a payment with a specific method.
          items:
            type: string
          example:
            - 550e8400-e29b-41d4-a716-446655440000
        title:
          type: string
          description: >
            Display title for the payment method group (e.g., payment method
            name).

            Use this to label the payment method in your selector UI.
          example: Resurs Invoice
        subtitle:
          type: string
          description: >
            Display subtitle providing additional context about the payment
            method.

            Always present (empty string if not applicable).
          example: Pay within 30 days
        type:
          $ref: '#/components/schemas/paymentMethodType'
        customerTypes:
          type: array
          description: |
            Customer segments supported by this payment method group.
          items:
            $ref: '#/components/schemas/customerType'
          example:
            - NATURAL
        internalData:
          type: string
          format: byte
          description: >
            Base64-encoded opaque data for Resurs web components.

            Pass this value directly to Resurs elements (e.g.,
            `<resurs-payment-method data="..." />`).


            **Do not parse or depend on the contents of this field.**

            The internal structure is subject to change without notice.
          example: eyJ0eXBlIjoiUkVTVVJTX0lOVk9JQ0UiLCJtZXRob2RJZHMiOlsiaWQxIl19
    paymentMethodType:
      description: |
        Payment method type classification.
        * `GENERIC` - Generic
        * `RESURS_INVOICE` - Resurs Invoice
        * `RESURS_INVOICE_ACCOUNT` - Resurs Invoice Account
        * `RESURS_PART_PAYMENT_SELECT_LATER` - Resurs Part Payment Select Later
        * `RESURS_PART_PAYMENT_SELECT_NOW` - Resurs Part Payment Select Now
        * `RESURS_CARD` - Resurs Card
        * `RESURS_REVOLVING_CREDIT` - Resurs Revolving Credit
        * `RESURS_NEW_REVOLVING_CREDIT` - Resurs New Revolving Credit
        * `NETS` - Nets
        * `D2I` - D2I
        * `SWISH` - Swish
        * `TRUSTLY` - Trustly
        * `ZERO` - Zero
        * `VIPPS` - Vipps
        * `MOBILEPAY` - MobilePay
        * `CARD` - Card (Adyen)

        This is an extensible enum.
      anyOf:
        - type: string
          title: Known Values
          enum:
            - GENERIC
            - RESURS_INVOICE
            - RESURS_INVOICE_ACCOUNT
            - RESURS_PART_PAYMENT_SELECT_LATER
            - RESURS_PART_PAYMENT_SELECT_NOW
            - RESURS_CARD
            - RESURS_REVOLVING_CREDIT
            - RESURS_NEW_REVOLVING_CREDIT
            - NETS
            - D2I
            - SWISH
            - TRUSTLY
            - ZERO
            - VIPPS
            - MOBILEPAY
            - CARD
        - type: string
          title: Other
          description: Catch-all for future values
      example: RESURS_INVOICE
    errorResponse:
      type: object
      properties:
        message:
          type: string
          description: A human-readable description of the error
          example: Session not found
      required:
        - message
  responses:
    badRequest:
      description: >-
        Bad Request - The request could not be understood or was missing
        required parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
          example:
            message: The request could not be understood due to malformed syntax
    notFound:
      description: Not Found - The requested resource does not exist
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
          example:
            message: The requested resource was not found
    conflict:
      description: Conflict - The request conflicts with the current state of the resource
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
          example:
            message: The request conflicts with the current state of the resource
    unprocessableEntity:
      description: >-
        Unprocessable Entity - The request was well-formed but contains semantic
        errors
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
          example:
            message: One or more fields failed validation
    internalServerError:
      description: Internal Server Error - An unexpected error occurred on the server
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
          example:
            message: An unexpected error occurred while processing your request

````