openapi: 3.0.1
info:
  title: Credit cards
  version: '1.0'
servers:
  - url: https://api.solaris-sandbox.de
    description: Sandbox
  - url: https://api.solarisbank.de
    description: Production
paths:
  /v1/persons/{person_id}/credit_card_applications:
    post:
      summary: Create a credit card application for a consumer or freelancer
      description: >-
        This endpoint creates a credit card application and assigns it to the
        person with the `person_id` specified in the request URL. The
        application includes all the required information about the customer,
        such as their self-declared financial information, credit card type and
        requested limit, which Solaris' credit scorer uses to initiate a series
        of credit checks.<br> **Note:** Solaris will tell you which fields are
        mandatory based on your use case.
      tags:
        - Credit cards
      parameters:
        - $ref: '#/components/parameters/person_id'
      requestBody:
        $ref: '#/components/requestBodies/consumer_create_credit_card_application'
      responses:
        '201':
          $ref: '#/components/responses/credit_card_application'
        '400':
          $ref: '#/components/responses/validation_error'
        '403':
          $ref: '#/components/responses/unauthorized_error'
        '404':
          $ref: '#/components/responses/not_found_error'
        '500':
          $ref: '#/components/responses/internal_server_error'
      security:
        - oauth2:
            - solaris_person_credit_card_application#create
  /v1/businesses/{business_id}/credit_card_applications:
    post:
      summary: Create a credit card application for a business
      description: >-
        This endpoint creates a credit card application and assigns it to the
        business with the `business_id` specified in the request URL. The
        application includes all the required information about the customer,
        such as their self-declared financial information, credit card type and
        requested limit, which Solaris' credit scorer uses to initiate a series
        of credit checks.<br> **Note:** Solaris will tell you which fields are
        mandatory based on your use case.
      tags:
        - Credit cards
      parameters:
        - $ref: '#/components/parameters/business_id'
      requestBody:
        $ref: '#/components/requestBodies/business_create_credit_card_application'
      responses:
        '201':
          $ref: '#/components/responses/credit_card_application'
        '400':
          $ref: '#/components/responses/validation_error'
        '403':
          $ref: '#/components/responses/unauthorized_error'
        '404':
          $ref: '#/components/responses/not_found_error'
        '500':
          $ref: '#/components/responses/internal_server_error'
      security:
        - oauth2:
            - solaris_business_credit_card_application#create
  /v1/credit_card_applications/{id}/finalize:
    post:
      summary: Accept and finalize credit card application
      description: >-
        Finalizes the credit card application specified in the request URL. If
        the request succeeds, then Solaris will create a credit card account for
        the customer.<br> **Note:** Call this endpoint only after the customer
        has successfully completed the KYC process.
      tags:
        - Credit cards
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          $ref: '#/components/responses/credit_card_application'
        '400':
          $ref: '#/components/responses/validation_error'
        '403':
          $ref: '#/components/responses/unauthorized_error'
        '404':
          $ref: '#/components/responses/not_found_error'
        '500':
          $ref: '#/components/responses/internal_server_error'
      security:
        - oauth2:
            - solaris_credit_card_application#finalize
  /v1/credit_card_applications/{id}/limit:
    patch:
      summary: Set limit for credit card account
      description: >-
        Attaches a credit limit to the credit card account specified in the
        request URL by its ID.<br> **Note:** You must attach a limit that is
        less than or equal to the limit approved by Solaris.
      tags:
        - Credit cards
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        $ref: '#/components/requestBodies/set_account_limit'
      responses:
        '202':
          $ref: '#/components/responses/credit_card_application'
        '400':
          $ref: '#/components/responses/validation_error'
        '403':
          $ref: '#/components/responses/unauthorized_error'
        '404':
          $ref: '#/components/responses/not_found_error'
        '500':
          $ref: '#/components/responses/internal_server_error'
      security:
        - oauth2:
            - solaris_credit_card_application#set_limit
  /v1/credit_card_applications:
    get:
      summary: Get a list of credit card applications
      description: >-
        Returns an array containing all credit card applications created for
        your customers.
      tags:
        - Credit cards
      parameters:
        - $ref: '#/components/parameters/page_size'
        - $ref: '#/components/parameters/page_number'
        - $ref: '#/components/parameters/filter_id'
        - $ref: '#/components/parameters/filter_customer_id'
        - $ref: '#/components/parameters/filter_external_customer_id'
        - $ref: '#/components/parameters/filter_product_type'
        - $ref: '#/components/parameters/filter_status'
        - $ref: '#/components/parameters/sort'
      responses:
        '200':
          $ref: '#/components/responses/extended_credit_card_application'
        '400':
          $ref: '#/components/responses/validation_error'
        '403':
          $ref: '#/components/responses/unauthorized_error'
        '500':
          $ref: '#/components/responses/internal_server_error'
      security:
        - oauth2:
            - solaris_credit_card_application#all
  /v1/credit_card_applications/{id}:
    get:
      summary: Get a credit card application
      description: >-
        Returns the credit card application specified in the request URL by its
        ID.
      tags:
        - Credit cards
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          $ref: '#/components/responses/extended_credit_card_application'
        '403':
          $ref: '#/components/responses/unauthorized_error'
        '404':
          $ref: '#/components/responses/not_found_error'
        '500':
          $ref: '#/components/responses/internal_server_error'
      security:
        - oauth2:
            - solaris_credit_card_application#find
    patch:
      summary: Update repayment option for a credit card
      description: >
        This endpoint changes the repayment option (i.e., from charge to
        revolving, or vice versa) for the credit card specified in the request
        URL by the respective application ID.

        **Note:** The change will only take effect in the **next billing
        cycle.**


        The API applies the following validation logic:


        | current_type | upcoming_type | minimum_amount & minimum_percentage |
        logic description |

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

        | FULL         | FULL          | Absent or null                      | -
        |

        | FULL         | PARTIAL       | Passed or already set               |
        Allowed to be done any time in the billing cycle.<br>A customer must
        have QES and be not in Dunning.<br>`latest_repayment_type_switch_date`
        will be set to the current date.<br>Interest calculation for this
        account will start from the date of the switch.<br>`current_type` &
        `upcoming_type` will be set to PARTIAL<br>If there is a PENDING bill
        then:<br>it will be closed and a new one is generated for the same bill
        start_date and end_date.<br>a new PDF statement is also generated. |

        | PARTIAL      | PARTIAL       | Passed or already set               | -
        |

        | PARTIAL      | FULL          | Passed or already set               |
        Allowed only once in a billing cycle.<br>A customer must have QES and be
        not in Dunning.<br>A switch is not allowed if
        `repayment_type_switch_available_date` is not today or older.<br>The
        `upcoming_type` will be set to FULL. |
      tags:
        - Credit cards
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        $ref: '#/components/requestBodies/update_credit_card_application'
      responses:
        '200':
          $ref: '#/components/responses/credit_card_application'
        '400':
          $ref: '#/components/responses/validation_error'
        '403':
          $ref: '#/components/responses/unauthorized_error'
        '404':
          $ref: '#/components/responses/not_found_error'
        '500':
          $ref: '#/components/responses/internal_server_error'
      security:
        - oauth2:
            - solaris_credit_card_application#update
  /v1/credit_card_bills/{bill_id}:
    get:
      summary: Get a credit card bill
      description: Returns the credit card bill specified in the request URL.
      tags:
        - Credit cards
      parameters:
        - $ref: '#/components/parameters/bill_id'
      responses:
        '200':
          $ref: '#/components/responses/bill'
        '400':
          $ref: '#/components/responses/validation_error'
        '403':
          $ref: '#/components/responses/unauthorized_error'
        '404':
          $ref: '#/components/responses/not_found_error'
        '500':
          $ref: '#/components/responses/internal_server_error'
      security:
        - oauth2:
            - solaris_credit_card_bill#find
  /v1/credit_card_bills:
    get:
      summary: List all credit card bills
      description: >-
        Returns an array containing all credit card bills for all of your
        customers.
      tags:
        - Credit cards
      parameters:
        - $ref: '#/components/parameters/page_size-2'
        - $ref: '#/components/parameters/page_number-2'
        - $ref: '#/components/parameters/filter_application_id'
        - $ref: '#/components/parameters/filter_status-2'
        - $ref: '#/components/parameters/filter_statement_date_min'
        - $ref: '#/components/parameters/filter_statement_date_max'
      responses:
        '200':
          $ref: '#/components/responses/bills'
        '400':
          $ref: '#/components/responses/validation_error'
        '403':
          $ref: '#/components/responses/unauthorized_error'
        '500':
          $ref: '#/components/responses/internal_server_error'
      security:
        - oauth2:
            - solaris_credit_card_bill#all
  /v1/credit_card_applications/{application_id}/termination_requests:
    post:
      summary: Create credit card termination request
      description: >-
        Creates a termination request for the credit card application specified
        in the request URL. See the [credit cards
        guide](https://docs.solarisgroup.com/guides/cards/credit-cards/consumer-credit-cards/#Credit-card-termination-process)
        for more information on how the termination process works.
      tags:
        - Termination requests
      parameters:
        - $ref: '#/components/parameters/application_id'
      requestBody:
        $ref: '#/components/requestBodies/create_termination_request'
      responses:
        '200':
          $ref: '#/components/responses/termination'
        '403':
          $ref: '#/components/responses/unauthorized_error'
        '500':
          $ref: '#/components/responses/internal_server_error'
      security:
        - oauth2:
            - solaris_credit_card_termination#create
  /v1/credit_card_terminations:
    get:
      summary: Get all credit card termination requests
      description: Returns a list of all credit card termination requests.
      tags:
        - Termination requests
      parameters:
        - $ref: '#/components/parameters/page_size'
        - $ref: '#/components/parameters/page_number'
        - $ref: '#/components/parameters/sort'
      responses:
        '200':
          $ref: '#/components/responses/terminations'
        '403':
          $ref: '#/components/responses/unauthorized_error'
        '500':
          $ref: '#/components/responses/internal_server_error'
      security:
        - oauth2:
            - solaris_credit_card_termination#all
  /v1/credit_card_terminations/{id}:
    get:
      summary: Get credit card termination request
      description: >-
        Returns the credit card termination request specified in the request
        URL.
      tags:
        - Termination requests
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          $ref: '#/components/responses/termination'
        '403':
          $ref: '#/components/responses/unauthorized_error'
        '404':
          $ref: '#/components/responses/not_found_error'
        '500':
          $ref: '#/components/responses/internal_server_error'
      security:
        - oauth2:
            - solaris_credit_card_termination#find
  /v1/credit_card_terminations/{id}/revoke:
    post:
      summary: Revoke a termination request
      description: >-
        Revokes the credit card termination request specified in the request
        URL. Note that you may only revoke a termination request within **5
        business days** of its creation.
      tags:
        - Termination requests
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          $ref: '#/components/responses/termination'
        '403':
          $ref: '#/components/responses/unauthorized_error'
        '404':
          $ref: '#/components/responses/not_found_error'
        '500':
          $ref: '#/components/responses/internal_server_error'
      security:
        - oauth2:
            - solaris_credit_card_termination#revoke
components:
  parameters:
    person_id:
      name: person_id
      in: path
      required: true
      schema:
        type: string
    business_id:
      name: business_id
      in: path
      required: true
      schema:
        type: string
    id:
      name: id
      in: path
      required: true
      schema:
        type: string
    page_size:
      name: page[size]
      in: query
      description: Indicates the number of entries to return on each results page.
      schema:
        type: integer
        default: 10
    page_number:
      name: page[number]
      in: query
      description: Indicates the number of results pages to return.
      schema:
        type: integer
        default: 1
    filter_id:
      name: filter[id]
      in: query
      description: Filter the results by resource ID.
      schema:
        type: string
    filter_customer_id:
      name: filter[customer_id]
      in: query
      description: Filter the results by customer ID.
      schema:
        type: string
    filter_external_customer_id:
      name: filter[external_customer_id]
      in: query
      description: Filter the results by external customer ID.
      schema:
        type: string
    filter_product_type:
      name: filter[product_type]
      in: query
      description: Filter the results by product type.
      schema:
        type: string
    filter_status:
      name: filter[status]
      in: query
      description: Filter the results by status.
      schema:
        type: string
    sort:
      name: sort
      in: query
      description: Sort the results by `created_at` or `updated_at`.
      schema:
        type: string
    bill_id:
      name: bill_id
      in: path
      required: true
      schema:
        type: string
    page_size-2:
      name: page[size]
      in: query
      description: Specifies the number of results to return on each page.
      schema:
        type: integer
        default: 10
    page_number-2:
      name: page[number]
      in: query
      description: Specifies the number of results pages to return.
      schema:
        type: integer
        default: 1
    filter_application_id:
      name: filter[application_id]
      description: >-
        Filters the results by credit card application ID (i.e., returns all
        bills related to a specific credit card).
      in: query
      schema:
        type: string
    filter_status-2:
      name: filter[status]
      in: query
      description: Filters the results by status.
      schema:
        type: string
    filter_statement_date_min:
      name: filter[statement_date][min]
      description: Returns all credit card bills on or after the provided date.
      in: query
      schema:
        type: string
    filter_statement_date_max:
      name: filter[statement_date][max]
      description: >-
        Returns all credit card bills with a statement date up to the given
        date.
      in: query
      schema:
        type: string
    application_id:
      name: application_id
      in: path
      required: true
      schema:
        type: string
  schemas:
    amount:
      type: object
      properties:
        value:
          type: integer
          description: The amount (in Euro cents).
          example: 100
        unit:
          type: string
          example: cents
          description: The unit.
        currency:
          type: string
          example: EUR
          description: The currency.
    modifiable_repayment_options:
      type: object
      properties:
        upcoming_type:
          type: string
          description: >-
            Allows you to change the type of credit card as of the next billing
            cycle. Options are `FULL` (charge) and `PARTIAL` (revolving).
          enum:
            - FULL
            - PARTIAL
          example: FULL
        minimum_amount:
          description: >-
            Minimum amount of the used limit to be repaid at the end of each
            billing cycle. Only relevant if `upcoming_type` is set to `PARTIAL`.
          allOf:
            - $ref: '#/components/schemas/amount'
        minimum_percentage:
          type: integer
          description: >-
            Minimum percentage of the used limit to be repaid at the end of each
            billing cycle. Only relevant if `upcoming_type` is set to `PARTIAL`.
          example: 3
    repayment_options:
      allOf:
        - $ref: '#/components/schemas/modifiable_repayment_options'
        - properties:
            current_type:
              type: string
              description: >-
                Indicates the type of the credit card. Possible values are
                `FULL` (charge) and `PARTIAL` (revolving).
              enum:
                - FULL
                - PARTIAL
              example: PARTIAL
            upcoming_type:
              type: string
              description: >-
                Indicates the type of the credit card which will be from next
                billing cycle.
              enum:
                - FULL
                - PARTIAL
              example: PARTIAL
            upcoming_billing_cycle:
              type: string
              description: Indicates the next billing interval for the card.
              enum:
                - WEEKLY
                - BIWEEKLY
                - MONTHLY
                - BIMONTHLY
                - QUARTERLY
              example: MONTHLY
            current_billing_cycle:
              type: string
              description: Indicates the current billing interval for the credit card.
              enum:
                - WEEKLY
                - BIWEEKLY
                - MONTHLY
                - BIMONTHLY
                - QUARTERLY
              example: MONTHLY
            grace_period_in_days:
              type: integer
              description: >-
                Indicates number of days in the grace period for paying off the
                required amount in each billing cycle.
              example: 15
            minimum_amount_lower_threshold:
              description: >-
                The lower threshold for the minimum payment amount that can be
                applied to the credit card. Solaris will set this value.
              allOf:
                - $ref: '#/components/schemas/amount'
            minimum_amount_upper_threshold:
              description: >-
                The upper threshold for the minimum payment amount that can be
                applied to the credit card. Solaris will set this value.
              allOf:
                - $ref: '#/components/schemas/amount'
            minimum_percentage_lower_threshold:
              type: integer
              description: >-
                The lower threshold for the minimum percentage of the balance
                that you may require customers to pay in each billing cycle.
              example: 3
            minimum_percentage_upper_threshold:
              type: integer
              description: >-
                The upper threshold for the minimum percentage of the balance
                that you may require customers to pay in each billing cycle.
              example: 20
            minimum_percentage:
              type: integer
              description: Credit card application's repayment minimum percentage
              example: 2
            minimum_amount:
              description: The minimum amount to be repaid each billing cycle
              allOf:
                - $ref: '#/components/schemas/amount'
    base_create_credit_card_application:
      type: object
      required:
        - product_type
        - scoring_options
      properties:
        product_type:
          type: string
          description: Indicates the type of credit card to open.
          enum:
            - CONSUMER_CREDIT_CARD
            - FREELANCER_CREDIT_CARD
            - BUSINESS_CREDIT_CARD
          example: CONSUMER_CREDIT_CARD
        external_customer_id:
          description: Arbitrary ID provided by you (e.g., membership ID).
          type: string
          example: CKV1002494
        repayment_options:
          description: >-
            Object containing information about the repayment plan for the
            credit card.
          allOf:
            - $ref: '#/components/schemas/repayment_options'
        statement_with_details:
          type: boolean
          description: >-
            Indicates whether to return the full transaction details in the
            credit card statements.
          example: true
    consumer_scoring_options:
      type: object
      properties:
        customer_desired_limit:
          description: >-
            The credit card limit requested by the customer, subject to the
            scorer's decision.
          allOf:
            - $ref: '#/components/schemas/amount'
          example:
            value: 50000
            unit: cents
            currency: EUR
        number_of_dependents:
          type: integer
          description: >-
            The number of dependents (e.g., children or spouse) who depend on
            the customer's income.
          example: 1
        marital_status:
          type: string
          description: The customer's marital status.
          enum:
            - SINGLE
            - MARRIED
            - DIVORCED
            - WIDOWED
            - UNKNOWN
          example: MARRIED
        living_situation:
          type: string
          description: The customer's living situation.
          enum:
            - LIVING_WITH_PARENTS
            - LIVING_IN_OWN_HOUSE
            - LIVING_IN_RENTED_HOUSE
          example: LIVING_WITH_PARENTS
        living_situation_expenses:
          description: >-
            The customer's living monthly expenses (e.g., rent or mortgage,
            utilities, health insurance, etc.)
          allOf:
            - $ref: '#/components/schemas/amount'
          example:
            value: 20000
            unit: cents
            currency: EUR
        net_income:
          description: The customer's net income amount (i.e., after tax), in Euro.
          allOf:
            - $ref: '#/components/schemas/amount'
          example:
            value: 30000
            unit: cents
            currency: EUR
        credit_repayment_excluding_mortgage:
          description: >-
            A field containing information about the customer's existing debt
            repayments (in EUR), excluding mortgage payments.
          allOf:
            - $ref: '#/components/schemas/amount'
          example:
            value: 10000
            unit: cents
            currency: EUR
        other_credit_card_limit:
          description: >-
            If the customer has existing credit cards, include the granted limit
            in this field.
          allOf:
            - $ref: '#/components/schemas/amount'
          example:
            value: 100000
            unit: cents
            currency: EUR
        employment_since:
          type: string
          description: The date from which the customer has held their current job.
          format: date
          example: '2019-08-24'
        annual_turnover:
          description: (Freelancers only) The customer's expected annual turnover.
          allOf:
            - $ref: '#/components/schemas/amount'
          example:
            value: 500000
            unit: cents
            currency: EUR
        monthly_business_costs:
          description: (Freelancers only) The customer's monthly business costs.
          allOf:
            - $ref: '#/components/schemas/amount'
          example:
            value: 25000
            unit: cents
            currency: EUR
        total_clients_12_months:
          type: integer
          description: >-
            (Freelancers only) The total number of clients that the customer has
            had in the last 12 months.
          example: 10
        has_credit_card:
          type: boolean
          description: Does customer already possess a credit card account.
        reference_account_created_year:
          type: string
          description: Year since when does reference bank account exist.
          example: '2019'
        member_since:
          type: string
          format: date
          description: Date of ADAC membership started.
          example: '2019-08-24'
        provision_code:
          type: string
          description: ADAC provision code.
        reference_account_iban:
          type: string
          description: Reference account
    consumer_create_credit_card_application:
      allOf:
        - $ref: '#/components/schemas/base_create_credit_card_application'
        - properties:
            scoring_options:
              $ref: '#/components/schemas/consumer_scoring_options'
    business_scoring_options:
      type: object
      properties:
        customer_desired_limit:
          description: >-
            The credit card limit requested by the customer, subject to the
            scorer's decision.
          allOf:
            - $ref: '#/components/schemas/amount'
          example:
            value: 100000
            unit: cents
            currency: EUR
        other_credit_card_limit:
          description: >-
            If the customer already has credit cards, include the granted limit
            in this field.
          allOf:
            - $ref: '#/components/schemas/amount'
          example:
            value: 30000
            unit: cents
            currency: EUR
        total_assets:
          description: The business' total assets.
          allOf:
            - $ref: '#/components/schemas/amount'
          example:
            value: null
            unit: cents
            currency: EUR
        total_equity:
          description: The business' total equity.
          allOf:
            - $ref: '#/components/schemas/amount'
          example:
            value: null
            unit: cents
            currency: EUR
        annual_turnover:
          description: The business' annual turnover amount.
          allOf:
            - $ref: '#/components/schemas/amount'
          example:
            value: 5000000
            unit: cents
            currency: EUR
        partner_recommended_limit:
          description: >-
            Your recommended limit for the credit card based on your own
            criteria.
          allOf:
            - $ref: '#/components/schemas/amount'
          example:
            value: 90000
            unit: cents
            currency: EUR
        partner_pd_rate:
          description: Your calculated probability of default (PD) rate for the business.
          type: number
          format: float
          example: 0.1
        partner_score:
          description: Your calculated score for the business.
          type: integer
          example: 1
    credit_card_application_response:
      type: object
      properties:
        id:
          type: string
        external_customer_id:
          description: Arbitrary ID provided by you (e.g., membership ID).
          type: string
        customer_id:
          type: string
          description: ID of the person who applied for the credit card.
          example: 0ba2211cab11af6094d60ead81f2bd9dcper
        account_id:
          type: string
          description: ID of the Solaris account associated with the credit card.
          example: c2a13abed3b0686ab5343aa748d7f2fecacc
        account_iban:
          type: string
          description: IBAN of the Solaris account associated with the credit card.
          example: DE53110101013323159108
        reference_account_id:
          type: string
          description: ID of the reference account associated with the credit card.
          example: d1ed02309ca52b5e636e215ff82b2d52sddm
        status:
          type: string
          description: The current status of the credit card.
          enum:
            - PENDING
            - IN_SCORING
            - PRE_APPROVED
            - FINALIZING
            - FINALIZED
            - DECLINED
            - TERMINATED
            - WAITING_FOR_IDENTIFICATION
            - IN_KNE_SCORING
          example: PENDING
        product_type:
          type: string
          description: Indicates the type of credit card.
          enum:
            - CONSUMER_CREDIT_CARD
            - FREELANCER_CREDIT_CARD
            - BUSINESS_CREDIT_CARD
          example: CONSUMER_CREDIT_CARD
        billing_start_date:
          type: string
          description: The start date of the current billing cycle.
          format: date
          example: '2022-07-01'
        billing_end_date:
          type: string
          description: The end date of the current billing cycle.
          format: date
          example: '2022-07-28'
        qes_at:
          type: string
          description: The date of QES completion.
          format: date
          example: '2022-07-28'
        approved_limit:
          description: The credit card limit approved for the customer by Solaris.
          allOf:
            - $ref: '#/components/schemas/amount'
          example:
            value: 20000
            unit: cents
            currency: EUR
        requested_limit:
          description: The credit card limit requested by the customer.
          allOf:
            - $ref: '#/components/schemas/amount'
          example:
            value: 50000
            unit: cents
            currency: EUR
        current_limit:
          description: >-
            The current limit applied to the credit card. Can be less than or
            equal to the `approved_limit`.
          allOf:
            - $ref: '#/components/schemas/amount'
          example:
            value: 15000
            unit: cents
            currency: EUR
        decline_reasons:
          type: array
          description: An array of reasons why the credit card application was declined.
          items:
            type: string
            enum:
              - SCORING
        repayment_options:
          description: >-
            Object containing information about the customer's repayment plan
            for the credit card.
          allOf:
            - $ref: '#/components/schemas/repayment_options'
        statement_with_details:
          type: boolean
          description: >-
            Indicates whether to return the full transaction details in the
            credit card statements.
          example: true
        scoring_options:
          description: >-
            Object containing information about the scoring for the credit card
            application.
          oneOf:
            - $ref: '#/components/schemas/consumer_scoring_options'
            - $ref: '#/components/schemas/business_scoring_options'
        in_dunning:
          type: boolean
          description: >-
            Boolean value to indicate whether the credit card is currently
            subject to the dunning process.
        repayment_type_switch_available_date:
          type: string
          description: >-
            The next possible date on which the customer may switch the credit
            card repayment type between charge and revolving.
          format: date
          example: '2022-07-28'
        created_at:
          type: string
          description: The date on which the application was created.
          format: date
          example: '2022-07-28'
        active_termination_id:
          type: string
          nullable: true
          description: >-
            The ID of an active, unrevoked termination linked to the credit card
            application.
    error:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: Error identifier
              status:
                type: integer
                description: Error status
              code:
                type: string
                description: Error code
              title:
                type: string
                description: Error title
              detail:
                type: string
                description: Error detail
    business_create_credit_card_application:
      allOf:
        - $ref: '#/components/schemas/base_create_credit_card_application'
        - properties:
            scoring_options:
              $ref: '#/components/schemas/business_scoring_options'
    extended_credit_card_application_response:
      type: object
      properties:
        id:
          type: string
        external_customer_id:
          description: Arbitrary ID provided by you (e.g., membership ID).
          type: string
        customer_id:
          type: string
          description: ID of the person who applied for the credit card.
          example: 0ba2211cab11af6094d60ead81f2bd9dcper
        account_id:
          type: string
          description: ID of the Solaris account associated with the credit card.
          example: c2a13abed3b0686ab5343aa748d7f2fecacc
        account_iban:
          type: string
          description: IBAN of the Solaris account associated with the credit card.
          example: DE53110101013323159108
        reference_account_id:
          type: string
          description: ID of the reference account associated with the credit card.
          example: d1ed02309ca52b5e636e215ff82b2d52sddm
        status:
          type: string
          description: The current status of the credit card.
          enum:
            - PENDING
            - IN_SCORING
            - PRE_APPROVED
            - FINALIZING
            - FINALIZED
            - DECLINED
            - TERMINATED
            - WAITING_FOR_IDENTIFICATION
            - IN_KNE_SCORING
          example: PENDING
        product_type:
          type: string
          description: Indicates the type of credit card.
          enum:
            - CONSUMER_CREDIT_CARD
            - FREELANCER_CREDIT_CARD
            - BUSINESS_CREDIT_CARD
          example: CONSUMER_CREDIT_CARD
        billing_start_date:
          type: string
          description: The start date of the current billing cycle.
          format: date
          example: '2022-07-01'
        billing_end_date:
          type: string
          description: The end date of the current billing cycle.
          format: date
          example: '2022-07-28'
        approved_limit:
          description: The credit card limit approved for the customer by Solaris.
          allOf:
            - $ref: '#/components/schemas/amount'
          example:
            value: 20000
            unit: cents
            currency: EUR
        requested_limit:
          description: The credit card limit requested by the customer.
          allOf:
            - $ref: '#/components/schemas/amount'
          example:
            value: 50000
            unit: cents
            currency: EUR
        current_limit:
          description: >-
            The current limit applied to the credit card. Can be less than or
            equal to the `approved_limit`.
          allOf:
            - $ref: '#/components/schemas/amount'
          example:
            value: 15000
            unit: cents
            currency: EUR
        decline_reasons:
          type: array
          description: An array of reasons why the credit card application was declined.
          items:
            type: string
            enum:
              - SCORING
        repayment_options:
          description: >-
            Object containing information about the customer's repayment plan
            for the credit card.
          allOf:
            - $ref: '#/components/schemas/repayment_options'
        statement_with_details:
          type: boolean
          description: >-
            Indicates whether to return the full transaction details in the
            credit card statements.
          example: true
        scoring_options:
          description: >-
            Object containing information about the scoring for the credit card
            application.
          oneOf:
            - $ref: '#/components/schemas/consumer_scoring_options'
            - $ref: '#/components/schemas/business_scoring_options'
        in_dunning:
          type: boolean
          description: >-
            Boolean value to indicate whether the credit card is currently
            subject to the dunning process.
        repayment_type_switch_available_date:
          type: string
          description: >-
            The next possible date on which the customer may switch the credit
            card repayment type between charge and revolving.
          format: date
          example: '2022-07-28'
        created_at:
          type: string
          description: The date on which the application was created.
          format: date
          example: '2022-07-28'
        default_interest_account_id:
          type: string
          description: The ID of an interest account
          example: e48c29b85992b8772eb7ddd518490920cacc
        interest_storing_account_id:
          type: string
          description: The ID of an interest storing account
          example: c2a13abed3b0686ab5343aa748d7f2fecacc
        latest_repayment_type_switch_date:
          type: string
          description: The date on which a repayment type was changed last time
          format: date
          example: '2022-07-28'
        qes_at:
          type: string
          description: The date on which QES was completed for the application.
          format: date
          example: '2022-07-28'
        active_termination_id:
          type: string
          description: active (not revoked) termination id linked to application
    update_credit_card_application:
      type: object
      properties:
        repayment_options:
          description: >-
            Object containing updated properties for the credit card's repayment
            plans.
          allOf:
            - $ref: '#/components/schemas/modifiable_repayment_options'
        statement_with_details:
          type: boolean
          description: >-
            Indicates whether to return the full transaction details in the
            credit card statements.
          example: true
    amount-2:
      type: object
      properties:
        value:
          type: integer
          description: The amount, in Euro cents.
          example: 100
        unit:
          type: string
          example: cents
          description: Unit of the amount.
        currency:
          type: string
          example: EUR
          description: Currency of the amount.
    bill_response:
      type: object
      properties:
        id:
          type: string
          description: Unique ID of the credit card bill.
          example: 8d298774499c44349e3f2e98ba408e74
        application_id:
          type: string
          description: >-
            Unique ID of the credit card application with which the bill is
            associated.
          example: a8cafe0c24e949c78bfbea04cb5b2905ccla
        status:
          type: string
          description: The current status of the credit card bill.
          enum:
            - PENDING
            - PRELIMINARILY_PAID
            - PAID
            - IN_DUNNING
            - CLOSED
          example: PENDING
        start_date:
          type: string
          description: The billing cycle start date.
          format: date
          example: '2022-04-01'
        end_date:
          type: string
          description: The billing cycle end date.
          format: date
          example: '2022-04-30'
        statement_date:
          type: string
          description: Date when the statement was issued.
          format: date
          example: '2022-05-01'
        due_date:
          type: string
          description: Date when payment for this bill is due.
          format: date
          example: '2022-05-15'
        sdd_collection_date:
          type: string
          description: >-
            Date when the SEPA Direct Debit for collecting the payment will
            occur.
          format: date
          example: '2022-05-16'
        previous_bill_amount:
          description: The amount of the previous credit card bill.
          allOf:
            - $ref: '#/components/schemas/amount-2'
          example:
            value: 10000
            unit: cents
            currency: EUR
        current_bill_amount:
          description: The amount of the current credit card bill.
          allOf:
            - $ref: '#/components/schemas/amount-2'
          example:
            value: 10000
            unit: cents
            currency: EUR
        total_outstanding_amount:
          description: The total outstanding amount for the credit card.
          allOf:
            - $ref: '#/components/schemas/amount-2'
          example:
            value: 20000
            unit: cents
            currency: EUR
        minimum_due_amount:
          description: >-
            The minimum payment the customer must make for this credit card
            bill.
          allOf:
            - $ref: '#/components/schemas/amount-2'
          example:
            value: 3000
            unit: cents
            currency: EUR
        outstanding_sddr_amount:
          description: The total amount outstanding for the dunning process.
          allOf:
            - $ref: '#/components/schemas/amount-2'
          example:
            value: 100
            unit: cents
            currency: EUR
        outstanding_amount:
          description: >-
            The amount remaining to be paid on the current credit card bill
            (i.e., the `total_outstanding_amount` minus any previous payments).
          allOf:
            - $ref: '#/components/schemas/amount-2'
          example:
            value: 9000
            unit: cents
            currency: EUR
        repayment_type:
          type: string
          description: >-
            The type of credit card. Possible options are `FULL` (charge) and
            `PARTIAL` (revolving).
          enum:
            - FULL
            - PARTIAL
          example: FULL
        minimum_amount:
          description: The minimum amount to be repaid each billing cycle.
          allOf:
            - $ref: '#/components/schemas/amount-2'
          example:
            value: null
            unit: cents
            currency: EUR
        minimum_percentage:
          type: integer
          description: >-
            The minimum percentage of the outstanding balance to be repaid each
            billing cycle.
          example: 3
        grace_period_in_days:
          type: integer
          description: >-
            Indicates number of days in the grace period for paying off the
            required amount in each billing cycle.
          example: 15
        dunning_fees:
          description: The amount of dunning fees applied during this billing cycle.
          allOf:
            - $ref: '#/components/schemas/amount-2'
          example:
            value: 0
            unit: cents
            currency: EUR
        other_fees:
          description: Any other fees applied during this billing cycle.
          allOf:
            - $ref: '#/components/schemas/amount-2'
          example:
            value: 100
            unit: cents
            currency: EUR
        accumulated_interest_amount:
          description: The total amount of interest accrued.
          allOf:
            - $ref: '#/components/schemas/amount-2'
          example:
            value: 5000
            unit: cents
            currency: EUR
        postbox_item_id:
          type: string
          description: ID of the Postbox item that corresponds with the credit card bill.
          example: c072c6e43f4d486cb553e9cd9fc1bae7pbxi
    create_termination_request:
      type: object
      required:
        - reason
      properties:
        reason:
          type: string
          description: The reason for the termination.
          enum:
            - CUSTOMER_WISH
          example: CUSTOMER_WISH
    termination_response:
      type: object
      properties:
        id:
          type: string
          example: ac8df7d811c042faacabd8162de7b789cctr
        application_id:
          description: The ID of the credit card application that is being terminated.
          type: string
          example: 796ff7b9961c4fe1b4470e45298b5d69ccla
        reason:
          description: The reason for the termination.
          type: string
          enum:
            - CUSTOMER_WISH
            - OTHER_IMMEDIATE
            - OTHER_ORDINARY
          example: CUSTOMER_WISH
        status:
          description: The current status of the credit card termination.
          type: string
          enum:
            - INITIATED
            - IN_PROGRESS
            - FINALIZED
            - REVOKED
          example: INITIATED
        legally_terminated_at:
          description: The date when the credit card termination will take effect.
          type: string
          format: date
          example: '2023-08-31'
        revocable_until:
          description: The date until which the termination can be revoked.
          type: string
          format: date
          example: '2023-08-02'
        created_at:
          description: UTC timestamp from when the termination was created.
          type: string
          format: date-time
          example: '2023-07-28T14:47:00.000Z'
  requestBodies:
    consumer_create_credit_card_application:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/consumer_create_credit_card_application'
    business_create_credit_card_application:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/business_create_credit_card_application'
    set_account_limit:
      content:
        application/json:
          schema:
            type: object
            properties:
              limit:
                $ref: '#/components/schemas/amount'
    update_credit_card_application:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/update_credit_card_application'
    create_termination_request:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/create_termination_request'
  responses:
    credit_card_application:
      description: The credit card application was created successfully.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/credit_card_application_response'
    validation_error:
      description: Validation Error
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/error'
              - type: object
                example:
                  errors:
                    - id: b5a79a32-fc0c-4326-aed4-a7e76d565f86
                      status: 400
                      code: validation_error
                      title: Validation Error
                      detail: Validation Error
    unauthorized_error:
      description: Unathorized action
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/error'
              - type: object
                example:
                  errors:
                    - id: 7aaf4dfb-b7cd-4a50-a1d2-fad0e19624ef
                      status: 403
                      code: unauthorized_action
                      title: Unauthorized Action
                      detail: Unauthorized action is not allowed.
    not_found_error:
      description: Not found
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/error'
              - type: object
                example:
                  errors:
                    - id: 93537ebd-c038-4a56-aa1b-17e540f57c3a
                      status: 404
                      code: model_not_found
                      title: Model Not Found
                      detail: Couldn't find 'XXX' for id.
    internal_server_error:
      description: Internal server error.
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/error'
              - type: object
                example:
                  errors:
                    - id: b5a79a32-fc0c-4326-aed4-a7e76d565f86
                      status: 500
                      code: generic_error
                      title: Generic Error
                      detail: There was an error.
    extended_credit_card_application:
      description: Extended response for credit card application.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/extended_credit_card_application_response'
    bill:
      description: Bill record for a credit card account
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/bill_response'
    bills:
      description: List of bills for a credit card account
      headers:
        Total:
          $ref: '#/components/headers/total'
        Per-Page:
          $ref: '#/components/headers/per_page'
        Link:
          $ref: '#/components/headers/link'
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/bill_response'
    termination:
      description: Termination record
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/termination_response'
    terminations:
      description: List of terminations records
      headers:
        Total:
          $ref: '#/components/headers/total-2'
        Per-Page:
          $ref: '#/components/headers/per_page-2'
        Link:
          $ref: '#/components/headers/link-2'
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/termination_response'
  headers:
    total:
      description: Total number of resources to return that match the provided filters.
      schema:
        type: string
        example: '123'
    per_page:
      description: Number of resources to return per page.
      schema:
        type: string
        example: '10'
    link:
      description: Links to other pages.
      schema:
        type: string
        example: >
          <url?page[size]=10&page[number]=1>; rel="first",
          <url?page[size]=10&page[number]=13>; rel="last",
          <url?page[size]=10&page[number]=2>; rel="next",
          <url?page[size]=10&page[number]=4>; rel="prev"
    total-2:
      description: Total number of elements that match the provided filters
      schema:
        type: string
        example: '123'
    per_page-2:
      description: Number of elements per page
      schema:
        type: string
        example: '10'
    link-2:
      description: Links to other pages
      schema:
        type: string
        example: >
          <url?page[size]=10&page[number]=1>; rel="first",
          <url?page[size]=10&page[number]=13>; rel="last",
          <url?page[size]=10&page[number]=2>; rel="next",
          <url?page[size]=10&page[number]=4>; rel="prev"
