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

# Migrate stripe payment methods

> Assigns stripe customer ids to fynn customers, which are matched by email. After that, all **not expired** and **attached** payment methods will be created in fynn.

<sup>Required permissions: `payment-method:migrate`</sup>



## OpenAPI

````yaml post /payment-methods/migrate/stripe
openapi: 3.1.0
info:
  title: Fynn API
  description: ''
  termsOfService: https://www.fynn.eu/tos
  contact:
    name: Fynn UG (haftungsbeschränkt)
    url: https://www.fynn.eu
    email: hi@fynn.eu
  license:
    name: Proprietary
    url: https://www.fynn.eu/license
  version: 0.0.0
servers:
  - url: https://coreapi.io
    description: Production
  - url: https://preview.coreapi.io
    description: Sandbox
security:
  - JWT: []
tags: []
paths:
  /payment-methods/migrate/stripe:
    parameters: []
    post:
      tags:
        - PaymentMethod
      summary: Migrate stripe payment methods
      description: >-
        Assigns stripe customer ids to fynn customers, which are matched by
        email. After that, all **not expired** and **attached** payment methods
        will be created in fynn.


        <sup>Required permissions: `payment-method:migrate`</sup>
      operationId: migrateStripePaymentMethods
      parameters: []
      requestBody:
        description: ''
        content: {}
        required: false
      responses:
        '200':
          description: Stripe payment methods migrated
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    migrated:
                      type: object
                      properties:
                        customer_id:
                          type: string
                          example: ad8f7a8d-7a8d-7a8d-7a8d-7a8d7a8d7a8d
                          description: The id of the fynn customer
                        customer_name:
                          type: string
                          example: Max Mustermann
                          description: The name of the fynn customer
                        customer_number:
                          type: string
                          example: '123456'
                          description: The customer number of the fynn customer
                        customer_email:
                          type: string
                          example: max@mustermann.de
                          description: >-
                            The email of the fynn customer which is used to
                            match the stripe customer
                        payment_method_id:
                          type: string
                          example: pm_1J5gqz2eZvKYlo2C2X2X2X2X
                          description: The id of the stripe payment method
                        payment_method_type:
                          type: string
                          example: card
                          description: The type of the stripe payment method
                          enum:
                            - card
                            - sepa_debit
                        payment_method_name:
                          type: string
                          example: Visa (4242)
                          description: >-
                            The name of the stripe payment method, on cards the
                            last 4 digits are appended. Otherwise only the type
                            is used.
                    skipped:
                      type: object
                      properties:
                        reason:
                          type: string
                          example: already_exists
                          description: The reason why the payment method was skipped
                          enum:
                            - already_exists
                            - expired
                            - customer_not_found_in_app
                        customer_id:
                          type: string
                          example: ad8f7a8d-7a8d-7a8d-7a8d-7a8d7a8d7a8d
                          description: The id of the fynn customer
                        customer_name:
                          type: string
                          example: Max Mustermann
                          description: The name of the fynn customer
                        customer_number:
                          type: string
                          example: '123456'
                          description: The customer number of the fynn customer
                        customer_email:
                          type: string
                          example: max@mustermann.de
                          description: >-
                            The email of the fynn customer which is used to
                            match the stripe customer
                        payment_method_id:
                          type: string
                          example: pm_1J5gqz2eZvKYlo2C2X2X2X2X
                          description: The id of the stripe payment method
                        payment_method_type:
                          type: string
                          example: card
                          description: The type of the stripe payment method
                          enum:
                            - card
                            - sepa_debit
                        payment_method_name:
                          type: string
                          example: Visa (4242)
                          description: >-
                            The name of the stripe payment method, on cards the
                            last 4 digits are appended. Otherwise only the type
                            is used.
        '400':
          description: >-
            Stripe needs to be connected. <a
            href="#tag/PaymentGateway/operation/connectPaymentGateway">Connect a
            payment gateway</a>
      deprecated: false
      security:
        - JWT:
            - payment-method:migrate
components:
  securitySchemes:
    JWT:
      type: http
      scheme: bearer

````