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

# Abonnement aktualisieren

Mit diesem Dienst können Sie die Details Ihres Abonnements aktualisieren und so die unterbrechungsfreie Fortführung Ihrer wiederkehrenden Zahlungen sicherstellen.


## OpenAPI

````yaml openapi/de/localpayment.json POST /api/payin/subscriptions/{externalId}
openapi: 3.1.0
info:
  version: '1.0'
  title: Localpayment
  contact:
    name: Support
    url: mailto:support@localpayment.com
servers:
  - url: https://api.stage.localpayment.com
    description: Stage
security:
  - token: []
paths:
  /api/payin/subscriptions/{externalId}:
    post:
      summary: Abonnement aktualisieren
      operationId: update-subscription
      parameters:
        - name: Authorization
          in: header
          description: >-
            Bearer-Zugriffstoken zur Authentifizierung. Dieses Token erhalten
            Sie über die Endpunkte [Zugriffstoken
            abrufen](/de/reference/get-token) oder [Zugriffstoken
            aktualisieren](/de/reference/refresh-token).
          required: true
          schema:
            type: string
        - name: externalId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                amount:
                  type: number
                  description: Transaktionsbetrag.
                card:
                  type: object
                  description: Kartendaten des Zahlers.
                  properties:
                    name:
                      type: string
                      description: ' Name des Karteninhabers, wie auf der Vorderseite der Debitkarte aufgedruckt.'
                    number:
                      type: string
                      description: Kartennummer (PAN).
                    cvv:
                      type: string
                      description: Kartenprüfnummer
                    expirationMonth:
                      type: string
                      description: Ablaufmonat der Karte. Format `MM`.
                      examples:
                        - '01'
                    expirationYear:
                      type: string
                      description: Ablaufjahr der Karte. Format `YYYY`.
                      examples:
                        - '2025'
                    token:
                      type: string
                      description: >-
                        Verwenden Sie eine zuvor tokenisierte Karte, indem Sie
                        das Token senden.
                  required:
                    - name
                    - number
                    - cvv
                    - expirationMonth
                    - expirationYear
                autoRecurring:
                  type: object
                  description: Eigenschaften des Abonnements
                  properties:
                    repetitions:
                      type: integer
                      description: >-
                        Wie oft diese Zahlung eingezogen wird. Für eine
                        Wiederholung bei Bedarf senden Sie den Parameter mit
                        `value=0`.
                    type:
                      type: string
                      enum:
                        - day
                        - month
                        - custom
                      description: >-
                        Definiert die Einheit des Wiederholungsintervalls. Für
                        eine Wiederholung bei Bedarf senden Sie den Parameter
                        mit `value=custom`.
                    trialDays:
                      type: number
                      description: Anzahl der Testtage des Abonnements.
                  required:
                    - repetitions
                    - type
                retry:
                  type: object
                  description: Optionen für Payin-Wiederholungsversuche.
                  properties:
                    repetitions:
                      type: number
                      description: Anzahl der Wiederholungsversuche für die Belastung.
                    intervalUnit:
                      type: string
                      enum:
                        - day
                        - hour
                      description: >-
                        Die Zeiteinheit, in der Wiederholungsversuche ausgeführt
                        werden. Zulässige Werte: `day` und `hour`.
                    intervalValue:
                      type: string
                      description: >-
                        Intervall, in dem Wiederholungsversuche durchgeführt
                        werden. Definiert die Anzahl der Zeiteinheiten zwischen
                        den Versuchen.
                discount:
                  type: object
                  description: Rabattoptionen.
                  properties:
                    amount:
                      type: string
                      description: Ihrem Endnutzer zu belastender Betrag.
                    period:
                      type: number
                      description: Rabattzeitraum.
                  required:
                    - amount
                    - period
                dateToUpdate:
                  type: string
                  description: >-
                    Gilt nur, wenn die angeforderte Aktualisierung zu einem
                    künftigen Datum wirksam werden soll. Format: `YYYY-MM-DD`.
              required:
                - amount
                - card
                - autoRecurring
              x-examples:
                Example 1:
                  paymentMethod:
                    type: CreditCard
                    code: '1000'
                    flow: DIRECT
                  externalId: '1662647310'
                  country: ARG
                  amount: 100
                  currency: ARS
                  accountNumber: '{{accountNumber}}'
                  conceptCode: '0001'
                  comment: subs test 1 del 7/9 xdia
                  merchant:
                    type: INDIVIDUAL
                    name: Obi Wan
                    lastname: Kenobi
                    document:
                      type: DNI
                      id: '12345678'
                    userReference: abc123
                    email: obiwankenobi@starwars.com
                    phone:
                      countryCode: '54'
                      areaCode: '11'
                      number: '98789632'
                    birthdate: '2000-01-01'
                    nationality: Argentinian
                    address:
                      street: Charruas
                      number: '938'
                      city: Hurlingham
                      state: state
                      country: ARG
                      zipCode: '1688'
                      comment: portero 801
                  payer:
                    type: INDIVIDUAL
                    name: Luke
                    lastname: Skywalker
                    document:
                      id: '37993830'
                      type: DNI
                    email: jane.doe@example.com
                    phone:
                      countryCode: '1'
                      areaCode: '11'
                      number: '98789632'
                    birthdate: 01/01/1990
                    nationality: American
                    address:
                      street: Siempre viva
                      number: '1234'
                      city: Springfield
                      state: Ohio
                      country: USA
                      zipCode: '1686'
                      comment: May the force be with you, always!
                  card:
                    name: APRO
                    number: '4509953566233704'
                    cvv: '123'
                    expirationMonth: '11'
                    expirationYear: '2025'
                    installments: 1
                  type: SOFTWARE
                  autoRecurring:
                    repetitions: 1
                    type: day
            examples:
              200 - Suscription:
                value:
                  dateToUpdate: '2025-01-30'
                  amount: 16000
                  autoRecurring:
                    repetitions: '3'
                    type: month
                    trialDays: '0'
                  retry:
                    repetitions: 2
                    intervalUnit: day
                    intervalValue: 1
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  externalId:
                    type: string
                    description: >-
                      Eine von Ihrem System generierte eindeutige Kennung zur
                      Nachverfolgung der Transaktion (alphanumerische Zeichen
                      und Bindestriche). Wir empfehlen UUID4, um die
                      Eindeutigkeit sicherzustellen.
                  internalId:
                    type: string
                    description: Localpayment-Transaktionskennung.
                  status:
                    type: object
                    description: Status des Vorgangs.
                    properties:
                      code:
                        type: string
                        description: Statuscode.
                      description:
                        type: string
                        description: Statusbeschreibung.
                      detail:
                        type: string
                        description: Statusdetails.
                  errors:
                    type: array
                    description: Liste der bei der Transaktion aufgetretenen Fehler.
                    items:
                      type: object
                x-examples:
                  Example 1:
                    externalId: 564b161a-76ba-4a84-b5cf-583f2df8c377
                    internalId: 52425bbd-b68b-4abc-9480-5ae88d53adb3
                    status:
                      code: '107'
                      description: APPROVED
                      detail: Update subscription success
                    errors: []
              examples:
                107 - Update subscription success:
                  value:
                    externalId: 564b161a-76ba-4a84-b5cf-583f2df8c377
                    internalId: 52425bbd-b68b-4abc-9480-5ae88d53adb3
                    status:
                      code: '107'
                      description: APPROVED
                      detail: Update subscription success
                    errors: []
        '400':
          description: Ungültige Anfrage
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: object
                    description: Status des Vorgangs.
                    properties:
                      code:
                        type: string
                        description: Statuscode.
                      description:
                        type: string
                        description: Statusbeschreibung.
                      detail:
                        type: string
                        description: Statusdetails.
                x-examples:
                  Example 1:
                    status:
                      code: '400'
                      description: ERROR
                      detail: Invalid operation
              examples:
                400 - Invalid operation:
                  value:
                    status:
                      code: '400'
                      description: ERROR
                      detail: Invalid operation
      security:
        - token: []
      servers:
        - url: https://api.stage.localpayment.com
          description: Stage
components:
  securitySchemes:
    token:
      type: http
      scheme: bearer

````

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