> ## 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.

# Creare un abbonamento

Questo endpoint ti consente di creare un nuovo abbonamento per un cliente. Creare un abbonamento significa associare un cliente a un piano di abbonamento specifico e registrarne le informazioni di pagamento.


## OpenAPI

````yaml openapi/it/localpayment.json POST /api/payin/subscriptions
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:
    post:
      summary: Creare un abbonamento
      operationId: create-a-subscription
      parameters:
        - name: Authorization
          in: header
          description: >-
            Token di accesso Bearer per l'autenticazione. Questo token si
            ottiene dagli endpoint [Ottenere il token di
            accesso](/it/reference/get-token) o [Rinnovare il token di
            accesso](/it/reference/refresh-token).
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                paymentMethod:
                  type: object
                  properties:
                    type:
                      type: string
                      description: >-
                        [Tipo di metodo di
                        pagamento](/it/reference/get-available-payment-methods).
                    code:
                      type: string
                      description: >-
                        [Codice del metodo di
                        pagamento](/it/reference/get-available-payment-methods).
                    flow:
                      type: string
                      description: >-
                        Definisce come vengono raccolti i dati di pagamento:
                        `DIRECT` (all'interno della richiesta API) o `REDIRECT`
                        (modulo esterno). Attualmente è supportato solo
                        `DIRECT`.
                  required:
                    - type
                    - code
                    - flow
                  x-examples:
                    Example 1:
                      type: BankTransfer
                      code: '1005'
                      flow: DIRECT
                externalId:
                  type: string
                  description: >-
                    Identificatore univoco generato dal tuo sistema per
                    tracciare la transazione (caratteri alfanumerici e
                    trattini). Consigliamo di usare UUID4 per garantirne
                    l'univocità.
                country:
                  type: string
                  enum:
                    - COL
                    - MEX
                    - PER
                  description: >-
                    [Paese del documento](/it/reference/country-codes). ISO
                    3166-1 alpha-3.
                amount:
                  type: number
                  description: Importo della transazione.
                currency:
                  type: string
                  enum:
                    - COP
                    - MXN
                    - PEN
                    - USD
                  description: '[Codici valuta](/it/reference/currency-codes).'
                accountNumber:
                  type: string
                  description: Numero di conto Localpayment.
                conceptCode:
                  type: string
                  enum:
                    - '0001'
                    - '0002'
                    - '0003'
                    - '0004'
                    - '0005'
                    - '0006'
                    - '0007'
                    - '0008'
                    - '0009'
                    - '0010'
                    - '0011'
                    - '0012'
                    - '0013'
                    - '0014'
                    - '0015'
                    - '0016'
                    - '0017'
                    - '0018'
                    - '0019'
                    - '0020'
                    - '0021'
                    - '0022'
                    - '0023'
                    - '0024'
                    - '0025'
                    - '0026'
                    - '0027'
                    - '0028'
                    - '0029'
                    - '0030'
                    - '0031'
                    - '0032'
                    - '0033'
                    - '0034'
                    - '0035'
                    - '0036'
                    - '0037'
                    - '0038'
                    - '0039'
                    - '0040'
                  description: '[Codice](/it/reference/concept-codes) causale del pagamento.'
                comment:
                  type: string
                  description: Informazioni aggiuntive
                exchangeRateToken:
                  type: string
                  description: >-
                    Token fornito dal [servizio di cambio
                    valuta](/it/reference/currency-exchange-quote) per usare un
                    tasso di cambio concordato in anticipo.
                payer:
                  type: object
                  description: Informazioni sul pagatore.
                  properties:
                    type:
                      type: string
                      enum:
                        - COMPANY
                        - INDIVIDUAL
                      description: Tipo di pagatore.
                    name:
                      type: string
                      description: >-
                        Nome del pagatore. I caratteri consentiti dipendono dal
                        campo `type`: per `individual`, lettere (inclusi i
                        caratteri accentati), spazi e punti (`.`); per
                        `company`, lo stesso insieme più cifre, trattino basso
                        (`_`) e trattino (`-`).
                      minLength: 2
                      maxLength: 255
                    lastName:
                      type: string
                      description: >-
                        Cognome del pagatore. Obbligatorio quando `type` è
                        `individual` e ignorato quando `type` è `company`. I
                        caratteri consentiti dipendono da `type`: per
                        `individual`, lettere (inclusi i caratteri accentati),
                        spazi e punti (`.`); per `company`, lo stesso insieme
                        più cifre, trattino basso (`_`) e trattino (`-`).
                      minLength: 2
                      maxLength: 255
                    document:
                      type: object
                      description: Informazioni sul documento d'identità del pagatore.
                      properties:
                        type:
                          type: string
                          description: >-
                            Il [tipo di documento
                            d'identità](/it/reference/identity-document-types),
                            ad esempio un numero di identità nazionale, un
                            numero di previdenza sociale o una patente di guida,
                            a seconda del paese di emissione.
                          examples:
                            - RUC
                        id:
                          type: string
                          description: >-
                            Numero del documento d'identità (di solito un
                            numero). Deve essere un numero valido secondo le
                            regole del tipo di documento specifico.
                          examples:
                            - '1791234561009'
                      required:
                        - type
                        - id
                      examples:
                        - type: RUC
                          id: '1791234561009'
                    userReference:
                      type: string
                      description: Nome utente o ID del pagatore nella tua piattaforma.
                    email:
                      type: string
                      description: E-mail dell'utente.
                    phone:
                      type: object
                      description: Numero di telefono del pagatore.
                      properties:
                        countryCode:
                          type: string
                          description: Codice paese del telefono.
                        areaCode:
                          type: string
                          description: Prefisso telefonico del paese.
                        number:
                          type: string
                          description: Numero di telefono.
                      required:
                        - countryCode
                        - areaCode
                        - number
                    birthDate:
                      type: string
                      description: Data di nascita del pagatore nel formato `yyyy-mm-dd`.
                    nationality:
                      type: string
                      description: Nazionalità del pagatore.
                    address:
                      type: object
                      description: Indirizzo del pagatore.
                      properties:
                        street:
                          type: string
                          description: Nome della via.
                          examples:
                            - Independencia
                        number:
                          type: string
                          description: Numero civico.
                          examples:
                            - '123'
                        city:
                          type: string
                          description: Città.
                          examples:
                            - Cordoba
                        state:
                          type: string
                          description: Stato.
                          examples:
                            - Cordoba
                        country:
                          type: string
                          description: Paese dell'indirizzo.
                          examples:
                            - Argentina
                        zipCode:
                          type: string
                          description: Codice postale.
                          examples:
                            - X5000IUO
                        comment:
                          type: string
                          description: Informazioni aggiuntive sull'indirizzo.
                          examples:
                            - Sucursal 123
                      examples:
                        - street: Independencia
                          number: '123'
                          city: Cordoba
                          state: Cordoba
                          country: ARG
                          zipCode: X5000IUO
                          comment: Sucursal 123
                  required:
                    - type
                    - name
                    - document
                    - email
                    - phone
                  x-examples:
                    Example 1:
                      beneficiary:
                        type: COMPANY
                        name: ITAU ARG
                        document:
                          type: CUIT
                          id: '20907920276'
                        userReference: Lorem
                        email: aldana@mail.com
                        phone:
                          countryCode: countryCode
                          areaCode: areaCode
                          number: phoneNumber
                        birthDate: '2021-11-08'
                        nationality: beneficiary nationality
                        address:
                          street: Beneficiary adress
                          number: '234'
                          city: City
                          state: Villa Rosa
                          country: Country
                          zipCode: '1411'
                          comment: TEST
                        bank:
                          name: ARG TEST
                          code: '007'
                          account:
                            type: C
                            number: '1234567891234567891234'
                intermediaries:
                  type: array
                  description: >-
                    Array di oggetti Party. Rappresenta le altre parti della
                    catena di pagamento, poiché l'utente finale non è un tuo
                    cliente diretto. Tieni conto della sequenza dell'array: il
                    tuo cliente deve essere il primo elemento, il cliente del
                    tuo cliente il secondo e così via, finché non ci sono più
                    intermediari.
                device:
                  type: object
                  properties:
                    id:
                      type: string
                      description: >-
                        ID del dispositivo Android / iPhone. Può essere vuoto
                        per altri tipi di dispositivo come PC / Mac.
                    ip:
                      type: string
                      description: Indirizzo IP del dispositivo
                    browser:
                      type: string
                      description: Browser del dispositivo.
                metaData:
                  type: string
                  description: >-
                    Oggetto non strutturato per registrare qualsiasi metadato
                    significativo per te.
                commercialData:
                  type: object
                  description: >-
                    Informazioni aggiuntive relative ai beni o servizi
                    scambiati. 
                  properties:
                    lastName:
                      type: string
                      description: >-
                        Cognome dell'entità commerciale. Obbligatorio quando il
                        valore rappresenta una persona fisica e ignorato quando
                        rappresenta un'azienda. Caratteri consentiti: per una
                        persona fisica, lettere (inclusi i caratteri accentati),
                        spazi e punti (`.`); per un'azienda, lo stesso insieme
                        più cifre, trattino basso (`_`) e trattino (`-`).
                      minLength: 2
                      maxLength: 255
                    name:
                      type: string
                      description: >-
                        Nome dell'entità commerciale. I caratteri consentiti
                        dipendono dal fatto che il valore rappresenti una
                        persona fisica o un'azienda: per una persona fisica,
                        lettere (inclusi i caratteri accentati), spazi e punti
                        (`.`); per un'azienda, lo stesso insieme più cifre,
                        trattino basso (`_`) e trattino (`-`).
                      minLength: 2
                      maxLength: 255
                merchant:
                  type: object
                  description: Informazioni sull'esercente.
                  properties:
                    type:
                      type: string
                      description: Tipo di esercente.
                    name:
                      type: string
                      description: >-
                        Nome dell'esercente. I caratteri consentiti dipendono
                        dal campo `type`: per `individual`, lettere (inclusi i
                        caratteri accentati), spazi e punti (`.`); per
                        `company`, lo stesso insieme più cifre, trattino basso
                        (`_`) e trattino (`-`).
                      minLength: 2
                      maxLength: 255
                    lastName:
                      type: string
                      description: >-
                        Cognome dell'esercente. Obbligatorio quando `type` è
                        `individual` e ignorato quando `type` è `company`. I
                        caratteri consentiti dipendono da `type`: per
                        `individual`, lettere (inclusi i caratteri accentati),
                        spazi e punti (`.`); per `company`, lo stesso insieme
                        più cifre, trattino basso (`_`) e trattino (`-`).
                      minLength: 2
                      maxLength: 255
                    document:
                      type: object
                      description: Informazioni sul documento d'identità dell'esercente.
                      properties:
                        type:
                          type: string
                          description: >-
                            Il [tipo di documento
                            d'identità](/it/reference/identity-document-types),
                            ad esempio un numero di identità nazionale, un
                            numero di previdenza sociale o una patente di guida,
                            a seconda del paese di emissione.
                          examples:
                            - RUC
                        id:
                          type: string
                          description: >-
                            Numero del documento d'identità (di solito un
                            numero). Deve essere un numero valido secondo le
                            regole del tipo di documento specifico.
                          examples:
                            - '1791234561009'
                      examples:
                        - type: RUC
                          id: '1791234561009'
                    phone:
                      type: object
                      description: Numero di telefono dell'esercente.
                      properties:
                        countryCode:
                          type: string
                          description: Codice paese del telefono.
                        areaCode:
                          type: string
                          description: Prefisso telefonico del paese.
                        number:
                          type: string
                          description: Numero di telefono.
                    email:
                      type: string
                      description: E-mail dell'esercente.
                    userReference:
                      type: string
                      description: Nome utente o ID dell'esercente nella tua piattaforma.
                    address:
                      type: object
                      description: Indirizzo dell'esercente.
                      properties:
                        street:
                          type: string
                          description: Nome della via.
                          examples:
                            - Independencia
                        number:
                          type: string
                          description: Numero civico.
                          examples:
                            - '123'
                        city:
                          type: string
                          description: Città.
                          examples:
                            - Cordoba
                        state:
                          type: string
                          description: Stato.
                          examples:
                            - Cordoba
                        country:
                          type: string
                          description: Paese dell'indirizzo.
                          examples:
                            - Argentina
                        zipCode:
                          type: string
                          description: Codice postale.
                          examples:
                            - X5000IUO
                        comment:
                          type: string
                          description: Informazioni aggiuntive sull'indirizzo.
                          examples:
                            - Sucursal 123
                      examples:
                        - street: Independencia
                          number: '123'
                          city: Cordoba
                          state: Cordoba
                          country: ARG
                          zipCode: X5000IUO
                          comment: Sucursal 123
                    nationality:
                      type: string
                      description: Nazionalità dell'esercente.
                    birthDate:
                      type: string
                      description: Data di nascita dell'esercente nel formato yyyy-mm-dd.
                  x-examples:
                    Example 1:
                      merchant:
                        type: COMPANY
                        name: Merchant Name
                        lastName: Merchant LastName
                        document:
                          type: Type Document
                          id: ID Document
                        userReference: additional information
                        email: email@Merchant.address
                        phone:
                          countryCode: '55'
                          areaCode: '55'
                          number: '66666666'
                        birthDate: '2001-01-01'
                        nationality: Merchant Nacionality
                        address:
                          street: Av Merchant Address
                          number: '1234'
                          city: City Name
                          state: State Name
                          country: Country Name
                          zipCode: Zip Code
                          comment: Additional address information
                card:
                  type: object
                  description: 'Dati della carta di debito del pagatore. '
                  properties:
                    name:
                      type: string
                      description: ' Nome del titolare della carta, come stampato sul fronte della carta di debito.'
                    number:
                      type: string
                      description: Numero della carta (PAN).
                    cvv:
                      type: string
                      description: Codice di verifica della carta
                    expirationMonth:
                      type: string
                      description: Mese di scadenza della carta. Formato `MM`.
                      examples:
                        - '01'
                    expirationYear:
                      type: string
                      description: Anno di scadenza della carta. Formato `YYYY`.
                      examples:
                        - '2025'
                    token:
                      type: string
                      description: >-
                        Usa una carta tokenizzata in precedenza inviando il
                        token.
                  required:
                    - name
                    - number
                    - cvv
                    - expirationMonth
                    - expirationYear
                invoice:
                  type: string
                  description: Riferimento della fattura.
                item:
                  type: object
                  description: Elenco degli articoli venduti.
                  properties:
                    id:
                      type: string
                      description: ' ID dell''articolo.'
                    quantity:
                      type: number
                      description: ' ID dell''articolo.'
                    categoryId:
                      type: string
                      description: Categoria dell'articolo.
                    pictureUrl:
                      type: string
                      description: ' URL che punta a un''immagine dell''articolo.'
                    description:
                      type: string
                      description: Descrizione dell'articolo.
                    title:
                      type: string
                      description: "Titolo dell'articolo.\r\n"
                    unitPrice:
                      type: number
                      description: Prezzo unitario
                shipments:
                  type: object
                  description: Elenco degli indirizzi di spedizione
                  properties:
                    city:
                      type: string
                      description: Città
                    number:
                      type: string
                      description: Numero civico
                    street:
                      type: string
                      description: Indirizzo stradale
                    country:
                      type: string
                      description: Paese
                    state:
                      type: string
                      description: Stato/Provincia
                    comment:
                      type: string
                      description: Informazioni aggiuntive
                    zipCode:
                      type: string
                      description: Codice postale
                beneficiary:
                  type: object
                  description: Informazioni sul conto del beneficiario.
                  properties:
                    type:
                      type: string
                      enum:
                        - INDIVIDUAL
                        - COMPANY
                      description: Tipo di beneficiario.
                    name:
                      type: string
                      description: >-
                        Nome del beneficiario. I caratteri consentiti dipendono
                        dal campo `type`: per `individual`, lettere (inclusi i
                        caratteri accentati), spazi e punti (`.`); per
                        `company`, lo stesso insieme più cifre, trattino basso
                        (`_`) e trattino (`-`).
                      minLength: 2
                      maxLength: 255
                    lastName:
                      type: string
                      description: >-
                        Cognome del beneficiario. Obbligatorio quando `type` è
                        `individual` e ignorato quando `type` è `company`. I
                        caratteri consentiti dipendono da `type`: per
                        `individual`, lettere (inclusi i caratteri accentati),
                        spazi e punti (`.`); per `company`, lo stesso insieme
                        più cifre, trattino basso (`_`) e trattino (`-`).
                      minLength: 2
                      maxLength: 255
                    document:
                      type: object
                      description: Informazioni sul documento d'identità del beneficiario.
                      properties:
                        type:
                          type: string
                          description: >-
                            Il [tipo di documento
                            d'identità](/it/reference/identity-document-types),
                            ad esempio un numero di identità nazionale, un
                            numero di previdenza sociale o una patente di guida,
                            a seconda del paese di emissione.
                        id:
                          type: string
                          description: >-
                            Numero del documento d'identità (di solito un
                            numero). Deve essere un numero valido secondo le
                            regole del tipo di documento specifico.
                type:
                  type: string
                  enum:
                    - SOFTWARE
                    - STREAMING
                    - CONTENT
                    - PRODUCTS
                    - MEMBERSHIP
                  description: 'Specifica la categoria dell''abbonamento. '
                autoRecurring:
                  type: object
                  description: Proprietà dell'abbonamento
                  properties:
                    type:
                      type: string
                      enum:
                        - day
                        - month
                        - custom
                      description: >-
                        Definisce l'unità dell'intervallo ricorrente. Per la
                        ricorrenza su richiesta, invia il parametro con
                        `value=custom`.
                    trialDays:
                      type: number
                      description: Numero di giorni di prova dell'abbonamento.
                  required:
                    - type
                retry:
                  type: object
                  description: Opzioni per i nuovi tentativi del payin.
                  properties:
                    repetitions:
                      type: number
                      description: Numero di volte in cui l'addebito verrà ritentato.
                    intervalUnit:
                      type: string
                      enum:
                        - day
                        - hour
                      description: >-
                        Unità di tempo in cui verranno eseguiti i tentativi.
                        Valori consentiti: `day` e `hour`.
                    intervalValue:
                      type: string
                      description: >-
                        Intervallo con cui verranno eseguiti i tentativi.
                        Definisce il numero di unità di tempo tra un tentativo e
                        l'altro.
                discount:
                  type: object
                  description: Opzioni di sconto.
                  properties:
                    amount:
                      type: string
                      description: Importo da addebitare al tuo utente finale.
                    period:
                      type: number
                      description: Periodo di sconto.
                  required:
                    - amount
                    - period
              required:
                - paymentMethod
                - externalId
                - country
                - amount
                - currency
                - accountNumber
                - conceptCode
                - payer
                - card
                - type
                - 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:
                    type: day
            examples:
              200 - Suscription:
                value:
                  paymentMethod:
                    type: CreditCard
                    code: '1000'
                    flow: DIRECT
                  externalId: 820d6e89-3715-4296-9975-def5c7750f65
                  country: ARG
                  amount: 100
                  currency: ARS
                  accountNumber: '{{accountNumber}}'
                  conceptCode: '0001'
                  comment: Test
                  merchant:
                    type: COMPANY
                    name: Company
                    document:
                      type: DNI
                      id: '12345678'
                    userReference: abc123
                    email: merchant@mail.com
                    phone:
                      countryCode: '54'
                      areaCode: '11'
                      number: '98781234'
                  payer:
                    type: INDIVIDUAL
                    name: John
                    lastname: Doe
                    document:
                      id: '37993812'
                      type: DNI
                    email: john.doe@example.com
                    phone:
                      countryCode: '1'
                      areaCode: '11'
                      number: '98789123'
                  card:
                    name: APRO
                    number: '4000000000000002'
                    cvv: '123'
                    expirationMonth: '11'
                    expirationYear: '2029'
                    installments: 1
                  type: SOFTWARE
                  autoRecurring:
                    type: day
              COL - Subscription:
                summary: COL - Subscription
                value:
                  paymentMethod:
                    type: CreditCard
                    code: '1900'
                    flow: DIRECT
                  externalId: 550e8400-e29b-41d4-a716-446655440000
                  country: COL
                  amount: 100
                  currency: COP
                  accountNumber: '{{yourLocalpaymentAccountNumber}}'
                  conceptCode: '0001'
                  comment: Subscription
                  merchant:
                    type: COMPANY
                    name: Example Company S.A.
                    document:
                      type: NIT
                      id: '900123456'
                  payer:
                    type: INDIVIDUAL
                    name: Jane
                    lastName: Doe
                    document:
                      type: CC
                      id: '1234567890'
                    email: jane.doe@example.com
                  card:
                    name: Jane Doe
                    number: '4000000000000002'
                    cvv: '123'
                    expirationMonth: '12'
                    expirationYear: '2029'
                    installments: 1
                  type: SOFTWARE
                  autoRecurring:
                    repetitions: 2
                    type: day
              PER - Subscription (PEN):
                summary: PER - Subscription (PEN)
                value:
                  paymentMethod:
                    type: CreditCard
                    code: '6000'
                    flow: DIRECT
                  externalId: 550e8400-e29b-41d4-a716-446655440000
                  country: PER
                  amount: 100
                  currency: PEN
                  accountNumber: '{{yourLocalpaymentAccountNumber}}'
                  conceptCode: '0001'
                  comment: Subscription
                  merchant:
                    type: COMPANY
                    name: Example Company S.A.
                    document:
                      type: RUC
                      id: '20123456789'
                  payer:
                    type: INDIVIDUAL
                    name: Jane
                    lastName: Doe
                    document:
                      type: DNI
                      id: '12345678'
                    email: jane.doe@example.com
                  card:
                    name: Jane Doe
                    number: '4000000000000002'
                    cvv: '123'
                    expirationMonth: '12'
                    expirationYear: '2029'
                    installments: 1
                  type: SOFTWARE
                  autoRecurring:
                    repetitions: 2
                    type: day
              PER - Subscription (USD):
                summary: PER - Subscription (USD)
                value:
                  paymentMethod:
                    type: CreditCard
                    code: '6004'
                    flow: DIRECT
                  externalId: 550e8400-e29b-41d4-a716-446655440000
                  country: PER
                  amount: 100
                  currency: USD
                  accountNumber: '{{yourLocalpaymentAccountNumber}}'
                  conceptCode: '0001'
                  comment: Subscription
                  merchant:
                    type: COMPANY
                    name: Example Company S.A.
                    document:
                      type: RUC
                      id: '20123456789'
                  payer:
                    type: INDIVIDUAL
                    name: Jane
                    lastName: Doe
                    document:
                      type: DNI
                      id: '12345678'
                    email: jane.doe@example.com
                  card:
                    name: Jane Doe
                    number: '4000000000000002'
                    cvv: '123'
                    expirationMonth: '12'
                    expirationYear: '2029'
                    installments: 1
                  type: SOFTWARE
                  autoRecurring:
                    repetitions: 2
                    type: day
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  subscriptionId:
                    type: string
                    description: Identificatore univoco dell'abbonamento.
                  status:
                    type: object
                    title: status
                    description: Stato dell'operazione.
                    properties:
                      code:
                        type: string
                        description: >-
                          [Codice di
                          stato](/it/reference/transaction-status-error-codes).
                      description:
                        type: string
                        description: >-
                          [Descrizione dello
                          stato](/it/reference/transaction-status-error-codes).
                      detail:
                        type: string
                        description: Informazioni aggiuntive sullo stato.
                  creationDate:
                    type: string
                    description: >-
                      Data e ora di creazione dell'abbonamento. Il timestamp
                      segue il formato ISO 8601.
                  nextPaymentDate:
                    type: string
                    description: >-
                      Data e ora di scadenza del prossimo pagamento
                      dell'abbonamento. Il timestamp segue il formato ISO 8601.
                  payments:
                    type: array
                    description: >-
                      Array di oggetti che rappresentano pagamenti associati
                      all'abbonamento.
                    items:
                      type: object
                      properties:
                        externalId:
                          type: string
                          description: >-
                            Identificatore univoco generato dal tuo sistema per
                            tracciare la transazione (caratteri alfanumerici e
                            trattini). Consigliamo di usare UUID4 per garantirne
                            l'univocità.
                        internalId:
                          type: string
                          description: Identificatore della transazione Localpayment.
                        status:
                          type: object
                          title: status
                          description: Stato dell'operazione.
                          properties:
                            code:
                              type: string
                              description: >-
                                [Codice di
                                stato](/it/reference/transaction-status-error-codes).
                            description:
                              type: string
                              description: >-
                                [Descrizione dello
                                stato](/it/reference/transaction-status-error-codes).
                            detail:
                              type: string
                              description: Informazioni aggiuntive sullo stato.
                x-examples:
                  Example 1:
                    subscriptionId: 133640f9-ac06-49fc-aa82-08bfe52ceb5e
                    status:
                      code: '105'
                      description: INPROGRESS
                      detail: The subscription is in progress
                    creationDate: '2022-05-31T15:05:47.665+00:00'
                    nextPaymentDate: '2022-06-30T15:05:47.665+00:00'
                    payments:
                      - externalId: bb7d32e5-04da-4b8a-856f-8caf89d986ea
                        internalId: 9977c353-ce00-48fd-b3ac-f685bce30895
                        status:
                          code: '103'
                          description: APPROVED
                          detail: The payin was confirmed but not credited yet
              examples:
                200 - Subscription:
                  value:
                    subscriptionId: 133640f9-ac16-49fc-aa82-08bfe52ceb5e
                    status:
                      code: '105'
                      description: INPROGRESS
                      detail: The subscription is in progress
                    creationDate: '2024-05-31T15:05:47.665+00:00'
                    nextPaymentDate: '2024-06-30T15:05:47.665+00:00'
                    payments:
                      - externalId: bb7d3235-04da-4b8a-85bf-8caf89d986ea
                        internalId: 9977c453-ce00-48fd-baac-f685bce30895
                        status:
                          code: '103'
                          description: APPROVED
                          detail: The payin was confirmed but not credited yet
                COL - Subscription:
                  summary: COL - Subscription
                  value:
                    type: SOFTWARE
                    externalId: 550e8400-e29b-41d4-a716-446655440000
                    internalId: 5aced5da-40c1-4bec-85ff-c8cd1bcb4526
                    country: COL
                    currency: COP
                    accountNumber: '{{yourLocalpaymentAccountNumber}}'
                    status:
                      code: '105'
                      description: ACTIVE
                      detail: The subscription is active
                    date:
                      creationDate: '2024-01-15T10:30:00Z'
                      nextPaymentDate: '2024-01-16T10:30:00Z'
                    payments:
                      - externalId: f47ac10b-58cc-4372-a567-0e02b2c3d479
                        internalId: 9b2e4c1d-7a3f-4e8b-b6d5-2c1f0a9e8d7c
                        status:
                          code: '103'
                          description: APPROVED
                          detail: The payin was confirmed but not credited yet
                    errors: []
                PER - Subscription (PEN):
                  summary: PER - Subscription (PEN)
                  value:
                    type: SOFTWARE
                    externalId: 550e8400-e29b-41d4-a716-446655440000
                    internalId: 5aced5da-40c1-4bec-85ff-c8cd1bcb4526
                    country: PER
                    currency: PEN
                    accountNumber: '{{yourLocalpaymentAccountNumber}}'
                    status:
                      code: '105'
                      description: ACTIVE
                      detail: The subscription is active
                    date:
                      creationDate: '2024-01-15T10:30:00Z'
                      nextPaymentDate: '2024-01-16T10:30:00Z'
                    payments:
                      - externalId: f47ac10b-58cc-4372-a567-0e02b2c3d479
                        internalId: 9b2e4c1d-7a3f-4e8b-b6d5-2c1f0a9e8d7c
                        status:
                          code: '103'
                          description: APPROVED
                          detail: The payin was confirmed but not credited yet
                    errors: []
                PER - Subscription (USD):
                  summary: PER - Subscription (USD)
                  value:
                    type: SOFTWARE
                    externalId: 550e8400-e29b-41d4-a716-446655440000
                    internalId: 5aced5da-40c1-4bec-85ff-c8cd1bcb4526
                    country: PER
                    currency: USD
                    accountNumber: '{{yourLocalpaymentAccountNumber}}'
                    status:
                      code: '105'
                      description: ACTIVE
                      detail: The subscription is active
                    date:
                      creationDate: '2024-01-15T10:30:00Z'
                      nextPaymentDate: '2024-01-16T10:30:00Z'
                    payments:
                      - externalId: f47ac10b-58cc-4372-a567-0e02b2c3d479
                        internalId: 9b2e4c1d-7a3f-4e8b-b6d5-2c1f0a9e8d7c
                        status:
                          code: '103'
                          description: APPROVED
                          detail: The payin was confirmed but not credited yet
                    errors: []
        '400':
          description: Richiesta non valida.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: object
                    title: status
                    description: Stato dell'operazione.
                    properties:
                      code:
                        type: string
                        description: >-
                          [Codice di
                          stato](/it/reference/transaction-status-error-codes).
                      description:
                        type: string
                        description: >-
                          [Descrizione dello
                          stato](/it/reference/transaction-status-error-codes).
                      detail:
                        type: string
                        description: Informazioni aggiuntive sullo stato.
                  errors:
                    type: array
                    description: Elenco degli errori verificatisi durante la transazione.
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          description: Codice di errore.
                        detail:
                          type: string
                          description: Dettagli dell'errore.
                x-examples:
                  Example 1:
                    status:
                      code: '501'
                      description: REJECTED
                      detail: Country not found
                    errors:
                      - code: '501'
                        detail: Country not found
                      - code: '817'
                        detail: Invalid concept code
              examples:
                501 - Country not found:
                  value:
                    status:
                      code: '501'
                      description: REJECTED
                      detail: Country not found
                    errors:
                      - code: '501'
                        detail: Country not found
                      - code: '817'
                        detail: Invalid concept code
        '401':
          description: Non autorizzato.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: Informazioni aggiuntive della risposta.
                  code:
                    type: string
                    description: Codice di stato.
                  messages:
                    type: array
                    description: Elenco dei messaggi.
                    items:
                      type: object
                      properties:
                        token_class:
                          type: string
                          description: Classe del token.
                        token_type:
                          type: string
                          description: Tipo di token.
                        message:
                          type: string
                          description: Messaggio con informazioni aggiuntive.
                x-examples:
                  Example 1:
                    detail: Given token not valid for any token type
                    code: token_not_valid
                    messages:
                      - token_class: AccessToken
                        token_type: access
                        message: Token is invalid or expired
              examples:
                401 - Token is invalid or expired:
                  value:
                    detail: Given token not valid for any token type
                    code: token_not_valid
                    messages:
                      - token_class: AccessToken
                        token_type: access
                        message: Token is invalid or expired
      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.