{"openapi":"3.0.0","paths":{"/v1/payment/{providerId}":{"post":{"operationId":"PaymentController_connectAccount","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["sumup","stripe","mollie","viva","mypos","satispay","poynt","dojo","teya","nexi","xpay","handoff"],"type":"string"}}],"responses":{"201":{"description":"Account connected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentAccountDto"}}}},"400":{"description":"Bad request"},"500":{"description":"Internal server error"}},"security":[{"bearer":[]}],"summary":"Connect account","tags":["Payment"]},"get":{"operationId":"PaymentController_getAccount","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["sumup","stripe","mollie","viva","mypos","satispay","poynt","dojo","teya","nexi","xpay","handoff"],"type":"string"}}],"responses":{"200":{"description":"Account retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentAccountDto"}}}},"404":{"description":"Account not found"}},"security":[{"bearer":[]}],"summary":"Get account","tags":["Payment"]},"delete":{"operationId":"PaymentController_disconnectAccount","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["sumup","stripe","mollie","viva","mypos","satispay","poynt","dojo","teya","nexi","xpay","handoff"],"type":"string"}}],"responses":{"200":{"description":"Account disconnected"},"404":{"description":"Account not found"}},"security":[{"bearer":[]}],"summary":"Disconnect account","tags":["Payment"]}},"/v1/payment/{providerId}/merchant":{"get":{"operationId":"PaymentController_getMerchant","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["sumup","stripe","mollie","viva","mypos","satispay","poynt","dojo","teya","nexi","xpay","handoff"],"type":"string"}}],"responses":{"200":{"description":"Merchant retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentGetMerchantResponseDto"}}}},"404":{"description":"Merchant not found"}},"security":[{"bearer":[]}],"summary":"Get merchant","tags":["Payment"]},"put":{"operationId":"PaymentController_updateMerchant","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["sumup","stripe","mollie","viva","mypos","satispay","poynt","dojo","teya","nexi","xpay","handoff"],"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentUpdateMerchantRequestDto"}}}},"responses":{"200":{"description":"Merchant updated"},"400":{"description":"Bad request"},"404":{"description":"Merchant not found"}},"security":[{"bearer":[]}],"summary":"Update merchant","tags":["Payment"]}},"/v1/payment/{providerId}/card":{"post":{"operationId":"PaymentController_processCard","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["sumup","stripe","mollie","viva","mypos","satispay","dojo","teya","nexi","xpay"],"type":"string"}},{"name":"x-client-id","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentCardTransactionDto"}}}},"responses":{"201":{"description":"Card payment created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentProcessCardResponseDto"}}}},"400":{"description":"Bad request"},"404":{"description":"Account not found"}},"security":[{"bearer":[]}],"summary":"Process card","tags":["Payment"]}},"/v1/payment/{providerId}/link":{"post":{"operationId":"PaymentController_processLink","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["sumup","stripe","mollie","viva","mypos","satispay","dojo","teya","nexi","xpay"],"type":"string"}},{"name":"x-client-id","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentLinkTransactionDto"}}}},"responses":{"201":{"description":"Payment link created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentProcessLinkResponseDto"}}}},"400":{"description":"Bad request"},"404":{"description":"Account not found"}},"security":[{"bearer":[]}],"summary":"Process link","tags":["Payment"]}},"/v1/payment/{providerId}/app":{"post":{"operationId":"PaymentController_processApp","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["mollie","viva","dojo"],"type":"string"}},{"name":"x-client-id","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentAppTransactionDto"}}}},"responses":{"201":{"description":"App payload generated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentAppResponseDto"}}}},"400":{"description":"Bad request"},"404":{"description":"Account not found"}},"security":[{"bearer":[]}],"summary":"Process app","tags":["Payment"]}},"/v1/payment/{providerId}/transactions":{"get":{"operationId":"PaymentController_listTransactions","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["sumup","stripe","mollie","viva","mypos","satispay","poynt","dojo","teya","nexi","xpay","handoff"],"type":"string"}},{"name":"start","required":true,"in":"query","description":"Start date (ISO 8601)","schema":{"example":"2024-01-01T00:00:00Z","type":"string"}},{"name":"end","required":true,"in":"query","description":"End date (ISO 8601)","schema":{"example":"2024-01-31T23:59:59Z","type":"string"}},{"name":"limit","required":false,"in":"query","description":"Limit","schema":{"default":50,"example":50,"type":"number"}},{"name":"status","required":false,"in":"query","description":"Status filter","schema":{"example":"completed","type":"string"}},{"name":"type","required":false,"in":"query","description":"Type filter","schema":{"example":"payment","type":"string"}}],"responses":{"200":{"description":"Transactions retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentTransactionListDto"}}}},"404":{"description":"Account not found"}},"security":[{"bearer":[]}],"summary":"List transactions","tags":["Payment"]}},"/v1/payment/{providerId}/transactions/{transactionId}":{"get":{"operationId":"PaymentController_getTransaction","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["sumup","stripe","mollie","viva","mypos","satispay","poynt","dojo","teya","nexi","xpay","handoff"],"type":"string"}},{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Transaction retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentTransactionDto"}}}},"404":{"description":"Transaction not found"}},"security":[{"bearer":[]}],"summary":"Get transaction","tags":["Payment"]},"patch":{"operationId":"PaymentController_updateTransaction","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["sumup","stripe","mollie","viva","mypos","satispay","poynt","dojo","teya","nexi","xpay","handoff"],"type":"string"}},{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentUpdateTransactionDto"}}}},"responses":{"200":{"description":"Transaction updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentTransactionDto"}}}},"400":{"description":"Bad request"},"404":{"description":"Account or transaction not found"}},"security":[{"bearer":[]}],"summary":"Update transaction","tags":["Payment"]},"delete":{"operationId":"PaymentController_refundTransaction","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["sumup","stripe","mollie","viva","mypos","satispay","dojo","teya","nexi","xpay"],"type":"string"}},{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRefundDto"}}}},"responses":{"200":{"description":"Refund processed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentTransactionDto"}}}},"400":{"description":"Bad request"},"404":{"description":"Account or transaction not found"}},"security":[{"bearer":[]}],"summary":"Refund transaction","tags":["Payment"]}},"/v1/payment/{providerId}/terminal":{"post":{"operationId":"PaymentController_processTerminal","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["sumup","stripe","mollie","viva","mypos","poynt","dojo","handoff"],"type":"string"}},{"name":"x-client-id","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentTerminalTransactionDto"}}}},"responses":{"201":{"description":"Terminal payment created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentProcessTerminalResponseDto"}}}},"400":{"description":"Bad request"},"404":{"description":"Account not found"}},"security":[{"bearer":[]}],"summary":"Process terminal","tags":["Payment"]},"delete":{"operationId":"PaymentController_cancelTerminal","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["sumup","stripe","mollie","viva","mypos","poynt","dojo","handoff"],"type":"string"}},{"name":"terminalId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Terminal payment canceled"}},"security":[{"bearer":[]}],"summary":"Cancel terminal","tags":["Payment"]}},"/v1/payment/{providerId}/terminals":{"get":{"operationId":"PaymentController_listTerminals","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["sumup","stripe","mollie","viva","mypos","poynt","dojo","handoff"],"type":"string"}},{"name":"locationId","required":false,"in":"query","description":"Optional location filter (provider-specific)","schema":{"example":"tml_1234567890","type":"string"}}],"responses":{"200":{"description":"Terminals retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentTerminalListDto"}}}},"404":{"description":"Account not found"}},"security":[{"bearer":[]}],"summary":"List terminals","tags":["Payment"]},"post":{"operationId":"PaymentController_createTerminal","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["sumup","stripe"],"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentCreateTerminalDto"}}}},"responses":{"201":{"description":"Terminal created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentTerminalDto"}}}},"400":{"description":"Bad request"},"404":{"description":"Account not found"}},"security":[{"bearer":[]}],"summary":"Create terminal","tags":["Payment"]}},"/v1/payment/{providerId}/terminals/{terminalId}":{"get":{"operationId":"PaymentController_getTerminal","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["sumup","stripe","mollie","viva","mypos","poynt","dojo","handoff"],"type":"string"}},{"name":"terminalId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Terminal retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentTerminalDto"}}}},"404":{"description":"Terminal not found"}},"security":[{"bearer":[]}],"summary":"Get terminal","tags":["Payment"]},"patch":{"operationId":"PaymentController_updateTerminal","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["sumup","stripe"],"type":"string"}},{"name":"terminalId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentUpdateTerminalDto"}}}},"responses":{"200":{"description":"Terminal updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentTerminalDto"}}}},"400":{"description":"Bad request"},"404":{"description":"Terminal not found"}},"security":[{"bearer":[]}],"summary":"Update terminal","tags":["Payment"]},"delete":{"operationId":"PaymentController_deleteTerminal","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["sumup","stripe"],"type":"string"}},{"name":"terminalId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Terminal deleted"},"404":{"description":"Terminal not found"}},"security":[{"bearer":[]}],"summary":"Delete terminal","tags":["Payment"]}},"/v1/payment/{providerId}/webhook":{"post":{"operationId":"PaymentController_handleWebhookPost","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["sumup","stripe","mollie","viva","mypos","satispay","poynt","dojo","teya","nexi","xpay","handoff"],"type":"string"}}],"responses":{"200":{"description":"Webhook processed"}},"summary":"Handle webhook","tags":["Payment"]},"get":{"operationId":"PaymentController_handleWebhookGet","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["sumup","stripe","mollie","viva","mypos","satispay","poynt","dojo","teya","nexi","xpay","handoff"],"type":"string"}}],"responses":{"200":{"description":"Webhook processed"}},"summary":"Handle webhook","tags":["Payment"]}},"/v1/payment/{providerId}/locations":{"get":{"operationId":"PaymentController_listLocations","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["sumup","stripe","mollie","viva","mypos","satispay","poynt","dojo","teya","nexi"],"type":"string"}}],"responses":{"200":{"description":"Locations retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentLocationListDto"}}}},"404":{"description":"Account not found"}},"security":[{"bearer":[]}],"summary":"List locations","tags":["Payment"]},"post":{"operationId":"PaymentController_createLocation","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["sumup","stripe","mollie","viva","mypos","satispay","poynt","dojo","teya","nexi"],"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentCreateLocationDto"}}}},"responses":{"201":{"description":"Location created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentLocationDto"}}}},"400":{"description":"Bad request"},"404":{"description":"Account not found"}},"security":[{"bearer":[]}],"summary":"Create location","tags":["Payment"]}},"/v1/payment/{providerId}/locations/{locationId}":{"patch":{"operationId":"PaymentController_updateLocation","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["sumup","stripe","mollie","viva","mypos","satispay","poynt","dojo","teya","nexi"],"type":"string"}},{"name":"locationId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentUpdateLocationDto"}}}},"responses":{"200":{"description":"Location updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentLocationDto"}}}},"400":{"description":"Bad request"},"404":{"description":"Location not found"}},"security":[{"bearer":[]}],"summary":"Update location","tags":["Payment"]},"delete":{"operationId":"PaymentController_deleteLocation","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["sumup","stripe","mollie","viva","mypos","satispay","poynt","dojo","teya","nexi"],"type":"string"}},{"name":"locationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Location deleted"},"404":{"description":"Location not found"}},"security":[{"bearer":[]}],"summary":"Delete location","tags":["Payment"]}},"/v1/payment/{providerId}/checkin":{"post":{"operationId":"PaymentController_processCheckin","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["satispay"],"type":"string"}},{"name":"x-client-id","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentCheckinTransactionDto"}}}},"responses":{"201":{"description":"Check-in processed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentProcessCheckinResponseDto"}}}},"400":{"description":"Bad request"},"404":{"description":"Account not found"}},"security":[{"bearer":[]}],"summary":"Process check-in","tags":["Payment"]}},"/v1/payment/{providerId}/code":{"post":{"operationId":"PaymentController_processCode","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["satispay"],"type":"string"}},{"name":"x-client-id","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentLinkTransactionDto"}}}},"responses":{"201":{"description":"Code processed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentProcessCodeResponseDto"}}}},"400":{"description":"Bad request"},"404":{"description":"Account not found"}},"security":[{"bearer":[]}],"summary":"Process code","tags":["Payment"]}},"/v1/apps":{"post":{"description":"Creates a new OAuth2 application for the authenticated user. The app receives a `clientId` and `clientSecret` used to initiate the OAuth2 authorization code flow on behalf of NoPos users.\n\nUse the returned `clientId` to direct users to `POST /auth/code?clientId=<id>&redirectUri=<uri>` for authorization.","operationId":"AppsController_createApp","parameters":[],"requestBody":{"required":true,"description":"App name, description, and allowed redirect URIs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAppDto"}}}},"responses":{"201":{"description":"App created — `clientSecret` is shown only once","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppResponseDto"}}}},"400":{"description":"Invalid input (e.g. malformed redirect URI)"},"401":{"description":"Unauthorized"}},"security":[{"bearer":[]}],"summary":"Create OAuth2 app","tags":["Apps"]},"get":{"description":"Returns all OAuth2 apps owned by the authenticated user.","operationId":"AppsController_findAll","parameters":[],"responses":{"200":{"description":"List of apps","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AppResponseDto"}}}}},"401":{"description":"Unauthorized"}},"security":[{"bearer":[]}],"summary":"List your OAuth2 apps","tags":["Apps"]}},"/v1/apps/clients/{clientId}":{"get":{"description":"Returns public-facing information about an OAuth2 app by its `clientId`. This endpoint is unauthenticated and is used by the NoPos authorization consent screen to display the app name and logo before the user approves access.","operationId":"AppsController_findOneByClientId","parameters":[{"name":"clientId","required":true,"in":"path","description":"OAuth2 client ID","schema":{"example":"client_abc123def456","type":"string"}}],"responses":{"200":{"description":"Public app info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicAppInfoDto"}}}},"404":{"description":"App not found"}},"summary":"Get app by client ID (public)","tags":["Apps"]}},"/v1/apps/{appId}":{"get":{"description":"Returns the full details of a specific OAuth2 app owned by the authenticated user.","operationId":"AppsController_findOne","parameters":[{"name":"appId","required":true,"in":"path","description":"App ID","schema":{"example":"app_xyz789","type":"string"}}],"responses":{"200":{"description":"App details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppResponseDto"}}}},"401":{"description":"Unauthorized"},"403":{"description":"App belongs to a different user"},"404":{"description":"App not found"}},"security":[{"bearer":[]}],"summary":"Get app","tags":["Apps"]},"patch":{"description":"Updates the name, description, webhook URL, or allowed domains of an existing OAuth2 app. Only the owner can update an app.","operationId":"AppsController_update","parameters":[{"name":"appId","required":true,"in":"path","description":"App ID","schema":{"example":"app_xyz789","type":"string"}}],"requestBody":{"required":true,"description":"Fields to update — all fields are optional","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAppDto"}}}},"responses":{"200":{"description":"Updated app details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppResponseDto"}}}},"401":{"description":"Unauthorized"},"403":{"description":"App belongs to a different user"},"404":{"description":"App not found"}},"security":[{"bearer":[]}],"summary":"Update app","tags":["Apps"]},"delete":{"description":"Permanently deletes an OAuth2 app. All issued access tokens for this app will be revoked. This action cannot be undone.","operationId":"AppsController_remove","parameters":[{"name":"appId","required":true,"in":"path","description":"App ID","schema":{"example":"app_xyz789","type":"string"}}],"responses":{"200":{"description":"App deleted"},"401":{"description":"Unauthorized"},"403":{"description":"App belongs to a different user"},"404":{"description":"App not found"}},"security":[{"bearer":[]}],"summary":"Delete app","tags":["Apps"]}},"/v1/assets":{"post":{"description":"Generates a pre-signed S3 upload URL for the given file type and size. Upload the file directly to the returned `url` with an HTTP `PUT` request, then use the returned `assetId` to reference the asset.\n\nThe URL is short-lived and single-use. Supported types include `image/jpeg`, `image/png`, `image/webp`, and `application/pdf`.","operationId":"AssetsController_generateUploadUrl","parameters":[],"requestBody":{"required":true,"description":"File MIME type and size in bytes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateUploadUrlDto"}}}},"responses":{"201":{"description":"Upload URL generated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateUploadUrlResponseDto"}}}},"400":{"description":"Unsupported file type or size exceeds maximum allowed"},"401":{"description":"Unauthorized"}},"security":[{"bearer":[]}],"summary":"Generate upload URL","tags":["Assets"]}},"/v1/assets/{assetId}":{"get":{"description":"Redirects to a pre-signed S3 download URL for the given asset. The redirect URL is short-lived and grants temporary read access. Follow the redirect to download the file, or use the `Location` header URL directly.","operationId":"AssetsController_get","parameters":[{"name":"assetId","required":true,"in":"path","description":"Asset ID returned from the upload URL generation endpoint","schema":{"example":"asset_abc123","type":"string"}}],"responses":{"302":{"description":"Redirects to a pre-signed S3 download URL"},"404":{"description":"Asset not found or expired"}},"summary":"Get asset","tags":["Assets"]}},"/v1/devices":{"get":{"description":"Returns all push-notification devices registered by the authenticated user. Devices are typically registered by the NoPos app on first launch and are used to deliver push notifications for payment events and alerts.","operationId":"DevicesController_listDevices","parameters":[],"responses":{"200":{"description":"List of registered devices","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceListDto"}}}},"401":{"description":"Unauthorized"}},"security":[{"bearer":[]}],"summary":"List registered devices","tags":["Devices"]},"post":{"description":"Registers a new device for push notifications. If the device token already exists it is updated (upsert).\n\n- **FCM tokens** (Android / web): pass `type: 'fcm'`\n- **APNs tokens** (iOS): pass `type: 'apns'`\n\nTokens are automatically removed when they expire or become invalid.","operationId":"DevicesController_addDevice","parameters":[],"requestBody":{"required":true,"description":"Device push token and platform type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDeviceDto"}}}},"responses":{"201":{"description":"Device registered — returns device ID and display name","content":{"application/json":{"schema":{"example":{"id":"dev_abc123","name":"iPhone 15 Pro"}}}}},"400":{"description":"Invalid token format or unsupported device type"},"401":{"description":"Unauthorized"}},"security":[{"bearer":[]}],"summary":"Register a device","tags":["Devices"]}},"/v1/devices/{deviceId}":{"delete":{"description":"Removes a registered device. The device will no longer receive push notifications. Call this when the user logs out or revokes notification permission.","operationId":"DevicesController_deleteDevice","parameters":[{"name":"deviceId","required":true,"in":"path","description":"Device ID returned when the device was registered","schema":{"example":"dev_abc123","type":"string"}}],"responses":{"200":{"description":"Device unregistered"},"401":{"description":"Unauthorized"},"404":{"description":"Device not found or belongs to a different user"}},"security":[{"bearer":[]}],"summary":"Unregister a device","tags":["Devices"]}},"/v1/fiscal/{providerId}":{"post":{"operationId":"FiscalController_connectAccount","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["fiskaly","fattutto","ade","sdi","acube","registry","fiskaltrust","handoff"],"type":"string"}}],"responses":{"201":{"description":"Account connected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalAccountDto"}}}},"400":{"description":"Bad request"},"500":{"description":"Internal server error"}},"security":[{"bearer":[]}],"summary":"Connect account","tags":["Fiscal"]},"get":{"operationId":"FiscalController_getAccount","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["fiskaly","fattutto","ade","sdi","acube","registry","fiskaltrust","handoff"],"type":"string"}}],"responses":{"200":{"description":"Account retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalAccountDto"}}}},"404":{"description":"Account not found"}},"security":[{"bearer":[]}],"summary":"Get account","tags":["Fiscal"]},"delete":{"operationId":"FiscalController_disconnectAccount","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["fiskaly","fattutto","ade","acube","handoff"],"type":"string"}}],"responses":{"200":{"description":"Account disconnected"},"404":{"description":"Account not found"}},"security":[{"bearer":[]}],"summary":"Disconnect account","tags":["Fiscal"]}},"/v1/fiscal/{providerId}/merchant":{"get":{"operationId":"FiscalController_getMerchant","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["fiskaly","fattutto","ade","sdi","acube","registry","fiskaltrust","handoff"],"type":"string"}}],"responses":{"200":{"description":"Merchant retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalMerchantDto"}}}}},"security":[{"bearer":[]}],"summary":"Get merchant","tags":["Fiscal"]},"patch":{"operationId":"FiscalController_updateMerchant","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["fiskaly","fattutto","ade","sdi","acube","registry","fiskaltrust","handoff"],"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalUpdateMerchantDto"}}}},"responses":{"200":{"description":"Merchant updated"},"404":{"description":"Account not found"}},"security":[{"bearer":[]}],"summary":"Update merchant","tags":["Fiscal"]}},"/v1/fiscal/{providerId}/credentials":{"patch":{"operationId":"FiscalController_updateCredentials","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["fiskaly","acube","fiskaltrust"],"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalUpdateCredentialsDto"}}}},"responses":{"200":{"description":"Credentials updated"}},"security":[{"bearer":[]}],"summary":"Update credentials","tags":["Fiscal"]}},"/v1/fiscal/{providerId}/receipts":{"post":{"operationId":"FiscalController_createReceipt","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["fiskaly","fattutto","ade","acube","registry","fiskaltrust","handoff"],"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalCreateReceiptDto"}}}},"responses":{"201":{"description":"Receipt created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalReceiptDto"}}}},"400":{"description":"Bad request"},"404":{"description":"Account not found"}},"security":[{"bearer":[]}],"summary":"Create receipt","tags":["Fiscal"]},"get":{"operationId":"FiscalController_listReceipts","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["fiskaly","fattutto","ade","sdi","acube","registry","fiskaltrust","handoff"],"type":"string"}},{"name":"limit","required":true,"in":"query","schema":{"type":"number"}},{"name":"token","required":true,"in":"query","schema":{"type":"string"}},{"name":"start","required":true,"in":"query","schema":{"type":"string"}},{"name":"end","required":true,"in":"query","schema":{"type":"string"}},{"name":"type","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Receipts retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalReceiptListDto"}}}}},"security":[{"bearer":[]}],"summary":"List receipts","tags":["Fiscal"]}},"/v1/fiscal/{providerId}/receipts/{receiptId}":{"patch":{"operationId":"FiscalController_updateReceipt","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["handoff"],"type":"string"}},{"name":"receiptId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalUpdateReceiptDto"}}}},"responses":{"200":{"description":"Receipt updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalReceiptDto"}}}}},"security":[{"bearer":[]}],"summary":"Update receipt","tags":["Fiscal"]},"get":{"operationId":"FiscalController_getReceipt","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["fiskaly","fattutto","ade","acube","registry","fiskaltrust","handoff"],"type":"string"}},{"name":"receiptId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Receipt retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalReceiptDto"}}}},"404":{"description":"Receipt not found"}},"security":[{"bearer":[]}],"summary":"Get receipt","tags":["Fiscal"]}},"/v1/fiscal/{providerId}/receipts/{receiptId}/file":{"get":{"operationId":"FiscalController_downloadReceipt","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["fiskaly","fattutto","ade","acube","registry","fiskaltrust"],"type":"string"}},{"name":"receiptId","required":true,"in":"path","schema":{"type":"string"}},{"name":"gift","required":true,"in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Receipt file","content":{"application/pdf":{},"application/xml":{}}},"404":{"description":"Receipt not found"}},"security":[{"bearer":[]}],"summary":"Get receipt file","tags":["Fiscal"]}},"/v1/fiscal/{providerId}/invoices":{"post":{"operationId":"FiscalController_createInvoice","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["fiskaly","fattutto","ade","sdi","acube","registry","handoff"],"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalCreateInvoiceDto"}}}},"responses":{"201":{"description":"Invoice created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalInvoiceDto"}}}},"400":{"description":"Bad request"},"404":{"description":"Account not found"}},"security":[{"bearer":[]}],"summary":"Create invoice","tags":["Fiscal"]},"get":{"operationId":"FiscalController_listInvoices","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["fiskaly","fattutto","ade","acube","registry"],"type":"string"}},{"name":"limit","required":true,"in":"query","schema":{"type":"number"}},{"name":"start","required":true,"in":"query","schema":{"type":"string"}},{"name":"end","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Invoices retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalInvoiceListDto"}}}}},"security":[{"bearer":[]}],"summary":"List invoices","tags":["Fiscal"]}},"/v1/fiscal/{providerId}/invoices/{invoiceId}":{"get":{"operationId":"FiscalController_getInvoice","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["fiskaly","fattutto","ade","sdi","acube","registry"],"type":"string"}},{"name":"invoiceId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Invoice retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalInvoiceDto"}}}},"404":{"description":"Invoice not found"}},"security":[{"bearer":[]}],"summary":"Get invoice","tags":["Fiscal"]}},"/v1/fiscal/{providerId}/invoices/{invoiceId}/file":{"get":{"operationId":"FiscalController_downloadInvoice","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["fiskaly","fattutto","ade","sdi","acube","registry"],"type":"string"}},{"name":"invoiceId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Invoice file","content":{"application/pdf":{},"application/xml":{}}},"404":{"description":"Invoice not found"}},"security":[{"bearer":[]}],"summary":"Get invoice file","tags":["Fiscal"]}},"/v1/billing/subscriptions/portal":{"get":{"description":"Generates a short-lived Stripe Customer Portal session URL. Redirect the user to this URL to let them manage their subscription, update payment methods, download invoices, or cancel their plan.\n\nThe URL expires after a few minutes and can only be used once.","operationId":"BillingController_createCustomerPortalSession","parameters":[],"responses":{"200":{"description":"Customer portal session URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomerPortalSessionResponseDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"No Stripe customer found for this user"}},"security":[{"bearer":[]}],"summary":"Get Stripe customer portal URL","tags":["Billing"]}},"/v1/billing/subscriptions/{priceId}":{"get":{"description":"Returns the current subscription status for a specific Stripe Price ID. Use this to check whether the authenticated user has an active subscription for a given plan.\n\nThe `priceId` is the Stripe Price ID (e.g. `price_1OABCdEfGhIjKlMn`).","operationId":"BillingController_getSubscription","parameters":[{"name":"priceId","required":true,"in":"path","description":"Stripe Price ID","schema":{"example":"price_1OABCdEfGhIjKlMn","type":"string"}}],"responses":{"200":{"description":"Subscription status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"No subscription found for this price"}},"security":[{"bearer":[]}],"summary":"Get subscription status","tags":["Billing"]},"post":{"description":"Creates a Stripe Checkout session for the given price plan. Redirect the user to the returned `url` to complete the payment.\n\nAfter a successful checkout, Stripe notifies NoPos via webhook (`POST /billing/webhook`) and the subscription is activated automatically.","operationId":"BillingController_createCheckoutSession","parameters":[{"name":"priceId","required":true,"in":"path","description":"Stripe Price ID for the plan to subscribe to","schema":{"example":"price_1OABCdEfGhIjKlMn","type":"string"}}],"responses":{"201":{"description":"Checkout session created — redirect user to `url`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCheckoutSessionResponseDto"}}}},"400":{"description":"Invalid price ID"},"401":{"description":"Unauthorized"}},"security":[{"bearer":[]}],"summary":"Create Stripe checkout session","tags":["Billing"]}},"/v1/billing/webhook":{"post":{"description":"Receives and processes Stripe webhook events. This endpoint is called by Stripe, not by end clients.\n\n**Signature verification**: Every request must include the `Stripe-Signature` header. The signature is validated against the configured webhook secret. Requests with an invalid or missing signature are rejected with `400`.\n\n**Handled events**:\n- `checkout.session.completed` — activates a new subscription\n- `customer.subscription.updated` — updates subscription status\n- `customer.subscription.deleted` — marks subscription as canceled\n- `invoice.payment_failed` — flags past-due subscriptions\n\nRegister this URL in your Stripe Dashboard under Developers → Webhooks.","operationId":"BillingController_handleStripeWebhook","parameters":[{"name":"stripe-signature","in":"header","description":"Stripe webhook signature for request validation (format: `t=<timestamp>,v1=<hmac>`)","required":true,"schema":{"type":"string","example":"t=1492774577,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a05bd539e6d4129e21eb92d"}}],"responses":{"200":{"description":"Webhook event processed"},"400":{"description":"Invalid or missing Stripe-Signature header"}},"summary":"Handle Stripe webhook","tags":["Billing"]}},"/v1/sdi/transmissions":{"post":{"operationId":"SdiController_transmitInvoice","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SdiTransmissionRequestDto"}}}},"responses":{"201":{"description":"Invoice transmitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SdiResponseDto"}}}},"400":{"description":"Bad request - invalid XML content"},"500":{"description":"Internal server error during transmission"}},"summary":"Transmit invoice","tags":["Sdi"]}},"/v1/sdi/receptions":{"post":{"operationId":"SdiController_receiveNotification","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SdiReceptionRequestDto"}}}},"responses":{"201":{"description":"Notification received","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SdiResponseDto"}}}},"400":{"description":"Bad request - invalid XML content"},"500":{"description":"Internal server error during reception"}},"summary":"Receive notification","tags":["Sdi"]}},"/v1/store/{providerId}":{"post":{"operationId":"StoreController_connectAccount","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["shopify","woocommerce","magento","prestashop"],"type":"string"}}],"responses":{"201":{"description":"Account connected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreAccountDto"}}}},"400":{"description":"Bad request"},"500":{"description":"Internal server error"}},"security":[{"bearer":[]}],"summary":"Connect account","tags":["Store"]},"get":{"operationId":"StoreController_getAccount","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["shopify","woocommerce","magento","prestashop"],"type":"string"}}],"responses":{"200":{"description":"Account retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreAccountDto"}}}},"404":{"description":"Account not found"}},"security":[{"bearer":[]}],"summary":"Get account","tags":["Store"]},"delete":{"operationId":"StoreController_disconnectAccount","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["shopify","woocommerce","magento","prestashop"],"type":"string"}}],"responses":{"200":{"description":"Account disconnected"},"404":{"description":"Account not found"}},"security":[{"bearer":[]}],"summary":"Disconnect account","tags":["Store"]}},"/v1/store/{providerId}/merchant":{"get":{"operationId":"StoreController_getMerchant","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["shopify","woocommerce","magento","prestashop"],"type":"string"}}],"responses":{"200":{"description":"Merchant retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreGetMerchantResponseDto"}}}},"404":{"description":"Merchant not found"}},"security":[{"bearer":[]}],"summary":"Get merchant","tags":["Store"]},"put":{"operationId":"StoreController_updateMerchant","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["shopify","woocommerce","magento","prestashop"],"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreUpdateMerchantRequestDto"}}}},"responses":{"200":{"description":"Merchant updated"},"400":{"description":"Bad request"},"404":{"description":"Merchant not found"}},"security":[{"bearer":[]}],"summary":"Update merchant","tags":["Store"]}},"/v1/store/{providerId}/transactions":{"get":{"operationId":"StoreController_listTransactions","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["shopify","woocommerce","magento","prestashop"],"type":"string"}},{"name":"start","required":true,"in":"query","schema":{"type":"string"}},{"name":"end","required":true,"in":"query","schema":{"type":"string"}},{"name":"limit","required":true,"in":"query","schema":{"type":"number"}},{"name":"status","required":true,"in":"query","schema":{"type":"string"}},{"name":"type","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Transactions retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreTransactionListDto"}}}},"404":{"description":"Account not found"}},"security":[{"bearer":[]}],"summary":"List transactions","tags":["Store"]}},"/v1/store/{providerId}/transactions/{transactionId}":{"get":{"operationId":"StoreController_getTransactionDetails","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["shopify","woocommerce","magento","prestashop"],"type":"string"}},{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Transaction retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreTransactionDto"}}}},"404":{"description":"Transaction not found"}},"security":[{"bearer":[]}],"summary":"Get transaction","tags":["Store"]},"delete":{"operationId":"StoreController_createRefund","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["shopify","woocommerce","magento","prestashop"],"type":"string"}},{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreCreateRefundDto"}}}},"responses":{"200":{"description":"Refund created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreTransactionDto"}}}},"404":{"description":"Transaction not found"}},"security":[{"bearer":[]}],"summary":"Create refund","tags":["Store"]},"patch":{"operationId":"StoreController_updateTransaction","parameters":[{"name":"providerId","required":true,"in":"path","schema":{"enum":["shopify","woocommerce","magento","prestashop"],"type":"string"}},{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreUpdateTransactionDto"}}}},"responses":{"200":{"description":"Transaction updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreTransactionDto"}}}},"404":{"description":"Transaction not found"}},"security":[{"bearer":[]}],"summary":"Update transaction","tags":["Store"]}},"/v1/bridges":{"post":{"operationId":"BridgesController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBridgeDto"}}}},"responses":{"201":{"description":"Bridge created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BridgeResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Create bridge","tags":["Bridges"]},"get":{"operationId":"BridgesController_findAll","parameters":[],"responses":{"200":{"description":"Bridges retrieved","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BridgeResponseDto"}}}}}},"security":[{"bearer":[]}],"summary":"List bridges","tags":["Bridges"]}},"/v1/bridges/{bridgeId}":{"get":{"operationId":"BridgesController_findOne","parameters":[{"name":"bridgeId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Bridge retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BridgeResponseDto"}}}},"404":{"description":"Bridge not found"}},"security":[{"bearer":[]}],"summary":"Get bridge","tags":["Bridges"]},"patch":{"operationId":"BridgesController_update","parameters":[{"name":"bridgeId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBridgeDto"}}}},"responses":{"200":{"description":"Bridge updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BridgeResponseDto"}}}},"404":{"description":"Bridge not found"}},"security":[{"bearer":[]}],"summary":"Update bridge","tags":["Bridges"]},"delete":{"operationId":"BridgesController_remove","parameters":[{"name":"bridgeId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Bridge deleted"},"404":{"description":"Bridge not found"}},"security":[{"bearer":[]}],"summary":"Delete bridge","tags":["Bridges"]}},"/v1/bridges/payment":{"post":{"operationId":"BridgesController_processPayment","parameters":[{"name":"x-source-address","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BridgePaymentRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BridgePaymentResponseDto"}}}}},"summary":"Process payment (or registration probe) from nopos-bridge","tags":["Bridges"]},"delete":{"operationId":"BridgesController_cancelPayment","parameters":[{"name":"x-source-address","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Cancel pending terminal payment from nopos-bridge","tags":["Bridges"]}},"/v1/bridges/fiscal":{"post":{"operationId":"BridgesController_processFiscal","parameters":[{"name":"x-source-address","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BridgeFiscalRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BridgeFiscalResponseDto"}}}}},"summary":"Process fiscal receipt from nopos-bridge","tags":["Bridges"]}},"/v1/auth/login":{"post":{"description":"Passwordless email login using a one-time passcode (OTP).\n\n**Step 1** — Call with `email` only: an OTP is sent to the user's email address. Response indicates the OTP was sent.\n\n**Step 2** — Call with `email` + `code` (the OTP): returns an `accessToken` and `refreshToken` pair on success.\n\nOTPs are single-use and expire after a few minutes.","operationId":"AuthController_login","parameters":[],"requestBody":{"required":true,"description":"Email address, and optionally the OTP code received by email","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginDto"}}}},"responses":{"200":{"description":"OTP sent (step 1) or tokens issued (step 2)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponseDto"}}}},"400":{"description":"Invalid or expired OTP code"}},"summary":"Login","tags":["Auth"]}},"/v1/auth/refresh":{"post":{"description":"Exchanges a valid refresh token for a new access token. Use this when the current access token has expired. The refresh token itself has a longer TTL and is rotated on each use.","operationId":"AuthController_refresh","parameters":[],"requestBody":{"required":true,"description":"The refresh token obtained from a prior login or refresh call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshTokenDto"}}}},"responses":{"200":{"description":"New access token issued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshTokenResponseDto"}}}},"401":{"description":"Refresh token is invalid, expired, or already used"}},"summary":"Refresh access token","tags":["Auth"]}},"/v1/auth/code":{"post":{"description":"Generates a short-lived authorization code for the OAuth2 authorization code flow. This endpoint is called by the NoPos consent screen after the user approves access for a third-party OAuth2 app.\n\nThe returned `code` must be exchanged for an access token via `POST /auth/token` within a few minutes. The `redirect_uri` must match one of the app's registered redirect URIs.","operationId":"AuthController_generateCode","parameters":[{"name":"redirect_uri","required":true,"in":"query","description":"Redirect URI — must match a URI registered for the OAuth2 app","schema":{"example":"https://app.example.com/callback","type":"string"}}],"requestBody":{"required":true,"description":"OAuth2 client ID and requested scopes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizationCodeDto"}}}},"responses":{"200":{"description":"Authorization code generated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizationCodeResponseDto"}}}},"401":{"description":"User not authenticated"},"404":{"description":"OAuth2 app not found or redirect URI not allowed"}},"summary":"Generate OAuth2 authorization code","tags":["Auth"]}},"/v1/auth/token":{"post":{"description":"Completes the OAuth2 authorization code flow. Exchange the `code` received from `POST /auth/code` for an access token.\n\nThe request must include the app's `clientId`, `clientSecret`, `code`, and the same `redirectUri` used to generate the code. Codes are single-use and expire after a few minutes.","operationId":"AuthController_exchangeToken","parameters":[],"requestBody":{"required":true,"description":"Authorization code, client credentials, and redirect URI","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeCodeDto"}}}},"responses":{"200":{"description":"Access token issued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthTokenResponseDto"}}}},"400":{"description":"Code is invalid, expired, or already used"},"403":{"description":"Client secret does not match the app registration"}},"summary":"Exchange authorization code for access token","tags":["Auth"]}},"/v1/products":{"post":{"description":"Creates a new product in the authenticated user's catalog. Returns the created product with its assigned ID.","operationId":"ProductsController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProductDto"}}}},"responses":{"201":{"description":"Product created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponseDto"}}}},"400":{"description":"Invalid product data"},"401":{"description":"Unauthorized"}},"security":[{"bearer":[]}],"summary":"Create product","tags":["Products"]},"get":{"description":"Returns all products in the authenticated user's catalog.","operationId":"ProductsController_findAll","parameters":[],"responses":{"200":{"description":"Product list","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductResponseDto"}}}}},"401":{"description":"Unauthorized"}},"security":[{"bearer":[]}],"summary":"List products","tags":["Products"]}},"/v1/products/{productId}":{"get":{"description":"Returns a single product by ID.","operationId":"ProductsController_findOne","parameters":[{"name":"productId","required":true,"in":"path","description":"Product ID","schema":{"example":"prod_abc123","type":"string"}}],"responses":{"200":{"description":"Product details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponseDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Product not found"}},"security":[{"bearer":[]}],"summary":"Get product","tags":["Products"]},"patch":{"description":"Updates one or more fields of an existing product. Only provided fields are updated (partial update).","operationId":"ProductsController_update","parameters":[{"name":"productId","required":true,"in":"path","description":"Product ID","schema":{"example":"prod_abc123","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductDto"}}}},"responses":{"200":{"description":"Updated product details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponseDto"}}}},"400":{"description":"Invalid input"},"401":{"description":"Unauthorized"},"404":{"description":"Product not found"}},"security":[{"bearer":[]}],"summary":"Update product","tags":["Products"]},"delete":{"description":"Permanently deletes a product from the catalog. This action cannot be undone.","operationId":"ProductsController_remove","parameters":[{"name":"productId","required":true,"in":"path","description":"Product ID","schema":{"example":"prod_abc123","type":"string"}}],"responses":{"200":{"description":"Product deleted"},"401":{"description":"Unauthorized"},"404":{"description":"Product not found"}},"security":[{"bearer":[]}],"summary":"Delete product","tags":["Products"]}},"/v1/orders":{"post":{"operationId":"OrdersController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderDto"}}}},"responses":{"201":{"description":"Order created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Create order","tags":["Orders"]},"get":{"operationId":"OrdersController_findAll","parameters":[],"responses":{"200":{"description":"Orders retrieved","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrderResponseDto"}}}}}},"security":[{"bearer":[]}],"summary":"List orders","tags":["Orders"]}},"/v1/orders/{orderId}":{"get":{"operationId":"OrdersController_findOne","parameters":[{"name":"orderId","required":true,"in":"path","description":"Order ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Order retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponseDto"}}}},"404":{"description":"Order not found"}},"security":[{"bearer":[]}],"summary":"Get order","tags":["Orders"]},"patch":{"operationId":"OrdersController_update","parameters":[{"name":"orderId","required":true,"in":"path","description":"Order ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrderDto"}}}},"responses":{"200":{"description":"Order updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponseDto"}}}},"404":{"description":"Order not found"}},"security":[{"bearer":[]}],"summary":"Update order","tags":["Orders"]},"delete":{"operationId":"OrdersController_remove","parameters":[{"name":"orderId","required":true,"in":"path","description":"Order ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Order deleted"},"404":{"description":"Order not found"}},"security":[{"bearer":[]}],"summary":"Delete order","tags":["Orders"]}},"/v1/tables":{"post":{"description":"Creates a new table in the authenticated user's venue layout. The response includes an `ETag` header for optimistic concurrency control on subsequent updates.","operationId":"TablesController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTableDto"}}}},"responses":{"201":{"description":"Table created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableResponseDto"}}}},"400":{"description":"Invalid table data"},"401":{"description":"Unauthorized"}},"security":[{"bearer":[]}],"summary":"Create table","tags":["Tables"]},"get":{"description":"Returns all tables in the authenticated user's venue layout.","operationId":"TablesController_findAll","parameters":[],"responses":{"200":{"description":"Table list","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TableResponseDto"}}}}},"401":{"description":"Unauthorized"}},"security":[{"bearer":[]}],"summary":"List tables","tags":["Tables"]}},"/v1/tables/{tableId}":{"get":{"description":"Returns a single table by ID. The response includes an `ETag` header for optimistic concurrency control.","operationId":"TablesController_findOne","parameters":[{"name":"tableId","required":true,"in":"path","description":"Table ID","schema":{"example":"tbl_abc123","type":"string"}}],"responses":{"200":{"description":"Table details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableResponseDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Table not found"}},"security":[{"bearer":[]}],"summary":"Get table","tags":["Tables"]},"patch":{"description":"Updates one or more fields of an existing table. Supports optimistic concurrency control via the `If-Match` header: if provided, the update is rejected with `409` if the table has been modified since the ETag was issued. Omit `If-Match` to bypass concurrency checking.","operationId":"TablesController_update","parameters":[{"name":"tableId","required":true,"in":"path","description":"Table ID","schema":{"example":"tbl_abc123","type":"string"}},{"name":"If-Match","in":"header","description":"ETag value from a prior GET response — rejects the update if the table has changed since","required":false,"schema":{"type":"string","example":"\"a1b2c3d4\""}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTableDto"}}}},"responses":{"200":{"description":"Updated table details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableResponseDto"}}}},"400":{"description":"Invalid input"},"401":{"description":"Unauthorized"},"404":{"description":"Table not found"},"409":{"description":"Conflict — table was modified by another request since the ETag was issued"}},"security":[{"bearer":[]}],"summary":"Update table","tags":["Tables"]},"delete":{"description":"Permanently removes a table from the venue layout. This action cannot be undone.","operationId":"TablesController_remove","parameters":[{"name":"tableId","required":true,"in":"path","description":"Table ID","schema":{"example":"tbl_abc123","type":"string"}}],"responses":{"200":{"description":"Table deleted"},"401":{"description":"Unauthorized"},"404":{"description":"Table not found"}},"security":[{"bearer":[]}],"summary":"Delete table","tags":["Tables"]}},"/v1/customers/public/{code}":{"get":{"operationId":"CustomersPublicController_findByCode","parameters":[{"name":"code","required":true,"in":"path","description":"Short public code","schema":{"type":"string"}}],"responses":{"200":{"description":"Customer public info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerPublicResponseDto"}}}},"404":{"description":"Customer not found"}},"summary":"Get public customer info by code (no auth)","tags":["Customers"]}},"/v1/customers":{"post":{"description":"Creates a new customer record in the authenticated user's customer registry.","operationId":"CustomersController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomerDto"}}}},"responses":{"201":{"description":"Customer created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerResponseDto"}}}},"400":{"description":"Invalid customer data"},"401":{"description":"Unauthorized"}},"security":[{"bearer":[]}],"summary":"Create customer","tags":["Customers"]},"get":{"description":"Returns all customers in the authenticated user's registry. Use `search` to filter by name, email, or phone number.","operationId":"CustomersController_findAll","parameters":[{"name":"search","required":false,"in":"query","description":"Full-text search across name, email, and phone","schema":{"example":"Mario","type":"string"}}],"responses":{"200":{"description":"Customer list","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomerResponseDto"}}}}},"401":{"description":"Unauthorized"}},"security":[{"bearer":[]}],"summary":"List customers","tags":["Customers"]}},"/v1/customers/by-code/{code}":{"get":{"operationId":"CustomersController_findOneByCode","parameters":[{"name":"code","required":true,"in":"path","description":"Short code","schema":{"type":"string"}}],"responses":{"200":{"description":"Customer retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerResponseDto"}}}},"404":{"description":"Customer not found"}},"security":[{"bearer":[]}],"summary":"Get customer by short code","tags":["Customers"]}},"/v1/customers/{customerId}":{"get":{"description":"Returns a single customer by ID.","operationId":"CustomersController_findOne","parameters":[{"name":"customerId","required":true,"in":"path","description":"Customer ID","schema":{"example":"cust_abc123","type":"string"}}],"responses":{"200":{"description":"Customer details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerResponseDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Customer not found"}},"security":[{"bearer":[]}],"summary":"Get customer","tags":["Customers"]},"patch":{"description":"Updates one or more fields of an existing customer. Only provided fields are updated (partial update).","operationId":"CustomersController_update","parameters":[{"name":"customerId","required":true,"in":"path","description":"Customer ID","schema":{"example":"cust_abc123","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomerDto"}}}},"responses":{"200":{"description":"Updated customer details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerResponseDto"}}}},"400":{"description":"Invalid input"},"401":{"description":"Unauthorized"},"404":{"description":"Customer not found"}},"security":[{"bearer":[]}],"summary":"Update customer","tags":["Customers"]},"delete":{"description":"Permanently deletes a customer record. This action cannot be undone.","operationId":"CustomersController_remove","parameters":[{"name":"customerId","required":true,"in":"path","description":"Customer ID","schema":{"example":"cust_abc123","type":"string"}}],"responses":{"200":{"description":"Customer deleted"},"401":{"description":"Unauthorized"},"404":{"description":"Customer not found"}},"security":[{"bearer":[]}],"summary":"Delete customer","tags":["Customers"]}},"/v1/customers/{customerId}/credit":{"post":{"operationId":"CustomersController_addCredit","parameters":[{"name":"customerId","required":true,"in":"path","description":"ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddCreditDto"}}}},"responses":{"200":{"description":"Credit updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Add or subtract credit (use negative amount to subtract)","tags":["Customers"]}},"/v1/users/{userId}/products":{"get":{"operationId":"UsersController_getPublicProducts","parameters":[{"name":"userId","required":true,"in":"path","description":"User ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Products retrieved","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductResponseDto"}}}}}},"summary":"Get public products for a user","tags":["Users"]}},"/v1/users/{userId}/public":{"get":{"operationId":"UsersController_getPublicUser","parameters":[{"name":"userId","required":true,"in":"path","description":"User ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Public profile retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUserResponseDto"}}}},"404":{"description":"User not found"}},"summary":"Get public user profile","tags":["Users"]}},"/v1/users/{userId}":{"get":{"operationId":"UsersController_getUser","parameters":[{"name":"userId","required":true,"in":"path","description":"User ID or 'me'","schema":{"example":"me","type":"string"}}],"responses":{"200":{"description":"User retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponseDto"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"User not found"}},"security":[{"bearer":[]}],"summary":"Get user","tags":["Users"]},"patch":{"operationId":"UsersController_updateUser","parameters":[{"name":"userId","required":true,"in":"path","description":"User ID or 'me'","schema":{"example":"me","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserDto"}}}},"responses":{"200":{"description":"User updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponseDto"}}}},"400":{"description":"Invalid input data"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"User not found"}},"security":[{"bearer":[]}],"summary":"Update user","tags":["Users"]},"delete":{"operationId":"UsersController_deleteUser","parameters":[{"name":"userId","required":true,"in":"path","description":"User ID or 'me'","schema":{"example":"me","type":"string"}}],"responses":{"200":{"description":"User deleted"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"User not found"}},"security":[{"bearer":[]}],"summary":"Delete user","tags":["Users"]}},"/v1/merchants/{vatId}":{"get":{"operationId":"MerchantsController_getMerchant","parameters":[{"name":"vatId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Merchant info retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDto"}}}},"400":{"description":"Invalid VAT number"},"500":{"description":"Merchant lookup service error"}},"security":[{"bearer":[]}],"summary":"Get merchant info","tags":["Merchants"]},"patch":{"operationId":"MerchantsController_updateMerchant","parameters":[{"name":"vatId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMerchantDto"}}}},"responses":{"200":{"description":"Merchant info updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDto"}}}},"400":{"description":"Invalid input data"},"404":{"description":"Merchant not found"}},"security":[{"bearer":[]}],"summary":"Update merchant info","tags":["Merchants"]}},"/v1/health":{"get":{"description":"Verify API availability and version","operationId":"DiscoveryController_health","parameters":[],"responses":{"200":{"description":"Service is healthy"}},"summary":"Health check","tags":["Discovery"]}},"/v1/mcp/sse":{"get":{"description":"Opens a Server-Sent Events (SSE) stream for Model Context Protocol (MCP) communication. The client establishes this connection and then sends JSON-RPC messages via `POST /v1/mcp/messages?sessionId=<id>`.\n\nOn connection, the MCP server auto-discovers all API endpoints from the OpenAPI spec (`/v1/openapi.json`) and exposes them as MCP tools. Each tool corresponds to an API endpoint with its full path, method, and parameters.\n\n**Bearer token**: Pass your NoPos JWT in the `Authorization: Bearer <token>` header. The token is extracted and forwarded to every proxied API call, so OAuth2 scopes are enforced natively.","operationId":"McpController_sse","parameters":[{"name":"sessionId","required":false,"in":"query","description":"Optional stable session ID; generated with a random UUID if omitted. Reuse to reconnect to the same session.","schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer token (JWT) for authentication","required":true,"schema":{"type":"string","example":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."}}],"responses":{"200":{"description":"SSE stream established; server begins sending MCP protocol frames"},"401":{"description":"Unauthorized — invalid or missing Bearer token"}},"security":[{"bearer":[]}],"summary":"Open MCP SSE stream","tags":["MCP"]}},"/v1/mcp/messages":{"post":{"description":"Delivers a JSON-RPC message to an active SSE session. The request body must be a valid JSON-RPC 2.0 message (typically from an MCP client like Claude Desktop or Cursor).\n\nThe MCP server processes the message (e.g., `{ jsonrpc: \"2.0\", id: 1, method: \"tools/list\" }` to list available tools), and the response is sent back to the client via the same SSE connection. The sessionId must match an active SSE stream.","operationId":"McpController_message","parameters":[{"name":"sessionId","required":true,"in":"query","description":"Session ID from the active SSE connection","schema":{"example":"550e8400-e29b-41d4-a716-446655440000","type":"string"}}],"responses":{"200":{"description":"Message processed and response enqueued on SSE stream"},"401":{"description":"Unauthorized"},"404":{"description":"Session not found or has expired"}},"security":[{"bearer":[]}],"summary":"Send MCP message","tags":["MCP"]}},"/v1/mcp/tools":{"get":{"description":"Returns a summary of all MCP tools available on an active SSE session. Each tool corresponds to a NoPos API endpoint auto-discovered from the OpenAPI spec.\n\nThe response includes the tool name, description (first line), HTTP method, path, applicable tags, and parameter structure. Use the `tags` query parameter to filter the list by one or more OpenAPI tag names (e.g. `tags=Payment,Fiscal`).\n\n**Note**: This endpoint is primarily for debugging and integration testing. MCP clients do not call this directly — they use the SSE stream to request `tools/list` and receive the full tool definitions.","operationId":"McpController_listTools","parameters":[{"name":"tags","required":false,"in":"query","description":"Comma-separated list of OpenAPI tags to include (if omitted, all tools are returned)","schema":{"example":"Payment,Store,Fiscal","type":"string"}}],"responses":{"200":{"description":"Tool summary list"},"401":{"description":"Unauthorized"}},"security":[{"bearer":[]}],"summary":"List MCP tools","tags":["MCP"]}},"/v1/mcp/cache/invalidate":{"post":{"description":"Forces the MCP service to clear its internal OpenAPI spec cache and rebuild the tool list on the next request. Use this after deploying new API endpoints to make them immediately available to MCP clients without restarting the server.\n\nThe cache normally expires after a configurable TTL (e.g. 1 hour), so this endpoint is primarily useful during development or for emergency synchronization after API changes.","operationId":"McpController_invalidateCache","parameters":[],"responses":{"200":{"description":"Cache invalidated successfully"},"401":{"description":"Unauthorized"}},"security":[{"bearer":[]}],"summary":"Invalidate MCP tool cache","tags":["MCP"]}}},"info":{"title":"NoPos API","description":"# NoPos API Documentation\n\nNoPos is a comprehensive payment and fiscal management platform that provides a unified API for handling payments, fiscal receipts, invoices, and e-commerce integrations.\n\n## Features\n\n- **Payment Processing**: Support for multiple payment providers (Stripe, SumUp, Mollie, Viva, MyPos, Satispay, Poynt, and more)\n- **Fiscal Management**: Integration with Italian fiscal systems (Fiskaly, Fattutto, ADE, SDI, Acube, Registry, Fiskaltrust)\n- **E-commerce Integration**: Connect with Shopify, WooCommerce, Magento, and PrestaShop\n- **User Management**: Secure authentication and user profile management\n- **Product & Inventory**: Manage products, tables, and customers\n- **Apps & Integrations**: Create and manage API applications with OAuth2 support\n\n## Authentication\n\nAll endpoints require Bearer token authentication. Obtain your access token through the authentication endpoints.\n\n## Getting Started\n\n1. Create an account or log in to get your access token\n2. Use the access token in the Authorization header: `Bearer <your-token>`\n3. Explore the available endpoints for your use case\n\n## Rate Limits\n\nAPI rate limits apply to ensure fair usage. Check response headers for rate limit information.\n\n## Support\n\nFor questions, issues, or support, visit [support.nopos.it](https://support.nopos.it) or contact our support team.","version":"1.0","contact":{}},"tags":[],"servers":[{"url":"https://api.nopos.it","description":"Production"},{"url":"https://dev-api.nopos.it","description":"Development"},{"url":"http://localhost:3000","description":"Local Development"}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"PaymentAccountDto":{"type":"object","properties":{"id":{"type":"string","description":"ID","example":"abc123def456"},"name":{"type":"string","description":"Name","example":"My Business"},"url":{"type":"string","description":"Invitation URL","example":"https://viva.com/invitation/..."},"token":{"type":"string","description":"SDK token (e.g., Stripe Terminal connection token)","example":"pst_test_51N..."}},"required":["id","name"]},"PaymentMerchantAddressDto":{"type":"object","properties":{"street":{"type":"string","description":"Street address","example":"Via Roma 1"},"number":{"type":"string","description":"Street number","example":"1"},"city":{"type":"string","description":"City","example":"Milano"},"state":{"type":"string","description":"State/Province","example":"MI"},"postal":{"type":"string","description":"Postal code","example":"20100"},"country":{"type":"string","description":"Country","example":"IT"}}},"PaymentGetMerchantResponseDto":{"type":"object","properties":{"type":{"type":"string","description":"Merchant type","example":"company","enum":["company","individual"]},"name":{"type":"string","description":"Business name (for company type)","example":"Acme S.r.l."},"firstName":{"type":"string","description":"First name (for individual type)","example":"Mario"},"lastName":{"type":"string","description":"Last name (for individual type)","example":"Rossi"},"vatId":{"type":"string","description":"VAT ID","example":"IT12345678901"},"address":{"description":"Address","allOf":[{"$ref":"#/components/schemas/PaymentMerchantAddressDto"}]}}},"PaymentUpdateMerchantRequestDto":{"type":"object","properties":{"type":{"type":"string","description":"Merchant type","example":"company","enum":["company","individual"]},"name":{"type":"string","description":"Business name (for company type)","example":"Acme S.r.l."},"firstName":{"type":"string","description":"First name (for individual type)","example":"Mario"},"lastName":{"type":"string","description":"Last name (for individual type)","example":"Rossi"},"vatId":{"type":"string","description":"VAT ID","example":"IT12345678901"},"address":{"type":"string","description":"Street address","example":"Via Roma 1"},"postal":{"type":"string","description":"Postal code","example":"20100"},"city":{"type":"string","description":"City","example":"Milano"},"state":{"type":"string","description":"State/Province","example":"MI"},"country":{"type":"string","description":"Country","example":"IT"}},"required":["type"]},"PaymentCardTransactionDto":{"type":"object","properties":{"transactionId":{"type":"string","description":"Transaction/order ID used by iframe flow","example":"order_1234567890"},"amount":{"type":"number","description":"Amount","example":12.4},"currency":{"type":"string","description":"Currency code","example":"EUR"},"description":{"type":"string","description":"Description","example":"Payment for order #123"},"token":{"type":"string","description":"Card token from provider SDK (required for tokenized card flows)","example":"cardToken_1234567890"}},"required":["amount","currency","description"]},"PaymentProcessCardResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"ID","example":"abc123def456"},"status":{"type":"string","description":"Status","enum":["pending","completed","canceled","failed","verification"],"example":"pending"},"url":{"type":"string","description":"URL","example":"https://checkout.example.com/..."},"clientSecret":{"type":"string","description":"Client secret","example":"pi_3Nk..._secret_8fM..."}},"required":["id","status"]},"PaymentLinkTransactionDto":{"type":"object","properties":{"amount":{"type":"number","description":"Amount","example":12.4},"currency":{"type":"string","description":"Currency code","example":"EUR"},"description":{"type":"string","description":"Description","example":"Payment for order #123"}},"required":["amount","currency","description"]},"PaymentProcessLinkResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"ID","example":"abc123def456"},"status":{"type":"string","description":"Status","enum":["pending","completed","canceled","failed","verification"],"example":"pending"},"url":{"type":"string","description":"URL","example":"https://checkout.example.com/..."}},"required":["id","status"]},"PaymentAppTransactionDto":{"type":"object","properties":{"amount":{"type":"number","description":"Amount","example":12.4},"currency":{"type":"string","description":"Currency code","example":"EUR"},"description":{"type":"string","description":"Description","example":"Payment for order #123"},"referenceId":{"type":"string","description":"Reference ID","example":"order_1234567890"}},"required":["amount","currency","description"]},"PaymentAppResponseDto":{"type":"object","properties":{"type":{"type":"string","description":"App mode","enum":["app2app","intent"],"example":"app2app"},"payload":{"type":"string","description":"App2App payload","example":"{\"amount\":{\"currency\":\"EUR\",\"value\":\"10.00\"},\"appId\":\"com.example.myapp\",...}"},"signature":{"type":"string","description":"App2App signature","example":"a1b2c3d4e5f6g7h8i9j0..."},"intentId":{"type":"string","description":"Intent ID (for intent-based flows)","example":"pi_1234567890"},"intentSecret":{"type":"string","description":"Intent secret/token (for intent-based flows)","example":"secret_1234567890"}},"required":["type"]},"PaymentTransactionCustomerDto":{"type":"object","properties":{"name":{"type":"string","description":"Customer name","example":"John Doe"},"email":{"type":"string","description":"Customer email","example":"john@example.com"}}},"PaymentTransactionItemDto":{"type":"object","properties":{"id":{"type":"string","description":"ID","example":"item_123"},"name":{"type":"string","description":"Name","example":"Product Name"},"quantity":{"type":"number","description":"Quantity","example":2},"price":{"type":"number","description":"Unit price","example":12.5},"sku":{"type":"string","description":"SKU","example":"SKU123"},"description":{"type":"string","description":"Description","example":"Product description"}},"required":["name","quantity","price"]},"PaymentTransactionMerchantAddressDto":{"type":"object","properties":{"street":{"type":"string","description":"Street address","example":"Via Roma"},"number":{"type":"string","description":"Street number","example":"1"},"city":{"type":"string","description":"City","example":"Roma"},"state":{"type":"string","description":"State/Province","example":"RM"},"zip":{"type":"string","description":"Postal code","example":"00100"},"country":{"type":"string","description":"Country","example":"IT"}}},"PaymentTransactionMerchantDto":{"type":"object","properties":{"name":{"type":"string","description":"Merchant name","example":"My Business"},"vatId":{"type":"string","description":"Merchant VAT ID","example":"IT12345678901"},"address":{"description":"Merchant address","allOf":[{"$ref":"#/components/schemas/PaymentTransactionMerchantAddressDto"}]}}},"PaymentTransactionDto":{"type":"object","properties":{"id":{"type":"string","description":"ID","example":"abc123def456"},"amount":{"type":"number","description":"Amount","example":12.4},"currency":{"type":"string","description":"Currency code","example":"EUR"},"status":{"type":"string","description":"Status","enum":["pending","completed","canceled","failed","verification"],"example":"completed"},"type":{"type":"string","description":"Type","enum":["payment","refund","charge"],"example":"payment"},"provider":{"type":"string","description":"Provider","example":"sumup"},"createdAt":{"format":"date-time","type":"string","description":"Created at","example":"2024-01-15T10:30:00Z"},"updatedAt":{"format":"date-time","type":"string","description":"Updated at","example":"2024-01-15T10:30:00Z"},"description":{"type":"string","description":"Description","example":"Payment for order #123"},"customer":{"description":"Customer information","example":{"name":"John Doe","email":"john@example.com"},"allOf":[{"$ref":"#/components/schemas/PaymentTransactionCustomerDto"}]},"items":{"description":"Items","type":"array","items":{"$ref":"#/components/schemas/PaymentTransactionItemDto"}},"refundIds":{"description":"Refund IDs","example":["refund_123","refund_456"],"type":"array","items":{"type":"string"}},"merchant":{"description":"Merchant information","example":{"name":"My Business","vatId":"IT12345678901","address":{"street":"Via Roma 1","city":"Roma"}},"allOf":[{"$ref":"#/components/schemas/PaymentTransactionMerchantDto"}]},"refProviderId":{"type":"string","description":"Reference provider ID (for handoff transactions)","example":"stripe"},"refTransactionId":{"type":"string","description":"Reference transaction ID (for handoff transactions)","example":"cs_test_..."},"method":{"type":"string","description":"Payment method (for card/terminal transactions)","example":"Visa •••• 4242"},"quantity":{"type":"number","description":"Quantity (e.g. for meal vouchers)","example":1},"url":{"type":"string","description":"Payment URL (for link payments)","example":"https://checkout.example.com/..."},"code":{"type":"string","description":"Payment code/QR (for code payments)","example":"ABC123XYZ"}},"required":["id","amount","currency","status","provider","createdAt"]},"PaymentTransactionListDto":{"type":"object","properties":{"items":{"description":"Items","type":"array","items":{"$ref":"#/components/schemas/PaymentTransactionDto"}}},"required":["items"]},"PaymentUpdateTransactionDto":{"type":"object","properties":{"status":{"type":"string","description":"Status","enum":["pending","completed","canceled","failed"],"example":"completed"},"amount":{"type":"number","description":"Amount","example":12.4},"metadata":{"type":"object","description":"Metadata","example":{"reference":"nopos::client_123","clientId":"client_123","refProviderId":"stripe","refTransactionId":"cs_test_..."}},"refProviderId":{"type":"string","description":"Reference provider ID","example":"stripe"},"refTransactionId":{"type":"string","description":"Reference transaction ID","example":"cs_test_..."}}},"PaymentRefundDto":{"type":"object","properties":{"amount":{"type":"number","description":"Amount","example":12.4}},"required":["amount"]},"PaymentTerminalTransactionDto":{"type":"object","properties":{"amount":{"type":"number","description":"Amount","example":12.4},"currency":{"type":"string","description":"Currency code","example":"EUR"},"description":{"type":"string","description":"Description","example":"Payment for order #123"},"terminalId":{"type":"string","description":"Terminal ID","example":"tmr_1234567890"}},"required":["amount","currency","description"]},"PaymentProcessTerminalResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"ID","example":"abc123def456"},"status":{"type":"string","description":"Status","enum":["pending","completed","canceled","failed","verification"],"example":"pending"},"url":{"type":"string","description":"URL","example":"https://checkout.example.com/..."},"clientSecret":{"type":"string","description":"Client secret","example":"pi_3Nk..._secret_8fM..."}},"required":["id","status"]},"PaymentTerminalDto":{"type":"object","properties":{"id":{"type":"string","description":"Terminal ID","example":"tmr_1234567890"},"name":{"type":"string","description":"Terminal name","example":"Counter Terminal 1"},"status":{"type":"string","description":"Terminal status","enum":["ready","offline","unconnected"],"example":"ready"},"type":{"type":"string","description":"Terminal type","enum":["internet","bluetooth","taptopay","managed","app"],"example":"bluetooth"},"serial":{"type":"string","description":"Serial number","example":"SN123456"}},"required":["id","name","status"]},"PaymentTerminalListDto":{"type":"object","properties":{"items":{"description":"Items","type":"array","items":{"$ref":"#/components/schemas/PaymentTerminalDto"}}},"required":["items"]},"PaymentCreateTerminalDto":{"type":"object","properties":{"name":{"type":"string","description":"Terminal name","example":"Counter Terminal 1"},"code":{"type":"string","description":"Pairing/registration code","example":"ABC123XYZ"},"locationId":{"type":"string","description":"Location ID (optional; provider-specific)","example":"tml_1234567890"}},"required":["name","code"]},"PaymentUpdateTerminalDto":{"type":"object","properties":{"name":{"type":"string","description":"Terminal name","example":"Counter Terminal 1"}}},"PaymentLocationDto":{"type":"object","properties":{"id":{"type":"string","description":"Location ID","example":"loc_1234567890"},"name":{"type":"string","description":"Location name","example":"Main Store"},"street":{"type":"string","description":"Street address","example":"123 Main St"},"number":{"type":"string","description":"Street number","example":"1"},"city":{"type":"string","description":"City","example":"New York"},"state":{"type":"string","description":"State/Province","example":"NY"},"postal":{"type":"string","description":"Postal code","example":"10001"},"country":{"type":"string","description":"Country code","example":"US"}},"required":["id","name","street","number","city","state","postal","country"]},"PaymentLocationListDto":{"type":"object","properties":{"items":{"description":"Items","type":"array","items":{"$ref":"#/components/schemas/PaymentLocationDto"}}},"required":["items"]},"PaymentCreateLocationDto":{"type":"object","properties":{"name":{"type":"string","description":"Location name","example":"Main Store"},"street":{"type":"string","description":"Street address","example":"123 Main St"},"number":{"type":"string","description":"Street number","example":"1"},"city":{"type":"string","description":"City","example":"New York"},"state":{"type":"string","description":"State/Province","example":"NY"},"postal":{"type":"string","description":"Postal code","example":"10001"},"country":{"type":"string","description":"Country code","example":"US"}},"required":["name","street","city","state","postal","country"]},"PaymentUpdateLocationDto":{"type":"object","properties":{"name":{"type":"string","description":"Location name","example":"Main Store"},"street":{"type":"string","description":"Street address","example":"123 Main St"},"number":{"type":"string","description":"Street number","example":"1"},"city":{"type":"string","description":"City","example":"New York"},"state":{"type":"string","description":"State/Province","example":"NY"},"postal":{"type":"string","description":"Postal code","example":"10001"},"country":{"type":"string","description":"Country code","example":"US"}}},"PaymentCheckinTransactionDto":{"type":"object","properties":{"transactionId":{"type":"string","description":"Transaction ID","example":"txn_1234567890"}},"required":["transactionId"]},"PaymentProcessCheckinResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"ID","example":"abc123def456"},"status":{"type":"string","description":"Status","enum":["pending","completed","canceled","failed","verification"],"example":"pending"},"method":{"type":"string","description":"Payment method","example":"Visa •••• 4242"},"quantity":{"type":"number","description":"Quantity (e.g. for meal vouchers)","example":1}},"required":["id","status"]},"PaymentProcessCodeResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"ID","example":"abc123def456"},"status":{"type":"string","description":"Status","enum":["pending","completed","canceled","failed","verification"],"example":"pending"},"code":{"type":"string","description":"Code","example":"ABC123XYZ"}},"required":["id","status"]},"CreateAppDto":{"type":"object","properties":{"name":{"type":"string","description":"App name","example":"My Payment App"},"allowedDomains":{"description":"Allowed domains","example":["app.example.com","www.example.com"],"type":"array","items":{"type":"string"}}},"required":["name"]},"AppResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"App ID","example":"123e4567-e89b-12d3-a456-426614174000"},"clientId":{"type":"string","description":"Client ID","example":"app_ci_a1b2c3d4e5f6789012345678901234567890ab"},"clientSecret":{"type":"string","description":"Client secret","example":"app_cs_a1b2c3d4e5f6789012345678901234567890abcdef1234567890abcdef1234567890ab"},"name":{"type":"string","description":"App name","example":"My Payment App"},"iconId":{"type":"string","description":"App icon ID","example":"123e4567-e89b-12d3-a456-426614174000.png"},"webhookUrl":{"type":"string","description":"Webhook URL","example":"https://app.example.com/webhook"},"allowedDomains":{"description":"Allowed domains","example":["app.example.com","www.example.com"],"type":"array","items":{"type":"string"}},"volume":{"type":"number","description":"Volume","example":1234.56},"transactions":{"type":"number","description":"Transactions","example":42},"createdAt":{"format":"date-time","type":"string","description":"Creation date","example":"2024-01-15T10:30:00Z"},"updatedAt":{"format":"date-time","type":"string","description":"Last update date","example":"2024-01-15T10:30:00Z"}},"required":["id","clientId","clientSecret","name","volume","transactions","createdAt","updatedAt"]},"PublicAppInfoDto":{"type":"object","properties":{"name":{"type":"string","description":"App name","example":"My Payment App"},"iconId":{"type":"string","description":"App icon ID","example":"123e4567-e89b-12d3-a456-426614174000.png"},"allowedDomains":{"description":"Allowed domains","example":["app.example.com","www.example.com"],"type":"array","items":{"type":"string"}}},"required":["name"]},"UpdateAppDto":{"type":"object","properties":{"name":{"type":"string","description":"App name","example":"My Payment App"},"iconId":{"type":"string","description":"App icon ID","example":"123e4567-e89b-12d3-a456-426614174000.png"},"webhookUrl":{"type":"string","description":"Webhook URL","example":"https://app.example.com/webhook"},"allowedDomains":{"description":"Allowed domains","example":["app.example.com","www.example.com"],"type":"array","items":{"type":"string"}}}},"GenerateUploadUrlDto":{"type":"object","properties":{"type":{"type":"string","description":"File type (must start with image/ or video/)","example":"image/jpeg"},"size":{"type":"number","description":"File size in bytes (max 5MB)","example":1048576}},"required":["type","size"]},"GenerateUploadUrlResponseDto":{"type":"object","properties":{"uploadUrl":{"type":"string","description":"Presigned upload URL","example":"https://s3.amazonaws.com/bucket/file?signature=..."},"fileId":{"type":"string","description":"File ID for the uploaded file","example":"123e4567-e89b-12d3-a456-426614174000.jpg"}},"required":["uploadUrl","fileId"]},"DeviceDto":{"type":"object","properties":{"id":{"type":"string","description":"ID","example":"device-uuid-123"},"name":{"type":"string","description":"Name","example":"iPhone 15 Pro"}},"required":["id","name"]},"DeviceListDto":{"type":"object","properties":{"items":{"description":"Items","type":"array","items":{"$ref":"#/components/schemas/DeviceDto"}}},"required":["items"]},"CreateDeviceDto":{"type":"object","properties":{"deviceToken":{"type":"string","description":"Token","example":"fGhJkLmNoPqRsTuVwXyZ123456789"},"deviceName":{"type":"string","description":"Name","example":"iPhone 15 Pro"}},"required":["deviceToken","deviceName"]},"FiscalAccountDto":{"type":"object","properties":{"id":{"type":"string","description":"ID","example":"abc123def456"},"name":{"type":"string","description":"Name","example":"My Business"}},"required":["id","name"]},"FiscalAddressDto":{"type":"object","properties":{"street":{"type":"string","description":"Street","example":"Via Roma"},"number":{"type":"string","description":"Street number","example":"123"},"postal":{"type":"string","description":"Postal code","example":"00100"},"city":{"type":"string","description":"City","example":"Roma"},"state":{"type":"string","description":"State/Province","example":"RM"},"country":{"type":"string","description":"Country","example":"IT"}},"required":["street","postal","city","state","country"]},"FiscalCredentialsDto":{"type":"object","properties":{"username":{"type":"string","description":"Username","example":"username123"},"password":{"type":"string","description":"Password"},"pin":{"type":"string","description":"PIN"},"assignee":{"type":"string","description":"Assignee","example":"me"}},"required":["username"]},"FiscalMerchantDto":{"type":"object","properties":{"type":{"type":"string","description":"Merchant type","enum":["company","individual"]},"name":{"type":"string","description":"Name","example":"Acme S.r.l."},"email":{"type":"string","description":"Company email","example":"info@acme.it"},"firstName":{"type":"string","description":"First name","example":"Mario"},"lastName":{"type":"string","description":"Last name","example":"Rossi"},"vatId":{"type":"string","description":"VAT ID","example":"IT12345678901"},"taxId":{"type":"string","description":"Fiscal code","example":"RSSMRA80A01H501U"},"address":{"description":"Address","allOf":[{"$ref":"#/components/schemas/FiscalAddressDto"}]},"credentials":{"description":"Credentials","allOf":[{"$ref":"#/components/schemas/FiscalCredentialsDto"}]},"pec":{"type":"string","description":"PEC","example":"acme@pec.it"}},"required":["vatId"]},"FiscalUpdateMerchantDto":{"type":"object","properties":{"type":{"type":"string","description":"Merchant type","enum":["company","individual"]},"name":{"type":"string","description":"Name","example":"Acme S.r.l."},"email":{"type":"string","description":"Company email","example":"info@acme.it"},"firstName":{"type":"string","description":"First name","example":"Mario"},"lastName":{"type":"string","description":"Last name","example":"Rossi"},"vatId":{"type":"string","description":"VAT ID","example":"IT12345678901"},"taxId":{"type":"string","description":"Fiscal code","example":"RSSMRA80A01H501U"},"address":{"description":"Address","allOf":[{"$ref":"#/components/schemas/FiscalAddressDto"}]},"credentials":{"description":"Credentials","allOf":[{"$ref":"#/components/schemas/FiscalCredentialsDto"}]},"pec":{"type":"string","description":"PEC","example":"acme@pec.it"}},"required":["vatId"]},"FiscalUpdateCredentialsDto":{"type":"object","properties":{"username":{"type":"string","description":"Username","example":"username123"},"password":{"type":"string","description":"Password"},"pin":{"type":"string","description":"PIN"},"assignee":{"type":"string","description":"Assignee","example":"me"}},"required":["username"]},"FiscalReceiptItemDto":{"type":"object","properties":{"description":{"type":"string","description":"Description","example":"Pizza Margherita"},"quantity":{"type":"number","description":"Quantity","example":2},"price":{"type":"number","description":"Price","example":8.5},"vat":{"type":"string","description":"VAT rate","enum":["4","5","10","22","2","6.4","7","7.3","7.5","7.65","7.95","8.3","8.5","8.8","9.5","12.3","N1","N2","N3","N4","N5","N6"],"example":"22"},"discount":{"type":"number","description":"Discount","example":2.5},"gift":{"type":"boolean","description":"Gift item","example":false}},"required":["description","quantity","price","vat"]},"FiscalReceiptPaymentDto":{"type":"object","properties":{"cash":{"type":"number","description":"Cash payment amount","example":10.5},"electronic":{"type":"number","description":"Electronic payment amount","example":10.5},"ticket":{"type":"number","description":"Ticket Restaurant amount","example":10.5},"ticketCount":{"type":"number","description":"Ticket count","example":5},"discount":{"type":"number","description":"Discount to pay","example":2.5},"credit":{"type":"number","description":"Credit payment amount","example":5},"service":{"type":"number","description":"Service payment amount","example":5}}},"FiscalUncollectedDto":{"type":"object","properties":{"invoice":{"type":"boolean","description":"Invoice","example":false},"services":{"type":"number","description":"Services","example":10.5},"credit":{"type":"number","description":"Credit","example":10.5}}},"FiscalCreateReceiptDto":{"type":"object","properties":{"type":{"type":"string","description":"Type","enum":["sale","return","refund"],"example":"sale"},"original":{"type":"string","description":"Original document ID (for refund/return)","example":"abc123def456"},"lottery":{"type":"string","description":"Lottery code","example":"1234567890123"},"items":{"description":"Items","type":"array","items":{"$ref":"#/components/schemas/FiscalReceiptItemDto"}},"payment":{"description":"Payment","allOf":[{"$ref":"#/components/schemas/FiscalReceiptPaymentDto"}]},"uncollected":{"description":"Uncollected","allOf":[{"$ref":"#/components/schemas/FiscalUncollectedDto"}]}},"required":["type","items"]},"FiscalLinkedDto":{"type":"object","properties":{"revokes":{"type":"object","description":"Revokes"},"returns":{"type":"object","description":"Returns"}}},"FiscalReceiptDto":{"type":"object","properties":{"id":{"type":"string","description":"ID","example":"abc123def456"},"number":{"type":"string","description":"Number","example":"2024-0001"},"type":{"type":"string","description":"Type","enum":["sale","return","refund"],"example":"sale"},"original":{"type":"string","description":"Original document ID (for refund/return)"},"date":{"format":"date-time","type":"string","description":"Date","example":"2024-01-15T10:30:00Z"},"lottery":{"type":"string","description":"Lottery","example":"ABC123"},"amount":{"type":"number","description":"Amount","example":100.5},"status":{"type":"string","description":"Status","enum":["pending","completed","canceled","failed"],"example":"completed"},"merchant":{"description":"Merchant","allOf":[{"$ref":"#/components/schemas/FiscalMerchantDto"}]},"items":{"description":"Items","type":"array","items":{"$ref":"#/components/schemas/FiscalReceiptItemDto"}},"payment":{"description":"Payment","allOf":[{"$ref":"#/components/schemas/FiscalReceiptPaymentDto"}]},"uncollected":{"description":"Uncollected","allOf":[{"$ref":"#/components/schemas/FiscalUncollectedDto"}]},"linked":{"description":"Linked","allOf":[{"$ref":"#/components/schemas/FiscalLinkedDto"}]},"refProviderId":{"type":"string","description":"Reference provider ID for handoff receipts","example":"ade"},"refDocumentId":{"type":"string","description":"Reference document ID for handoff receipts","example":"doc_123"},"refDocumentType":{"type":"string","description":"Reference document type for handoff receipts","enum":["receipt","invoice"],"example":"receipt"}},"required":["id","type","date","amount","merchant","items"]},"FiscalUpdateReceiptDto":{"type":"object","properties":{"status":{"type":"string","description":"Status","enum":["pending","completed","canceled","failed"],"example":"completed"},"refProviderId":{"type":"string","description":"Reference provider ID","example":"ade"},"refDocumentId":{"type":"string","description":"Reference document ID","example":"doc_123"},"refDocumentType":{"type":"string","description":"Reference document type","enum":["receipt","invoice"],"example":"receipt"}}},"FiscalReceiptListDto":{"type":"object","properties":{"items":{"description":"Items","type":"array","items":{"$ref":"#/components/schemas/FiscalReceiptDto"}}},"required":["items"]},"FiscalInvoiceItemDto":{"type":"object","properties":{"description":{"type":"string","description":"Description","example":"Pizza Margherita"},"quantity":{"type":"number","description":"Quantity","example":2},"price":{"type":"number","description":"Price","example":8.5},"vat":{"type":"string","description":"VAT rate","enum":["22.00","21.00","20.00","10.00","5.00","4.00","0.00","2.00","6.40","7.00","7.30","7.50","7.65","7.95","8.30","8.50","8.80","9.50","12.30"],"example":"22.00"},"nature":{"type":"string","description":"VAT nature","enum":["N1","N2.1","N2.2","N3.1","N3.2","N3.3","N3.4","N3.5","N3.6","N4","N5","N6.1","N6.2","N6.3","N6.4","N6.5","N6.6","N6.7","N6.8","N6.9","N7"],"example":"N4"}},"required":["description","quantity","price","vat"]},"FiscalInvoiceCustomerDto":{"type":"object","properties":{"type":{"type":"string","description":"Merchant type","enum":["company","individual"]},"name":{"type":"string","description":"Name","example":"Acme S.r.l."},"email":{"type":"string","description":"Company email","example":"info@acme.it"},"firstName":{"type":"string","description":"First name","example":"Mario"},"lastName":{"type":"string","description":"Last name","example":"Rossi"},"vatId":{"type":"string","description":"VAT ID","example":"IT12345678901"},"taxId":{"type":"string","description":"Fiscal code","example":"RSSMRA80A01H501U"},"address":{"description":"Address","allOf":[{"$ref":"#/components/schemas/FiscalAddressDto"}]},"credentials":{"description":"Credentials","allOf":[{"$ref":"#/components/schemas/FiscalCredentialsDto"}]},"pec":{"type":"string","description":"PEC","example":"acme@pec.it"},"sdi":{"type":"string","description":"SDI code","example":"SUBM70N"}},"required":["vatId","sdi"]},"FiscalInvoicePaymentDto":{"type":"object","properties":{"cash":{"type":"number","description":"Cash payment amount","example":10.5},"electronic":{"type":"number","description":"Electronic payment amount","example":10.5},"ticket":{"type":"number","description":"Ticket Restaurant amount","example":10.5},"ticketCount":{"type":"number","description":"Ticket count","example":5},"discount":{"type":"number","description":"Discount to pay","example":2.5},"credit":{"type":"number","description":"Credit payment amount","example":5},"service":{"type":"number","description":"Service payment amount","example":5}}},"FiscalCreateInvoiceDto":{"type":"object","properties":{"type":{"type":"string","description":"Document type","enum":["TD01","TD02","TD03","TD04","TD05","TD06","TD16","TD17","TD18","TD19","TD20","TD21","TD22","TD23","TD24","TD25","TD26","TD27","TD28","TD29"],"example":"TD01"},"regime":{"type":"string","description":"Fiscal regime","enum":["RF01","RF19","RF02","RF17","RF07","RF16","RF04","RF11","RF05","RF14","RF10","RF12","RF13","RF06","RF08","RF09","RF15","RF20","RF18"],"example":"RF01"},"original":{"type":"string","description":"Original document ID (for credit/debit notes)"},"documentNumber":{"type":"string","description":"Document number"},"documentSeries":{"type":"string","description":"Document series"},"activityCode":{"type":"string","description":"Activity code"},"items":{"description":"Items","type":"array","items":{"$ref":"#/components/schemas/FiscalInvoiceItemDto"}},"customer":{"description":"Customer","allOf":[{"$ref":"#/components/schemas/FiscalInvoiceCustomerDto"}]},"merchant":{"description":"Merchant","allOf":[{"$ref":"#/components/schemas/FiscalMerchantDto"}]},"payment":{"description":"Payment","allOf":[{"$ref":"#/components/schemas/FiscalInvoicePaymentDto"}]},"paymentTermId":{"type":"number","description":"Payment term ID"},"notes":{"type":"string","description":"Notes"}},"required":["type","regime","items","customer"]},"FiscalInvoiceDto":{"type":"object","properties":{"id":{"type":"string","description":"ID","example":"abc123def456"},"number":{"type":"string","description":"Number","example":"2024-0001"},"type":{"type":"string","description":"Document type","enum":["TD01","TD02","TD03","TD04","TD05","TD06","TD16","TD17","TD18","TD19","TD20","TD21","TD22","TD23","TD24","TD25","TD26","TD27","TD28","TD29"],"example":"TD01"},"regime":{"type":"string","description":"Fiscal regime","enum":["RF01","RF19","RF02","RF17","RF07","RF16","RF04","RF11","RF05","RF14","RF10","RF12","RF13","RF06","RF08","RF09","RF15","RF20","RF18"],"example":"RF01"},"original":{"type":"string","description":"Original document ID (for credit/debit notes)"},"date":{"format":"date-time","type":"string","description":"Date","example":"2024-01-15T10:30:00Z"},"amount":{"type":"number","description":"Amount","example":100.5},"status":{"type":"string","description":"Status","enum":["pending","completed","canceled","failed"],"example":"completed"},"customer":{"description":"Customer","allOf":[{"$ref":"#/components/schemas/FiscalInvoiceCustomerDto"}]},"merchant":{"description":"Merchant","allOf":[{"$ref":"#/components/schemas/FiscalMerchantDto"}]},"items":{"description":"Items","type":"array","items":{"$ref":"#/components/schemas/FiscalInvoiceItemDto"}},"payment":{"description":"Payment","allOf":[{"$ref":"#/components/schemas/FiscalInvoicePaymentDto"}]},"notes":{"type":"string","description":"Notes"},"refProviderId":{"type":"string","description":"Reference provider ID for handoff invoices","example":"acube"},"refDocumentId":{"type":"string","description":"Reference document ID for handoff invoices","example":"doc_123"},"refDocumentType":{"type":"string","description":"Reference document type for handoff invoices","enum":["receipt","invoice"],"example":"invoice"}},"required":["id","type","regime","date","amount","customer","items"]},"FiscalInvoiceListDto":{"type":"object","properties":{"items":{"description":"Items","type":"array","items":{"$ref":"#/components/schemas/FiscalInvoiceDto"}}},"required":["items"]},"CreateCustomerPortalSessionResponseDto":{"type":"object","properties":{"portalUrl":{"type":"string","description":"Customer portal URL","example":"https://billing.stripe.com/p/session/..."}},"required":["portalUrl"]},"SubscriptionDto":{"type":"object","properties":{"status":{"type":"string","description":"Subscription status","enum":["active","inactive"],"example":"active"},"amount":{"type":"number","description":"Price amount in currency units","example":9.99},"currency":{"type":"string","description":"Price currency","example":"EUR"},"interval":{"type":"string","description":"Price interval","example":"month"}},"required":["status","amount","currency","interval"]},"CreateCheckoutSessionResponseDto":{"type":"object","properties":{"checkoutUrl":{"type":"string","description":"Checkout session URL","example":"https://checkout.stripe.com/c/pay/..."}},"required":["checkoutUrl"]},"SdiTransmissionRequestDto":{"type":"object","properties":{"xmlContent":{"type":"string","description":"XML content","example":"<?xml version=\"1.0\" encoding=\"UTF-8\"?><FatturaElettronica>..."}},"required":["xmlContent"]},"SdiResponseDto":{"type":"object","properties":{"status":{"type":"string","description":"Status","example":"success"},"message":{"type":"string","description":"Message","example":"Invoice successfully transmitted to SDI"},"data":{"type":"object","description":"Data"},"timestamp":{"type":"string","description":"Timestamp","example":"2024-01-15T10:30:00Z"}},"required":["status","message","timestamp"]},"SdiReceptionRequestDto":{"type":"object","properties":{"xmlContent":{"type":"string","description":"XML content","example":"<?xml version=\"1.0\" encoding=\"UTF-8\"?><Notifica>..."}},"required":["xmlContent"]},"StoreAccountDto":{"type":"object","properties":{"id":{"type":"string","description":"ID","example":"abc123def456"},"name":{"type":"string","description":"Name","example":"My Shop"}},"required":["id","name"]},"StoreMerchantAddressDto":{"type":"object","properties":{"street":{"type":"string","description":"Street address","example":"Via Roma 1"},"number":{"type":"string","description":"Street number","example":"1"},"city":{"type":"string","description":"City","example":"Milano"},"state":{"type":"string","description":"State/Province","example":"MI"},"postal":{"type":"string","description":"Postal code","example":"20100"},"country":{"type":"string","description":"Country","example":"IT"}}},"StoreGetMerchantResponseDto":{"type":"object","properties":{"type":{"type":"string","description":"Merchant type","example":"company","enum":["company","individual"]},"name":{"type":"string","description":"Business name (for company type)","example":"My Shop"},"firstName":{"type":"string","description":"First name (for individual type)","example":"Mario"},"lastName":{"type":"string","description":"Last name (for individual type)","example":"Rossi"},"vatId":{"type":"string","description":"VAT ID","example":"IT12345678901"},"address":{"description":"Address","allOf":[{"$ref":"#/components/schemas/StoreMerchantAddressDto"}]}}},"StoreUpdateMerchantRequestDto":{"type":"object","properties":{"type":{"type":"string","description":"Merchant type","example":"company","enum":["company","individual"]},"name":{"type":"string","description":"Business name (for company type)","example":"My Shop"},"firstName":{"type":"string","description":"First name (for individual type)","example":"Mario"},"lastName":{"type":"string","description":"Last name (for individual type)","example":"Rossi"},"vatId":{"type":"string","description":"VAT ID","example":"IT12345678901"},"address":{"type":"string","description":"Street address","example":"Via Roma 1"},"postal":{"type":"string","description":"Postal code","example":"20100"},"city":{"type":"string","description":"City","example":"Milano"},"state":{"type":"string","description":"State/Province","example":"MI"},"country":{"type":"string","description":"Country","example":"IT"}},"required":["type"]},"StoreTransactionItemDto":{"type":"object","properties":{"id":{"type":"string","description":"ID","example":"item_123"},"name":{"type":"string","description":"Name","example":"Product Name"},"quantity":{"type":"number","description":"Quantity","example":2},"price":{"type":"number","description":"Price","example":12.5},"sku":{"type":"string","description":"SKU","example":"SKU123"},"description":{"type":"string","description":"Description","example":"Product description"}},"required":["name","quantity","price"]},"StoreTransactionDto":{"type":"object","properties":{"id":{"type":"string","description":"ID","example":"gid://shopify/Order/1234567890"},"amount":{"type":"number","description":"Amount","example":125.5},"currency":{"type":"string","description":"Currency code","example":"EUR"},"status":{"type":"string","description":"Status","enum":["pending","completed","canceled","failed"],"example":"completed"},"type":{"type":"string","description":"Type","enum":["payment","refund"],"example":"payment"},"provider":{"type":"string","description":"Provider","example":"shopify"},"createdAt":{"format":"date-time","type":"string","description":"Created at","example":"2024-01-15T10:30:00Z"},"updatedAt":{"format":"date-time","type":"string","description":"Updated at","example":"2024-01-15T10:30:00Z"},"description":{"type":"string","description":"Description","example":"Order #1001"},"customerEmail":{"type":"string","description":"Customer email","example":"customer@example.com"},"customerName":{"type":"string","description":"Customer name","example":"John Doe"},"items":{"description":"Items","type":"array","items":{"$ref":"#/components/schemas/StoreTransactionItemDto"}},"metadata":{"type":"object","description":"Metadata"},"receiptUrl":{"type":"string","description":"Receipt URL","example":"https://receipt.example.com/..."},"refundIds":{"description":"Refund IDs","example":["refund_123","refund_456"],"type":"array","items":{"type":"string"}}},"required":["id","amount","currency","status","provider","createdAt","description"]},"StoreTransactionListDto":{"type":"object","properties":{"items":{"description":"Items","type":"array","items":{"$ref":"#/components/schemas/StoreTransactionDto"}}},"required":["items"]},"StoreCreateRefundDto":{"type":"object","properties":{"amount":{"type":"number","description":"Amount","example":12.4},"reason":{"type":"string","description":"Reason","example":"Customer request"},"items":{"description":"Items","type":"array","items":{"type":"object"}}},"required":["amount"]},"StoreUpdateTransactionDto":{"type":"object","properties":{"metadata":{"type":"object","description":"Metadata","example":{"custom_field":"value"}}}},"CreateBridgeDto":{"type":"object","properties":{"name":{"type":"string","description":"Bridge name","example":"Cassa 1 ECR"},"protocol":{"type":"string","description":"Bridge protocol","enum":["ecr17","escpos","fepos","xonxoff","epos"],"example":"ecr17"},"type":{"type":"string","description":"Bridge type","enum":["cloud","local"],"example":"cloud"}},"required":["name","protocol","type"]},"BridgeResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Bridge ID","example":"123e4567-e89b-12d3-a456-426614174000"},"userId":{"type":"string","description":"User ID","example":"123e4567-e89b-12d3-a456-426614174000"},"name":{"type":"string","description":"Bridge name","example":"Cassa 1 ECR"},"protocol":{"type":"string","description":"Bridge protocol","enum":["ecr17","escpos","fepos","xonxoff","epos"],"example":"ecr17"},"type":{"type":"string","description":"Bridge type","enum":["cloud","local"],"example":"cloud"},"sourceAddress":{"type":"string","description":"Source IP address of the POS/ECR device (auto-bound on first registration payment)","example":"192.168.1.100"},"destinationAddress":{"type":"string","description":"Bridge destination address","example":"89.167.53.134"},"destinationPort":{"type":"number","description":"Bridge destination port","example":5001},"authCode":{"type":"string","description":"9-digit setup code used for registration — available only for cloud bridges","example":"123456789"},"paymentProviderId":{"type":"string","description":"Payment provider ID","example":"sumup"},"paymentTerminalId":{"type":"string","description":"Payment provider terminal ID","example":"tmr_1234567890"},"fiscalProviderId":{"type":"string","description":"Fiscal provider ID","example":"fiskaly"},"createdAt":{"format":"date-time","type":"string","description":"Creation date","example":"2024-01-15T10:30:00Z"},"updatedAt":{"format":"date-time","type":"string","description":"Last update date","example":"2024-01-15T10:30:00Z"}},"required":["id","userId","name","protocol","type","destinationAddress","destinationPort","createdAt","updatedAt"]},"UpdateBridgeDto":{"type":"object","properties":{"name":{"type":"string","description":"Bridge name","example":"Cassa 1 ECR"},"paymentProviderId":{"type":"string","description":"Payment provider ID","example":"sumup"},"paymentTerminalId":{"type":"string","description":"Payment provider terminal ID","example":"tmr_1234567890"},"fiscalProviderId":{"type":"string","description":"Fiscal provider ID","example":"fiskaly"},"destinationPort":{"type":"number","description":"Bridge destination port. Customizable only for local bridges.","example":5001}}},"BridgePaymentRequestDto":{"type":"object","properties":{"amount":{"type":"number","description":"Amount in EUR. Amounts >= 100 000 are treated as registration probes.","example":12.5},"currency":{"type":"string","description":"Currency code","example":"EUR"},"reference":{"type":"string","description":"Reference","example":"order_123"}},"required":["amount","currency"]},"BridgePaymentResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"ID","example":"abc123"},"status":{"type":"string","description":"Status","enum":["pending","completed","canceled","failed","verification"],"example":"completed"}},"required":["id","status"]},"BridgeFiscalItemDto":{"type":"object","properties":{"description":{"type":"string","description":"Item description","example":"Water"},"quantity":{"type":"number","description":"Quantity","example":1},"price":{"type":"number","description":"Price in EUR","example":1.5},"vat":{"type":"string","description":"VAT rate","enum":["4","5","10","22","2","6.4","7","7.3","7.5","7.65","7.95","8.3","8.5","8.8","9.5","12.3","N1","N2","N3","N4","N5","N6"],"example":"22"}},"required":["description","quantity","price","vat"]},"BridgeFiscalPaymentDto":{"type":"object","properties":{"type":{"type":"string","description":"Payment type","enum":["cash","card","ticket","multi"],"example":"card"},"amount":{"type":"number","description":"Amount in EUR","example":1.5}},"required":["type","amount"]},"BridgeFiscalRequestDto":{"type":"object","properties":{"items":{"description":"Receipt items","type":"array","items":{"$ref":"#/components/schemas/BridgeFiscalItemDto"}},"payments":{"description":"Payments","type":"array","items":{"$ref":"#/components/schemas/BridgeFiscalPaymentDto"}}},"required":["items","payments"]},"BridgeFiscalResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"ID","example":"abc123"},"status":{"type":"string","description":"Status","enum":["pending","completed","canceled","failed","verification"],"example":"completed"}},"required":["id","status"]},"LoginDto":{"type":"object","properties":{"email":{"type":"string","description":"Email","example":"user@example.com"},"code":{"type":"string","description":"OTP code","example":"123456"},"clientId":{"type":"string","description":"App client ID for referral","example":"app_123456789"}},"required":["email"]},"LoginResponseDto":{"type":"object","properties":{"accessToken":{"type":"string","description":"Access token","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."},"refreshToken":{"type":"string","description":"Refresh token","example":"refresh_token_abc123..."}}},"RefreshTokenDto":{"type":"object","properties":{"refreshToken":{"type":"string","description":"Refresh token","example":"refresh_token_abc123..."}},"required":["refreshToken"]},"RefreshTokenResponseDto":{"type":"object","properties":{"accessToken":{"type":"string","description":"Access token","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."},"refreshToken":{"type":"string","description":"Refresh token","example":"refresh_token_abc123..."}},"required":["accessToken","refreshToken"]},"AuthorizationCodeDto":{"type":"object","properties":{"clientId":{"type":"string","description":"Client ID","example":"app_1234567890abcdef"},"scopes":{"type":"string","description":"Scopes","example":"payments:read payments:write"}},"required":["clientId"]},"AuthorizationCodeResponseDto":{"type":"object","properties":{"code":{"type":"string","description":"Authorization code","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."}},"required":["code"]},"ExchangeCodeDto":{"type":"object","properties":{"code":{"type":"string","description":"Authorization code","example":"auth_code_abc123..."},"clientId":{"type":"string","description":"Client ID","example":"app_1234567890abcdef"},"clientSecret":{"type":"string","description":"Client secret","example":"sk_live_..."},"redirectUri":{"type":"string","description":"Redirect URI","example":"https://app.example.com/callback"}},"required":["code","clientId","clientSecret","redirectUri"]},"AuthTokenResponseDto":{"type":"object","properties":{"accessToken":{"type":"string","description":"Access token","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."},"refreshToken":{"type":"string","description":"Refresh token","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."}},"required":["accessToken","refreshToken"]},"CreateProductDto":{"type":"object","properties":{"name":{"type":"string","description":"Product name","example":"Cartolina"},"description":{"type":"string","description":"Product description","example":"Cartolina in formato A6"},"price":{"type":"number","description":"Product price (including VAT)","example":2.99},"currency":{"type":"string","description":"Product currency","example":"EUR","default":"EUR"},"category":{"type":"string","description":"Product category","example":"Cartoleria"},"color":{"type":"string","description":"Product color (hex code)","example":"#000000"},"discount":{"type":"number","description":"Discount amount","example":10},"discountType":{"type":"string","description":"Discount type","example":"percentage","enum":["percentage","fixed"]},"gift":{"type":"boolean","description":"Whether this is a gift item","example":false},"imageId":{"type":"string","description":"Product image asset ID (UUID with file extension)","example":"123e4567-e89b-12d3-a456-426614174000.jpg"},"code":{"type":"string","description":"Product code/barcode","example":"8001234567890"},"quantity":{"type":"number","description":"Product quantity in stock","example":10},"vat":{"type":"string","description":"VAT type","example":"22","default":"22"}},"required":["name","price"]},"ProductResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Product ID","example":"123e4567-e89b-12d3-a456-426614174000"},"name":{"type":"string","description":"Product name","example":"Cartolina"},"description":{"type":"string","description":"Product description","example":"Cartolina in formato A6"},"price":{"type":"number","description":"Product price (including VAT)","example":2.99},"currency":{"type":"string","description":"Product currency","example":"EUR"},"category":{"type":"string","description":"Product category","example":"Cartoleria"},"color":{"type":"string","description":"Product color (hex code)","example":"#000000"},"discount":{"type":"number","description":"Discount amount","example":10},"discountType":{"type":"string","description":"Discount type","example":"percentage","enum":["percentage","fixed"]},"gift":{"type":"boolean","description":"Whether this is a gift item","example":false},"imageId":{"type":"string","description":"Product image asset ID (UUID with file extension)","example":"123e4567-e89b-12d3-a456-426614174000.jpg"},"code":{"type":"string","description":"Product code/barcode","example":"8001234567890"},"quantity":{"type":"number","description":"Product quantity in stock","example":10},"vat":{"type":"string","description":"VAT type","example":"22"},"createdAt":{"format":"date-time","type":"string","description":"Creation date","example":"2023-01-01T00:00:00.000Z"},"updatedAt":{"format":"date-time","type":"string","description":"Last update date","example":"2023-01-01T00:00:00.000Z"}},"required":["id","name","price","currency","vat","createdAt","updatedAt"]},"UpdateProductDto":{"type":"object","properties":{"name":{"type":"string","description":"Product name","example":"Cartolina"},"description":{"type":"string","description":"Product description","example":"Cartolina in formato A6"},"price":{"type":"number","description":"Product price (including VAT)","example":2.99},"currency":{"type":"string","description":"Product currency","example":"EUR"},"category":{"type":"string","description":"Product category","example":"Cartoleria"},"color":{"type":"string","description":"Product color (hex code)","example":"#000000"},"discount":{"type":"number","description":"Discount amount","example":10},"discountType":{"type":"string","description":"Discount type","example":"percentage","enum":["percentage","fixed"]},"gift":{"type":"boolean","description":"Whether this is a gift item","example":false},"imageId":{"type":"string","description":"Product image asset ID (UUID with file extension)","example":"123e4567-e89b-12d3-a456-426614174000.jpg"},"code":{"type":"string","description":"Product code/barcode","example":"8001234567890"},"quantity":{"type":"number","description":"Product quantity in stock","example":10},"vat":{"type":"string","description":"VAT type","example":"22"}}},"OrderItemDto":{"type":"object","properties":{"id":{"type":"string","description":"Item ID"},"name":{"type":"string","description":"Item name","example":"Pizza Margherita"},"description":{"type":"string","description":"Item description"},"quantity":{"type":"number","description":"Item quantity","example":2},"price":{"type":"number","description":"Item price","example":8.5},"vat":{"type":"string","description":"VAT type","example":"22"},"discount":{"type":"number","description":"Discount amount"},"discountType":{"type":"string","description":"Discount type","enum":["fixed","percentage"]},"gift":{"type":"boolean","description":"Whether this is a gift item"}},"required":["id","name","quantity","price","vat"]},"CreateOrderDto":{"type":"object","properties":{"tableId":{"type":"string","description":"Table ID this order is linked to"},"tableName":{"type":"string","description":"Display name (e.g. table name)","example":"Tavolo 3"},"notes":{"type":"string","description":"Optional notes for the order"},"items":{"description":"Order items","type":"array","items":{"$ref":"#/components/schemas/OrderItemDto"}}},"required":["items"]},"OrderResponseDto":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"tableId":{"type":"string"},"tableName":{"type":"string"},"status":{"type":"string","enum":["open","preparing","ready","closed"]},"notes":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemDto"}},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","userId","status","items","createdAt","updatedAt"]},"UpdateOrderDto":{"type":"object","properties":{"status":{"type":"string","description":"Order status","enum":["open","preparing","ready","closed"]},"notes":{"type":"string","description":"Optional notes"},"items":{"description":"Order items","type":"array","items":{"$ref":"#/components/schemas/OrderItemDto"}}}},"CreateTableDto":{"type":"object","properties":{"name":{"type":"string","description":"Table name","example":"1"},"seats":{"type":"number","description":"Number of seats","example":4},"color":{"type":"string","description":"Table color (hex code)","example":"#3b82f6"}},"required":["name","seats"]},"CartItemDto":{"type":"object","properties":{"id":{"type":"string","description":"Item ID","example":"123e4567-e89b-12d3-a456-426614174000"},"name":{"type":"string","description":"Item name","example":"Pizza Margherita"},"description":{"type":"string","description":"Item description","example":"Classic pizza with tomato and mozzarella"},"quantity":{"type":"number","description":"Item quantity","example":2},"price":{"type":"number","description":"Item price","example":8.5},"vat":{"type":"string","description":"VAT type","example":"22"},"discount":{"type":"number","description":"Discount amount","example":1},"discountType":{"type":"string","description":"Discount type","enum":["fixed","percentage"],"example":"fixed"},"gift":{"type":"boolean","description":"Whether this is a gift item","example":false}},"required":["id","name","quantity","price","vat"]},"CartDto":{"type":"object","properties":{"items":{"description":"Cart items","type":"array","items":{"$ref":"#/components/schemas/CartItemDto"}}},"required":["items"]},"TableResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Table ID","example":"123e4567-e89b-12d3-a456-426614174000"},"name":{"type":"string","description":"Table name","example":"1"},"seats":{"type":"number","description":"Number of seats","example":4},"color":{"type":"string","description":"Table color (hex code)","example":"#3b82f6"},"cart":{"description":"Cart with items","allOf":[{"$ref":"#/components/schemas/CartDto"}]},"createdAt":{"format":"date-time","type":"string","description":"Creation date","example":"2023-01-01T00:00:00.000Z"},"updatedAt":{"format":"date-time","type":"string","description":"Last update date","example":"2023-01-01T00:00:00.000Z"}},"required":["id","name","seats","cart","createdAt","updatedAt"]},"UpdateTableDto":{"type":"object","properties":{"name":{"type":"string","description":"Table name","example":"1"},"seats":{"type":"number","description":"Number of seats","example":4},"color":{"type":"string","description":"Table color (hex code)","example":"#3b82f6"},"cart":{"description":"Cart with items","allOf":[{"$ref":"#/components/schemas/CartDto"}]}}},"CustomerPublicResponseDto":{"type":"object","properties":{"code":{"type":"string","description":"Short public code","example":"a1b2c3d4"},"name":{"type":"string","description":"Customer name","example":"Mario Rossi"},"type":{"type":"string","description":"Customer type","example":"individual","enum":["individual","company"]}},"required":["code","name","type"]},"CreateCustomerDto":{"type":"object","properties":{"name":{"type":"string","description":"Customer name","example":"Mario Rossi"},"email":{"type":"string","description":"Customer email","example":"mario.rossi@example.com"},"phone":{"type":"string","description":"Customer phone number","example":"+39 123 456 7890"},"taxId":{"type":"string","description":"Customer tax ID (VAT number)","example":"IT12345678901"},"street":{"type":"string","description":"Street name","example":"Via Roma"},"number":{"type":"string","description":"Street number","example":"123"},"postal":{"type":"string","description":"ZIP/Postal code","example":"00100"},"city":{"type":"string","description":"City","example":"Roma"},"state":{"type":"string","description":"Province/State code","example":"RM"},"country":{"type":"string","description":"Country code (ISO 3166-1 alpha-2)","example":"IT","default":"IT"},"credit":{"type":"number","description":"Loyalty credit balance","example":10.5,"default":0},"type":{"type":"string","description":"Customer type","example":"individual","enum":["individual","company"],"default":"individual"},"codiceSdi":{"type":"string","description":"SDI code for electronic invoicing","example":"XXXXXXXX"}},"required":["name"]},"CustomerResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Customer ID","example":"123e4567-e89b-12d3-a456-426614174000"},"code":{"type":"string","description":"Short public code for barcode/QR","example":"a1b2c3d4"},"name":{"type":"string","description":"Customer name","example":"Mario Rossi"},"email":{"type":"string","description":"Customer email","example":"mario.rossi@example.com"},"phone":{"type":"string","description":"Customer phone number","example":"+39 123 456 7890"},"taxId":{"type":"string","description":"Customer tax ID (VAT number)","example":"IT12345678901"},"street":{"type":"string","description":"Street name","example":"Via Roma"},"number":{"type":"string","description":"Street number","example":"123"},"postal":{"type":"string","description":"ZIP/Postal code","example":"00100"},"city":{"type":"string","description":"City","example":"Roma"},"state":{"type":"string","description":"Province/State code","example":"RM"},"country":{"type":"string","description":"Country code (ISO 3166-1 alpha-2)","example":"IT"},"credit":{"type":"number","description":"Loyalty credit balance","example":10.5},"type":{"type":"string","description":"Customer type","example":"individual","enum":["individual","company"]},"codiceSdi":{"type":"string","description":"SDI code for electronic invoicing","example":"XXXXXXXX"},"createdAt":{"format":"date-time","type":"string","description":"Creation date","example":"2023-01-01T00:00:00.000Z"},"updatedAt":{"format":"date-time","type":"string","description":"Last update date","example":"2023-01-01T00:00:00.000Z"}},"required":["id","code","name","credit","type","createdAt","updatedAt"]},"UpdateCustomerDto":{"type":"object","properties":{"name":{"type":"string","description":"Customer name","example":"Mario Rossi"},"email":{"type":"string","description":"Customer email","example":"mario.rossi@example.com"},"phone":{"type":"string","description":"Customer phone number","example":"+39 123 456 7890"},"taxId":{"type":"string","description":"Customer tax ID (VAT number)","example":"IT12345678901"},"street":{"type":"string","description":"Street name","example":"Via Roma"},"number":{"type":"string","description":"Street number","example":"123"},"postal":{"type":"string","description":"ZIP/Postal code","example":"00100"},"city":{"type":"string","description":"City","example":"Roma"},"state":{"type":"string","description":"Province/State code","example":"RM"},"country":{"type":"string","description":"Country code (ISO 3166-1 alpha-2)","example":"IT"},"credit":{"type":"number","description":"Loyalty credit balance","example":10.5},"type":{"type":"string","description":"Customer type","example":"individual","enum":["individual","company"]},"codiceSdi":{"type":"string","description":"SDI code for electronic invoicing","example":"XXXXXXXX"}}},"AddCreditDto":{"type":"object","properties":{}},"PublicUserResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"User ID"},"displayName":{"type":"string","description":"Display name or first/last name"},"firstName":{"type":"string","description":"First name"},"lastName":{"type":"string","description":"Last name"},"pictureId":{"type":"string","description":"Profile picture asset ID"},"bio":{"type":"string","description":"Short bio"},"website":{"type":"string","description":"Website URL"},"instagram":{"type":"string","description":"Instagram handle"},"facebook":{"type":"string","description":"Facebook handle"},"tiktok":{"type":"string","description":"TikTok handle"}},"required":["id"]},"UserResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"User unique identifier","example":"123e4567-e89b-12d3-a456-426614174000"},"email":{"type":"string","description":"User email address","example":"mario.rossi@example.com"},"firstName":{"type":"string","description":"User first name","example":"Mario"},"lastName":{"type":"string","description":"User last name","example":"Rossi"},"pictureId":{"type":"string","description":"User profile picture asset ID","example":"123e4567-e89b-12d3-a456-426614174000.jpg"},"phone":{"type":"string","description":"User phone number","example":"+393331234567"},"createdAt":{"format":"date-time","type":"string","description":"User creation timestamp","example":"2024-01-15T10:30:00Z"},"updatedAt":{"format":"date-time","type":"string","description":"User last update timestamp","example":"2024-01-15T10:30:00Z"},"scopes":{"description":"User scopes","example":["users:admin"],"type":"array","items":{"type":"string"}},"clientId":{"type":"string","description":"Client ID associated with the user","example":"app_ci_8972b72ff9226c423cf497469a8a9cc9"},"terms":{"type":"string","description":"Accepted terms of service version","example":"1.0.0"},"privacy":{"type":"string","description":"Accepted privacy policy version","example":"1.0.0"},"pec":{"type":"string","description":"PEC (Posta Elettronica Certificata) email address","example":"user@pec.example.it"},"idHash":{"type":"string","description":"Hashed user ID for external use","example":"a1b2c3d4e5f6..."},"displayName":{"type":"string","description":"Public display name"},"bio":{"type":"string","description":"Short public bio"},"website":{"type":"string","description":"Website URL"},"instagram":{"type":"string","description":"Instagram handle"},"facebook":{"type":"string","description":"Facebook handle"},"tiktok":{"type":"string","description":"TikTok handle"}},"required":["id","email","createdAt","updatedAt","idHash"]},"UpdateUserDto":{"type":"object","properties":{"firstName":{"type":"string","description":"User first name","example":"Mario"},"lastName":{"type":"string","description":"User last name","example":"Rossi"},"pictureId":{"type":"string","description":"User profile pictureId asset ID (UUID with file extension)","example":"123e4567-e89b-12d3-a456-426614174000.jpg"},"phone":{"type":"string","description":"User phone number","example":"+393331234567"},"scopes":{"description":"User scopes (admin only)","example":["users:admin"],"type":"array","items":{"type":"string"}},"terms":{"type":"string","description":"Accepted terms of service version (semver)","example":"1.0.0"},"privacy":{"type":"string","description":"Accepted privacy policy version (semver)","example":"1.0.0"},"pec":{"type":"string","description":"PEC (Posta Elettronica Certificata) email address","example":"user@pec.example.it"},"pecCode":{"type":"string","description":"PEC verification OTP code (6 digits)","example":"123456"},"displayName":{"type":"string","description":"Public display name","example":"Pizzeria Da Mario"},"bio":{"type":"string","description":"Short public bio","example":"La migliore pizza di Milano"},"website":{"type":"string","description":"Website URL","example":"https://pizzeriamario.it"},"instagram":{"type":"string","description":"Instagram handle or URL","example":"@pizzeriamario"},"facebook":{"type":"string","description":"Facebook page URL or handle"},"tiktok":{"type":"string","description":"TikTok handle or URL"}}},"MerchantDto":{"type":"object","properties":{"type":{"type":"string","description":"Merchant type (company or individual)","enum":["company","individual"],"example":"company"},"name":{"type":"string","description":"Company name","example":"MENS REVERSA S.R.L."},"firstName":{"type":"string","description":"First name (for individuals)","example":"John"},"lastName":{"type":"string","description":"Last name (for individuals)","example":"Doe"},"email":{"type":"string","description":"Email address","example":"info@example.it"},"vatId":{"type":"string","description":"VAT number or Tax ID","example":"17346831005"},"taxId":{"type":"string","description":"Tax ID (distinct from VAT number if applicable)","example":"RSSMRA85M01H501U"},"street":{"type":"string","description":"Street name","example":"VIA CLELIA BERTINI ATTILJ"},"number":{"type":"string","description":"Street number","example":"34D"},"postal":{"type":"string","description":"Postal code","example":"00137"},"city":{"type":"string","description":"City","example":"ROMA"},"state":{"type":"string","description":"Province code","example":"RM"},"country":{"type":"string","description":"Country code (ISO 3166-1 alpha-2)","example":"IT"},"pec":{"type":"string","description":"PEC (Posta Elettronica Certificata) email","example":"user@pec.example.it"}},"required":["vatId"]},"UpdateMerchantDto":{"type":"object","properties":{"type":{"type":"string","description":"Merchant type (company or individual)","enum":["company","individual"],"example":"company"},"name":{"type":"string","description":"Company name","example":"MENS REVERSA S.R.L."},"firstName":{"type":"string","description":"First name (for individuals)","example":"John"},"lastName":{"type":"string","description":"Last name (for individuals)","example":"Doe"},"email":{"type":"string","description":"Email address","example":"info@example.it"},"vatId":{"type":"string","description":"VAT number or Tax ID","example":"17346831005"},"taxId":{"type":"string","description":"Tax ID (distinct from VAT number if applicable)","example":"RSSMRA85M01H501U"},"street":{"type":"string","description":"Street name","example":"VIA CLELIA BERTINI ATTILJ"},"number":{"type":"string","description":"Street number","example":"34D"},"postal":{"type":"string","description":"Postal code","example":"00137"},"city":{"type":"string","description":"City","example":"ROMA"},"state":{"type":"string","description":"Province code","example":"RM"},"country":{"type":"string","description":"Country code (ISO 3166-1 alpha-2)","example":"IT"},"pec":{"type":"string","description":"PEC (Posta Elettronica Certificata) email","example":"user@pec.example.it"}}}}}}