PagoPA Payment API

Payment operation

Operations 3

POST /retrievalTokens ENG: Save retrieval payload - IT: Salvataggio del retrieval payload #
GET /retrievalTokens/{retrievalId} ENG: Get retrieval payload - IT: Recupera il retrieval payload #

Specifications

Schemas & Data

📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-ct-receipt-model-response-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-cart-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-get-cart-response-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-get-mbd-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-get-mdb-receipt-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-create-mbd-request-v2-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-single-flow-response-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-paginated-payments-response-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-paginated-flows-response-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-create-flow-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-single-flow-created-response-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-paginated-flows-published-response-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-paginated-flows-created-response-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-payment-position-model-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-payments-model-response-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-payment-position-model-base-response-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-payment-positions-info-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-app-info-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-already-paid-payment-option-model-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-file-id-list-response-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-upload-report-dto-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-upload-status-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-update-transfer-iban-massive-response-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-payment-position-model-v3-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-payment-position-model-response-v3-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-payment-positions-info-v3-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-flow-list-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-upload-report-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-receipts-info-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-broker-institutions-response-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-ciibans-response-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-payment-options-response-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-new-debt-position-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-debt-position-response-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-get-generation-request-status-resource-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-template-resource-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-notice-generation-request-item-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-notice-generation-massive-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-notice-generation-massive-resource-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-get-signed-url-resource-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-transaction-result-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-transaction-result-response-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-eservice-descriptor-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-purpose-template-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-purpose-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-problem-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-eservice-template-version-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-agreement-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-verification-response-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-input-message-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-success-response-signature-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-verifica-organization-id-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-pseudonymization-response-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-data-preparation-response-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-datapreparation-template-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-richiesta-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-verifica-codice-fiscale-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-submit-tracing-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-get-tracing-errors-response-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-recover-tracing-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-signal-pull-response-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-signal-payload-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-signal-push-response-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-signature-request-detail-view-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-dossier-detail-view-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-create-signature-request-body-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-create-dossier-body-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-signature-request-list-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-signature-field-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-citizen-consent-response-dto-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-access-control-allow-origin-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-list-citizen-consent-response-dto-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-retry-after-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-rate-limit-limit-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-rate-limit-reset-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-retrieval-response-dto-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-retrieval-request-dto-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-retrieva-id-response-dto-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-tpp-network-connection-response-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-notification-payload-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-auth-request-dynamic-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-token-response-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-auth-payment-response-dto-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-preview-payment-response-v2-dto-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-transaction-bar-code-response-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-auth-bar-code-payment-dto-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-preview-payment-request-v2-dto-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-invoice-dto-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-new-notification-request-v26-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-new-notification-request-v25-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-new-notification-request-v24-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-new-notification-request-v21-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-new-notification-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-new-notification-request-v23-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-asynchronous-sepa-request-to-pay-response-resource-schema.json
📊
JSONSchema
https://artifacts.apis.io/pagopa/json-schema/pagopa-sepa-request-to-pay-cancellation-response-resource-schema.json

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/pagopa:pagopa-payment-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

pagopa-payment-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: EMD Payment API
  version: 1.4.1-SNAPSHOT
  description: EMD Payment
  contact:
    name: PagoPA S.p.A.
    email: cstar@pagopa.it
servers:
- description: Development Test
  url: https://api-emd.dev.cstar.pagopa.it/emd/payment
  x-internal: true
- description: User Acceptance Test
  url: https://api-emd.uat.cstar.pagopa.it/emd/payment
  x-internal: true
- description: Prod
  url: https://api-emd.cstar.pagopa.it/emd/payment
  x-internal: false
tags:
- name: Payment
  description: Payment operation
paths:
  /retrievalTokens:
    post:
      tags:
      - Payment
      summary: 'ENG: Save retrieval payload - IT: Salvataggio del retrieval payload'
      operationId: retrievalTokens
      description: Save retrieval payload
      security:
      - oAuth2: []
      parameters:
      - name: Accept-Language
        in: header
        description: 'ENG: Language - IT: Lingua'
        schema:
          type: string
          pattern: ^[ -~]{2,5}$
          minLength: 2
          maxLength: 5
          example: it-IT
          default: it-IT
        required: true
      requestBody:
        description: 'ENG: Agent, originId and (optional) linkVersion - IT: Agent, originId e (opzionale) linkVersion'
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RetrievalRequestDTO'
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetrievaIdResponseDTO'
          headers:
            Access-Control-Allow-Origin:
              description: Indicates whether the response can be shared with requesting code from the given origin
              required: false
              schema:
                $ref: '#/components/schemas/AccessControlAllowOrigin'
            RateLimit-Limit:
              description: The number of allowed requests in the current period
              required: false
              schema:
                $ref: '#/components/schemas/RateLimitLimit'
            RateLimit-Reset:
              description: The number of seconds left in the current period
              required: false
              schema:
                $ref: '#/components/schemas/RateLimitReset'
            Retry-After:
              description: The number of seconds to wait before allowing a follow-up request
              required: false
              schema:
                $ref: '#/components/schemas/RetryAfter'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetrievalErrorDTO'
              example:
                code: BAD_REQUEST
                message: Bad request
          headers:
            Access-Control-Allow-Origin:
              description: Indicates whether the response can be shared with requesting code from the given origin
              required: false
              schema:
                $ref: '#/components/schemas/AccessControlAllowOrigin'
            RateLimit-Limit:
              description: The number of allowed requests in the current period
              required: false
              schema:
                $ref: '#/components/schemas/RateLimitLimit'
            RateLimit-Reset:
              description: The number of seconds left in the current period
              required: false
              schema:
                $ref: '#/components/schemas/RateLimitReset'
            Retry-After:
              description: The number of seconds to wait before allowing a follow-up request
              required: false
              schema:
                $ref: '#/components/schemas/RetryAfter'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetrievalErrorDTO'
              example:
                code: AUTHENTICATION_FAILED
                message: Something went wrong with authentication
          headers:
            Access-Control-Allow-Origin:
              description: Indicates whether the response can be shared with requesting code from the given origin
              required: false
              schema:
                $ref: '#/components/schemas/AccessControlAllowOrigin'
            RateLimit-Limit:
              description: The number of allowed requests in the current period
              required: false
              schema:
                $ref: '#/components/schemas/RateLimitLimit'
            RateLimit-Reset:
              description: The number of seconds left in the current period
              required: false
              schema:
                $ref: '#/components/schemas/RateLimitReset'
            Retry-After:
              description: The number of seconds to wait before allowing a follow-up request
              required: false
              schema:
                $ref: '#/components/schemas/RetryAfter'
        '404':
          description: The TPP was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetrievalErrorDTO'
              example:
                code: TPP_NOT_FOUND
                message: TPP does not exist or is not active
          headers:
            Access-Control-Allow-Origin:
              description: Indicates whether the response can be shared with requesting code from the given origin
              required: false
              schema:
                $ref: '#/components/schemas/AccessControlAllowOrigin'
            RateLimit-Limit:
              description: The number of allowed requests in the current period
              required: false
              schema:
                $ref: '#/components/schemas/RateLimitLimit'
            RateLimit-Reset:
              description: The number of seconds left in the current period
              required: false
              schema:
                $ref: '#/components/schemas/RateLimitReset'
            Retry-After:
              description: The number of seconds to wait before allowing a follow-up request
              required: false
              schema:
                $ref: '#/components/schemas/RetryAfter'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetrievalErrorDTO'
              example:
                code: TOO_MANY_REQUESTS
                message: Too many requests
          headers:
            Access-Control-Allow-Origin:
              description: Indicates whether the response can be shared with requesting code from the given origin
              required: false
              schema:
                $ref: '#/components/schemas/AccessControlAllowOrigin'
            RateLimit-Limit:
              description: The number of allowed requests in the current period
              required: false
              schema:
                $ref: '#/components/schemas/RateLimitLimit'
            RateLimit-Reset:
              description: The number of seconds left in the current period
              required: false
              schema:
                $ref: '#/components/schemas/RateLimitReset'
            Retry-After:
              description: The number of seconds to wait before allowing a follow-up request
              required: false
              schema:
                $ref: '#/components/schemas/RetryAfter'
        '500':
          description: Server ERROR
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetrievalErrorDTO'
              example:
                code: RETRIEVAL_GENERIC_ERROR
                message: Application error
          headers:
            Access-Control-Allow-Origin:
              description: Indicates whether the response can be shared with requesting code from the given origin
              required: false
              schema:
                $ref: '#/components/schemas/AccessControlAllowOrigin'
            RateLimit-Limit:
              description: The number of allowed requests in the current period
              required: false
              schema:
                $ref: '#/components/schemas/RateLimitLimit'
            RateLimit-Reset:
              description: The number of seconds left in the current period
              required: false
              schema:
                $ref: '#/components/schemas/RateLimitReset'
            Retry-After:
              description: The number of seconds to wait before allowing a follow-up request
              required: false
              schema:
                $ref: '#/components/schemas/RetryAfter'
  /retrievalTokens/{retrievalId}:
    get:
      tags:
      - Payment
      summary: 'ENG: Get retrieval payload - IT: Recupera il retrieval payload'
      operationId: getRetrieval
      description: Get retrieval
      security:
      - oAuth2: []
      parameters:
      - name: Accept-Language
        in: header
        description: 'ENG: Language - IT: Lingua'
        schema:
          type: string
          pattern: ^[ -~]{2,5}$
          minLength: 2
          maxLength: 5
          example: it-IT
          default: it-IT
        required: true
      - name: retrievalId
        in: path
        description: 'ENG: Unique ID that identify retrieval payload - IT: Identificativo univoco del retrieval payload'
        required: true
        schema:
          type: string
          description: 'ENG: Unique ID that identify retrieval payload - IT: Identificativo univoco del retrieval payload'
          pattern: ^[ -~]{1,50}$
          minLength: 50
          maxLength: 50
          example: 0e4c6629-8753-234s-b0da-1f796999ec2-15038637960920
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetrievalResponseDTO'
          headers:
            Access-Control-Allow-Origin:
              description: Indicates whether the response can be shared with requesting code from the given origin
              required: false
              schema:
                $ref: '#/components/schemas/AccessControlAllowOrigin'
            RateLimit-Limit:
              description: The number of allowed requests in the current period
              required: false
              schema:
                $ref: '#/components/schemas/RateLimitLimit'
            RateLimit-Reset:
              description: The number of seconds left in the current period
              required: false
              schema:
                $ref: '#/components/schemas/RateLimitReset'
            Retry-After:
              description: The number of seconds to wait before allowing a follow-up request
              required: false
              schema:
                $ref: '#/components/schemas/RetryAfter'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetrievalErrorDTO'
              example:
                code: BAD_REQUEST
                message: Bad request
          headers:
            Access-Control-Allow-Origin:
              description: Indicates whether the response can be shared with requesting code from the given origin
              required: false
              schema:
                $ref: '#/components/schemas/AccessControlAllowOrigin'
            RateLimit-Limit:
              description: The number of allowed requests in the current period
              required: false
              schema:
                $ref: '#/components/schemas/RateLimitLimit'
            RateLimit-Reset:
              description: The number of seconds left in the current period
              required: false
              schema:
                $ref: '#/components/schemas/RateLimitReset'
            Retry-After:
              description: The number of seconds to wait before allowing a follow-up request
              required: false
              schema:
                $ref: '#/components/schemas/RetryAfter'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetrievalErrorDTO'
              example:
                code: AUTHENTICATION_FAILED
                message: Something went wrong with authentication
          headers:
            Access-Control-Allow-Origin:
              description: Indicates whether the response can be shared with requesting code from the given origin
              required: false
              schema:
                $ref: '#/components/schemas/AccessControlAllowOrigin'
            RateLimit-Limit:
              description: The number of allowed requests in the current period
              required: false
              schema:
                $ref: '#/components/schemas/RateLimitLimit'
            RateLimit-Reset:
              description: The number of seconds left in the current period
              required: false
              schema:
                $ref: '#/components/schemas/RateLimitReset'
            Retry-After:
              description: The number of seconds to wait before allowing a follow-up request
              required: false
              schema:
                $ref: '#/components/schemas/RetryAfter'
        '404':
          description: The TPP was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetrievalErrorDTO'
              example:
                code: RETRIEVAL_NOT_FOUND
                message: Retrieval does not exist or is not active
          headers:
            Access-Control-Allow-Origin:
              description: Indicates whether the response can be shared with requesting code from the given origin
              required: false
              schema:
                $ref: '#/components/schemas/AccessControlAllowOrigin'
            RateLimit-Limit:
              description: The number of allowed requests in the current period
              required: false
              schema:
                $ref: '#/components/schemas/RateLimitLimit'
            RateLimit-Reset:
              description: The number of seconds left in the current period
              required: false
              schema:
                $ref: '#/components/schemas/RateLimitReset'
            Retry-After:
              description: The number of seconds to wait before allowing a follow-up request
              required: false
              schema:
                $ref: '#/components/schemas/RetryAfter'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetrievalErrorDTO'
              example:
                code: TOO_MANY_REQUESTS
                message: Too many requests
          headers:
            Access-Control-Allow-Origin:
              description: Indicates whether the response can be shared with requesting code from the given origin
              required: false
              schema:
                $ref: '#/components/schemas/AccessControlAllowOrigin'
            RateLimit-Limit:
              description: The number of allowed requests in the current period
              required: false
              schema:
                $ref: '#/components/schemas/RateLimitLimit'
            RateLimit-Reset:
              description: The number of seconds left in the current period
              required: false
              schema:
                $ref: '#/components/schemas/RateLimitReset'
            Retry-After:
              description: The number of seconds to wait before allowing a follow-up request
              required: false
              schema:
                $ref: '#/components/schemas/RetryAfter'
        '500':
          description: Server ERROR
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetrievalErrorDTO'
              example:
                code: RETRIEVAL_GENERIC_ERROR
                message: Application error
          headers:
            Access-Control-Allow-Origin:
              description: Indicates whether the response can be shared with requesting code from the given origin
              required: false
              schema:
                $ref: '#/components/schemas/AccessControlAllowOrigin'
            RateLimit-Limit:
              description: The number of allowed requests in the current period
              required: false
              schema:
                $ref: '#/components/schemas/RateLimitLimit'
            RateLimit-Reset:
              description: The number of seconds left in the current period
              required: false
              schema:
                $ref: '#/components/schemas/RateLimitReset'
            Retry-After:
              description: The number of seconds to wait before allowing a follow-up request
              required: false
              schema:
                $ref: '#/components/schemas/RetryAfter'
  /token:
    get:
      tags:
      - Payment
      summary: 'ENG: Redirect API - IT: API di redirect'
      operationId: generateDeepLink
      description: Generate deeplink
      security: []
      parameters:
      - name: Accept-Language
        in: header
        description: 'ENG: Language - IT: Lingua'
        schema:
          type: string
          pattern: ^[ -~]{2,5}$
          minLength: 2
          maxLength: 5
          example: it-IT
          default: it-IT
        required: true
      - name: retrievalId
        in: query
        description: 'ENG: Unique ID that identify retrieval payload - IT: Identificativo univoco del retrieval payload'
        required: true
        schema:
          type: string
          description: 'ENG: Unique ID that identify retrieval payload - IT: Identificativo univoco del retrieval payload'
          pattern: ^[ -~]{1,50}$
          minLength: 50
          maxLength: 50
          example: 0e4c6629-8753-234s-b0da-1f796999ec2-15038637960920
      - name: fiscalCode
        in: query
        description: 'ENG: Fiscal code or P.IVA of the EC - IT: Codice fiscale o partita IVA dell''EC'
        required: true
        schema:
          type: string
          description: Fiscal Code or P.IVA of the EC
          pattern: ^[A-Za-z0-9]{11,16}$
          minLength: 11
          maxLength: 16
          example: 01234567892
      - name: noticeNumber
        in: query
        required: true
        schema:
          type: string
          description: Unique payment identifier
          pattern: ^[A-Za-z0-9]\d{2}[A-Za-z0-9]{15,17}$
          minLength: 18
          maxLength: 20
          example: X01ABCDEF12345678901
      responses:
        '302':
          description: Redirezione al deep link generato con l'header 'Location'.
          headers:
            Location:
              description: Deeplink url generated
              schema:
                type: string
                format: uri
                maxLength: 2048
                pattern: ^(https?|ftp):\/\/[a-zA-Z0-9.-]+(:[0-9]+)?(\/[a-zA-Z0-9._~!$&'()*+,;=:@%-]*)*(\?[a-zA-Z0-9._~!$&'()*+,;=:@%/?-]*)?(#[a-zA-Z0-9._~!$&'()*+,;=:@%/?-]*)?$
            Access-Control-Allow-Origin:
              description: Indicates whether the response can be shared with requesting code from the given origin
              required: false
              schema:
                $ref: '#/components/schemas/AccessControlAllowOrigin'
            RateLimit-Limit:
              description: The number of allowed requests in the current period
              required: false
              schema:
                $ref: '#/components/schemas/RateLimitLimit'
            RateLimit-Reset:
              description: The number of seconds left in the current period
              required: false
              schema:
                $ref: '#/components/schemas/RateLimitReset'
            Retry-After:
              description: The number of seconds to wait before allowing a follow-up request
              required: false
              schema:
                $ref: '#/components/schemas/RetryAfter'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetrievalErrorDTO'
              example:
                code: BAD_REQUEST
                message: Bad request
          headers:
            Access-Control-Allow-Origin:
              description: Indicates whether the response can be shared with requesting code from the given origin
              required: false
              schema:
                $ref: '#/components/schemas/AccessControlAllowOrigin'
            RateLimit-Limit:
              description: The number of allowed requests in the current period
              required: false
              schema:
                $ref: '#/components/schemas/RateLimitLimit'
            RateLimit-Reset:
              description: The number of seconds left in the current period
              required: false
              schema:
                $ref: '#/components/schemas/RateLimitReset'
            Retry-After:
              description: The number of seconds to wait before allowing a follow-up request
              required: false
              schema:
                $ref: '#/components/schemas/RetryAfter'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetrievalErrorDTO'
              example:
                code: AUTHENTICATION_FAILED
                message: Something went wrong with authentication
          headers:
            Access-Control-Allow-Origin:
              description: Indicates whether the response can be shared with requesting code from the given origin
              required: false
              schema:
                $ref: '#/components/schemas/AccessControlAllowOrigin'
            RateLimit-Limit:
              description: The number of allowed requests in the current period
              required: false
              schema:
                $ref: '#/components/schemas/RateLimitLimit'
            RateLimit-Reset:
              description: The number of seconds left in the current period
              required: false
              schema:
                $ref: '#/components/schemas/RateLimitReset'
            Retry-After:
              description: The number of seconds to wait before allowing a follow-up request
              required: false
              schema:
                $ref: '#/components/schemas/RetryAfter'
        '404':
          description: The TPP was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetrievalErrorDTO'
              example:
                code: RETRIEVAL_NOT_FOUND
                message: Retrieval does not exist or is not active
          headers:
            Access-Control-Allow-Origin:
              description: Indicates whether the response can be shared with requesting code from the given origin
              required: false
              schema:
                $ref: '#/components/schemas/AccessControlAllowOrigin'
            RateLimit-Limit:
              description: The number of allowed requests in the current period
              required: false
              schema:
                $ref: '#/components/schemas/RateLimitLimit'
            RateLimit-Reset:
              description: The number of seconds left in the current period
              required: false
              schema:
                $ref: '#/components/schemas/RateLimitReset'
            Retry-After:
              description: The number of seconds to wait before allowing a follow-up request
              required: false
              schema:
                $ref: '#/components/schemas/RetryAfter'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetrievalErrorDTO'
              example:
                code: TOO_MANY_REQUESTS
                message: Too many requests
          headers:
            Access-Control-Allow-Origin:
              description: Indicates whether the response can be shared with requesting code from the given origin
              required: false
              schema:
                $ref: '#/components/schemas/AccessControlAllowOrigin'
            RateLimit-Limit:
              description: The number of allowed requests in the current period
              required: false
              schema:
                $ref: '#/components/schemas/RateLimitLimit'
            RateLimit-Reset:
              description: The number of seconds left in the current period
              required: false
              schema:
                $ref: '#/components/schemas/RateLimitReset'
            Retry-After:
              description: The number of seconds to wait before allowing a follow-up request
              required: false
              schema:
                $ref: '#/components/schemas/RetryAfter'
        '500':
          description: Server ERROR
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetrievalErrorDTO'
              example:
                code: RETRIEVAL_GENERIC_ERROR
                message: Application error
          headers:
            Access-Control-Allow-Origin:
              description: Indicates whether the response can be shared with requesting code from the given origin
              required: false
              schema:
                $ref: '#/components/schemas/AccessControlAllowOrigin'
            RateLimit-Limit:
              description: The number of allowed requests in the current period
              required: false
              schema:
                $ref: '#/components/schemas/RateLimitLimit'
            RateLimit-Reset:
              description: The number of seconds left in the current period
              required: false
              schema:
                $ref: '#/components/schemas/RateLimitReset'
            Retry-After:
              description: The number of seconds to wait before allowing a follow-up request
              required: false
              schema:
                $ref: '#/components/schemas/RetryAfter'
components:
  schemas:
    RetrievalResponseDTO:
      type: object
      required:
      - retrievalId
      description: Retrieval Response information
      properties:
        retrievalId:
          type: string
          description: 'ENG: Unique ID that identify retrieval payload - IT: Identificativo univoco del retrieval payload'
          pattern: ^[ -~]{1,50}$
          minLength: 50
          maxLength: 50
          example: 0e4c6629-8753-234s-b0da-1f796999ec2-15038637960920
        tppId:
          type: string
          description: 'ENG: Unique ID that identify TPP on PagoPA systems - IT: Identificativo univoco della TPP sui sistemi PagoPA'
          pattern: ^[ -~]{1,50}$
          minLength: 50
          maxLength: 50
          example: 0e3bee29-8753-447c-b0da-1f7965558ec2-1706867960900
        deeplink:
          type: string
          description: Rappresenta il collegamento profondo (DeepLink) che consente il reindirizzamento diretto a una specifica sezione o funzionalità dell'app TPP. Deve essere una stringa alfanumerica che rispetti un formato specifico e avere una lunghezza compresa tra 48 e 128 caratteri.
          pattern: ^[a-zA-Z0-9._~:/?#\[\]@!$&'()*+,;=-]{48,128}$
          minLength: 10
          maxLength: 128
          example: https://example.com/deeplink/123e4567-e89b-12d3-a456-426614174000?userId=1234567890&session=abcdef
        pspDenomination:
          type: string
          description: Etichetta del pulsante di pagamento (ad es. il nome del provider di pagamento).
          pattern: ^[a-zA-Z0-9 ]{1,15}$
          minLength: 1
          maxLength: 15
          example: Banca1
        originId:
          type: string
          description: ID of the original message
          pattern: ^[ -~]{24,36}$
          minLength: 24
          maxLength: 36
          example: XRUZ-GZAJ-ZUEJ-202407-W-1
        isPaymentEnabled:
          type: boolean
          description: 'ENG: Flag indicating whether the TPP is integrated with the payment system. - IT: Flag che indica se il TPP è integrato con il sistema di pagamento.'
          example: true
    RetrievaIdResponseDTO:
      type: object
      required:
      - retrievalId
      description: Retrieval Response information
      properties:
        retrievalId:
          type: string
          description: 'ENG: Unique ID that identify retrieval payload - IT: Identificativo univoco del retrieval payload'
          pattern: ^[ -~]{1,50}$
          minLength: 50
          maxLength: 50
          example: 0e4c6629-8753-234s-b0da-1f796999ec2-15038637960920
    RetrievalRequestDTO:
      type: object
      required:
      - agent
      - originId
      description: Contiene le informazioni relative a una richiesta di recupero.
      properties:
        agent:
          type: string
          description: Identificatore dell'agente proveniente dal sistema operativo sorgente (ad esempio, 'iOS', 'Android').
          pattern: ^[a-zA-Z0-9_-]{2,50}$
          minLength: 2
          maxLength: 50
          example: iOS
        originId:
          type: string
          description: Identificatore univoco del messaggio originale.
          pattern: ^[a-zA-Z0-9-]{24,36}$
          minLength: 24
          maxLength: 36
          example: XRUZ-GZAJ-ZUEJ-202407-W-1
        linkVersion:
          type: string
          description: Identificatore univoco della versione del deeplink. Non obbligatorio. Se non fornito, verrà utilizzata la versione predefinita in accordo con la TPP.
          minLength: 1
          maxLength: 50
          example: v1
          pattern: ^[a-zA-Z0-9_-]{1,50}$
    RetryAfter:
      description: The number of seconds to wait before allowing a follow-up request
      type: integer
      format: int32
      minimum: 1
      maximum: 240
    RetrievalErrorDTO:
      type: object
      required:
      - code
      - message
      properties:
        code:
          type: string
          enum:
          - TPP_NOT_FOUND
          - RETRIEVAL_NOT_FOUND
          - AUTHENTICATION_FAILED
          - RETRIEVAL_GENERIC_ERROR
          - TOO_MANY_REQUESTS
          - BAD_REQUEST
          description: "\"ENG: Error code: TPP_NOT_FOUND: TPP does not exist or is not active,\n RETRIEVAL_NOT_FOUND: Retrieval does not exist or is not active,\n AUTHENTICATION_FAILED: Something went wrong with authentication,\n RETRIEVAL_GENERIC_ERROR: Application error,\n TOO_MANY_REQUESTS: Too many requests,\n BAD_REQUEST: Bad request - IT: Codice di errore:\n TPP_NOT_FOUND: La TPP non esiste o non è attiva,\n RETRIEVAL_NOT_FOUND: Il retrieval non esiste o non è attivo,\n AUTHENTICATION_FAILED: Qualcosa è andato storto con l'autenticazione,\n RETRIEVAL_GENERIC_ERROR: Errore applicativo,\n TOO_MANY_REQUESTS: Troppe richieste,\n BAD_REQUEST: Request errata\""
        message:
          type: string
          description: 'ENG: Error message - IT: Messaggio di errore'
          maxLength: 250
          pattern: ^[\w\s.,!?'"-]+$
    AccessControlAllowOrigin:
      description: Indicates whether the response can be shared with requesting code from the given origin
      type: string
      pattern: ^[ -~]{1,2048}$
      minLength: 1
      maxLength: 2048
    RateLimitReset:
      description: The number of seconds left in the current period
      type: integer
      format: int32
      minimum: 1
      maximum: 60
    RateLimitLimit:
      description: The number of allowed requests in the current period
      type: integer
      format: int32
      minimum: 1
      maximum: 240
  securitySchemes:
    oAuth2:
      description: 'A bearer token in the format of a JWS and conforms to the specifications

        included in RFC8725.

        '
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: /token
          refreshUrl: /token
          scopes: {}