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

# Update the direct debit settings of an engagement

> amount sets how much of each invoice the direct debit collects: FULL for the invoice's totalAmount, MINIMUM for its minimumAmount, or FIXED for a positive fixedAmount in EUR minor units (cents). Answers 409 when the engagement has no active direct debit mandate.



## OpenAPI

````yaml https://partner-card.test.public.rockerapi.dev/docs/docs.yaml post /api/engagements/card/{engagement-id}/direct-debit
openapi: 3.1.0
info:
  title: Card
  version: '1.0'
servers:
  - url: https://partner-card.test.public.rockerapi.dev
security: []
paths:
  /api/engagements/card/{engagement-id}/direct-debit:
    post:
      tags:
        - Card
      summary: Update the direct debit settings of an engagement
      description: >-
        amount sets how much of each invoice the direct debit collects: FULL for
        the invoice's totalAmount, MINIMUM for its minimumAmount, or FIXED for a
        positive fixedAmount in EUR minor units (cents). Answers 409 when the
        engagement has no active direct debit mandate.
      operationId: Update direct debit
      parameters:
        - name: engagement-id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HttpUpdateDirectDebitRequest'
            examples:
              FULL:
                summary: Collect the whole invoice
                value:
                  amount:
                    amountType: FULL
              MINIMUM:
                summary: Collect the minimum to pay
                value:
                  amount:
                    amountType: MINIMUM
              FIXED:
                summary: Collect EUR 1500.00
                value:
                  amount:
                    fixedAmount:
                      currency: EUR
                      amount: 150000
                      unit: MINOR
                    amountType: FIXED
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpDirectDebitResponse'
              examples:
                FIXED:
                  value:
                    amount:
                      fixedAmount:
                        currency: EUR
                        amount: 150000
                        unit: MINOR
                      amountType: FIXED
        '400':
          description: >-
            Invalid value for: path parameter engagement-id, Invalid value for:
            body
          content:
            text/plain:
              schema:
                type: string
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorBodyResponse'
      security:
        - httpAuth: []
components:
  schemas:
    HttpUpdateDirectDebitRequest:
      title: HttpUpdateDirectDebitRequest
      type: object
      required:
        - amount
      properties:
        amount:
          $ref: '#/components/schemas/HttpDirectDebitAmount'
    HttpDirectDebitResponse:
      title: HttpDirectDebitResponse
      type: object
      required:
        - amount
      properties:
        amount:
          $ref: '#/components/schemas/HttpDirectDebitAmount'
    HttpErrorBodyResponse:
      title: HttpErrorBodyResponse
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
        message:
          type: string
    HttpDirectDebitAmount:
      title: HttpDirectDebitAmount
      oneOf:
        - $ref: '#/components/schemas/HttpDirectDebitAmountFixed'
        - $ref: '#/components/schemas/HttpDirectDebitAmountFull'
        - $ref: '#/components/schemas/HttpDirectDebitAmountMinimum'
      discriminator:
        propertyName: amountType
        mapping:
          FIXED: '#/components/schemas/HttpDirectDebitAmountFixed'
          FULL: '#/components/schemas/HttpDirectDebitAmountFull'
          MINIMUM: '#/components/schemas/HttpDirectDebitAmountMinimum'
    HttpDirectDebitAmountFixed:
      title: HttpDirectDebitAmountFixed
      type: object
      required:
        - fixedAmount
        - amountType
      properties:
        fixedAmount:
          $ref: '#/components/schemas/MoneyMinor'
        amountType:
          type: string
          const: FIXED
    HttpDirectDebitAmountFull:
      title: HttpDirectDebitAmountFull
      type: object
      required:
        - amountType
      properties:
        amountType:
          type: string
          const: FULL
    HttpDirectDebitAmountMinimum:
      title: HttpDirectDebitAmountMinimum
      type: object
      required:
        - amountType
      properties:
        amountType:
          type: string
          const: MINIMUM
    MoneyMinor:
      title: MoneyMinor
      description: Money object represented in the smallest currency unit
      type: object
      required:
        - amount
        - currency
        - unit
      properties:
        amount:
          type: integer
          format: int64
        currency:
          description: Currency represented with a ISO 4217 currency code
          examples:
            - EUR
          type: string
        unit:
          examples:
            - MINOR
          type: string
  securitySchemes:
    httpAuth:
      type: http
      scheme: basic

````

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