diff --git a/docs/description_ultimate_debtor.md b/docs/description_ultimate_debtor.md
new file mode 100644
index 0000000..562a263
--- /dev/null
+++ b/docs/description_ultimate_debtor.md
@@ -0,0 +1,18 @@
+Determina chi compare come ordinante sul conto o sulla ricevuta.
+
+
+
+Nel caso di pagamento PagoPA, questo valore viene utilizzato per generare la ricevuta.
+
+
+
+
+
⚠️ Attenzione
+
Se diverso da debtor, il pagamento viene dirottato su un conto tecnico e riemesso dopo la ricezione dei fondi.
+
\ No newline at end of file
diff --git a/docs/general.md b/docs/general.md
index 7f614cb..03129b0 100644
--- a/docs/general.md
+++ b/docs/general.md
@@ -1,3 +1,7 @@
+
+
+
+
[](/postman_collection)
If you can't find what you're looking for, it doesn't mean we can't do it. Write to us and tell us about your idea.
@@ -6,7 +10,7 @@ If you can't find what you're looking for, it doesn't mean we can't do it. Write
If you have any questions or need help with the APIs, you can open a ticket on our support portal. Click on the button below to open a ticket.
-
+
Do you need help? Open a ticket!
@@ -24,9 +28,7 @@ If you have any questions or need help with the APIs, you can open a ticket on o
# FlowPay's commitment to the payments ecosystem
-FlowPay is both a payment institution and a start-up.
-
-As a Payment Service Provider (PSP), we are regulated by the Bank of Italy and we are authorised to provide payment services to our customers. As a start-up, we are always looking for new ideas and new ways to improve our services and help you grow your business.
+As a Payment Service Provider (PSP), FlowPay is regulated by the Bank of Italy and we are authorised to provide payment services to our customers.
We believe that the best API a payment institution can provide is one that is tailored to the payment use case, **allowing customers to focus on their business and not the payment process**.
@@ -34,10 +36,7 @@ On the end user side, FlowPay ensures that **users own their data, can access it
# Introduction
-FlowPay's services compose a multi-tenant platform, where each tenant is a user of FlowPay and can be a legal entity or an individual.
-Users can delegate third-party applications, called _clients_, to act on their behalf using the OAuth2 protocol.
-
-The APIs provided are REST and accessible via HTTPS, some endpoints are protected by the OAuth2, so you need to register your application and obtain a valid access token to use them.
+The APIs provided are REST and accessible via HTTPS, some endpoints are restricted, so you need to register your application and obtain a valid access token to use them.
## Account Information Service (AIS)
@@ -59,7 +58,6 @@ APIs allow users to initiate any traditional payment type:
- Simple account-to-account payment: user can initiate a SEPA Credit Transfer (SCT) payment from one of its bank accounts.
- Future date payment: the payer can schedule a payment for a future date.
-- Recurring payment: the payer can schedule a recurring payment with a fixed frequency.
In addition, FlowPay extends traditional payment methods by providing value-added services such as
@@ -67,12 +65,10 @@ In addition, FlowPay extends traditional payment methods by providing value-adde
- **Payment chain**: user can authorise a payment to be executed when a previous payment has been successfully received.
- **Locked payment**: the user can authorise a payment to be executed if a previous payment has been successfully received. The check is performed by the client application that initiated the payment request.
-Each of these services uses the FlowPay technical account, but the payment retains the original payer and payee information.
+Each of these services uses a FlowPay technical account, but the payment retains the original payer and payee information.
# Onboarding
-Tenants can share their FlowPay resources with third-party applications by simply granting permission based on the OAuth2 protocol.
-
A partner who intends to develop an integration to access tenants' data must first register its application and obtain the `client_id` and `client_secret` pair.
The developer portal can be reached at https://developer.flowpay.it, to access it's necessary to have a company account registered with FlowPay services.
@@ -105,18 +101,15 @@ Within the developer portal access the "Applications" section and press the "+"
## Be enabled as a third-party application
-Once the application has been created, it is already enabled for the sandbox environment but is not yet able to act as a third-party application for the production environment. It is however possible to use client credentials to access the APIs for your own tenant in production.
+Once the application has been created, it is already enabled for the sandbox environment but is not yet able to act as a third-party application for the production environment.
# Sandbox environment
-The sandbox is a shared environment where it is possible to test most of the basic flows and functionalities of the APIs, without using real data and accounts.
-We enable you to test the authentication as a third party by providing you with two fake businesses, each with a fake bank account and fake account data, so you can test AIS and PIS flows.
+#TODO: add sandbox description
## Limitations of the public sandbox environment
-The sandbox uses sandbox open banking APIs and doesn't have access to the FlowPay technical account, so some features are not available or are limited.
-
-Open banking sandbox APIs don't allow us to monitor the status of the payment, so the webhook for the payment status change is not triggered, and the payment status is not updated.
+Open banking sandbox APIs don't allow us to monitor the status of the payment, so the callback for the payment status change is not triggered, and the payment status is not updated.
In addition, AIS data is not provided by the bank in the sandbox environment, so if you try to complete the AIS flow, you will be able to connect the bank account, but won't receive any balance and transactions data from it. We do however provide fake AIS data on the fake bank accounts that come with the sandbox users.
It is not possible to use the bulk payment service, as it requires the FlowPay technical account to be used.
@@ -129,38 +122,6 @@ Onboarding users isn't allowed in the sandbox environment also.
If you need to test the full functionality of the APIs, you can request a dedicated sandbox environment, and test all the features of the APIs, including the onboarding flow.
-# Oauth2 authentication flows
-
-FlowPay uses the OAuth2 protocol to authenticate third-party applications and users.
-Oauth2 is the industry standard for authentication and authorization, and is used by most of the major companies in the world.
-
-The scopes
-
-FlowPay supports the following authentication flows:
-
-## Authorization code flow
-
-## Client credentials flow
-
-The Client Credentials grant type is used by clients to obtain an access token outside of the context of a user.
-
-This is typically used by clients to access resources about themselves rather than to access a user's resources.
-
-The client makes a request to the token endpoint by sending the following parameters using the "application/x-www-form-urlencoded" format per Appendix B with a character encoding of UTF-8 in the HTTP request entity-body:
-
-- grant_type
- - REQUIRED. Value MUST be set to "client_credentials".
-- scope
- - OPTIONAL. The scope of the access request as described by Section 3.3.
-- client_id
- - REQUIRED. The client identifier as described by Section 2.2.
-- client_secret
- - REQUIRED. The client secret as described by Section 2.3.1.
-
-## How token works and tenant filtering
-
-(negli header )
-
# Pagination
# Rate limits
@@ -168,10 +129,3 @@ The client makes a request to the token endpoint by sending the following parame
Requests are limited to 100 requests per minute per source IP, if you exceed this limit you will receive a 429 error.
There is also a burst limit of 10 requests per second.
-
-Tenant
-
-A tenant can be a company or a single person, is identified by a unique identifier (tenant ID ) and owns its data,
- for transparency and security reasons each tenant can manage its data via the dedicated Account portal
-
diff --git a/docs/invoice_lifecycle.md b/docs/invoice_lifecycle.md
deleted file mode 100644
index c8f3f85..0000000
--- a/docs/invoice_lifecycle.md
+++ /dev/null
@@ -1,25 +0,0 @@
-# Invoice lifecycle
-
-This endpoint allows you to create, update, and retrieve invoices. It also allows you to manage each step of the invoice lifecycle, from draft to get paid.
-
-## Invoice
-
-An invoice is a commercial document that itemizes a transaction between a buyer and a seller. It serves as a request for payment from the seller to the buyer, indicating the products or services provided, their quantities, prices, and any applicable taxes or discounts. Invoices typically include payment terms, such as due dates and accepted payment methods.
-Only legal entities can issue invoices.
-
-In order to work seamlessly with real customers' invoice management, we provide also API to manage proforma and credit notes.
-
-## Proforma invoice
-
-A proforma invoice is a preliminary invoice that is issued before the completion of a transaction. It provides an estimate of the costs and terms of a potential sale, allowing the buyer to review and approve them before proceeding. Proforma invoices are often used in international trade to facilitate customs procedures, as they provide a detailed breakdown of the expected costs, including shipping charges, taxes, and duties. They are also used to provide a quote for potential buyers or to seek approval for a budgeted purchase.
-In common practice, payments are often collected against proforma invoices and then the final invoice is issued, FlowPay supports this scenario.
-Creating a checkout for a proforma invoice is allowed, but it's necessary to provide the final invoice details when it's issued and link it to the original proforma invoice.
-Linking a proforma invoice to a paid invoice is also supported, this can be useful to keep track of the entire invoicing process.
-
-When linked, the invoice replaces previously created proforma checkout and the payment status of each document is updated accordingly.
-
-## Credit note
-
-A credit note, also known as a credit memo or credit memo invoice, is a document issued by a seller to a buyer to indicate a reduction in the amount owed. It is essentially a negative invoice that reflects a credit or refund due to various reasons, such as product returns, billing errors, or pricing adjustments. Credit notes help maintain accurate accounting records and allow for the reconciliation of accounts between buyers and sellers.
-You can also create a checkout for a credit note to refund the customer, but it's necessary to provide the original invoice and link it to the original invoice.
-Linking a credit note to an invoice will automatically update the invoice status and amount due.
diff --git a/openapi.json b/openapi.json
index 2edce01..a4c86b2 100644
--- a/openapi.json
+++ b/openapi.json
@@ -1,4160 +1,87 @@
{
"openapi": "3.1.0",
"info": {
- "title": "FlowPay API",
- "version": "2.0.0-alpha.4",
+ "title": "Payment Gateway API",
+ "version": "2.0.0+S",
"description": {
- "$ref": "docs/general.md"
+ "$ref": "./docs/general.md"
},
- "termsOfService": "https://developer.flowpay.it/tos",
"license": {
- "name": "FlowPay SRL",
- "url": "https://developer.flowpay.it/tos"
- },
- "x-logo": {
- "url": "https://images.flowpay.it/logo",
- "altText": "FlowPay"
- },
- "contact": {
- "name": "API Support",
- "url": "https://developer.flowpay.it",
- "email": "api-support@flowpay.it"
- },
- "x-json-schema-faker": {
- "locale": "it-IT",
- "omitNulls": true,
- "fillProperties": true,
- "reuseProperties": true
+ "name": "MIT",
+ "url": "https://opensource.org/licenses/MIT"
}
},
"servers": [
{
- "url": "https://api.flowpay.it/v2",
- "description": "Production server (Not implementend)"
+ "url": "https://api.flowpay.it/v3",
+ "description": "Server di produzione"
+ }
+ ],
+ "security": [
+ {
+ "basicAuth": []
+ }
+ ],
+ "tags": [
+ {
+ "name": "Request To Pay",
+ "description": "Operazioni relative alla creazione e gestione di richieste di pagamento."
},
{
- "url": "https://mock.flowpay.it/v2",
- "description": "Mock server"
+ "name": "Payment Method",
+ "description": "Operazioni relative alla gestione dei metodi di pagamento tokenizzati."
},
{
- "url": "https://sandbox.{customerID}.flowpay.it/v2",
- "description": "Customer-assigned sandbox server",
- "variables": {
- "customerID": {
- "default": "00000000-00000000-00000000-00000000",
- "description": "Unique customer identifier assigned after contract signature"
- }
- }
+ "name": "Payments",
+ "description": "Operazioni di pagamento generiche come rimborsi e transazioni."
+ },
+ {
+ "name": "Wallet",
+ "description": "Operazioni relative al wallet del cliente e gestione dei fondi."
},
{
- "url": "http://localhost:5002",
- "description": "Debug"
+ "name": "Customers",
+ "description": "Operazioni relative ai clienti registrati."
}
],
- "components": {
- "securitySchemes": {
- "oAuth2": {
- "type": "oauth2",
- "description": "OAuth2 flow",
- "flows": {
- "authorizationCode": {
- "authorizationUrl": "/openid/authenticate",
- "tokenUrl": "/oauth/token",
- "refreshUrl": "/oauth/token",
- "scopes": {
- "accounts:read": "Allow to read accounts",
- "accounts:write": "Allow to mediate accounts creation and open banking consent renewal",
- "invoices:read": "Allow to read invoices",
- "invoices:write": "Allow to create invoices and manage lifecycle",
- "bills:read": "Allow to read bills",
- "bills:write": "Allow to create bills and manage lifecycle",
- "constructions:read": "Allow to read information about construction sites",
- "constructions:write": "Allow to create construction sites and manage the lifecycle",
- "openid": "Allow to read user profile",
- "pagopa:read": "Allow to retrieve users' PagoPA payment notices",
- "pagopa:write": "Allow to create PagoPA payment notices",
- "transfers:read": "Allow to read transfers",
- "transfers:write": "Allow to create transfers and manage lifecycle",
- "wallet:`document_type`": "Allow to manage wallet for the specified use case"
- }
- },
- "clientCredentials": {
- "tokenUrl": "/oauth/token",
- "scopes": {
- "ade": "Allow to interact with Agenzia delle Entrate services",
- "accounts:read": "Allow to read accounts",
- "accounts:write": "Allow to mediate accounts creation and open banking consent renewal",
- "invoices:read": "Allow to read invoices",
- "invoices:write": "Allow to create invoices and manage lifecycle",
- "bills:read": "Allow to read bills",
- "bills:write": "Allow to create bills and manage lifecycle",
- "constructions:read": "Allow to read information about construction sites",
- "constructions:write": "Allow to create construction sites and manage the lifecycle",
- "openid": "Allow to read user profile",
- "pagopa:read": "Allow to retrieve users' PagoPA payment notices",
- "pagopa:write": "Allow to create PagoPA payment notices",
- "transfers:read": "Allow to read transfers",
- "transfers:write": "Allow to create transfers and manage lifecycle",
- "wallet:`document_type`": "Allow to manage wallet for the specified use case"
- }
- }
- }
- }
- },
- "schemas": {
- "Address": {
- "type": "object",
- "properties": {
- "city": {
- "type": "string",
- "description": "Name of the city where the property is located."
- },
- "street": {
- "type": "string",
- "description": "This field contains the name of the street where the property is located. It must include the name with a type (e.g., Avenue, Street, Road, etc.) but not the number or any other information."
- },
- "number": {
- "type": "string",
- "description": "This field refers to the numeric or alphanumeric value assigned to a property on a street."
- },
- "unitNumber": {
- "type": "string",
- "description": "his field is used when a single property has multiple units, such as apartments or office suites. It differentiates one unit from another within the same property."
- },
- "postalCode": {
- "type": "string",
- "description": "Also known as ZIP code (or CAP in Italy)"
- },
- "province": {
- "type": "string",
- "description": "It refers to the name of the state or province where the property is located."
- },
- "country": {
- "type": "string",
- "description": "The name of the country where the property is located."
- }
- },
- "required": [
- "city",
- "street",
- "postalCode",
- "province",
- "country"
- ]
- },
- "Bank": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the bank",
- "example": "Intesa Sanpaolo",
- "x-faker": "Company.companyName"
- },
- "nationalID": {
- "type": "string",
- "description": "National identifier of the bank",
- "example": "03999",
- "x-faker": "finance.bic"
- },
- "id": {
- "type": "string",
- "description": "Unique identifier of the bank",
- "example": "intesa_sanpaolo"
- },
- "countries": {
- "type": "array",
- "items": {
- "type": "string",
- "description": "Countries where the bank operates in ISO 3166-1 alpha-2 format",
- "example": "IT",
- "x-faker": "address.countryCode"
- }
- },
- "logo": {
- "type": "string",
- "description": "URL of the bank logo",
- "example": "https://flowpayproduction.blob.core.windows.net/img/84036981-d004-40c4-a872-c81dd37e4acc.png",
- "x-faker": "image.imageUrl"
- },
- "features": {
- "type": "object",
- "description": "Features supported by the bank",
- "properties": {
- "futurePayments": {
- "type": "boolean",
- "description": "True if the bank supports future payments",
- "example": true
- },
- "sct": {
- "type": "array",
- "description": "List of SCT payment types supported by the bank",
- "items": {
- "type": "string",
- "enum": [
- "standard",
- "instant"
- ],
- "description": "SCT payment type"
- }
- },
- "recurringPayments": {
- "type": "array",
- "description": "List of recurring payment types supported by the bank",
- "items": {
- "type": "string",
- "enum": [
- "monthly",
- "everyTwoMonths",
- "quarterly",
- "semiAnnual",
- "daily",
- "everyFourMonths",
- "weekly",
- "everyTwoWeeks",
- "annual"
- ],
- "description": "Recurring payment frequency"
- }
- }
- }
- }
- }
- },
- "BankAccount": {
- "type": "object",
- "properties": {
- "owner": {
- "type": "string",
- "format": "uuid",
- "description": "Identifier of the owner of the bank account"
- },
- "iban": {
- "type": "string",
- "description": "International Bank Account Number",
- "x-faker": "finance.iban",
- "example": "IT60X0542811101000000123456"
- },
- "currencies": {
- "type": "array",
- "items": {
- "type": "string",
- "description": "Currencies supported by the bank account",
- "x-faker": "finance.currencyCode"
- },
- "example": [
- "EUR",
- "CHF",
- "GBP"
- ]
- },
- "bankName": {
- "type": "string",
- "description": "Identifier of the bank",
- "example": "intesa_sanpaolo"
- },
- "owners": {
- "type": "array",
- "description": "List of owners of the bank account",
- "items": {
- "type": "string",
- "description": "Name of the owner of the bank account",
- "x-faker": "person.fullName"
- },
- "example": [
- "Maria Fumagalli",
- "Luigi Verdi"
- ]
- },
- "consentStatus": {
- "$ref": "#/components/schemas/ConsentStatusEnum"
- }
- }
- },
- "Bulk": {
- "type": "object",
- "properties": {
- "fingerprint": {
- "$ref": "#/components/schemas/Fingerprint"
- },
- "amount": {
- "type": "number",
- "format": "double",
- "example": 48223.07,
- "description": "Total amount of the bulk"
- },
- "allowWireTranfersAggregation": {
- "type": "boolean",
- "example": true,
- "description": "Indicate if the wire transfers to the same beneficiary can be aggregated"
- },
- "documents": {
- "type": "object",
- "description": "Dictionary of documents related to the bulk. Keys are the document type, values are the fingerprints of the documents.",
- "additionalProperties": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Fingerprint"
- }
- }
- }
- }
- },
- "Chain": {
- "description": "Chain of documents",
- "type": "object",
- "properties": {
- "fingerprint": {
- "$ref": "#/components/schemas/Fingerprint"
- },
- "targetType": {
- "$ref": "#/components/schemas/DocumentKindEnum"
- },
- "targetFingerprint": {
- "$ref": "#/components/schemas/Fingerprint"
- },
- "triggerType": {
- "$ref": "#/components/schemas/DocumentKindEnum"
- },
- "triggerFingerprint": {
- "$ref": "#/components/schemas/Fingerprint"
- }
- }
- },
- "Checkout": {
- "type": "object",
- "properties": {
- "code": {
- "type": "string",
- "pattern": "^[a-zA-Z\\d]{8}$",
- "description": "Unique identifier of the checkout session. This code is secret and should never be shared with anyone who is not the payer."
- },
- "fingerprint": {
- "$ref": "#/components/schemas/Fingerprint"
- },
- "type": {
- "$ref": "#/components/schemas/DocumentKindEnum"
- },
- "creditor": {
- "type": "string",
- "format": "uuid",
- "description": "Identifier of the creditor",
- "x-faker": "datatype.uuid"
- },
- "debtor": {
- "type": "string",
- "format": "uuid",
- "description": "Identifier of the debtor",
- "x-faker": "datatype.uuid"
- },
- "collectionMethods": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/CollectionMethodEnum"
- },
- "description": "Collection methods enabled for the payment. Note that collection methods are the intersection of the collection methods techologies enabled for the creditor and the collection methods allowed by the client for checkout."
- },
- "payments": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Payment"
- },
- "description": "List of payments related to the checkout"
- }
- },
- "required": [
- "code",
- "fingerprint",
- "type",
- "creditor",
- "debtor",
- "collectionMethods"
- ]
- },
- "ConsentStatusEnum": {
- "type": "string",
- "enum": [
- "not_granted",
- "granted",
- "revoked",
- "expired",
- "all"
- ],
- "default": "all",
- "description": "Status of the account information service (AIS) consent granted by account owner to FlowPay. - `not_granted`: owner has never granted a consent - `granted`: consent granted by account owner - `revoked`: consent revoked by account owner - `expired`: consent expired - `all`: all types of consent"
- },
- "CollectionMethodEnum": {
- "type": "string",
- "enum": [
- "sct",
- "sct-inst",
- "sdd",
- "card",
- "custom/"
+ "paths": {
+ "/payment-requests": {
+ "get": {
+ "summary": "Elenca tutte le richieste di pagamento create",
+ "description": "Restituisce un elenco paginato di tutte le richieste di pagamento create.",
+ "operationId": "listPaymentRequests",
+ "tags": [
+ "Request To Pay",
+ "Payments"
],
- "description": "Collection method enabled for the payment. - `sct`: SEPA Credit Transfer (SCT) - `sct-inst`: SEPA Credit Transfer Instant (SCT-INST) - `sdd`: SEPA Direct Debit (SDD) - `card`: Credit Card - `custom/label`: Custom collection method, enabled by the client who created the checkout. Please see the `custom` section for more details: https://docs.flowpay.it/docs/custom-collection-method"
- },
- "CompanyVATNumber": {
- "type": "string",
- "description": "VAT number of the company, full european format",
- "pattern": "/^((AT)(U\\d{8})|(BE)(0\\d{9})|(BG)(\\d{9,10})|(CY)(\\d{8}[LX])|(CZ)(\\d{8,10})|(DE)(\\d{9})|(DK)(\\d{8})|(EE)(\\d{9})|(EL|GR)(\\d{9})|(ES)([\\dA-Z]\\d{7}[\\dA-Z])|(FI)(\\d{8})|(FR)([\\dA-Z]{2}\\d{9})|(HU)(\\d{8})|(IE)(\\d{7}[A-Z]{2})|(IT)(\\d{11})|(LT)(\\d{9}|\\d{12})|(LU)(\\d{8})|(LV)(\\d{11})|(MT)(\\d{8})|(NL)(\\d{9}(B\\d{2}|BO2))|(PL)(\\d{10})|(PT)(\\d{9})|(RO)(\\d{2,10})|(SE)(\\d{12})|(SI)(\\d{8})|(SK)(\\d{10}))$",
- "example": "IT12345678901",
- "x-faker": "finance.vat"
- },
- "ConstructionProgress": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uuid",
- "description": "Unique identifier of the construction progress",
- "x-faker": "datatype.uuid"
- },
- "site": {
- "type": "string",
- "format": "uuid",
- "description": "Identifier of the construction site",
- "x-faker": "datatype.uuid"
- },
- "createdAt": {
- "type": "string",
- "format": "date-time",
- "description": "Date and time of the construction progress creation",
- "example": "2020-01-01T00:00:00Z",
- "x-faker": "date.past"
- },
- "amount": {
- "type": "number",
- "format": "float",
- "example": 45050.23,
- "description": "Total amount of the construction progress",
- "x-faker": "finance.amount"
- },
- "invoices": {
- "type": "object",
- "description": "Array of invoices related to each supplier for the worker. Keys are the creditor identifiers.",
- "additionalProperties": {
- "$ref": "#/components/schemas/Fingerprint"
- }
- }
- }
- },
- "ConstructionSite": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uuid",
- "description": "Unique identifier of the construction site",
- "x-faker": "datatype.uuid"
- },
- "name": {
- "type": "string",
- "description": "Name of the construction site",
- "example": "Calenzano Payments Museum",
- "x-faker": "lorem.word"
- },
- "address": {
- "$ref": "#/components/schemas/Address"
- },
- "initialCreditFingerprint": {
- "$ref": "#/components/schemas/Fingerprint",
- "description": "Fingerprint of the initial credit document, used to transfer money to the wallet"
- },
- "availableBalance": {}
- }
- },
- "ConsumerNationalID": {
- "type": "string",
- "description": "National ID of the consumer, currently only italian format is supported",
- "pattern": "/^([A-Z]{6}\\d{2}[A-Z]\\d{2}[A-Z]\\d{3}[A-Z])$",
- "example": "RSSMRA80A01H501T"
- },
- "Contact": {
- "type": "object",
- "properties": {
- "fullName": {
- "description": "Full name of the contact, contains the concatenation of the name and surname of a consumer, or the name of a company.",
- "oneOf": [
- {
- "type": "string",
- "description": "Full name of the consumer",
- "example": "Mario Rossi",
- "x-faker": "person.fullName"
- },
- {
- "type": "string",
- "description": "Company name",
- "example": "Illustrious Company S.p.A.",
- "x-faker": "company.companyName"
- }
- ]
- },
- "fullVat": {
- "type": "string",
- "description": "VAT number of the company in full european format or national ID of the consumer ",
- "oneOf": [
- {
- "$ref": "#/components/schemas/ConsumerNationalID"
- },
- {
- "$ref": "#/components/schemas/CompanyVATNumber"
- }
- ]
- },
- "type": {
- "type": "string",
- "enum": [
- "consumer",
- "company"
- ],
- "description": "Type of the contact"
+ "security": [
+ {
+ "basicAuth": []
}
- }
- },
- "DocumentKindEnum": {
- "type": "string",
- "enum": [
- "bill",
- "bulk",
- "chain",
- "construction",
- "invoice",
- "pagopa",
- "transfer"
],
- "description": {
- "$ref": "types/DocumentKind.md"
- }
- },
- "Fee": {
- "type": "object",
- "properties": {
- "fingerprint": {
- "$ref": "#/components/schemas/Fingerprint",
- "description": "Fingerprint of the fee"
- },
- "amount": {
- "type": "number",
- "format": "double",
- "minimum": 0,
- "example": 0.5,
- "description": "Amount of the fee"
- },
- "targetFingerprint": {
- "$ref": "#/components/schemas/Fingerprint",
- "description": "Fingerprint of the document the fee is related to"
- },
- "targetType": {
- "$ref": "#/components/schemas/DocumentKindEnum",
- "description": "Type of the document the fee is related to"
- },
- "ruleID": {
- "type": "string",
- "format": "uuid",
- "description": "Identifier of the rule that generated the fee"
- },
- "linkedFingerprint": {
- "$ref": "#/components/schemas/Fingerprint",
- "description": "Fingerprint of the document the fee is linked to. Can be related to a `bulk` if the payer is the debtor of the target or to a `chain` if the payer is the creditor of the target."
- }
- }
- },
- "FeeRule": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uuid",
- "description": "Unique identifier of the fee rule",
- "x-faker": "datatype.uuid"
- },
- "clientID": {
- "type": "string",
- "format": "uuid",
- "description": "Unique identifier of the client that created the rule",
- "x-faker": "datatype.uuid"
- },
- "useCase": {
- "$ref": "#/components/schemas/DocumentKindEnum",
- "description": "Use case of the rule"
- },
- "method": {
- "$ref": "#/components/schemas/FeeRuleMethods"
- },
- "lowerBound": {
- "type": "number",
- "format": "double",
- "description": "Lower bound of the rule. If the amount is lower than this value, the rule does not apply."
- },
- "kind": {
- "type": "string",
- "enum": [
- "fixed",
- "percentage"
- ],
- "description": "Calculation method of the fee. - `fixed`: the fee is a fixed amount - `percentage`: the fee is a percentage of the target's amount"
- },
- "numeric": {
- "type": "number",
- "format": "double",
- "description": "Value of the fee. If the kind is `percentage`, the value is a percentage of the target's amount and can assume values between 0 and 1."
- },
- "remittance": {
- "type": "string",
- "description": "Remittance information of the fee charged to the payer"
- },
- "payer": {
- "$ref": "#/components/schemas/FeeRulePayer",
- "description": "Payer of the fee. - `debtor`: the debtor of the target document pays the fee using a bulk - `creditor`: the creditor of the target document pays the fee using a chain"
- }
- },
- "required": [
- "id",
- "clientID",
- "useCase",
- "method",
- "kind",
- "numeric",
- "payer",
- "lowerBound"
- ]
- },
- "FeeRuleMap": {
- "type": "object",
- "description": "A dictionary mapping document fingerprints to fee amounts.",
- "propertyNames": {
- "$ref": "#/components/schemas/Fingerprint"
- },
- "additionalProperties": {
- "type": "number",
- "format": "double"
- },
- "example": {
- "d41d8cd98f00b204e9800998ecf8427e": 0.05,
- "e56d7ef1234567890abcde1234567890": 0.10
- }
- },
- "FeeRuleAmountMap": {
- "type": "object",
- "description": "A dictionary mapping payment methods to payment amounts including fees for a specific document",
- "propertyNames": {
- "$ref": "#/components/schemas/FeeRuleMethods"
- },
- "additionalProperties": {
- "type": "number",
- "format": "double"
- },
- "example": {
- "pis": 0.05,
- "card": 0.10
- }
- },
- "FeeRuleMethods": {
- "type": "string",
- "enum": [
- "pis",
- "card",
- "sdd"
- ],
- "description": "Payment methods applicable for fee rules.\n\n- **pis**: Used for bank transfers, including standard bank transfers and instant transfers (bonifico istantaneo).\n- **card**: Used for card payments, including mobile wallet transactions.\n- **sdd**: Used for direct debit payments."
- },
- "FeeRulePayer": {
- "type": "string",
- "enum": [
- "debtor",
- "creditor"
- ],
- "description": "Payer types applicable for fee rules.\n\n- **debtor**: The fees are paid by the debtor via a bulk payment.\n- **creditor**: The fees are paid by the creditor via a split payment."
- },
- "Fingerprint": {
- "type": "string",
- "description": "Fingerprint of the document",
- "example": "d41d8cd98f00b204e9800998ecf8427e"
- },
- "Invoice": {
- "type": "object",
- "properties": {
- "number": {
- "type": "string",
- "description": "Invoice number",
- "x-faker": "finance.account"
- },
- "date": {
- "type": "string",
- "format": "iso8601",
- "example": "2019-01-01T00:00:00Z",
- "description": "Invoice date of issue",
- "x-faker": "date.past"
- },
- "amount": {
- "type": "number",
- "description": "Invoice amount",
- "x-faker": "finance.amount"
- },
- "currency": {
- "type": "string",
- "description": "Invoice currency",
- "default": "EUR",
- "x-faker": "finance.currencyCode"
- },
- "stage": {
- "type": "string",
- "enum": [
- "proforma",
- "invoice",
- "creditNote"
- ],
- "default": "invoice",
- "description": "Invoice stage"
- },
- "type": {
- "type": "string",
- "enum": [
- "b2b",
- "b2c"
- ],
- "description": "Invoice relations with the debtor. - `b2b`: invoice issued to a business - `b2c`: invoice issued to a private person. Note:. Invoice relations with Public Administrations are not directly supported by FlowPay. However, you can use the `b2b` type to represent the invoice issued to a Public Administration."
- },
- "creditor": {
- "type": "string",
- "format": "uuid",
- "description": "Identifier of the creditor",
- "x-faker": "datatype.uuid"
- },
- "debtor": {
- "type": "string",
- "format": "uuid",
- "description": "Identifier of the debtor",
- "x-faker": "datatype.uuid"
- },
- "attachments": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/DocumentAttachment"
- },
- "description": "Attachments of the invoice"
- },
- "items": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/DocumentItem"
- },
- "description": "Items of the invoice"
- },
- "terms": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/DocumentTerm"
- },
- "description": "Terms of the invoice"
- },
- "invoice": {
- "$ref": "#/components/schemas/Fingerprint",
- "description": "Fingerprint of the invoice related to the proforma invoice or credit note, if any"
- },
- "proforma": {
- "$ref": "#/components/schemas/Fingerprint",
- "description": "Fingerprint of the proforma invoice related to the invoice, if any"
- },
- "creditNotes": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Fingerprint"
- },
- "description": "Fingerprints of the credit notes related to the invoice, if any"
- }
- },
- "description": "Document representing an invoice at any stage.",
- "required": [
- "number",
- "date",
- "amount",
- "currency",
- "stage",
- "type",
- "creditor",
- "debtor",
- "terms"
- ]
- },
- "KYCBankAccountDossier": {
- "type": "object",
- "properties": {
- "iban": {
- "type": "string",
- "description": "IBAN of the bank account",
- "x-faker": "finance.iban"
- },
- "label": {
- "type": "string",
- "description": "Label of the bank account",
- "example": "My bank account"
- },
- "verified": {
- "type": "boolean",
- "description": "True if the ownership of the bank account has been verified"
- },
- "consentExpiresAt": {
- "type": "string",
- "format": "date-time",
- "description": "Date and time of the bank account PSD2 consent expiration",
- "example": "2020-01-01T00:00:00Z",
- "x-faker": "date.future"
- }
- }
- },
- "KYCCompanyDossier": {
- "type": "object",
- "description": "Company information",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the company",
- "example": "Illustrious Company S.p.A.",
- "x-faker": "company.companyName"
- },
- "vat": {
- "$ref": "#/components/schemas/CompanyVATNumber",
- "description": "VAT number of the company"
- },
- "address": {
- "$ref": "#/components/schemas/Address",
- "description": "Address of the company"
- },
- "email": {
- "type": "string",
- "format": "email",
- "description": "Email of the company",
- "x-faker": "internet.email"
- },
- "phone": {
- "type": "string",
- "description": "Phone number of the company",
- "example": "+393331234567",
- "x-faker": "phone.phoneNumber"
- },
- "sanctioned": {
- "type": "boolean",
- "description": "True if the company is present in the list of sanctioned subjects"
- },
- "verified": {
- "type": "boolean",
- "description": "True if the company information has been verified"
- },
- "accounts": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/KYCBankAccountDossier"
- },
- "description": "List of bank accounts of the company"
- }
- }
- },
- "KYCConsumerDossier": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the consumer",
- "example": "Mario",
- "x-faker": "person.firstName"
- },
- "surname": {
- "type": "string",
- "description": "Surname of the consumer",
- "example": "Rossi",
- "x-faker": "person.lastName"
- },
- "tin": {
- "$ref": "#/components/schemas/ConsumerNationalID",
- "description": "National ID of the consumer"
- },
- "birthDate": {
- "type": "string",
- "format": "date",
- "description": "Date of birth of the consumer",
- "example": "1980-01-01",
- "x-faker": "date.past"
- },
- "birthPlace": {
- "type": "string",
- "description": "Place of birth of the consumer",
- "example": "Milano",
- "x-faker": "address.city"
- },
- "birthCountry": {
- "type": "string",
- "description": "Country of birth of the consumer",
- "example": "IT",
- "x-faker": "address.countryCode"
- },
- "address": {
- "$ref": "#/components/schemas/Address",
- "description": "Address of the consumer"
- },
- "email": {
- "type": "string",
- "format": "email",
- "description": "Email of the consumer",
- "x-faker": "internet.email"
- },
- "phone": {
- "type": "string",
- "description": "Phone number of the consumer",
- "example": "+393331234567",
- "x-faker": "phone.phoneNumber"
- },
- "sanctioned": {
- "type": "boolean",
- "description": "True if the consumer is present in the list of sanctioned subjects"
- },
- "verified": {
- "type": "boolean",
- "description": "True if the consumer information has been verified"
- },
- "accounts": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/KYCBankAccountDossier"
- },
- "description": "List of bank accounts of the consumer"
- }
- }
- },
- "KYCDossier": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uuid",
- "description": "Unique identifier of the KYC session",
- "x-faker": "datatype.uuid"
- },
- "createdAt": {
- "type": "string",
- "format": "date-time",
- "description": "Date and time of the KYC session creation",
- "example": "2020-01-01T00:00:00Z",
- "x-faker": "date.past"
- },
- "updatedAt": {
- "type": "string",
- "format": "date-time",
- "description": "Date and time of the last KYC session update",
- "example": "2020-01-01T00:00:00Z",
- "x-faker": "date.past"
- },
- "lastAccessAt": {
- "type": "string",
- "format": "date-time",
- "description": "Date and time of the last KYC session access",
- "example": "2020-01-01T00:00:00Z",
- "x-faker": "date.past"
- },
- "kind": {
- "$ref": "#/components/schemas/KYCFlow"
- },
- "canLogin": {
- "type": "boolean",
- "description": "True if the user can login to the KYC session. If true, the user can retrieve data verified in previous sessions and can skip some steps of the KYC flow.",
- "default": false
- },
- "consumer": {
- "$ref": "#/components/schemas/KYCConsumerDossier",
- "description": "Consumer information"
- },
- "company": {
- "$ref": "#/components/schemas/KYCCompanyDossier",
- "description": "Company information"
- }
- }
- },
- "KYCFlow": {
- "type": "string",
- "description": "KYC flow",
- "enum": [
- "consumer",
- "company",
- "business"
- ]
- },
- "DocumentAttachment": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the attachment",
- "example": "ITAAABBB99T99X999W_00003.xml.p7m",
- "x-faker": "system.fileName"
- },
- "description": {
- "type": "string",
- "description": "Description of the attachment",
- "example": "Electronic invoice signed with P7M format",
- "x-faker": "lorem.sentence"
- },
- "id": {
- "type": "string",
- "format": "uuid",
- "description": "Identifier of the attachment",
- "example": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
- "x-faker": "datatype.uuid"
- }
- },
- "description": "Attachment of the document.",
- "required": [
- "name",
- "id"
- ]
- },
- "DocumentItem": {
- "type": "object",
- "properties": {
- "description": {
- "type": "string",
- "description": "Description of the item",
- "example": "Super energy drink",
- "x-faker": "lorem.sentence"
- },
- "quantity": {
- "type": "number",
- "format": "double",
- "example": 8,
- "description": "Quantity of the item",
- "x-faker": "random.number"
- },
- "measureUnit": {
- "type": "string",
- "description": "Measure unit of the item",
- "example": "L",
- "maxLength": 10,
- "x-faker": "commerce.productAdjective"
- },
- "unitPrice": {
- "type": "number",
- "format": "double",
- "example": 1.5,
- "description": "Unit price of the item",
- "x-faker": "finance.amount"
- },
- "tax": {
- "type": "number",
- "format": "double",
- "example": 0.23,
- "description": "Tax rate of the item",
- "x-faker": "finance.amount"
- },
- "discount": {
- "type": "number",
- "format": "double",
- "example": 0.0,
- "description": "Discount rate of the item",
- "x-faker": "finance.amount"
- }
- },
- "description": "Billing item. This is used only for UX and utility purposes and will not be used for the payment process.",
- "required": [
- "description",
- "quantity",
- "unitPrice"
- ]
- },
- "DocumentTerm": {
- "type": "object",
- "description": "A payment term of the document, it will be used to generate the payment schedule.",
- "properties": {
- "dueDate": {
- "type": "string",
- "format": "iso8601",
- "example": "2020-01-01T00:00:00Z",
- "description": "Due date of the payment",
- "x-faker": "date.future"
- },
- "amount": {
- "type": "number",
- "format": "double",
- "example": 100.01,
- "description": "Amount to be paid",
- "x-faker": "finance.amount"
- },
- "currency": {
- "type": "string",
- "description": "Currency of the payment. Note: All payments must be in the same currency. ",
- "example": "EUR",
- "default": "EUR",
- "x-faker": "finance.currencyCode"
- },
- "description": {
- "type": "string",
- "description": "Description of the payment. This will be shown to the customer when paying the invoice through the FlowPay checkout page.",
- "example": "Subscription to the premium plan",
- "x-faker": "lorem.sentence"
- },
- "remittance": {
- "type": "string",
- "description": "Remittance information. This will be shown to the customer during the payment process and will be included in the bank statement. Notes: - This field is optional and will be automatically generated if not provided with the format: Invoice # - - Remittance will also contain a FlowPay identifier",
- "maxLength": 100,
- "example": "Invoice #1234 - subscription to the premium plan",
- "x-faker": "lorem.sentence"
- }
- },
- "required": [
- "dueDate",
- "amount",
- "currency"
- ]
- },
- "PaginatedResult": {
- "type": "object",
- "properties": {
- "page": {
- "type": "integer",
- "description": "Current page number"
- },
- "pageSize": {
- "type": "integer",
- "description": "Number of items per page"
- },
- "total": {
- "type": "integer",
- "description": "Total number of items"
- },
- "items": {
- "type": "array",
- "description": "List of items",
- "items": {}
- }
- }
- },
- "pagoPA": {
- "type": "object",
- "description": "PagoPA payment information",
- "properties": {
- "fingerprint": {
- "description": "Fingerprint generated for the document",
- "$ref": "#/components/schemas/Fingerprint"
- },
- "ec": {
- "$ref": "#/components/schemas/CompanyVATNumber",
- "description": "Public administration VAT number"
- },
- "debtor": {
- "$ref": "#/components/schemas/Contact",
- "description": "Debtor information"
- },
- "remittance": {
- "type": "string",
- "description": "Remittance information",
- "example": "Rata scuola A.S. 2019/2020"
- },
- "amount": {
- "type": "number",
- "format": "double",
- "example": 100.01,
- "description": "Amount to be paid",
- "x-faker": "finance.amount"
- },
- "status": {
- "$ref": "#/components/schemas/pagoPAStatus"
- }
- },
- "required": [
- "fingerprint",
- "ec",
- "debtor",
- "remittance",
- "amount",
- "status"
- ]
- },
- "pagoPAStatus": {
- "type": "string",
- "enum": [
- "ready",
- "activated",
- "locked",
- "paid",
- "paidOnAnotherProvider"
- ],
- "description": {
- "$ref": "docs/pagopa_status.md"
- }
- },
- "Payment": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uuid",
- "description": "Unique identifier of the payment assigned by FlowPay.",
- "x-faker": "random.uuid"
- },
- "sessionID": {
- "type": "string",
- "format": "uuid",
- "description": "Unique identifier of the checkout session",
- "x-faker": "random.uuid"
- },
- "amount": {
- "type": "number",
- "description": "Amount of the payment",
- "example": 100.00
- },
- "currency": {
- "type": "string",
- "description": "Currency of the payment",
- "example": "EUR"
- },
- "remittance": {
- "type": "string",
- "description": "Remittance information of the payment",
- "example": "Payment for invoice 1234"
- },
- "status": {
- "$ref": "#/components/schemas/PaymentStatusEnum"
- },
- "createdAt": {
- "type": "string",
- "format": "iso8601",
- "description": "Date and time of the payment creation",
- "example": "2020-01-01T00:00:00Z",
- "x-faker": "date.past"
- },
- "updatedAt": {
- "type": "string",
- "format": "iso8601",
- "description": "Date and time of the last payment update",
- "example": "2020-01-01T00:00:00Z",
- "x-faker": "date.past"
- },
- "debtorIBAN": {
- "type": "string",
- "description": "IBAN of the debtor",
- "example": "IT60X0542811101000000123456",
- "x-faker": "finance.iban"
- }
- }
- },
- "PaymentStatusEnum": {
- "type": "string",
- "enum": [
- "authorized",
- "arrived_to_technical_account",
- "outgoing_from_technical_account",
- "completed",
- "rejected",
- "revoked"
- ],
- "description": "Status of the payment. - `authorized`: payment authorized by the user - `arrived_to_technical_account`: payment arrived to the FlowPay technical account. t - `outgoing_from_technical_account`: payment outgoing from the technical account - `completed`: funds has been transferred to the beneficiary - `rejected`: payment rejected by the bank - `revoked`: payment revoked by the user or by the client in case of conditional payment"
- },
- "RequestID": {
- "type": "string",
- "description": "Unique identifier of the request. It is helpful to identify the request in case of errors, providing it to the support team. Please submit it in the support ticket.",
- "format": "uuid",
- "x-faker": "random.uuid"
- },
- "SiteQuote": {
- "description": "Quote for a construction site",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uuid",
- "description": "Unique identifier of the quote ",
- "x-faker": "datatype.uuid"
- },
- "site": {
- "type": "string",
- "format": "uuid",
- "description": "Identifier of the construction site",
- "x-faker": "datatype.uuid"
- },
- "createdAt": {
- "type": "string",
- "format": "date-time",
- "description": "Date and time of the quote creation",
- "example": "2020-01-01T00:00:00Z",
- "x-faker": "date.past"
- },
- "amount": {
- "type": "number",
- "format": "float",
- "example": 45050.23,
- "description": "Total amount of the quote",
- "x-faker": "finance.amount"
- },
- "description": {
- "type": "string",
- "description": "Description of the quote",
- "example": "Construction of the new museum"
- },
- "reference": {
- "type": "string",
- "description": "Reference of the quote",
- "example": "123AF-4654Z"
- },
- "fingerprint": {
- "type": "string",
- "example": "d41d8cd98f00b204e9800998ecf8427e",
- "description": "Fingerprint of the document accounting for the quote"
- },
- "files": {
- "type": "array",
- "description": "List of files related to the quote",
- "items": {
- "type": "string",
- "format": "uuid"
- }
- }
- },
- "required": [
- "id",
- "site",
- "createdAt",
- "amount",
- "fingerprint",
- "files"
- ]
- },
- "SiteWorkerContractCreation": {
- "description": "Request to create a new contract between a construction site and a worker",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uuid",
- "description": "Unique identifier of the contract ",
- "x-faker": "datatype.uuid"
- },
- "site": {
- "type": "string",
- "format": "uuid",
- "description": "Identifier of the construction site",
- "x-faker": "datatype.uuid"
- },
- "createdAt": {
- "type": "string",
- "format": "date-time",
- "description": "Date and time of the contract creation",
- "example": "2020-01-01T00:00:00Z",
- "x-faker": "date.past"
- }
- }
- },
- "SiteWorkerContract": {
- "description": "Contract between a company and a worker for a construction site",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uuid",
- "description": "Unique identifier of the contract ",
- "x-faker": "datatype.uuid"
- },
- "site": {
- "type": "string",
- "format": "uuid",
- "description": "Identifier of the construction site",
- "x-faker": "datatype.uuid"
- },
- "createdAt": {
- "type": "string",
- "format": "date-time",
- "description": "Date and time of the contract creation",
- "example": "2020-01-01T00:00:00Z",
- "x-faker": "date.past"
- },
- "company": {
- "$ref": "#/components/schemas/Contact"
- }
- }
- },
- "StatusCode": {
- "type": "integer",
- "description": "HTTP status code",
- "example": 404
- },
- "Transaction": {
- "type": "object",
- "description": "Transaction",
- "properties": {
- "id": {
- "type": "string",
- "format": "uuid",
- "description": "Unique identifier of the transaction assigned by FlowPay. This is not end to end transaction identifier, which is not provided by banks via Open Banking APIs.",
- "x-faker": "random.uuid"
- },
- "amount": {
- "type": "number",
- "description": "Amount of the transaction",
- "example": 100.00,
- "x-faker": "finance.amount"
- },
- "bookingDate": {
- "type": "string",
- "format": "iso8601",
- "description": "Booking date of the transaction",
- "example": "2020-01-01T00:00:00Z",
- "x-faker": "date.past"
- },
- "valueDate": {
- "type": "string",
- "format": "iso8601",
- "description": "Value date of the transaction",
- "example": "2020-01-01T00:00:00Z",
- "x-faker": "date.past"
- },
- "currency": {
- "type": "string",
- "description": "Currency of the transaction",
- "example": "EUR",
- "x-faker": "finance.currencyCode"
- },
- "remittance": {
- "type": "string",
- "description": "Remittance information",
- "example": "Payment for invoice 1234",
- "x-faker": "lorem.sentence"
- },
- "debtorName": {
- "type": "string",
- "description": "Name of the debtor",
- "example": "John Doe",
- "x-faker": "name.findName"
- },
- "debtorIBAN": {
- "type": "string",
- "description": "International Bank Account Number of the debtor",
- "example": "IT60X0542811101000000123456",
- "x-faker": "finance.iban"
- },
- "creditorName": {
- "type": "string",
- "description": "Name of the creditor",
- "example": "Jane Doe",
- "x-faker": "name.findName"
- },
- "creditorIBAN": {
- "type": "string",
- "description": "International Bank Account Number of the creditor",
- "example": "IT60X0542811101000000123456",
- "x-faker": "finance.iban"
- }
- },
- "required": [
- "id",
- "amount",
- "currency",
- "remittance"
- ]
- },
- "Transfer": {
- "type": "object",
- "description": "Kind of document that allow clients to manage payment requests with low constraints. Clients can use transfers to fast prototyping payment initiation use cases or to avoid specific document's lifecycle managment. Note: In order to use transfers in production, a more in-depth due diligence is required.",
- "properties": {
- "id": {
- "type": "string",
- "format": "uuid",
- "description": "Unique identifier of the transfer",
- "x-faker": "random.uuid"
- },
- "fingerprint": {
- "$ref": "#/components/schemas/Fingerprint"
- },
- "amount": {
- "type": "number",
- "description": "Amount of the transfer",
- "example": 100.34,
- "x-faker": "finance.amount"
- },
- "remittance": {
- "type": "string",
- "description": "Remittance information of the transfer",
- "example": "Payment for invoice 123",
- "x-faker": "lorem.sentence"
- },
- "creditor": {
- "description": "Creditor of this transfer",
- "$ref": "#/components/schemas/Contact"
- },
- "debtor": {
- "description": "Debtor of this transfer",
- "$ref": "#/components/schemas/Contact"
- },
- "createdAt": {
- "type": "string",
- "format": "iso8601",
- "description": "Date and time of the transfer creation",
- "example": "2020-01-01T00:00:00Z",
- "x-faker": "date.past"
- }
- }
- }
- },
- "responses": {
- "BadRequest": {
- "description": "Client has provided invalid data",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "statusCode": {
- "$ref": "#/components/schemas/StatusCode"
- },
- "requestID": {
- "$ref": "#/components/schemas/RequestID"
- },
- "message": {
- "type": "string",
- "description": "Error message",
- "example": "Proforma invoice can not have a due date later than the invoice date"
- },
- "additionalInfo": {
- "type": "object",
- "description": "Additional information about the error",
- "properties": {
- "path": {
- "type": "string",
- "description": "JSON path of the field that caused the error",
- "example": ".dueDate"
- },
- "key": {
- "type": "string",
- "description": "JSON key of the field that caused the error",
- "example": "dueDate"
- },
- "type": {
- "type": "string",
- "description": "Expected type of the field that caused the error",
- "example": "string"
- }
- },
- "required": [
- "path"
- ]
- }
- },
- "required": [
- "statusCode",
- "requestID",
- "message",
- "additionalInfo"
- ]
- }
- }
- }
- },
- "Unauthorized": {
- "description": "Client has not provided valid credentials to access the requested resource",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "statusCode": {
- "$ref": "#/components/schemas/StatusCode"
- },
- "requestID": {
- "$ref": "#/components/schemas/RequestID"
- },
- "message": {
- "type": "string",
- "description": "Error message",
- "example": "You must provide a valid access token"
- }
- },
- "required": [
- "statusCode",
- "requestID",
- "message"
- ]
- }
- }
- }
- },
- "Forbidden": {
- "description": "Client is not authorized to access the requested resource",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "statusCode": {
- "$ref": "#/components/schemas/StatusCode"
- },
- "requestID": {
- "$ref": "#/components/schemas/RequestID"
- },
- "message": {
- "type": "string",
- "description": "Error message",
- "example": "You can't create a new invoice for this tenant"
- }
- },
- "required": [
- "statusCode",
- "requestID",
- "message"
- ]
- }
- }
- }
- },
- "NotFound": {
- "description": "The requested resource was not found",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "statusCode": {
- "$ref": "#/components/schemas/StatusCode"
- },
- "requestID": {
- "$ref": "#/components/schemas/RequestID"
- },
- "message": {
- "type": "string",
- "description": "Error message",
- "example": "Invoice not found"
- }
- },
- "required": [
- "statusCode",
- "requestID",
- "message"
- ]
- }
- }
- }
- },
- "Conflict": {
- "description": "The requested resource is in conflict with the current state of the server",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "statusCode": {
- "$ref": "#/components/schemas/StatusCode"
- },
- "requestID": {
- "$ref": "#/components/schemas/RequestID"
- },
- "message": {
- "type": "string",
- "description": "Error message",
- "example": "Invoice already paid"
- }
- },
- "required": [
- "statusCode",
- "requestID",
- "message"
- ]
- }
- }
- }
- },
- "InternalServerError": {
- "description": "Server encountered an unexpected condition that prevented it from fulfilling the request",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "statusCode": {
- "$ref": "#/components/schemas/StatusCode"
- },
- "requestID": {
- "$ref": "#/components/schemas/RequestID"
- }
- },
- "required": [
- "statusCode",
- "requestID"
- ]
- }
- }
- }
- }
- }
- },
- "webhooks": {
- "AIS consent status": {
- "post": {
- "summary": "AIS consent status",
- "description": "Notify the status of the account information service (AIS) ",
- "operationId": "AISConsentStatus",
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "account": {
- "$ref": "#/components/schemas/BankAccount"
- },
- "status": {
- "type": "string",
- "enum": [
- "ACTIVATED",
- "REVOKED",
- "EXPIRED"
- ],
- "description": "Status of the account information service (AIS) consent granted by account owner to FlowPay. - `ACTIVATED`: consent granted by account owner - `REVOKED`: consent revoked by account owner - `EXPIRED`: consent expired"
- },
- "rejectionReason": {
- "type": "string",
- "description": "Reason of the rejection of the consent. It is present only if the status is `REVOKED`. Note: The majority of the banks do not provide this information . Consent may be revoked from the bank for any reason or by the user from the bank website.",
- "example": "Operation not allowed on ASPSP system"
- }
- },
- "required": [
- "consentId",
- "status",
- "account"
- ]
- }
- }
- }
- },
- "security": [],
- "responses": {
- "200": {
- "description": "OK"
- },
- "default": {
- "$ref": "#/components/responses/InternalServerError"
- }
- },
- "tags": [
- "Accounts",
- "Webhooks"
- ]
- }
- }
- },
- "tags": [
- {
- "name": "Accounts",
- "description": "Manage accounts"
- },
- {
- "name": "Authentication",
- "description": "Manage authentication"
- },
- {
- "name": "Banks",
- "description": "Banks informations"
- },
- {
- "name": "Bulk",
- "description": {
- "$ref": "docs/bulk_lifecycle.md"
- }
- },
- {
- "name": "Chain",
- "description": {
- "$ref": "docs/chain_lifecycle.md"
- }
- },
- {
- "name": "Checkout",
- "description": "This endpoint allows managing checkout sessions any document client has access to"
- },
- {
- "name": "Construction",
- "description": "Manage construction sites and related entities lifecycle"
- },
- {
- "name": "Fee",
- "description": {
- "$ref": "docs/fee_description.md"
- }
- },
- {
- "name": "Invoices",
- "description": {
- "$ref": "docs/invoice_lifecycle.md"
- }
- },
- {
- "name": "KYC",
- "description": {
- "$ref": "docs/kyc_description.md"
- }
- },
- {
- "name": "pagoPA",
- "description": {
- "$ref": "docs/pagopa_lifecycle.md"
- }
- },
- {
- "name": "Payments",
- "description": "Access to payments initiated by FlowPay"
- },
- {
- "name": "Transactions",
- "description": "Endpoint for retrieving transactions collected with AIS consent"
- },
- {
- "name": "Transfers",
- "description": "Lifecycle-free documents"
- },
- {
- "name": "Webhooks",
- "description": "Manage webhooks"
- },
- {
- "name": "Documents",
- "description": "CRUD operations on documents"
- }
- ],
- "paths": {
- "/oauth/token": {
- "post": {
- "summary": "Get an access token or refresh an existing one",
- "description": "Get an access token or refresh an existing one",
- "operationId": "GetAccessToken",
- "requestBody": {
- "content": {
- "application/x-www-form-urlencoded": {
- "schema": {
- "type": "object",
- "properties": {
- "grant_type": {
- "type": "string",
- "enum": [
- "authorization_code",
- "client_credentials",
- "refresh_token"
- ]
- },
- "client_id": {
- "type": "string",
- "format": "uuid"
- },
- "client_secret": {
- "type": "string"
- },
- "code": {
- "type": "string"
- },
- "redirect_uri": {
- "type": "string",
- "format": "uri"
- },
- "refresh_token": {
- "type": "string"
- },
- "scope": {
- "type": "string"
- }
- },
- "required": [
- "grant_type",
- "client_id",
- "client_secret",
- "scope"
- ]
- }
- }
- }
- },
- "responses": {
- "200": {
- "description": "Token obtained",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "access_token": {
- "type": "string",
- "description": "Access token to be used to access protected resources"
- },
- "expires_in": {
- "type": "integer",
- "example": 3600,
- "x-faker": {
- "datatype.number": {
- "min": 3000,
- "max": 3600
- }
- },
- "description": "Number of seconds before the access token expires"
- },
- "refresh_token": {
- "type": "string",
- "description": "Refresh token to be used to obtain a new access token"
- },
- "scope": {
- "type": "string",
- "description": "List of scopes granted to the client, separated by a space"
- }
- },
- "required": [
- "access_token",
- "expires_in",
- "scope"
- ]
- }
- }
- }
- },
- "400": {
- "$ref": "#/components/responses/BadRequest"
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
- }
- },
- "tags": [
- "Authentication"
- ],
- "security": []
- }
- },
- "/oauth/token/info": {
- "post": {
- "summary": "Get information about the token",
- "description": "Get information about the token",
- "operationId": "GetTokenInfo",
- "security": [],
- "tags": [
- "Authentication"
- ],
- "requestBody": {
- "content": {
- "application/x-www-form-urlencoded": {
- "schema": {
- "type": "object",
- "properties": {
- "token": {
- "type": "string",
- "description": "Token to be checked"
- }
- },
- "required": [
- "token"
- ]
- }
- }
- }
- },
- "responses": {
- "200": {
- "description": "Token information",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "active": {
- "type": "boolean",
- "example": true,
- "description": "Whether the token is active or not"
- },
- "scopes": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "client_id": {
- "type": "string",
- "format": "uuid",
- "example": "d290f1ee-6c54-4b01-90e6-d701748f0851",
- "description": "Client identifier of the application that obtained the token"
- },
- "clientID": {
- "type": "string",
- "format": "uuid",
- "example": "d290f1ee-6c54-4b01-90e6-d701748f0851",
- "description": "Client identifier of the application that obtained the token"
- },
- "expiresAt": {
- "type": "string",
- "format": "date-time",
- "example": "2020-01-01T00:00:00Z",
- "description": "Date and time when the token expires",
- "x-faker": "date.recent"
- },
- "exp": {
- "type": "number",
- "example": 1577836800,
- "description": "The unix timestamp indicating when this token will expire.",
- "x-faker": "date.unix"
- },
- "consumer": {
- "type": "string",
- "format": "uuid",
- "example": "d290f1ee-6c54-4b01-90e6-d701748f0851",
- "description": "Consumer identifier that granted the token"
- },
- "companies": {
- "type": "array",
- "items": {
- "type": "string",
- "format": "uuid",
- "example": "d290f1ee-6c54-4b01-90e6-d701748f0851",
- "description": "Company identifier"
- },
- "description": "List of companies for which consumer has access to"
- }
- }
- }
- }
- }
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- }
- }
- }
- },
- "/accounts": {
- "get": {
- "summary": "Get the list of accounts",
- "description": "Get the list of accounts associated to the token",
- "operationId": "getAccounts",
- "security": [
- {
- "oAuth2": [
- "accounts:read"
- ]
- }
- ],
- "parameters": [
- {
- "name": "page",
- "in": "query",
- "description": "Page number to retrieve",
- "required": false,
- "schema": {
- "type": "integer",
- "minimum": 1
- },
- "example": 1,
- "x-faker": "datatype.number"
- },
- {
- "name": "tenantID",
- "in": "query",
- "description": "Tenant identifier to filter accounts. This has effect only for token obtained with client_credentials grant type which could be associated to multiple tenants. If not specified, response will contain all accounts associated to all tenants the token is authorized to access",
- "required": false,
- "schema": {
- "type": "string",
- "format": "uuid"
- },
- "x-faker": "datatype.uuid"
- },
- {
- "name": "bank",
- "in": "query",
- "description": "Bank identifier to filter accounts.",
- "required": false,
- "schema": {
- "type": "string"
- },
- "example": "intesa_sanpaolo"
- },
- {
- "name": "consent",
- "in": "query",
- "required": false,
- "schema": {
- "$ref": "#/components/schemas/ConsentStatusEnum"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "List of accounts. TODO: La paginazione non serve qui, è per prototipo",
- "content": {
- "application/json": {
- "schema": {
- "allOf": [
- {
- "$ref": "#/components/schemas/PaginatedResult"
- },
- {
- "type": "object",
- "properties": {
- "items": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/BankAccount"
- }
- }
- }
- }
- ]
- }
- }
- }
- },
- "400": {
- "$ref": "#/components/responses/BadRequest"
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "default": {
- "$ref": "#/components/responses/InternalServerError"
- }
- },
- "tags": [
- "Accounts"
- ]
- },
- "post": {
- "summary": "Create account consent session",
- "description": "Create a new session to allow an user to grant consent to FlowPay to access his accounts for AIS service. Clients can use this endpoint to create a new session to allow an user to grant consent to FlowPay to access his accounts for AIS service.",
- "operationId": "createAisConsentSession",
- "security": [
- {
- "oAuth2": [
- "accounts:write"
- ]
- }
- ],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "tenantID": {
- "type": "string",
- "format": "uuid",
- "description": "Tenant identifier of user who will grant consent to FlowPay to access his accounts for AIS service"
- },
- "bank": {
- "type": "string",
- "description": "Bank identifier. If not specified, the user will be able to choose the bank from a list of supported banks",
- "example": "intesa_sanpaolo"
- }
- },
- "required": [
- "tenantID"
- ]
- }
- }
- }
- },
- "responses": {
- "201": {
- "description": "Account created",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "link": {
- "type": "string",
- "format": "uri",
- "description": "URL to be used to redirect the user to the bank website to grant consent to FlowPay to access his accounts for AIS service"
- }
- },
- "required": [
- "sessionID"
- ]
- }
- }
- }
- },
- "400": {
- "$ref": "#/components/responses/BadRequest"
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
- }
- },
- "callbacks": {
- "ok": {
- "/": {
- "get": {
- "summary": "Consent correctly granted",
- "description": "Redirect URL to be used by FlowPay to notify the client that user has granted consent to FlowPay to access his accounts for AIS service. After the user has granted consent to FlowPay to access his accounts for AIS service, the bank will redirect to FlowPay server to notify the result of the operation, FlowPay will then redirect to the client to notify the result of the operation. Use this redirect URL to manage user experience, for example, you can synchronously refresh token at backend and redirect the user to a specific page in your client application. Note: You can be notified of the result of the operation also by using the webhook mechanism.",
- "operationId": "aisOkConsentSessionCallback",
- "parameters": [
- {
- "name": "owner",
- "in": "query",
- "description": "Identifier of the user who has granted consent.",
- "required": true,
- "schema": {
- "type": "string",
- "format": "uuid"
- },
- "x-faker": "datatype.uuid"
- }
- ],
- "security": []
- }
- }
- },
- "ko": {
- "/": {
- "get": {
- "summary": "Some error occured",
- "description": "Redirect URL to be used by FlowPay to notify the client that user has not granted consent to FlowPay to access his accounts for AIS service. After user redirection to FlowPay server, FlowPay will then redirect to the client to notify the result of the operation. Use this redirect URL to manage user experience.",
- "operationId": "aisKoConsentSessionCallback",
- "parameters": [
- {
- "name": "owner",
- "in": "query",
- "description": "Identifier of the user who has not granted consent.",
- "required": true,
- "schema": {
- "type": "string",
- "format": "uuid"
- },
- "x-faker": "datatype.uuid"
- },
- {
- "name": "reason",
- "in": "query",
- "description": "Reason why user has not granted consent. Note: This parameter is optional and it is not supported by all banks. User may voluntarily not grant consent or he may have not been able to grant consent due to some bank error.",
- "required": false,
- "schema": {
- "type": "string"
- }
- }
- ],
- "security": []
- }
- }
- }
- },
- "tags": [
- "Accounts"
- ]
- }
- },
- "/accounts/{accountID}": {
- "get": {
- "summary": "Get account details",
- "description": "Retrieve details of a specific account",
- "operationId": "getAccount",
- "security": [
- {
- "oAuth2": [
- "accounts:read"
- ]
- }
- ],
- "parameters": [
- {
- "name": "accountID",
- "in": "path",
- "description": "Account identifier",
- "required": true,
- "schema": {
- "type": "string",
- "format": "uuid"
- },
- "x-faker": "datatype.uuid"
- }
- ],
- "responses": {
- "200": {
- "description": "Account details",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/BankAccount"
- }
- }
- }
- },
- "400": {
- "$ref": "#/components/responses/BadRequest"
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
- },
- "404": {
- "$ref": "#/components/responses/NotFound"
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
- }
- },
- "tags": [
- "Accounts"
- ]
- }
- },
- "/banks": {
- "get": {
- "summary": "Get banks",
- "description": "Retrieve the list of banks supported by FlowPay",
- "operationId": "getBanks",
- "security": [],
- "tags": [
- "Banks"
- ],
- "parameters": [
- {
- "name": "country",
- "in": "query",
- "description": "Country code (ISO 3166-1 alpha-2) to filter banks by country",
- "required": false,
- "schema": {
- "type": "string"
- },
- "x-faker": "address.countryCode",
- "example": "IT"
- },
- {
- "name": "recurring",
- "in": "query",
- "description": "Filter banks by support at least one recurring payment type",
- "required": false,
- "schema": {
- "type": "boolean"
- }
- },
- {
- "name": "recurringFrequency",
- "in": "query",
- "description": "Filter banks by support specified recurring payment frequency",
- "required": false,
- "schema": {
- "type": "array",
- "items": {
- "type": "string",
- "enum": [
- "monthly",
- "everyTwoMonths",
- "quarterly",
- "semiAnnual",
- "daily",
- "everyFourMonths",
- "weekly",
- "everyTwoWeeks",
- "annual"
- ]
- }
- }
- },
- {
- "name": "sctType",
- "in": "query",
- "description": "Filter banks by support specified SCT type",
- "required": false,
- "schema": {
- "type": "array",
- "items": {
- "type": "string",
- "enum": [
- "standard",
- "instant"
- ]
- }
- }
- }
- ],
- "responses": {
- "200": {
- "description": "List of banks",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Bank"
- }
- }
- }
- }
- },
- "400": {
- "$ref": "#/components/responses/BadRequest"
- }
- }
- }
- },
- "/banks/{id}": {
- "get": {
- "summary": "Get bank details",
- "description": "Retrieve details of a specific bank",
- "operationId": "getBank",
- "security": [],
- "tags": [
- "Banks"
- ],
- "parameters": [
- {
- "name": "id",
- "in": "path",
- "description": "Bank identifier",
- "required": true,
- "schema": {
- "type": "string"
- },
- "example": "cassa_di_risparmio_di_orvieto"
- }
- ],
- "responses": {
- "200": {
- "description": "Bank details",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Bank"
- }
- }
- }
- },
- "400": {
- "$ref": "#/components/responses/BadRequest"
- },
- "404": {
- "$ref": "#/components/responses/NotFound"
- }
- }
- }
- },
- "/bulk": {
- "post": {
- "summary": "Create bulk document",
- "description": "Create a new bulk document. This endpoint allows to specificy a dictionary of fingerprints to be linked to the bulk payment, each property name is the document type. Returns the bulk document created with a new fingerprint.",
- "operationId": "createBulkPayment",
- "security": [
- {
- "oAuth2": []
- }
- ],
- "tags": [
- "Bulk"
- ],
- "requestBody": {
- "description": "Preferences and fingerprints that will be part of the bulk payment.",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "minProperties": 1,
- "propertyNames": {
- "$ref": "#/components/schemas/DocumentKindEnum"
- },
- "properties": {
- "allowWireTranfersAggregation": {
- "type": "boolean",
- "description": "If true, wire transfers to the same beneficiary will be aggregated, this determines a saving. If false, wire transfer to the same beneficiary will not be aggregated, this allows beneficiary to have a more detailed view of the payments and keeps the payment remittance information.",
- "default": true
- },
- "documents": {
- "type": "object",
- "description": "Dictionary of fingerprints to be linked to the bulk payment, each property name is the document type.",
- "additionalProperties": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Fingerprint"
- },
- "minItems": 1,
- "uniqueItems": true,
- "description": "List of fingerprints to be linked to the bulk payment. Property name is the document type."
- }
- }
- },
- "example": {
- "allowWireTranfersAggregation": true,
- "documents": {
- "invoice": [
- "d41d8cd98f00b204e9800998ecf8427e",
- "GskefcByhlsgCSUODJPWTRFaOVsPGDdq"
- ],
- "pagopa": [
- "RXi4PrrsOTiPxUVsbo12TAAD9kmTH2cM"
- ]
- }
- },
- "required": [
- "additionalProperties"
- ]
- }
- }
- }
- },
- "responses": {
- "201": {
- "description": "Bulk payment created",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Bulk"
- }
- }
- }
- },
- "400": {
- "$ref": "#/components/responses/BadRequest"
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
- }
- }
- },
- "get": {
- "summary": "List bulk documents",
- "description": "List all bulk documents according to the specified filters. Returns a paginated list of bulk documents.",
- "operationId": "listBulkPayments",
- "security": [
- {
- "oAuth2": []
- }
- ],
- "tags": [
- "Bulk"
- ],
- "parameters": [
- {
- "name": "page",
- "in": "query",
- "description": "Page number",
- "required": false,
- "schema": {
- "type": "integer",
- "format": "int32",
- "minimum": 1
- },
- "x-faker": "random.number",
- "x-fakerParams": [
- {
- "min": 1
- }
- ]
- },
- {
- "name": "pageSize",
- "in": "query",
- "description": "Page size",
- "required": false,
- "schema": {
- "type": "integer",
- "format": "int32",
- "minimum": 1,
- "maximum": 100
- },
- "x-faker": "random.number",
- "x-fakerParams": [
- {
- "min": 1,
- "max": 100
- }
- ]
- }
- ],
- "responses": {
- "200": {
- "description": "Bulk payments list",
- "content": {
- "application/json": {
- "schema": {
- "allOf": [
- {
- "$ref": "#/components/schemas/PaginatedResult"
- },
- {
- "type": "object",
- "properties": {
- "items": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Bulk"
- }
- }
- }
- }
- ]
- }
- }
- }
- },
- "400": {
- "$ref": "#/components/responses/BadRequest"
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
- }
- }
- }
- },
- "/bulk/{fingerprint}": {
- "get": {
- "summary": "Get document details",
- "description": "Get bulk document details by ID",
- "operationId": "getBulkPayment",
- "security": [
- {
- "oAuth2": []
- }
- ],
- "tags": [
- "Bulk"
- ],
- "parameters": [
- {
- "name": "fingerprint",
- "in": "path",
- "description": "Bulk payment fingerprint",
- "required": true,
- "schema": {
- "$ref": "#/components/schemas/Fingerprint"
- },
- "x-faker": "datatype.uuid"
- }
- ],
- "responses": {
- "200": {
- "description": "Bulk payment details",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Bulk"
- }
- }
- }
- },
- "400": {
- "$ref": "#/components/responses/BadRequest"
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
- },
- "404": {
- "$ref": "#/components/responses/NotFound"
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
- }
- }
- },
- "delete": {
- "summary": "Delete bulk payment",
- "description": "Delete bulk payment by ID. Deleting a bulk payment will not delete the linked documents.",
- "operationId": "deleteBulkPayment",
- "security": [
- {
- "oAuth2": []
- }
- ],
- "tags": [
- "Bulk"
- ],
- "parameters": [
- {
- "name": "fingerprint",
- "in": "path",
- "description": "Bulk payment fingerprint",
- "required": true,
- "schema": {
- "$ref": "#/components/schemas/Fingerprint"
- },
- "x-faker": "datatype.uuid"
- }
- ],
- "responses": {
- "204": {
- "description": "Bulk payment deleted"
- },
- "400": {
- "$ref": "#/components/responses/BadRequest"
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
- },
- "404": {
- "$ref": "#/components/responses/NotFound"
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
- }
- }
- }
- },
- "/chain": {
- "post": {
- "summary": "Create chain document",
- "description": "Create a new chain document. This endpoint allows to specify the fingerprint of the document that will be paid and the trigger document for that payment, along with their type.",
- "operationId": "createChainPayment",
- "security": [
- {
- "oAuth2": []
- }
- ],
- "tags": [
- "Chain"
- ],
- "requestBody": {
- "description": "Dictionary of fingerprints to be linked to the bulk payment, each property name is the document type.",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "triggerType": {
- "$ref": "#/components/schemas/DocumentKindEnum"
- },
- "triggerFingerprint": {
- "$ref": "#/components/schemas/Fingerprint"
- },
- "targetType": {
- "$ref": "#/components/schemas/DocumentKindEnum"
- },
- "targetFingerprint": {
- "$ref": "#/components/schemas/Fingerprint"
- }
- },
- "required": [
- "triggerType",
- "triggerFingerprint",
- "targetType",
- "targetFingerprint"
- ]
- }
- }
- }
- },
- "responses": {
- "201": {
- "description": "Chain payment created",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Chain"
- }
- }
- }
- },
- "400": {
- "$ref": "#/components/responses/BadRequest"
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
- }
- }
- },
- "get": {
- "summary": "List chain documents",
- "description": "List all chain documents according to the specified filters. Returns a paginated list of chain documents.",
- "operationId": "listChainPayments",
- "security": [
- {
- "oAuth2": []
- }
- ],
- "tags": [
- "Chain"
- ],
- "parameters": [
- {
- "name": "page",
- "in": "query",
- "description": "Page number",
- "required": false,
- "schema": {
- "type": "integer",
- "format": "int32",
- "minimum": 1
- },
- "x-faker": "random.number",
- "x-fakerParams": [
- {
- "min": 1
- }
- ]
- },
- {
- "name": "pageSize",
- "in": "query",
- "description": "Page size",
- "required": false,
- "schema": {
- "type": "integer",
- "format": "int32",
- "minimum": 1,
- "maximum": 100
- },
- "x-faker": "random.number",
- "x-fakerParams": [
- {
- "min": 1,
- "max": 100
- }
- ]
- }
- ],
- "responses": {
- "200": {
- "description": "Chain payments list",
- "content": {
- "application/json": {
- "schema": {
- "allOf": [
- {
- "$ref": "#/components/schemas/PaginatedResult"
- },
- {
- "type": "object",
- "properties": {
- "items": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Chain"
- }
- }
- }
- }
- ]
- }
- }
- }
- },
- "400": {
- "$ref": "#/components/responses/BadRequest"
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
- }
- }
- }
- },
- "/chain/{fingerprint}": {
- "get": {
- "summary": "Get document details",
- "description": "Get bulk document details by ID",
- "operationId": "getChainPayment",
- "security": [
- {
- "oAuth2": []
- }
- ],
- "tags": [
- "Chain"
- ],
- "parameters": [
- {
- "name": "fingerprint",
- "in": "path",
- "description": "Chain payment fingerprint",
- "required": true,
- "schema": {
- "$ref": "#/components/schemas/Fingerprint"
- },
- "x-faker": "datatype.uuid"
- }
- ],
- "responses": {
- "200": {
- "description": "Chain payment details",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Chain"
- }
- }
- }
- },
- "400": {
- "$ref": "#/components/responses/BadRequest"
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
- },
- "404": {
- "$ref": "#/components/responses/NotFound"
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
- }
- }
- }
- },
- "/checkout": {
- "post": {
- "summary": "Create checkout",
- "description": "This endpoint allows to create a new checkout specifying the document to be paid. If the payment needs to be authorized by the user, the response will contain a link to be used to redirect the user to FlowPay payment page.",
- "operationId": "createCheckout",
- "security": [
- {
- "oAuth2": []
- }
- ],
- "requestBody": {
- "description": "Checkout details",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "kind": {
- "$ref": "#/components/schemas/DocumentKindEnum"
- },
- "fingerprint": {
- "$ref": "#/components/schemas/Fingerprint"
- },
- "locked": {
- "type": "boolean",
- "default": false,
- "description": "If true funds will be directed to FlowPay technical account and will not be available to the beneficiary until the payment is confirmed or revoked via API. See locked payments paragraph for more details. "
- },
- "scaExempt": {
- "type": "boolean",
- "default": false,
- "description": "If true, the payment will be exempted from SCA. Only some use cases are eligible for SCA exemption, see SCA exemption paragraph for more details. In case of SCA exemption, if a supported payment method is specified, the payment will be instantly processed."
- },
- "okRedirectUrl": {
- "type": "string",
- "format": "uri",
- "description": "URL to be used to redirect the user to the client application after the payment has been successfully processed. If not specified, the user will be redirected to the default FlowPay payment page."
- },
- "koRedirectUrl": {
- "type": "string",
- "format": "uri",
- "description": "URL to be used to redirect the user to the client application in case of payment failure. If not specified, the user will be redirected to the default FlowPay payment page."
- },
- "preferences": {
- "type": "object",
- "description": "Useful to customize payer user experience on payment page",
- "properties": {
- "paymentMethod": {
- "type": "string",
- "format": "uuid",
- "description": "Payer payment method to be used to pay the document. If not specified, the user will be able to choose the payment method from a list of supported payment methods."
- },
- "canEditRemittance": {
- "type": "boolean",
- "default": true,
- "description": "If true, the user will be able to edit the remittance information from the payment page."
- },
- "allowedMethods": {
- "type": "array",
- "items": {
- "type": "string",
- "enum": [
- "sct",
- "sctInst",
- "card",
- "sdd",
- "wallet"
- ]
- },
- "description": "List of allowed payment methods. If not specified, all supported payment methods will be allowed."
- }
- }
- }
- },
- "required": [
- "kind",
- "fingerprint"
- ]
- }
- }
- },
- "required": true
- },
- "responses": {
- "200": {
- "description": "Payment processed. This response is returned only if the payment has been processed without requiring user authorization, i.e. in the case of a checkout created with SCA exemption (`scaExempt`) and consistent payment method (`preferences.paymentMethod`)",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {}
- }
- }
- }
- },
- "201": {
- "description": "Checkout created",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Checkout"
- }
- }
- }
- },
- "400": {
- "$ref": "#/components/responses/BadRequest"
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
- }
- },
- "tags": [
- "Checkout"
- ]
- }
- },
- "/checkout/{code}": {
- "get": {
- "summary": "Get checkout details",
- "description": "Retrieve details of a specific checkout",
- "operationId": "getCheckout",
- "security": [
- {
- "oAuth2": [
- "checkout:read"
- ]
- }
- ],
- "parameters": [
- {
- "name": "code",
- "in": "path",
- "description": "Checkout code",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Checkout details",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Checkout"
- }
- }
- }
- },
- "400": {
- "$ref": "#/components/responses/BadRequest"
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
- },
- "404": {
- "$ref": "#/components/responses/NotFound"
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
- }
- },
- "tags": [
- "Checkout"
- ]
- },
- "delete": {
- "summary": "Delete checkout",
- "description": "Allows to delete a checkout. This endpoint can be used to delete a checkout that has not been paid yet. If the checkout has been paid, it cannot be deleted and this endpoint will return an error.",
- "operationId": "deleteCheckout",
- "security": [
- {
- "oAuth2": []
- }
- ],
- "tags": [
- "Checkout"
- ],
- "parameters": [
- {
- "name": "code",
- "in": "path",
- "description": "Checkout code",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "204": {
- "description": "Checkout deleted"
- },
- "400": {
- "$ref": "#/components/responses/BadRequest"
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
- },
- "404": {
- "$ref": "#/components/responses/NotFound"
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
- }
- }
- }
- },
- "/creditNotes": {
- "post": {
- "summary": "Create credit note",
- "description": "Create a credit note to be paid by a customer",
- "operationId": "createCreditNote",
- "security": [
- {
- "oAuth2": [
- "invoice:read"
- ]
- }
- ],
- "requestBody": {
- "description": "Credit note details",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "number": {
- "type": "string",
- "description": "Credit note number",
- "example": "CN-123456",
- "x-faker": "lorem.sentence"
- },
- "invoice": {
- "$ref": "#/components/schemas/Invoice",
- "description": "Invoice to which this credit note refers to."
- },
- "amount": {
- "type": "number",
- "description": "Credit note amount. Amount must be equal or less than the invoice amount. If the credit note amount is less than the invoice amount, the remaining amount will be payable by the customer. Multiple credit notes can be created for the same invoice and the total amount of all credit notes must be equal or less than the invoice amount.",
- "example": 100.00,
- "x-faker": "finance.amount"
- }
- },
- "required": [
- "number",
- "invoice",
- "amount"
- ]
- }
- }
- },
- "required": true
- },
- "responses": {
- "201": {
- "description": "Credit note created",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Invoice"
- }
- }
- }
- },
- "400": {
- "$ref": "#/components/responses/BadRequest"
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
- },
- "404": {
- "$ref": "#/components/responses/NotFound"
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
- }
- },
- "tags": [
- "Invoices",
- "Documents"
- ]
- },
- "get": {
- "summary": "List credit notes",
- "description": "Retrieve a list of credit notes",
- "operationId": "getCreditNotes",
- "security": [
- {
- "oAuth2": [
- "invoice:read"
- ]
- }
- ],
- "parameters": [
- {
- "name": "page",
- "in": "query",
- "description": "Page number",
- "required": false,
- "schema": {
- "type": "integer"
- }
- },
- {
- "name": "limit",
- "in": "query",
- "description": "Number of items per page",
- "required": false,
- "schema": {
- "type": "integer"
- }
- },
- {
- "name": "sort",
- "in": "query",
- "description": "Sort order",
- "required": false,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "filter",
- "in": "query",
- "description": "Filter query",
- "required": false,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Credit notes list",
- "content": {
- "application/json": {
- "schema": {
- "allOf": [
- {
- "$ref": "#/components/schemas/PaginatedResult"
- },
- {
- "type": "object",
- "properties": {
- "items": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Invoice"
- }
- }
- }
- }
- ]
- }
- }
- }
- },
- "400": {
- "$ref": "#/components/responses/BadRequest"
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
- }
- },
- "tags": [
- "Invoices",
- "Documents"
- ]
- }
- },
- "/creditNotes/{fingerprint}": {
- "get": {
- "summary": "Get credit note details",
- "description": "Retrieve a credit note details by its fingerprint",
- "operationId": "getCreditNote",
- "security": [
- {
- "oAuth2": [
- "invoice:read"
- ]
- }
- ],
- "parameters": [
- {
- "name": "fingerprint",
- "in": "path",
- "description": "Credit note fingerprint",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Credit note",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Invoice"
- }
- }
- }
- },
- "400": {
- "$ref": "#/components/responses/BadRequest"
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
- },
- "404": {
- "$ref": "#/components/responses/NotFound"
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
- }
- },
- "tags": [
- "Invoices",
- "Documents"
- ]
- },
- "delete": {
- "summary": "Delete credit note",
- "description": "Delete a credit note by its fingerprint",
- "operationId": "deleteCreditNote",
- "security": [
- {
- "oAuth2": [
- "invoice:write"
- ]
- }
- ],
- "parameters": [
- {
- "name": "fingerprint",
- "in": "path",
- "description": "Credit note fingerprint",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "204": {
- "description": "Credit note deleted"
- },
- "400": {
- "$ref": "#/components/responses/BadRequest"
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
- },
- "404": {
- "$ref": "#/components/responses/NotFound"
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
- }
- },
- "tags": [
- "Invoices",
- "Documents"
- ]
- }
- },
- "/constructions/contracts": {
- "post": {
- "tags": [
- "Construction"
- ],
- "operationId": "addSiteWorker",
- "summary": "Add worker to site",
- "description": "This endpoint manages the association between a site and a worker. Is not mandatory for the worker to be registered on FlowPay. This request must be authorized by the site owner, then the worker will be able to call the [PATCH] `/constructions/contracts/{identifier}` endpoint to complete the handshake.",
- "requestBody": {
- "description": "Worker details",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "site": {
- "type": "string",
- "format": "uuid",
- "description": "Site identifier",
- "x-faker": "datatype.uuid"
- },
- "attachments": {
- "type": "array",
- "description": "List of files FlowPay will use to verify worker",
- "minItems": 1,
- "items": {
- "type": "string",
- "format": "uuid",
- "description": "Identifier of the file uploaded to FlowPay using the `/files` endpoint",
- "x-faker": "datatype.uuid"
- }
- }
- }
- }
- }
- }
- },
- "security": [
- {
- "oAuth2": [
- "construction:write"
- ]
- }
- ],
- "responses": {
- "201": {
- "description": "Created",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/SiteWorkerContractCreation"
- }
- }
- }
- },
- "400": {
- "$ref": "#/components/responses/BadRequest"
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
- }
- }
- },
- "get": {
- "tags": [
- "Construction"
- ],
- "operationId": "getWorkers",
- "summary": "List workers",
- "description": "Allows to retrieve a list of workers associated to the customer.",
- "parameters": [
- {
- "name": "page",
- "in": "query",
- "description": "Page number",
- "required": false,
- "schema": {
- "type": "integer"
- }
- },
- {
- "name": "limit",
- "in": "query",
- "description": "Number of items per page",
- "required": false,
- "schema": {
- "type": "integer"
- }
- }
- ],
- "security": [
- {
- "oAuth2": [
- "construction:read"
- ]
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "content": {
- "application/json": {
- "schema": {
- "allOf": [
- {
- "$ref": "#/components/schemas/PaginatedResult"
- },
- {
- "type": "object",
- "properties": {
- "items": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/SiteWorkerContract"
- }
- }
- }
- }
- ]
- }
- }
- }
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
- }
- }
- }
- },
- "/constructions/contracts/{identifier}": {
- "patch": {
- "summary": "Accept assignment",
- "description": "This endpoint allows workers to accept the assignment to a site. The request must be authorized by the worker.",
- "operationId": "acceptSiteAssignment",
- "security": [
- {
- "oAuth2": [
- "construction:write"
- ]
- }
- ],
- "tags": [
- "Construction"
- ],
- "parameters": [
- {
- "name": "identifier",
- "in": "path",
- "description": "Site identifier",
- "required": true,
- "schema": {
- "type": "string",
- "format": "uuid"
- }
- }
- ],
- "requestBody": {
- "description": "Empty body",
- "content": {
- "application/json": {}
- }
- },
- "responses": {
- "200": {
- "description": "OK",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/SiteWorkerContract"
- }
- }
- }
- },
- "400": {
- "$ref": "#/components/responses/BadRequest"
- },
- "401": {
- "$ref": "#/components/responses/Forbidden"
- },
- "403": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "404": {
- "$ref": "#/components/responses/NotFound"
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
- }
- }
- },
- "delete": {
- "summary": "Contract withdrawal",
- "description": "This endpoint allows workers and site owners to withdraw from a contract. The request must be authorized by the worker or the site owner.",
- "operationId": "withdrawFromSite",
- "security": [
- {
- "oAuth2": [
- "construction:write"
- ]
- }
- ],
- "tags": [
- "Construction"
- ],
- "parameters": [
- {
- "name": "identifier",
- "in": "path",
- "description": "Site identifier",
- "required": true,
- "schema": {
- "type": "string",
- "format": "uuid"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "OK"
- },
- "400": {
- "$ref": "#/components/responses/BadRequest"
- },
- "401": {
- "$ref": "#/components/responses/Forbidden"
- },
- "403": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "404": {
- "$ref": "#/components/responses/NotFound"
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
- }
- }
- }
- },
- "/constructions/sites": {
- "post": {
- "tags": [
- "Construction"
- ],
- "operationId": "createConstructionSite",
- "summary": "Open a new site",
- "description": "Allows to define a new site to be managed with FlowPay",
- "requestBody": {
- "description": "Information needed to create and verify a new site",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "User friendly name to identify the site",
- "example": "Cantiere di via Roma famiglia Verdi",
- "x-faker": "lorem.word"
- },
- "description": {
- "type": "string",
- "description": "Information about the site and planned activities. Details are not mandatory but an exhaustive description is recommended to help during the verification process and to avoid delays or more information requests.",
- "example": "Lavori di ristrutturazione completa dell'immobile, comprensivi di rifacimento tetti, creazione di un ulteriore vano e lavori al giardino",
- "x-faker": "lorem.paragraph"
- },
- "address": {
- "type": "string",
- "description": "Address of the site in free format",
- "example": "Via Roma -1, 50041 Calenzano, Italia",
- "x-faker": "address.streetAddress"
- },
- "expectedEndDate": {
- "type": "string",
- "format": "date-time",
- "description": "Estimated end date of the site"
- },
- "attachments": {
- "type": "array",
- "description": "List of files FlowPay will use to verify site operations",
- "minItems": 1,
- "items": {
- "type": "string",
- "format": "uuid",
- "description": "Identifier of the file uploaded to FlowPay using the `/files` endpoint",
- "x-faker": "datatype.uuid"
- }
- }
- },
- "required": [
- "name",
- "description",
- "address",
- "expectedEndDate",
- "attachments"
- ]
- }
- }
- }
- },
- "security": [
- {
- "oAuth2": [
- "authorization_code"
- ]
- }
- ],
- "responses": {
- "201": {
- "description": "Created",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ConstructionSite"
- }
- }
- }
- },
- "400": {
- "$ref": "#/components/responses/BadRequest"
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
- }
- }
- },
- "get": {
- "tags": [
- "Construction"
- ],
- "operationId": "getConstructionSites",
- "summary": "List sites",
- "description": "Allows to retrieve a list of sites managed by the customer",
"parameters": [
- {
- "name": "page",
- "in": "query",
- "description": "Page number",
- "required": false,
- "schema": {
- "type": "integer"
- }
- },
{
"name": "limit",
"in": "query",
- "description": "Number of items per page",
- "required": false,
- "schema": {
- "type": "integer"
- }
- }
- ],
- "security": [
- {
- "oAuth2": [
- "construction:read"
- ]
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "content": {
- "application/json": {
- "schema": {
- "allOf": [
- {
- "$ref": "#/components/schemas/PaginatedResult"
- },
- {
- "type": "object",
- "properties": {
- "items": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/ConstructionSite"
- }
- }
- }
- }
- ]
- }
- }
- }
- },
- "400": {
- "$ref": "#/components/responses/BadRequest"
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
- }
- }
- }
- },
- "/constructions/sites/{identifier}": {
- "get": {
- "tags": [
- "Construction"
- ],
- "operationId": "getConstructionSite",
- "summary": "Get site details",
- "description": "Allows to retrieve details of a specific site",
- "parameters": [
- {
- "name": "identifier",
- "in": "path",
- "description": "Site identifier",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "security": [
- {
- "oAuth2": [
- "construction:read"
- ]
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ConstructionSite"
- }
- }
- }
- },
- "400": {
- "$ref": "#/components/responses/BadRequest"
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
- },
- "404": {
- "$ref": "#/components/responses/NotFound"
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
- }
- }
- }
- },
- "/constructions/sites/{identifier}/cashout": {
- "post": {
- "operationId": "cashout",
- "summary": "Cashout",
- "description": "Allows to cashout residual money from a site. The request acts on the site wallet owned by the owner of the oauth token used to call the endpoint.",
- "parameters": [
- {
- "name": "identifier",
- "in": "path",
- "description": "Site identifier",
- "required": true,
- "schema": {
- "type": "string",
- "format": "uuid"
- }
- }
- ],
- "requestBody": {
- "description": "Cashout details",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "amount": {
- "type": "number",
- "format": "float",
- "example": 75500.01,
- "description": "Amount to be cashed out, this amount will be used to generate a document to be paid in order to transfer the amount from the wallet to the owner bank account."
- },
- "account": {
- "type": "string",
- "format": "uuid",
- "description": "Identifier of the bank account to be used to transfer the amount. If not specified, the default bank account will be used."
- },
- "description": {
- "type": "string",
- "description": "Remittance information to be used to generate the document. Details are not mandatory but an exhaustive description is recommended to help during the verification process and to avoid delays or more information requests.",
- "example": "Pagamento stipendio dipendenti, pagamento fornitore XYZ",
- "x-faker": "lorem.paragraph"
- },
- "reference": {
- "type": "string",
- "description": "Reference number of the cashout",
- "example": "C-123456",
- "x-faker": "lorem.sentence"
- }
- },
- "required": [
- "site",
- "amount",
- "description"
- ]
- }
- }
- }
- },
- "security": [
- {
- "oAuth2": [
- "construction:write",
- "wallet:construction"
- ]
- }
- ],
- "responses": {
- "201": {
- "description": "Created",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "fingerprint": {
- "$ref": "#/components/schemas/Fingerprint"
- }
- },
- "required": [
- "fingerprint"
- ]
- }
- }
- }
- },
- "400": {
- "$ref": "#/components/responses/BadRequest"
- },
- "401": {
- "$ref": "#/components/responses/Forbidden"
- },
- "403": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "404": {
- "$ref": "#/components/responses/NotFound"
- },
- "409": {
- "$ref": "#/components/responses/Conflict"
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
- }
- }
- }
- },
- "/constructions/sites/{identifier}/quote": {
- "post": {
- "tags": [
- "Construction"
- ],
- "operationId": "createQuote",
- "summary": "Create quote",
- "description": "Allows to create a new quote for a specific site, useful to credit site owner wallet with the amount needed to start the site operations. The request must be authorized by the site owner.",
- "parameters": [
- {
- "name": "identifier",
- "in": "path",
- "description": "Site identifier",
- "required": true,
- "schema": {
- "type": "string",
- "format": "uuid"
- }
- }
- ],
- "requestBody": {
- "description": "Quote details",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "amount": {
- "type": "number",
- "format": "float",
- "example": 75500.01,
- "description": "Estimated amount for the site. If the token has `wallet:construction` scope, this amount will be used to generate a document to be paid in order to transfer initial amount to the wallet."
- },
- "expectedEndDate": {
- "type": "string",
- "format": "date-time",
- "description": "Estimated end date of the site"
- },
- "description": {
- "type": "string",
- "description": "Information about the site and planned activities. Details are not mandatory but an exhaustive description is recommended to help during the verification process and to avoid delays or more information requests.",
- "example": "Giardino posteriore: rifacimento pavimentazione, installazione impianto di irrigazione, installazione impianto di illuminazione",
- "x-faker": "lorem.paragraph"
- },
- "reference": {
- "type": "string",
- "description": "Reference number of the quote",
- "example": "Q-123456",
- "x-faker": "lorem.sentence"
- },
- "attachments": {
- "type": "array",
- "description": "List of files FlowPay will use to verify site operations",
- "minItems": 1,
- "items": {
- "type": "string",
- "format": "uuid",
- "description": "Identifier of the file uploaded to FlowPay using the `/files` endpoint",
- "x-faker": "datatype.uuid"
- }
- }
- },
- "required": [
- "site",
- "amount",
- "description",
- "expectedEndDate",
- "attachments"
- ]
- }
- }
- }
- },
- "security": [
- {
- "oAuth2": [
- "construction:write",
- "wallet:construction"
- ]
- }
- ],
- "responses": {
- "201": {
- "description": "Created",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/SiteQuote"
- }
- }
- }
- },
- "400": {
- "$ref": "#/components/responses/BadRequest"
- },
- "401": {
- "$ref": "#/components/responses/Forbidden"
- },
- "403": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "404": {
- "$ref": "#/components/responses/NotFound"
- },
- "409": {
- "$ref": "#/components/responses/Conflict"
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
- }
- }
- },
- "get": {
- "tags": [
- "Construction"
- ],
- "operationId": "getQuotes",
- "summary": "List quotes",
- "description": "Allows to retrieve a list of quotes for a specific site",
- "parameters": [
- {
- "name": "identifier",
- "in": "path",
- "description": "Site identifier",
- "required": true,
- "schema": {
- "type": "string",
- "format": "uuid"
- }
- },
- {
- "name": "page",
- "in": "query",
- "description": "Page number",
- "required": false,
"schema": {
- "type": "integer"
- }
+ "type": "integer",
+ "default": 20
+ },
+ "description": "Numero massimo di elementi per pagina."
},
{
- "name": "limit",
+ "name": "offset",
"in": "query",
- "description": "Number of items per page",
- "required": false,
"schema": {
- "type": "integer"
- }
+ "type": "integer",
+ "default": 0
+ },
+ "description": "Numero di elementi da saltare."
}
],
"responses": {
"200": {
- "description": "OK",
+ "description": "Elenco paginato delle richieste di pagamento.",
"content": {
"application/json": {
"schema": {
@@ -4163,12 +90,11 @@
"$ref": "#/components/schemas/PaginatedResult"
},
{
- "type": "object",
"properties": {
"items": {
"type": "array",
"items": {
- "$ref": "#/components/schemas/SiteQuote"
+ "$ref": "#/components/schemas/PaymentRequest"
}
}
}
@@ -4178,366 +104,309 @@
}
}
},
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
+ "400": {
+ "$ref": "#/components/responses/BadRequest"
},
- "500": {
- "$ref": "#/components/responses/InternalServerError"
- }
- },
- "security": [
- {
- "oAuth2": [
- "construction:read",
- "wallet:construction"
- ]
+ "default": {
+ "$ref": "#/components/responses/DefaultError"
}
- ]
- }
- },
- "/constructions/progress": {
+ }
+ },
"post": {
- "summary": "Register work progress",
- "description": "You can register work progress by passing a list of the invoices previously uploaded using the `/invoices` endpoint. The request must be authorized by the worker. Each invoice between site owner and worker will be linked to a new site-related document. Each invoice between the worker and their suppliers will be linked to a new document.Note: The sum of the worker-to-customer invoices must be at least equal to the sum of the supplier-to-worker invoices .",
- "operationId": "registerWorkProgress",
+ "summary": "Crea una nuova richiesta di pagamento",
+ "description": "Endpoint per creare una richiesta di pagamento tra due attori, specificando dati di pagatore e beneficiario.",
+ "operationId": "createPaymentRequest",
+ "tags": [
+ "Request To Pay",
+ "Payments"
+ ],
"security": [
{
- "oAuth2": [
- "construction:write"
- ]
+ "basicAuth": []
}
],
- "tags": [
- "Construction"
- ],
"requestBody": {
- "description": "List of invoices's fingerprints",
+ "description": "Oggetto contenente informazioni su debitore, creditore e dettagli di pagamento.",
+ "required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "site": {
+ "payer": {
+ "description": "Informazioni sul payer del pagamento. Può essere un numero di telefono o un oggetto Consumer.",
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/PhoneNumber"
+ },
+ {
+ "$ref": "#/components/schemas/Consumer"
+ },
+ {
+ "title": "UUID del customer pagatore.",
+ "type": "string",
+ "format": "uuid",
+ "description": "UUID del customer che effettua il pagamento."
+ }
+ ]
+ },
+ "debtor": {
+ "description": "Informazioni sul debitore effettivo del pagamento. Se non valorizzato, verrà utilizzato il valore di `payer`.",
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/ConsumerTIN"
+ },
+ {
+ "$ref": "#/components/schemas/BusinessTIN"
+ },
+ {
+ "title": "UUID del customer debitore.",
+ "type": "string",
+ "format": "uuid",
+ "description": "UUID del customer debitore."
+ }
+ ]
+ },
+ "ultimateDebtor": {
"type": "string",
- "format": "uuid",
- "description": "Site identifier",
- "x-faker": "datatype.uuid"
+ "enum": [
+ "debtor",
+ "payee",
+ "payer",
+ "tenant",
+ "anonymous"
+ ],
+ "description": {
+ "$ref": "./docs/description_ultimate_debtor.md"
+ },
+ "default": "debtor"
},
- "invoice": {
+ "attachments": {
"type": "array",
- "description": "List of invoices's fingerprints",
- "minItems": 1,
"items": {
- "$ref": "#/components/schemas/Fingerprint"
- }
- }
- }
- }
- }
- },
- "required": true
- },
- "responses": {
- "201": {
- "description": "Created",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ConstructionProgress"
- }
- }
- }
- },
- "400": {
- "$ref": "#/components/responses/BadRequest"
- },
- "401": {
- "$ref": "#/components/responses/Forbidden"
- },
- "403": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "404": {
- "$ref": "#/components/responses/NotFound"
- },
- "409": {
- "$ref": "#/components/responses/Conflict"
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
- }
- }
- },
- "get": {
- "summary": "List work progress",
- "description": "Allows to retrieve a list of work progress registered by the worker",
- "operationId": "getWorkProgress",
- "security": [
- {
- "oAuth2": [
- "construction:read"
- ]
- }
- ],
- "tags": [
- "Construction"
- ],
- "parameters": [
- {
- "name": "page",
- "in": "query",
- "description": "Page number",
- "required": false,
- "schema": {
- "type": "integer"
- }
- },
- {
- "name": "limit",
- "in": "query",
- "description": "Number of items per page",
- "required": false,
- "schema": {
- "type": "integer"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "content": {
- "application/json": {
- "schema": {
- "allOf": [
- {
- "$ref": "#/components/schemas/PaginatedResult"
+ "type": "string",
+ "format": "uuid",
+ "description": "Identificativo univoco del file allegato al pagamento."
},
- {
- "type": "object",
- "properties": {
- "items": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/ConstructionProgress"
+ "description": "Elenco di UUID dei file allegati al pagamento che verranno mostrati nel checkout. Questi file devono essere stati precedentemente caricati utilizzando l'endpoint `/files`."
+ },
+ "privateAttachments": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "format": "uuid",
+ "description": "Identificativo univoco del file."
+ },
+ "description": "Elenco di UUID dei file allegati al pagamento che saranno visibili solo a FlowPay per i controlli di conformità. Questi file non saranno mostrati al pagatore durante il processo di pagamento."
+ },
+ "title": {
+ "type": "string",
+ "minLength": 3,
+ "maxLength": 50,
+ "description": "Titolo esemplicativo del pagamento. Verrà mostrato al pagatore durante il processo di pagamento."
+ },
+ "description": {
+ "type": "string",
+ "minLength": 5,
+ "maxLength": 255,
+ "description": "Descrizione del pagamento, visibile al pagatore."
+ },
+ "remittanceInformation": {
+ "type": "string",
+ "minLength": 5,
+ "maxLength": 100,
+ "description": "Informazioni di rimessa per il pagamento, visibili al pagatore e al beneficiario all'accredito sul conto."
+ },
+ "allowRemittanceChange": {
+ "type": "boolean",
+ "default": false,
+ "description": "Indica se il pagatore può modificare le informazioni di rimessa durante il pagamento."
+ },
+ "email": {
+ "type": "string",
+ "format": "email",
+ "description": "Indirizzo email a cui verrà inviata la ricevuta del pagamento. Obbligatorio nel caso di PagoPA."
+ },
+ "redirectUrl": {
+ "type": "string",
+ "format": "uri",
+ "description": "URL di redirect a cui l'utente verrà reindirizzato con query parameter status che può valere `success`, `error` o `cancel`."
+ },
+ "callbackUrl": {
+ "type": "string",
+ "format": "uri",
+ "description": "URL di callback singolo per il pagamento."
+ }
+ },
+ "required": [],
+ "oneOf": [
+ {
+ "title": "Pagamento standard",
+ "properties": {
+ "amount": {
+ "type": "number",
+ "format": "decimal",
+ "minimum": 0.01,
+ "description": "Importo del pagamento in formato decimale (es. 10.50)."
+ },
+ "payee": {
+ "description": "Informazioni sul payee del pagamento. Se non specificato, di default verrà utilizzato il partner associato al client e l'IBAN configurato per il client.",
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/PhoneNumber"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Nome del beneficiario."
+ },
+ "iban": {
+ "description": "IBAN del conto del beneficiario.",
+ "$ref": "#/components/schemas/IBAN"
+ }
+ },
+ "required": [
+ "name",
+ "iban"
+ ]
}
- }
+ ]
+ },
+ "allowPartialPayments": {
+ "type": "boolean",
+ "description": "Indica se accettare pagamenti parziali. Se true, `amount` deve essere valorizzato e `additionalPayees` non deve essere valorizzato."
}
- }
- ]
- }
- }
- }
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
- }
- }
- }
- },
- "/constructions/progress/{identifier}": {
- "get": {
- "summary": "Get work progress details",
- "description": "Allows to retrieve details of a specific work progress",
- "operationId": "getWorkProgressDetails",
- "security": [
- {
- "oAuth2": [
- "construction:read"
- ]
- }
- ],
- "tags": [
- "Construction"
- ],
- "parameters": [
- {
- "name": "identifier",
- "in": "path",
- "description": "Work progress identifier",
- "required": true,
- "schema": {
- "type": "string",
- "format": "uuid"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ConstructionProgress"
- }
- }
- }
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
- },
- "404": {
- "$ref": "#/components/responses/NotFound"
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
- }
- }
- }
- },
- "/fee": {
- "get": {
- "summary": "List fees",
- "description": "Retrieve the list of fees applied to the customer for the services provided by the client",
- "operationId": "getFees",
- "security": [
- {
- "oAuth2": [
- "fees:read"
- ]
- }
- ],
- "parameters": [
- {
- "name": "page",
- "in": "query",
- "description": "Page number",
- "required": false,
- "schema": {
- "type": "integer",
- "format": "int32"
- },
- "x-faker": "random.number"
- },
- {
- "name": "size",
- "in": "query",
- "description": "Page size",
- "required": false,
- "schema": {
- "type": "integer",
- "format": "int32"
- },
- "x-faker": "random.number"
- }
- ],
- "responses": {
- "200": {
- "description": "Fees list",
- "content": {
- "application/json": {
- "schema": {
- "allOf": [
- {
- "$ref": "#/components/schemas/PaginatedResult"
},
- {
- "type": "object",
- "properties": {
- "items": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Fee"
+ "required": [],
+ "allOf": [
+ {
+ "if": {
+ "title": "Pagamento intero",
+ "properties": {
+ "allowPartialPayments": {
+ "const": false
+ }
+ }
+ },
+ "then": {
+ "properties": {
+ "additionalPayees": {
+ "type": "array",
+ "description": "Elenco di beneficiari aggiuntivi a cui destinare parte dell'importo del pagamento. La somma degli importi specificati in `additionalPayees` non può essere maggiore di `amount`; la differenza tra `amount` e la somma degli `additionalPayees` verrà inviata al `payee`.",
+ "items": {
+ "oneOf": [
+ {
+ "type": "object",
+ "title": "Pagamento verso cellulare",
+ "description": "Pagamento a un numero di telefono.",
+ "properties": {
+ "amount": {
+ "type": "number",
+ "format": "decimal",
+ "minimum": 0.01,
+ "description": "Importo del pagamento in formato decimal"
+ },
+ "phoneNumber": {
+ "$ref": "#/components/schemas/PhoneNumber"
+ }
+ },
+ "required": [
+ "phoneNumber",
+ "amount"
+ ]
+ },
+ {
+ "type": "object",
+ "title": "Pagamento verso IBAN",
+ "description": "Pagamento a un beneficiario con IBAN.",
+ "properties": {
+ "amount": {
+ "type": "number",
+ "format": "decimal",
+ "minimum": 0.01,
+ "description": "Importo del pagamento in formato decimal"
+ },
+ "name": {
+ "type": "string",
+ "description": "Nome del beneficiario."
+ },
+ "iban": {
+ "description": "IBAN del conto del beneficiario.",
+ "$ref": "#/components/schemas/IBAN"
+ }
+ },
+ "required": [
+ "name",
+ "iban"
+ ]
+ },
+ {
+ "title": "Pagamento verso customer",
+ "type": "string",
+ "format": "uuid",
+ "description": "UUID del customer da utilizzare come payee addizionale."
+ }
+ ]
+ }
+ },
+ "lockedUntil": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Se valorizzato, i fondi di questo pagamento verranno dirottati su un conto tecnico FlowPay fino alla data specificata. Entro tale data sarà possibile sbloccare i fondi verso il payee o restituirli al payer. Se i fondi saranno ancora presenti alla scadenza, verranno restituiti automaticamente al payer."
+ },
+ "savePaymentMethod": {
+ "type": "boolean",
+ "default": false,
+ "description": "Indica se salvare il metodo di pagamento per futuri utilizzi."
+ },
+ "executionDate": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Data e ora di esecuzione del pagamento in formato ISO 8601. Se non valorizzato, il pagamento verrà eseguito immediatamente."
+ }
}
+ },
+ "else": {
+ "title": "Pagamento parziale",
+ "required": [
+ "amount"
+ ]
}
}
- }
- ]
- }
+ ]
+ },
+ {
+ "title": "PagoPA",
+ "properties": {
+ "pagopaEcFiscalCode": {
+ "type": "string",
+ "description": "Codice fiscale della persona per PagoPA."
+ },
+ "pagopaPaymentNotice": {
+ "type": "string",
+ "description": "Codice di avviso pagamento PagoPA."
+ }
+ },
+ "required": [
+ "pagopaEcFiscalCode",
+ "pagopaPaymentNotice",
+ "email"
+ ]
+ }
+ ]
}
}
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
}
},
- "tags": [
- "Fee"
- ]
- }
- },
- "/fee/rules": {
- "get": {
- "summary": "List fee rules",
- "operationId": "list_fee_rules",
- "description": "Retrieve a list of fee rules based on query parameters.",
- "security": [
- {
- "oAuth2": []
- }
- ],
- "tags": [
- "Fee"
- ],
- "parameters": [
- {
- "name": "types",
- "in": "query",
- "description": "Filter fee rules by document kind (e.g., invoice, bill, etc.)",
- "required": false,
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/DocumentKindEnum"
- }
- }
- },
- {
- "name": "methods",
- "in": "query",
- "description": "Filter fee rules by payment method (e.g., card, sdd, pis)",
- "required": false,
- "schema": {
- "type": "array",
- "items": {
- "type": "string",
- "enum": [
- "pis",
- "sdd",
- "card"
- ],
- "description": "Payment method the rule applies to"
- }
- }
- },
- {
- "name": "lowerBound",
- "in": "query",
- "description": "Filter fee rules by lower bound",
- "required": false,
- "schema": {
- "type": "number",
- "format": "double"
- }
- }
- ],
"responses": {
- "200": {
- "description": "List of fee rules",
+ "201": {
+ "description": "Richiesta di pagamento creata con successo.",
"content": {
"application/json": {
"schema": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/FeeRule"
- }
+ "$ref": "#/components/schemas/PaymentRequest"
}
}
}
@@ -4545,56 +414,64 @@
"400": {
"$ref": "#/components/responses/BadRequest"
},
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
- },
- "404": {
- "$ref": "#/components/responses/NotFound"
+ "default": {
+ "$ref": "#/components/responses/DefaultError"
}
}
}
},
- "/fee/rules/{kind}/{fingerprint}": {
+ "/payment-requests/{requestId}": {
"get": {
- "summary": "Retrieve fee rules for a document",
- "description": "Retrieve fee rules for a document identified by its type and fingerprint. The response is a mapping of payment methods (e.g., card, sdd, pis) to the corresponding fee rule.",
- "operationId": "getFeeRules",
+ "summary": "Recupera lo stato di una richiesta di pagamento",
+ "description": "Restituisce dettagli e stato della richiesta di pagamento specificata. Il documento PDF che include i dettagli della richiesta di pagamento e un QR code per apertura mobile. Se la richiesta è stata pagata, contiene anche le informazioni di pagamento e funge da ricevuta.",
+ "operationId": "getPaymentRequest",
+ "tags": [
+ "Request To Pay",
+ "Payments"
+ ],
"security": [
{
- "oAuth2": []
+ "basicAuth": []
}
],
"parameters": [
{
- "name": "kind",
+ "name": "requestId",
"in": "path",
"required": true,
"schema": {
- "$ref": "#/components/schemas/DocumentKindEnum"
- }
+ "type": "string"
+ },
+ "description": "Identificativo della richiesta di pagamento di cui recuperare lo stato."
},
{
- "name": "fingerprint",
- "in": "path",
- "required": true,
+ "name": "Accept",
+ "in": "header",
+ "required": false,
"schema": {
- "$ref": "#/components/schemas/Fingerprint"
- }
+ "type": "string",
+ "enum": [
+ "application/json",
+ "application/pdf"
+ ],
+ "default": "application/json"
+ },
+ "description": "Specifica il formato di risposta desiderato; usare application/pdf per ottenere un documento PDF."
}
],
- "tags": [
- "Fee"
- ],
"responses": {
"200": {
- "description": "Mapping of fee rules retrieved successfully.",
+ "description": "Dettagli della richiesta di pagamento in JSON o documento PDF se richiesto con Accept: application/pdf. ",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/FeeRuleMap"
+ "$ref": "#/components/schemas/PaymentRequest"
+ }
+ },
+ "application/pdf": {
+ "schema": {
+ "type": "string",
+ "format": "binary"
}
}
}
@@ -4602,177 +479,89 @@
"400": {
"$ref": "#/components/responses/BadRequest"
},
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "404": {
- "$ref": "#/components/responses/NotFound"
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
+ "default": {
+ "$ref": "#/components/responses/DefaultError"
}
}
- }
- },
- "/fee/rules/{kind}/{fingerprint}/{payer}": {
- "get": {
- "summary": "Retrieve fee rule for a specific payer",
- "description": "Retrieve fee rule(s) for a document identified by its type and fingerprint, filtered by the specified payer. Optionally, an 'amount' query parameter can be provided to influence fee calculation.",
- "operationId": "getFeeRuleForPayer",
+ },
+ "delete": {
+ "summary": "Cancella una richiesta di pagamento",
+ "description": "Cancella la richiesta di pagamento specificata. Può essere fatta solo se non è stato avviato alcun pagamento.",
+ "operationId": "deletePaymentRequest",
+ "tags": [
+ "Request To Pay",
+ "Payments"
+ ],
"security": [
{
- "oAuth2": []
+ "basicAuth": []
}
],
"parameters": [
{
- "name": "kind",
- "in": "path",
- "required": true,
- "schema": {
- "$ref": "#/components/schemas/DocumentKindEnum"
- }
- },
- {
- "name": "fingerprint",
- "in": "path",
- "required": true,
- "schema": {
- "$ref": "#/components/schemas/Fingerprint"
- }
- },
- {
- "name": "payer",
+ "name": "requestId",
"in": "path",
"required": true,
"schema": {
- "$ref": "#/components/schemas/FeeRulePayer"
- }
+ "type": "string",
+ "format": "uuid"
+ },
+ "description": "UUID della richiesta di pagamento da cancellare."
}
],
- "tags": [
- "Fee"
- ],
"responses": {
- "200": {
- "description": "Fee rule for the specified payer retrieved successfully.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/FeeRuleAmountMap"
- }
- }
- }
+ "204": {
+ "description": "Richiesta di pagamento cancellata con successo."
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "404": {
- "$ref": "#/components/responses/NotFound"
+ "409": {
+ "$ref": "#/components/responses/Conflict"
},
- "500": {
- "$ref": "#/components/responses/InternalServerError"
+ "default": {
+ "$ref": "#/components/responses/DefaultError"
}
}
}
},
- "/invoices": {
- "post": {
- "summary": "Create invoice",
- "description": "Create an invoice to be paid by a customer",
- "operationId": "createInvoice",
+ "/payment-requests/{requestId}/sessions": {
+ "get": {
+ "x-convenience": true,
+ "summary": "Elenca le sessioni di pagamento associate a una richiesta",
+ "description": "Convenience endpoint: restituisce l'elenco delle sessioni di pagamento (tentativi) per la richiesta specificata. Ideale per navigazione gerarchica.",
+ "operationId": "listPaymentRequestSessions",
+ "tags": [
+ "Request To Pay",
+ "Payments"
+ ],
"security": [
{
- "oAuth2": [
- "invoices:write"
- ]
+ "basicAuth": []
}
],
- "requestBody": {
- "description": "Invoice details",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "number": {
- "type": "string",
- "description": "Invoice number",
- "example": "INV-123456",
- "x-faker": "lorem.sentence"
- },
- "creditor": {
- "description": "Creditor VAT number, must be a company",
- "oneOf": [
- {
- "$ref": "#/components/schemas/CompanyVATNumber"
- }
- ]
- },
- "debtor": {
- "description": "Debtor VAT number, could be a company or a person",
- "oneOf": [
- {
- "$ref": "#/components/schemas/CompanyVATNumber"
- },
- {
- "$ref": "#/components/schemas/ConsumerNationalID"
- }
- ]
- },
- "terms": {
- "type": "array",
- "description": "Payment terms used to generate payment requests",
- "items": {
- "$ref": "#/components/schemas/DocumentTerm"
- }
- },
- "items": {
- "type": "array",
- "description": "Invoice items",
- "items": {
- "$ref": "#/components/schemas/DocumentItem"
- }
- },
- "attachments": {
- "type": "array",
- "description": "Invoice attachments",
- "items": {
- "$ref": "#/components/schemas/DocumentAttachment"
- }
- }
- },
- "required": [
- "creditor",
- "debtor",
- "terms",
- "number"
- ]
- }
+ "parameters": [
+ {
+ "name": "requestId",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "uuid"
},
- "application/xml; charset=utf-8": {
- "schema": {
- "type": "string",
- "format": "base64",
- "description": "Italian FatturaPA XML file encoded in base64. Both plain text invoice and .p7m signed invoice are supported.",
- "example": {
- "$ref": "./examples/xmlpa.txt"
- }
- }
- }
- },
- "required": true
- },
+ "description": "UUID della richiesta di pagamento."
+ }
+ ],
"responses": {
- "201": {
- "description": "Invoice created",
+ "200": {
+ "description": "Elenco delle sessioni di pagamento per la richiesta.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Invoice"
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/PaymentSessions"
+ }
}
}
}
@@ -4780,98 +569,72 @@
"400": {
"$ref": "#/components/responses/BadRequest"
},
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
+ "default": {
+ "$ref": "#/components/responses/DefaultError"
}
- },
- "tags": [
- "Invoices",
- "Documents"
- ]
- },
+ }
+ }
+ },
+ "/payment-sessions": {
"get": {
- "summary": "List invoices",
- "description": "Retrieve invoices list according to the specified filters",
- "operationId": "getInvoices",
+ "summary": "Elenca le sessioni di pagamento con filtri",
+ "description": "Risorsa principale per query globale sulle sessioni di pagamento. Supporta filtri, incluso requestId per selezionare le sessioni di una specifica richiesta.",
+ "operationId": "listPaymentSessions",
+ "tags": [
+ "Payments"
+ ],
"security": [
{
- "oAuth2": [
- "invoices:read"
- ]
+ "basicAuth": []
}
],
"parameters": [
{
- "name": "from",
+ "name": "limit",
"in": "query",
- "description": "Start date of the invoices to retrieve. If not specified, the default value is the first day of the current month",
- "required": false,
"schema": {
- "type": "string",
- "format": "iso8601"
+ "type": "integer",
+ "default": 20
},
- "x-faker": "date.past"
+ "description": "Numero massimo di elementi per pagina."
},
{
- "name": "to",
+ "name": "offset",
"in": "query",
- "description": "End date of the invoices to retrieve. If not specified, the default value is the current date",
- "required": false,
"schema": {
- "type": "string",
- "format": "iso8601"
+ "type": "integer",
+ "default": 0
},
- "x-faker": "date.future"
+ "description": "Numero di elementi da saltare."
},
{
- "name": "status",
+ "name": "requestId",
"in": "query",
- "description": "Invoice status",
- "required": false,
"schema": {
"type": "string",
- "enum": [
- "draft",
- "sent",
- "paid",
- "overdue",
- "canceled"
- ]
- },
- "x-faker": "random.arrayElement"
- },
- {
- "name": "page",
- "in": "query",
- "description": "Page number",
- "required": false,
- "schema": {
- "type": "integer",
- "format": "int32"
+ "format": "uuid"
},
- "x-faker": "random.number"
+ "description": "ID della richiesta di pagamento per filtrare le sessioni associate."
},
{
- "name": "size",
+ "name": "status",
"in": "query",
- "description": "Page size",
- "required": false,
"schema": {
- "type": "integer",
- "format": "int32"
+ "type": "string",
+ "enum": [
+ "succeeded",
+ "pending",
+ "expired",
+ "failed",
+ "cancelled"
+ ]
},
- "x-faker": "random.number"
+ "description": "Stato della sessione di pagamento da filtrare."
}
],
"responses": {
"200": {
- "description": "Invoices retrieved",
+ "description": "Elenco paginato delle sessioni di pagamento.",
"content": {
"application/json": {
"schema": {
@@ -4880,70 +643,16 @@
"$ref": "#/components/schemas/PaginatedResult"
},
{
- "type": "object",
"properties": {
"items": {
"type": "array",
"items": {
- "$ref": "#/components/schemas/Invoice"
+ "$ref": "#/components/schemas/PaymentSessions"
}
}
}
}
- ]
- }
- }
- }
- },
- "400": {
- "$ref": "#/components/responses/BadRequest"
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
- }
- },
- "tags": [
- "Invoices",
- "Documents"
- ]
- }
- },
- "/invoices/{fingerprint}": {
- "get": {
- "summary": "Get invoice details",
- "description": "Retrieve invoice details by fingerprint",
- "operationId": "getInvoice",
- "security": [
- {
- "oAuth2": [
- "invoices:read"
- ]
- }
- ],
- "parameters": [
- {
- "name": "fingerprint",
- "in": "path",
- "description": "Invoice fingerprint",
- "required": true,
- "schema": {
- "$ref": "#/components/schemas/Fingerprint"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Invoice retrieved",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Invoice"
+ ]
}
}
}
@@ -4951,36 +660,23 @@
"400": {
"$ref": "#/components/responses/BadRequest"
},
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
- },
- "404": {
- "$ref": "#/components/responses/NotFound"
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
+ "default": {
+ "$ref": "#/components/responses/DefaultError"
}
- },
- "tags": [
- "Invoices",
- "Documents"
- ]
+ }
}
},
- "/kyc": {
+ "/customers": {
"post": {
"summary": "Start KYC",
"description": "Start KYC process for the current user",
"operationId": "startKyc",
"tags": [
- "KYC"
+ "Customers"
],
"security": [
{
- "oAuth2": [
+ "basicAuth": [
"kyc"
]
}
@@ -5008,7 +704,6 @@
"description": "Flow to be used for the KYC process. If not specified, user will be able to choose the flow.",
"enum": [
"consumer",
- "company",
"business"
]
},
@@ -5027,7 +722,7 @@
"x-faker": "person.lastName"
},
"tin": {
- "$ref": "#/components/schemas/ConsumerNationalID"
+ "$ref": "#/components/schemas/ConsumerTIN"
},
"email": {
"type": "string",
@@ -5079,7 +774,7 @@
"x-faker": "company.companyName"
},
"tin": {
- "$ref": "#/components/schemas/CompanyVATNumber"
+ "$ref": "#/components/schemas/BusinessTIN"
},
"country": {
"type": "string",
@@ -5133,240 +828,39 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/KYCDossier"
+ "$ref": "#/components/schemas/Customer"
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
}
}
- }
- },
- "/kyc/{identifier}": {
+ },
"get": {
- "summary": "Get KYC data",
- "description": "Retrieve KYC data for the specified session",
- "operationId": "getKycStatus",
- "security": [
- {
- "oAuth2": [
- "kyc"
- ]
- }
- ],
- "parameters": [
- {
- "name": "identifier",
- "in": "path",
- "description": "KYC session identifier",
- "required": true,
- "schema": {
- "type": "string",
- "format": "uuid"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "KYC status retrieved",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/KYCDossier"
- }
- }
- }
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
- }
- },
- "tags": [
- "KYC"
- ]
- }
- },
- "/pagopa": {
- "post": {
- "summary": "pagoPA payment",
- "description": "Allow to upload a pagoPA payment notice",
- "operationId": "pagopaPayment",
- "security": [
- {
- "oAuth2": [
- "pagopa:write"
- ]
- }
- ],
+ "summary": "Elenca tutti i clienti registrati",
+ "description": "Restituisce l'elenco paginato dei clienti, popolati automaticamente alla creazione di una richiesta di pagamento per payer consumer o business.",
+ "operationId": "listCustomers",
"tags": [
- "pagoPA",
- "Documents"
+ "Customers"
],
- "requestBody": {
- "description": "Pagopa payment request",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "noticeNumber": {
- "type": "string",
- "pattern": "^d{18}",
- "description": "Notice number emitted by pagoPA",
- "example": "1234567890123456"
- },
- "paVatCode": {
- "type": "string",
- "description": "VAT code of the public administration",
- "pattern": "^d{11}",
- "example": "12345678901"
- },
- "debtorVatCode": {
- "oneOf": [
- {
- "$ref": "#/components/schemas/ConsumerNationalID"
- },
- {
- "$ref": "#/components/schemas/CompanyVATNumber"
- }
- ]
- },
- "debtorMail": {
- "type": "string",
- "format": "email",
- "description": "Debtor email address"
- },
- "fee": {
- "type": "number",
- "format": "double",
- "minimum": 0.01,
- "description": "Fee amount"
- }
- },
- "required": [
- "noticeNumber",
- "paVatCode"
- ]
- }
- }
- }
- },
- "responses": {
- "200": {
- "description": "Pagopa payment request accepted",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/pagoPA"
- }
- }
- }
- },
- "400": {
- "$ref": "#/components/responses/BadRequest"
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
- }
- }
- },
- "get": {
- "summary": "pagoPA list",
- "description": "Retrieve pagoPA list according to the specified filters",
- "operationId": "getPagopaList",
"security": [
{
- "oAuth2": [
- "pagopa:read"
- ]
+ "basicAuth": []
}
],
- "tags": [
- "pagoPA",
- "Documents"
- ],
"parameters": [
{
- "name": "from",
- "in": "query",
- "description": "Start date of the pagoPA list to retrieve. If not specified, the default value is the first day of the current month",
- "required": false,
- "schema": {
- "type": "string",
- "format": "date"
- },
- "x-faker": "date.past"
- },
- {
- "name": "to",
- "in": "query",
- "description": "End date of the pagoPA list to retrieve. If not specified, the default value is the current date",
- "required": false,
- "schema": {
- "type": "string",
- "format": "date"
- },
- "x-faker": "date.future"
- },
- {
- "name": "status",
- "in": "query",
- "description": "Status of the pagoPA list to retrieve. If not specified, the default value is 'all'",
- "required": false,
- "schema": {
- "type": "string",
- "enum": [
- "all",
- "pending",
- "paid",
- "rejected"
- ]
- }
- },
- {
- "name": "page",
- "in": "query",
- "description": "Page number of the pagoPA list to retrieve. If not specified, the default value is 1",
- "required": false,
- "schema": {
- "type": "integer",
- "minimum": 1
- },
- "x-faker": "datatype.number"
+ "$ref": "#/components/parameters/LimitParam"
},
{
- "name": "pageSize",
- "in": "query",
- "description": "Page size of the pagoPA list to retrieve. If not specified, the default value is 10",
- "required": false,
- "schema": {
- "type": "integer",
- "minimum": 1,
- "maximum": 100
- },
- "x-faker": "datatype.number"
+ "$ref": "#/components/parameters/OffsetParam"
}
],
"responses": {
"200": {
- "description": "Pagopa list retrieved",
+ "description": "Elenco paginato dei clienti.",
"content": {
"application/json": {
"schema": {
@@ -5375,12 +869,11 @@
"$ref": "#/components/schemas/PaginatedResult"
},
{
- "type": "object",
"properties": {
"items": {
"type": "array",
"items": {
- "$ref": "#/components/schemas/pagoPA"
+ "$ref": "#/components/schemas/Customer"
}
}
}
@@ -5393,181 +886,117 @@
"400": {
"$ref": "#/components/responses/BadRequest"
},
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
+ "default": {
+ "$ref": "#/components/responses/DefaultError"
}
}
}
},
- "/pagopa/{fingerprint}": {
+ "/customers/{customerId}": {
"get": {
- "summary": "Get pagoPA details",
- "description": "Retrieve pagoPA details by fingerprint",
- "operationId": "getPagopaDetails",
+ "summary": "Recupera il dettaglio di un cliente",
+ "description": "Restituisce i dettagli di un cliente specifico per UUID.",
+ "operationId": "getCustomerById",
+ "tags": [
+ "Customers"
+ ],
"security": [
{
- "oAuth2": [
- "pagopa:read"
- ]
+ "basicAuth": []
}
],
"parameters": [
{
- "name": "fingerprint",
+ "name": "customerId",
"in": "path",
- "description": "Pagopa fingerprint",
"required": true,
"schema": {
- "$ref": "#/components/schemas/Fingerprint"
- }
+ "type": "string",
+ "format": "uuid"
+ },
+ "description": "UUID del cliente da recuperare."
}
],
"responses": {
"200": {
- "description": "Pagopa details retrieved",
+ "description": "Dettagli del cliente.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/pagoPA"
+ "$ref": "#/components/schemas/Customer"
}
}
}
},
- "400": {
- "$ref": "#/components/responses/BadRequest"
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
- },
"404": {
"$ref": "#/components/responses/NotFound"
},
- "500": {
- "$ref": "#/components/responses/InternalServerError"
+ "default": {
+ "$ref": "#/components/responses/DefaultError"
}
- },
+ }
+ },
+ "delete": {
+ "summary": "Elimina un cliente",
+ "description": "Elimina il cliente specificato e i metodi di pagamento associati.",
+ "operationId": "deleteCustomer",
"tags": [
- "pagoPA",
- "Documents"
- ]
- }
- },
- "/pagopa/{fingerprint}/receipt": {
- "get": {
- "summary": "Get pagoPA receipt",
- "description": "Retrieve pagoPA receipt by fingerprint",
- "operationId": "getPagopaReceipt",
+ "Customers"
+ ],
"security": [
{
- "oAuth2": [
- "pagopa:read"
- ]
+ "basicAuth": []
}
],
"parameters": [
{
- "name": "fingerprint",
+ "name": "customerId",
"in": "path",
- "description": "Pagopa fingerprint",
"required": true,
"schema": {
- "$ref": "#/components/schemas/Fingerprint"
- }
+ "type": "string",
+ "format": "uuid"
+ },
+ "description": "UUID del cliente da eliminare."
}
],
"responses": {
- "200": {
- "description": "Pagopa receipt retrieved",
- "content": {
- "application/pdf": {
- "schema": {
- "type": "string",
- "format": "binary"
- }
- }
- }
- },
- "400": {
- "$ref": "#/components/responses/BadRequest"
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
+ "204": {
+ "description": "Cliente e metodo di pagamento associato eliminati con successo."
},
"404": {
"$ref": "#/components/responses/NotFound"
},
- "500": {
- "$ref": "#/components/responses/InternalServerError"
+ "default": {
+ "$ref": "#/components/responses/DefaultError"
}
- },
- "tags": [
- "pagoPA",
- "Documents"
- ]
+ }
}
},
- "/payments": {
+ "/refunds": {
"get": {
- "summary": "Get payments",
- "description": "Retrieve payments made through FlowPay",
- "operationId": "getPayments",
+ "summary": "Elenca tutti i rimborsi creati",
+ "description": "Restituisce un elenco paginato dei rimborsi creati (uno per sessione di pagamento).",
+ "operationId": "listRefunds",
+ "tags": [
+ "Refunds"
+ ],
"security": [
{
- "oAuth2": [
- "payments:read"
- ]
+ "basicAuth": []
}
],
"parameters": [
{
- "name": "accountID",
- "in": "query",
- "description": "Account identifier",
- "required": false,
- "schema": {
- "type": "string",
- "format": "uuid"
- },
- "x-faker": "datatype.uuid"
- },
- {
- "name": "from",
- "in": "query",
- "description": "Start date of the payments to retrieve. If not specified, the default value is the first day of the current month",
- "required": false,
- "schema": {
- "type": "string",
- "format": "iso8601"
- },
- "x-faker": "date.past"
+ "$ref": "#/components/parameters/LimitParam"
},
{
- "name": "to",
- "in": "query",
- "description": "End date of the payments to retrieve. If not specified, the default value is the last day of the current month",
- "required": false,
- "schema": {
- "type": "string",
- "format": "iso8601"
- },
- "x-faker": "date.future"
+ "$ref": "#/components/parameters/OffsetParam"
}
],
"responses": {
"200": {
- "description": "Payments",
+ "description": "Elenco paginato dei rimborsi.",
"content": {
"application/json": {
"schema": {
@@ -5576,12 +1005,11 @@
"$ref": "#/components/schemas/PaginatedResult"
},
{
- "type": "object",
"properties": {
"items": {
"type": "array",
"items": {
- "$ref": "#/components/schemas/Payment"
+ "$ref": "#/components/schemas/Refund"
}
}
}
@@ -5594,906 +1022,854 @@
"400": {
"$ref": "#/components/responses/BadRequest"
},
- "401": {
- "$ref": "#/components/responses/Unauthorized"
+ "default": {
+ "$ref": "#/components/responses/DefaultError"
+ }
+ }
+ },
+ "post": {
+ "summary": "Crea un rimborso",
+ "description": "Effettua un rimborso per una sessione di pagamento specificata. Il rimborso può essere parziale o totale, a seconda dell'importo specificato. In ogni caso, l'importo del rimborso non può superare l'importo della sessione di pagamento. Il rimborso viene accredito sul metodo di pagamento utilizzato nella sessione di pagamento originale.",
+ "operationId": "createRefund",
+ "tags": [
+ "Refunds"
+ ],
+ "security": [
+ {
+ "basicAuth": []
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "sessionId": {
+ "type": "string",
+ "format": "uuid",
+ "description": "ID della sessione di pagamento per cui creare il rimborso."
+ },
+ "amount": {
+ "type": "number",
+ "format": "decimal",
+ "minimum": 0.01,
+ "description": "Importo del rimborso in formato decimale (es. 10.50). Deve essere minore o uguale all'importo della sessione di pagamento."
+ },
+ "reason": {
+ "$ref": "#/components/schemas/RefundReason"
+ }
+ },
+ "required": [
+ "sessionId",
+ "amount",
+ "reason"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "description": "Rimborso creato.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Refund"
+ }
+ }
+ }
+ },
+ "400": {
+ "$ref": "#/components/responses/BadRequest"
},
- "403": {
- "$ref": "#/components/responses/Forbidden"
+ "409": {
+ "$ref": "#/components/responses/Conflict"
},
- "500": {
- "$ref": "#/components/responses/InternalServerError"
+ "default": {
+ "$ref": "#/components/responses/DefaultError"
}
- },
- "tags": [
- "Payments"
- ]
+ }
}
},
- "/payments/{paymentID}": {
+ "/refunds/{refundId}": {
"get": {
- "summary": "Get payment details",
- "description": "Retrieve details of a specific payment",
- "operationId": "getPayment",
+ "summary": "Recupera un rimborso",
+ "description": "Restituisce i dettagli di un rimborso. È possibile richiedere la risposta in formato PDF, in questo caso verrà prodotto un documento che include i dettagli del rimborso che può essere utilizzato come attestazione del rimborso.",
+ "operationId": "getRefundById",
+ "tags": [
+ "Refunds"
+ ],
"security": [
{
- "oAuth2": [
- "payments:read"
- ]
+ "basicAuth": []
}
],
"parameters": [
{
- "name": "paymentID",
+ "name": "refundId",
"in": "path",
- "description": "Payment identifier",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
},
- "x-faker": "datatype.uuid"
+ "description": "UUID del rimborso."
+ },
+ {
+ "name": "Accept",
+ "in": "header",
+ "required": false,
+ "schema": {
+ "type": "string",
+ "enum": [
+ "application/json",
+ "application/pdf"
+ ],
+ "default": "application/json"
+ },
+ "description": "Specifica il formato di risposta; usare application/pdf per ottenere un documento PDF con QR code e dettagli del rimborso."
}
],
"responses": {
"200": {
- "description": "Payment details",
+ "description": "Dettagli del rimborso in JSON o documento PDF se richiesto con Accept: application/pdf.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Payment"
+ "$ref": "#/components/schemas/Refund"
+ }
+ },
+ "application/pdf": {
+ "schema": {
+ "type": "string",
+ "format": "binary"
}
}
}
},
- "400": {
- "$ref": "#/components/responses/BadRequest"
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
- },
"404": {
"$ref": "#/components/responses/NotFound"
},
- "500": {
- "$ref": "#/components/responses/InternalServerError"
+ "default": {
+ "$ref": "#/components/responses/DefaultError"
}
- },
- "tags": [
- "Payments"
- ]
+ }
}
- },
- "/proforma": {
+ }
+ },
+ "webhooks": {
+ "paymentWebhook": {
"post": {
- "summary": "Create proforma invoice",
- "description": "Create a proforma invoice to be paid by a customer",
- "operationId": "createProformaInvoice",
- "security": [
- {
- "oAuth2": [
- "invoice:write"
- ]
- }
+ "summary": "Endpoint per webhook di aggiornamento pagamento",
+ "operationId": "paymentWebhook",
+ "description": "Riceve notifiche relative allo stato del pagamento (es. succeeded, failed).",
+ "tags": [
+ "Payments"
],
"requestBody": {
- "description": "Proforma invoice to create",
+ "description": "Payload inviato dal provider di pagamento contenente dettagli dell'evento.",
+ "required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "number": {
+ "paymentId": {
"type": "string",
- "description": "Proforma number. This field is optional, if not provided, FlowPay will generate a unique uuid",
- "example": "PINV-123456",
- "x-faker": "lorem.sentence"
- },
- "invoice": {
- "$ref": "#/components/schemas/Fingerprint",
- "description": "Invoice fingerprint to which the proforma invoice is related. Note that the invoice must be in a state that allows the creation of a proforma invoice (e.g. not already paid). If the invoice already has a proforma invoice, the request will fail"
- },
- "creditor": {
- "description": "Creditor VAT number, must be a company",
- "oneOf": [
- {
- "$ref": "#/components/schemas/CompanyVATNumber"
- }
- ]
- },
- "debtor": {
- "description": "Debtor VAT number, could be a company or a person",
- "oneOf": [
- {
- "$ref": "#/components/schemas/CompanyVATNumber"
- },
- {
- "$ref": "#/components/schemas/ConsumerNationalID"
- }
- ]
- },
- "terms": {
- "type": "array",
- "description": "Payment terms used to generate payment requests",
- "items": {
- "$ref": "#/components/schemas/DocumentTerm"
- }
+ "description": "Identificativo del pagamento associato all'evento."
},
- "items": {
- "type": "array",
- "description": "Invoice items",
- "items": {
- "$ref": "#/components/schemas/DocumentItem"
- }
+ "event": {
+ "type": "string",
+ "description": "Tipo di evento scatenato (es. `payment_succeeded`)."
},
- "attachments": {
- "type": "array",
- "description": "Invoice attachments",
- "items": {
- "$ref": "#/components/schemas/DocumentAttachment"
- }
+ "data": {
+ "type": "object",
+ "description": "Oggetto contenente dati aggiuntivi relativi all'evento."
}
- },
- "required": [
- "creditor",
- "debtor",
- "terms"
- ]
+ }
}
}
}
},
"responses": {
- "201": {
- "description": "Proforma invoice created",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Invoice"
- }
- }
- }
- },
- "400": {
- "$ref": "#/components/responses/BadRequest"
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
- },
- "403": {
- "$ref": "#/components/responses/Forbidden"
+ "200": {
+ "description": "Notifica webhook ricevuta correttamente."
},
- "409": {
- "description": "Proforma invoice already exists for invoice",
+ "default": {
+ "description": "Errore nell'elaborazione del webhook.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "statusCode": {
- "$ref": "#/components/schemas/StatusCode"
- },
- "requestID": {
- "$ref": "#/components/schemas/RequestID"
+ "code": {
+ "type": "integer",
+ "description": "Codice di errore."
},
"message": {
"type": "string",
- "description": "Error message",
- "example": "Proforma invoice already exists for invoice 123456"
- },
- "additionalInfo": {
- "type": "object",
- "description": "Additional information about the error",
- "properties": {
- "existingProforma": {
- "$ref": "#/components/schemas/Fingerprint"
- }
- }
+ "description": "Descrizione dell'errore."
}
- },
- "required": [
- "statusCode",
- "requestID",
- "message",
- "additionalInfo"
- ]
+ }
}
}
}
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
}
- },
+ }
+ }
+ },
+ "customerDataDeletionWebhook": {
+ "post": {
+ "summary": "Notifica cancellazione dati cliente",
+ "description": "Webhook inviato al partner quando un cliente richiede la cancellazione dei propri dati da FlowPay in virtù del GDPR o altra normativa.",
+ "operationId": "customerDataDeletion",
"tags": [
- "Invoices",
- "Documents"
- ]
- },
- "get": {
- "summary": "List proforma invoices",
- "description": "Retrieve proforma invoices list according to the specified filters",
- "operationId": "getProformaInvoices",
- "security": [
- {
- "oAuth2": [
- "invoice:read"
- ]
- }
+ "Customers"
],
- "parameters": [
- {
- "name": "from",
- "in": "query",
- "description": "Start date of the proforma invoices to retrieve. If not specified, the default value is the first day of the current month",
- "required": false,
- "schema": {
- "type": "string",
- "format": "iso8601"
- },
- "x-faker": "date.past"
- },
- {
- "name": "to",
- "in": "query",
- "description": "End date of the proforma invoices to retrieve. If not specified, the default value is the last day of the current month",
- "required": false,
- "schema": {
- "type": "string",
- "format": "iso8601"
- },
- "x-faker": "date.future"
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "description": "Payload inviato al partner quando un cliente richiede la cancellazione dei propri dati.",
+ "properties": {
+ "customerId": {
+ "type": "string",
+ "format": "uuid",
+ "description": "UUID del cliente che ha richiesto la cancellazione dei propri dati."
+ },
+ "requestedAt": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Timestamp ISO 8601 in cui il cliente ha richiesto la cancellazione."
+ }
+ },
+ "required": [
+ "customerId",
+ "requestedAt"
+ ]
+ }
+ }
}
- ],
+ },
"responses": {
"200": {
- "description": "Proforma invoices",
- "content": {
- "application/json": {
- "schema": {
- "allOf": [
- {
- "$ref": "#/components/schemas/PaginatedResult"
- },
- {
- "type": "object",
- "properties": {
- "items": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Invoice"
- }
- }
- }
- }
- ]
- }
- }
- }
- },
- "400": {
- "$ref": "#/components/responses/BadRequest"
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
+ "description": "Partner ha ricevuto correttamente la notifica di cancellazione."
},
- "403": {
- "$ref": "#/components/responses/Forbidden"
- },
- "500": {
- "$ref": "#/components/responses/InternalServerError"
+ "default": {
+ "$ref": "#/components/responses/DefaultError"
}
- },
- "tags": [
- "Invoices",
- "Documents"
- ]
+ }
+ }
+ }
+ },
+ "components": {
+ "securitySchemes": {
+ "basicAuth": {
+ "type": "http",
+ "scheme": "basic",
+ "description": "Utilizzare ClientID (UUID) come username e API Key come password."
}
},
- "/proforma/{fingerprint}": {
- "get": {
- "summary": "Get proforma details",
- "description": "Retrieve a proforma invoice details",
- "operationId": "getProformaInvoice",
- "security": [
- {
- "oAuth2": [
- "invoice:read"
- ]
+ "parameters": {
+ "LimitParam": {
+ "name": "limit",
+ "in": "query",
+ "required": false,
+ "schema": {
+ "type": "integer",
+ "default": 20,
+ "description": "Numero massimo di elementi per pagina."
+ }
+ },
+ "OffsetParam": {
+ "name": "offset",
+ "in": "query",
+ "required": false,
+ "schema": {
+ "type": "integer",
+ "default": 0,
+ "description": "Numero di elementi da saltare."
+ }
+ }
+ },
+ "responses": {
+ "BadRequest": {
+ "description": "Richiesta non valida.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "description": "Codice di errore."
+ },
+ "message": {
+ "type": "string",
+ "description": "Descrizione dell'errore."
+ }
+ },
+ "required": [
+ "code",
+ "message"
+ ]
+ }
}
- ],
- "parameters": [
- {
- "name": "fingerprint",
- "in": "path",
- "description": "Proforma invoice fingerprint",
- "required": true,
+ }
+ },
+ "NotFound": {
+ "description": "Risorsa non trovata.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "description": "Codice di errore."
+ },
+ "message": {
+ "type": "string",
+ "description": "Descrizione dell'errore."
+ }
+ },
+ "required": [
+ "code",
+ "message"
+ ]
+ }
+ }
+ }
+ },
+ "Conflict": {
+ "description": "Conflitto nello stato della risorsa.",
+ "content": {
+ "application/json": {
"schema": {
- "$ref": "#/components/schemas/Fingerprint"
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "description": "Codice di errore."
+ },
+ "message": {
+ "type": "string",
+ "description": "Descrizione dell'errore."
+ }
+ },
+ "required": [
+ "code",
+ "message"
+ ]
}
}
- ],
- "responses": {
- "200": {
- "description": "Proforma invoice",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Invoice"
+ }
+ },
+ "DefaultError": {
+ "description": "Errore inatteso.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "description": "Codice di errore."
+ },
+ "message": {
+ "type": "string",
+ "description": "Descrizione dell'errore."
}
- }
+ },
+ "required": [
+ "code",
+ "message"
+ ]
}
+ }
+ }
+ }
+ },
+ "schemas": {
+ "Customer": {
+ "type": "object",
+ "description": "Informazioni sul cliente registrato da una richiesta di pagamento.",
+ "properties": {
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "description": "Identificativo univoco del cliente."
},
- "400": {
- "$ref": "#/components/responses/BadRequest"
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
+ "name": {
+ "type": "string",
+ "description": "Nome completo così come fornito dall'utente."
},
- "403": {
- "$ref": "#/components/responses/Forbidden"
+ "providedName": {
+ "type": "string",
+ "description": "Nome completo così come fornito nella richiesta di pagamento."
},
- "404": {
- "$ref": "#/components/responses/NotFound"
+ "phoneNumber": {
+ "$ref": "#/components/schemas/PhoneNumber",
+ "description": "Numero di telefono cellulare del cliente registrato. Questo campo è presente solo se il numero di telefono è stato fornito nella richiesta di pagamento."
},
- "500": {
- "$ref": "#/components/responses/InternalServerError"
+ "registrationRequestId": {
+ "type": "string",
+ "format": "uuid",
+ "description": "UUID della richiesta di pagamento con cui il cliente è stato registrato."
}
},
- "tags": [
- "Invoices",
- "Documents"
+ "required": [
+ "id",
+ "userFullName",
+ "partnerFullName",
+ "registrationRequestId"
]
},
- "delete": {
- "summary": "Delete proforma invoice",
- "description": "Delete a proforma invoice. This operation is allowed only if the proforma invoice is not yet paid",
- "operationId": "deleteProformaInvoice",
- "security": [
- {
- "oAuth2": [
- "invoice:write"
- ]
- }
- ],
- "parameters": [
- {
- "name": "fingerprint",
- "in": "path",
- "description": "Proforma invoice fingerprint",
- "required": true,
- "schema": {
- "type": "string"
- },
- "x-faker": "finance.iban"
- }
- ],
- "responses": {
- "204": {
- "description": "Proforma invoice deleted"
+ "Consumer": {
+ "type": "object",
+ "properties": {
+ "phoneNumber": {
+ "type": "string",
+ "description": "Numero di telefono cellulare della persona."
},
- "400": {
- "$ref": "#/components/responses/BadRequest"
+ "name": {
+ "type": "string",
+ "description": "Nome della persona."
},
- "401": {
- "$ref": "#/components/responses/Unauthorized"
+ "surname": {
+ "type": "string",
+ "description": "Cognome della persona."
},
- "403": {
- "$ref": "#/components/responses/Forbidden"
+ "tin": {
+ "type": "string",
+ "description": "Tax Identification Number della persona."
},
- "404": {
- "$ref": "#/components/responses/NotFound"
+ "residenceAddress": {
+ "type": "string",
+ "description": "Indirizzo di residenza della persona."
},
- "500": {
- "$ref": "#/components/responses/InternalServerError"
+ "email": {
+ "type": "string",
+ "format": "email",
+ "description": "Email della persona."
}
},
- "tags": [
- "Invoices",
- "Documents"
+ "required": [
+ "phoneNumber"
]
- }
- },
- "/transactions": {
- "get": {
- "summary": "Get transactions",
- "description": "Retrieve transactions of a specific account",
- "operationId": "getTransactions",
- "security": [
- {
- "oAuth2": [
- "transactions:read"
- ]
- }
+ },
+ "PhoneNumber": {
+ "type": "string",
+ "description": "Numero di telefono cellulare in formato E.164 (es. +391234567890).",
+ "pattern": "^\\+?[1-9]\\d{1,14}$"
+ },
+ "ConsumerTIN": {
+ "type": "string",
+ "description": "Codice fiscale italiano (16 caratteri alfanumerici).",
+ "pattern": "^[A-Z]{6}[0-9]{2}[A-Z][0-9]{2}[A-Z][0-9]{3}[A-Z]$"
+ },
+ "BusinessTIN": {
+ "type": "string",
+ "description": "Partita IVA europea (formato: codice paese ISO 2 lettere seguito da 8-12 caratteri alfanumerici).",
+ "pattern": "^[A-Z]{2}[0-9A-Z]{8,12}$"
+ },
+ "IBAN": {
+ "type": "string",
+ "description": "IBAN europeo (formato: codice paese ISO 2 lettere, seguito da 2 cifre di controllo e fino a 30 caratteri alfanumerici).",
+ "pattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{1,30}$"
+ },
+ "PaymentCallbackEnum": {
+ "type": "string",
+ "enum": [
+ "success",
+ "error",
+ "cancel"
],
- "parameters": [
- {
- "name": "IBAN",
- "in": "query",
- "description": "Account IBAN",
- "required": false,
- "schema": {
- "type": "string"
- },
- "x-faker": "finance.iban"
- },
- {
- "name": "currency",
- "in": "query",
- "description": "Currency of the transactions to retrieve. If not specified, the default value is EUR",
- "required": false,
- "schema": {
- "type": "string"
- },
- "x-faker": "finance.currencyCode"
+ "description": "Tipi di callback disponibili per il pagamento."
+ },
+ "PaymentMethod": {
+ "type": "object",
+ "description": "Metodo di pagamento tokenizzato.",
+ "properties": {
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "description": "Identificativo univoco del metodo di pagamento."
},
- {
- "name": "from",
- "in": "query",
- "description": "Start date of the period to retrieve transactions for. If not specified, the default value is the first day of the current month",
- "required": false,
- "schema": {
- "type": "string",
- "format": "iso8601"
- },
- "x-faker": "date.past"
+ "type": {
+ "type": "string",
+ "enum": [
+ "card",
+ "bankAccount"
+ ],
+ "description": "Tipo di metodo di pagamento. Può essere 'card' per carte di credito/debito o 'bankAccount' per conti bancari."
},
- {
- "name": "to",
- "in": "query",
- "description": "End date of the period to retrieve transactions for. If not specified, the default value is the current date",
- "required": false,
- "schema": {
- "type": "string",
- "format": "iso8601"
- },
- "x-faker": "date.future"
+ "tokenizationDate": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Data e ora di tokenizzazione del metodo."
},
- {
- "name": "page",
- "in": "query",
- "description": "Page number to retrieve. If not specified, the default value is 1",
- "required": false,
- "schema": {
- "type": "integer",
- "format": "int32"
- },
- "x-faker": "random.number"
+ "enabled": {
+ "type": "boolean",
+ "description": "Indica se il metodo di pagamento è abilitato."
},
- {
- "name": "size",
- "in": "query",
- "description": "Number of transactions to retrieve. If not specified, the default value is 10",
- "required": false,
- "schema": {
- "type": "integer",
- "format": "int32"
- },
- "x-faker": "random.number"
- }
- ],
- "tags": [
- "Transactions"
- ],
- "responses": {
- "200": {
- "description": "Transactions list",
- "content": {
- "application/json": {
- "schema": {
- "allOf": [
- {
- "$ref": "#/components/schemas/PaginatedResult"
- },
- {
- "type": "object",
- "properties": {
- "items": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Transaction"
- }
- }
- }
- }
- ]
- }
- }
- }
+ "paymentSessionId": {
+ "type": "string",
+ "format": "uuid",
+ "description": "UUID della sessione di pagamento associata a questo metodo."
},
- "400": {
- "$ref": "#/components/responses/BadRequest"
+ "paymentRequestId": {
+ "type": "string",
+ "format": "uuid",
+ "description": "UUID della richiesta di pagamento a cui è collegato."
},
- "401": {
- "$ref": "#/components/responses/Unauthorized"
+ "methodIdentifier": {
+ "type": "string"
},
- "403": {
- "$ref": "#/components/responses/Forbidden"
+ "issuer": {
+ "type": "string",
+ "description": "Nome dell'issuer o emittente del metodo di pagamento (es. banca o circuito carta)."
},
- "500": {
- "$ref": "#/components/responses/InternalServerError"
+ "issuerLogo": {
+ "type": "string",
+ "format": "uri",
+ "description": "URL del logo dell'issuer o emittente del metodo di pagamento."
}
- }
- }
- },
- "/transactions/{transactionID}": {
- "get": {
- "summary": "Get transaction details",
- "description": "Retrieve details of a specific transaction. If the transactions has been originated by a payment authorized using FlowPay, the payment details are included in the response, but only if the token used to call the API has the `payment:read` scope.",
- "operationId": "getTransaction",
- "security": [
+ },
+ "oneOf": [
{
- "oAuth2": [
- "transactions:read"
- ]
- }
- ],
- "parameters": [
+ "title": "Card",
+ "properties": {
+ "type": {
+ "const": "card"
+ },
+ "methodIdentifier": {
+ "$ref": "#/components/schemas/MaskedPan"
+ }
+ }
+ },
{
- "name": "transactionID",
- "in": "path",
- "description": "Transaction identifier",
- "required": true,
- "schema": {
- "type": "string",
- "format": "uuid"
- },
- "x-faker": "datatype.uuid"
- }
- ],
- "responses": {
- "200": {
- "description": "Transaction details.",
- "content": {
- "application/json": {
- "schema": {
- "allOf": [
- {
- "$ref": "#/components/schemas/Transaction"
- },
- {
- "type": "object",
- "description": "If the transactions has been originated by a payment authorized using FlowPay, the payment details are included in the response. This field is present only if the token used to call the API has the `payment:read` scope.",
- "properties": {
- "payment": {
- "$ref": "#/components/schemas/Payment"
- }
- }
- }
- ]
- }
+ "title": "Bank Account",
+ "properties": {
+ "type": {
+ "const": "bankAccount"
+ },
+ "methodIdentifier": {
+ "$ref": "#/components/schemas/MaskedIBAN"
}
}
+ }
+ ],
+ "required": [
+ "id",
+ "type",
+ "tokenizationDate",
+ "enabled",
+ "paymentSessionId",
+ "methodIdentifier"
+ ]
+ },
+ "PaymentRequest": {
+ "type": "object",
+ "properties": {
+ "requestId": {
+ "type": "string",
+ "format": "uuid",
+ "description": "Identificativo univoco della richiesta di pagamento."
},
- "400": {
- "$ref": "#/components/responses/BadRequest"
+ "link": {
+ "type": "string",
+ "format": "uri",
+ "description": "Link al checkout per il pagamento"
},
- "401": {
- "$ref": "#/components/responses/Unauthorized"
+ "createdAt": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Timestamp ISO 8601 di creazione della richiesta di pagamento."
},
- "403": {
- "$ref": "#/components/responses/Forbidden"
+ "amount": {
+ "type": "number",
+ "format": "decimal",
+ "minimum": 0.01,
+ "description": "Importo totale del pagamento (es. 10.50)."
},
- "404": {
- "$ref": "#/components/responses/NotFound"
+ "currency": {
+ "type": "string",
+ "description": "Valuta utilizzata (es. 'EUR')."
},
- "500": {
- "$ref": "#/components/responses/InternalServerError"
- }
- },
- "tags": [
- "Transactions"
- ]
- }
- },
- "/transfers": {
- "get": {
- "summary": "Get transfers",
- "description": "Retrieve transfers document list",
- "operationId": "getTransfers",
- "security": [
- {
- "oAuth2": [
- "transfers:read"
- ]
- }
- ],
- "parameters": [
- {
- "name": "from",
- "in": "query",
- "description": "Start date of the period to retrieve transfers for. If not specified, the default value is the first day of the current month",
- "required": false,
- "schema": {
+ "payerId": {
+ "type": "string",
+ "format": "uuid",
+ "description": "ID univoco dell’entità che ha avviato la richiesta di pagamento (può coincidere con debtorId se non diversamente specificato)."
+ },
+ "debtorId": {
+ "type": "string",
+ "format": "uuid",
+ "description": "ID del debitore effettivo. Se non valorizzato, verrà usato lo stesso `payerId`."
+ },
+ "attachments": {
+ "type": "array",
+ "items": {
"type": "string",
- "format": "iso8601"
+ "format": "uuid",
+ "description": "UUID di file allegati visibili al pagatore nel checkout."
},
- "x-faker": "date.past"
+ "description": "Elenco di UUID dei file allegati visibili al pagatore."
},
- {
- "name": "to",
- "in": "query",
- "description": "End date of the period to retrieve transfers for. If not specified, the default value is the current date",
- "required": false,
- "schema": {
+ "privateAttachments": {
+ "type": "array",
+ "items": {
"type": "string",
- "format": "iso8601"
+ "format": "uuid",
+ "description": "UUID di file allegati privati (visibili solo a FlowPay per controlli interni)."
},
- "x-faker": "date.future"
+ "description": "Elenco di UUID dei file riservati per controlli di conformità (non mostrati al pagatore)."
},
- {
- "name": "page",
- "in": "query",
- "description": "Page number to retrieve. If not specified, the default value is 1",
- "required": false,
- "schema": {
- "type": "integer",
- "format": "int32"
- },
- "x-faker": "random.number"
+ "title": {
+ "type": "string",
+ "minLength": 3,
+ "maxLength": 50,
+ "description": "Titolo sintetico del pagamento, mostrato al pagatore."
},
- {
- "name": "size",
- "in": "query",
- "description": "Number of transfers to retrieve. If not specified, the default value is 10",
- "required": false,
- "schema": {
- "type": "integer",
- "format": "int32"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Transfer documents list",
- "content": {
- "application/json": {
- "schema": {
- "allOf": [
- {
- "$ref": "#/components/schemas/PaginatedResult"
- },
- {
- "type": "object",
- "properties": {
- "items": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Transfer"
- }
- }
- }
- }
- ]
- }
- }
- }
+ "description": {
+ "type": "string",
+ "minLength": 5,
+ "maxLength": 255,
+ "description": "Descrizione estesa del pagamento, visibile al pagatore."
},
- "400": {
- "$ref": "#/components/responses/BadRequest"
+ "remittanceInformation": {
+ "type": "string",
+ "minLength": 5,
+ "maxLength": 100,
+ "description": "Informazioni di rimessa (ad es. causale), visibili sia al pagatore che al beneficiario."
},
- "401": {
- "$ref": "#/components/responses/Unauthorized"
+ "allowRemittanceChange": {
+ "type": "boolean",
+ "default": false,
+ "description": "Se `true`, il pagatore può modificare le informazioni di rimessa in fase di pagamento."
},
- "403": {
- "$ref": "#/components/responses/Forbidden"
+ "savePaymentMethod": {
+ "type": "boolean",
+ "default": false,
+ "description": "Se `true`, il metodo di pagamento scelto viene salvato e tokenizzato per futuri utilizzi."
},
- "500": {
- "$ref": "#/components/responses/InternalServerError"
- }
- },
- "tags": [
- "Transfers"
- ]
- },
- "post": {
- "summary": "Create transfer",
- "description": "Create a new transfer document",
- "operationId": "createTransfer",
- "security": [
- {
- "oAuth2": [
- "transfers:write"
- ]
- }
- ],
- "requestBody": {
- "description": "Transfer details",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "amount": {
- "type": "number",
- "format": "float",
- "description": "Amount of the transfer",
- "example": 100.34,
- "x-faker": "finance.amount"
- },
- "currency": {
- "type": "string",
- "description": "Currency of the transfer",
- "example": "EUR",
- "default": "EUR",
- "x-faker": "finance.currencyCode"
- },
- "remittance": {
- "type": "string",
- "description": "Remittance information of the SEPA Credit Transfer",
- "example": "Pizza at Pizzeria da Mario. Thank you!",
- "x-faker": "lorem.sentence"
- },
- "creditor": {
- "oneOf": [
- {
- "$ref": "#/components/schemas/ConsumerNationalID"
- },
- {
- "$ref": "#/components/schemas/CompanyVATNumber"
- }
- ]
- },
- "debtor": {
- "oneOf": [
- {
- "$ref": "#/components/schemas/ConsumerNationalID"
- },
- {
- "$ref": "#/components/schemas/CompanyVATNumber"
- }
- ]
- }
- },
- "required": [
- "amount",
- "remittance",
- "creditor",
- "debtor"
- ]
- }
- }
+ "paymentMethod": {
+ "description": "Oggetto `PaymentMethod` associato a questo pagamento (se `savePaymentMethod` è `true`, qui troverai i dati del metodo tokenizzato).",
+ "$ref": "#/components/schemas/PaymentMethod"
},
- "required": true
- },
- "responses": {
- "201": {
- "description": "Transfer created",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Transfer"
- }
- }
- }
+ "redirectUrl": {
+ "type": "string",
+ "format": "uri",
+ "description": "URL verso cui l’utente viene reindirizzato al termine del pagamento, con query param `status` in {\"success\",\"error\",\"cancel\"}."
},
- "400": {
- "$ref": "#/components/responses/BadRequest"
+ "callbackUrl": {
+ "type": "string",
+ "format": "uri",
+ "description": "URL per le notifiche server-to-server sullo stato del pagamento."
},
- "401": {
- "$ref": "#/components/responses/Unauthorized"
+ "customerId": {
+ "type": "string",
+ "format": "uuid",
+ "description": "UUID del cliente associato a questa richiesta di pagamento."
},
- "403": {
- "$ref": "#/components/responses/Forbidden"
+ "refundId": {
+ "type": "string",
+ "format": "uuid",
+ "description": "UUID del rimborso associato a questa richiesta, se presente."
},
- "500": {
- "$ref": "#/components/responses/InternalServerError"
+ "newCustomer": {
+ "type": "boolean",
+ "default": false,
+ "description": "Indica se il cliente è stato registrato per la prima volta tramite questa richiesta di pagamento."
}
},
- "tags": [
- "Transfers",
- "Documents"
+ "required": [
+ "requestId",
+ "createdAt",
+ "amount",
+ "customerId"
]
- }
- },
- "/transfers/{transferID}": {
- "get": {
- "summary": "Get transfer details",
- "description": "Retrieve transfer document details",
- "operationId": "getTransfer",
- "security": [
- {
- "oAuth2": [
- "transfers:read"
- ]
- }
- ],
- "parameters": [
- {
- "name": "transferID",
- "in": "path",
- "description": "Transfer ID",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
+ },
+ "PaymentRequestStatus": {
+ "type": "string",
+ "enum": [
+ "pending",
+ "rejected",
+ "succeeded",
+ "onHold"
],
- "responses": {
- "200": {
- "description": "Transfer document details",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Transfer"
- }
- }
- }
- },
- "400": {
- "$ref": "#/components/responses/BadRequest"
- },
- "401": {
- "$ref": "#/components/responses/Unauthorized"
+ "description": "Stato della richiesta di pagamento."
+ },
+ "PaymentSessions": {
+ "type": "object",
+ "description": "Contiene la liste dei tentativi di pagamento e i relativi esisti",
+ "properties": {
+ "sessionId": {
+ "type": "string",
+ "format": "uuid",
+ "description": "Identificativo univoco della sessione di pagamento."
},
- "403": {
- "$ref": "#/components/responses/Forbidden"
+ "startedAt": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Data e ora di creazione della sessione in formato ISO 8601."
},
- "404": {
- "$ref": "#/components/responses/NotFound"
+ "endedAt": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Data e ora di scadenza della sessione in formato ISO 8601."
},
- "500": {
- "$ref": "#/components/responses/InternalServerError"
+ "status": {
+ "type": "string",
+ "enum": [
+ "succeeded",
+ "pending",
+ "expired",
+ "failed",
+ "cancelled"
+ ],
+ "description": "Stato della sessione di pagamento."
}
},
- "tags": [
- "Transfers"
+ "required": [
+ "sessionId",
+ "createdAt",
+ "expiresAt",
+ "status"
]
},
- "delete": {
- "summary": "Delete transfer",
- "description": "Delete a transfer document that has not yet been executed",
- "operationId": "deleteTransfer",
- "security": [
- {
- "oAuth2": [
- "transfers:write"
- ]
- }
- ],
- "parameters": [
- {
- "name": "transferID",
- "in": "path",
- "description": "Transfer ID",
- "required": true,
- "schema": {
- "type": "string"
+ "MaskedPan": {
+ "type": "string",
+ "description": "PAN mascherato, formato tipico '**** **** **** 1234'.",
+ "pattern": "^\\*{4}\\s?\\*{4}\\s?\\*{4}\\s?\\d{4}$"
+ },
+ "MaskedIBAN": {
+ "type": "string",
+ "description": "IBAN mascherato: conserva le prime 4 lettere e le ultime 4 cifre, con asterischi nel mezzo (es. 'IT60 **** **** 1234').",
+ "pattern": "^[A-Z]{2}\\d{2}(?:\\s?\\*{4})+\\s?\\d{4}$"
+ },
+ "PaginatedResult": {
+ "type": "object",
+ "description": "Struttura di risposta comune per API che supportano la paginazione.",
+ "properties": {
+ "total": {
+ "type": "integer",
+ "description": "Numero totale di elementi disponibili."
+ },
+ "limit": {
+ "type": "integer",
+ "description": "Numero massimo di elementi restituiti nella singola pagina."
+ },
+ "offset": {
+ "type": "integer",
+ "description": "Numero di elementi saltati prima di questa pagina."
+ },
+ "count": {
+ "type": "integer",
+ "description": "Numero di elementi effettivamente restituiti in questa pagina."
+ },
+ "items": {
+ "type": "array",
+ "description": "Array di elementi della pagina corrente.",
+ "items": {
+ "type": "object",
+ "description": "Oggetto generico rappresentante un singolo elemento in una risposta paginata. Verrà esteso o referenziato da schemi specifici.",
+ "additionalProperties": true
}
}
+ },
+ "required": [
+ "total",
+ "limit",
+ "offset",
+ "count",
+ "items"
],
- "responses": {
- "204": {
- "description": "Transfer document deleted",
- "content": {
- "application/json": {
- "schema": {
- "type": "object"
- }
- }
- }
+ "additionalProperties": false
+ },
+ "Refund": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "description": "Identificativo univoco del rimborso."
},
- "400": {
- "$ref": "#/components/responses/BadRequest"
+ "sessionId": {
+ "type": "string",
+ "format": "uuid",
+ "description": "UUID della sessione di pagamento da rimborsare."
},
- "401": {
- "$ref": "#/components/responses/Unauthorized"
+ "amount": {
+ "type": "number",
+ "format": "decimal",
+ "minimum": 0.01,
+ "description": "Importo da rimborsare (intero o parziale)."
},
- "403": {
- "$ref": "#/components/responses/Forbidden"
+ "createdAt": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Data e ora di creazione del rimborso in formato ISO 8601."
},
- "404": {
- "$ref": "#/components/responses/NotFound"
+ "status": {
+ "type": "string",
+ "enum": [
+ "pending",
+ "succeeded",
+ "failed"
+ ],
+ "description": "Stato del rimborso."
+ },
+ "reason": {
+ "$ref": "#/components/schemas/RefundReason",
+ "description": "Motivo del rimborso."
+ },
+ "additionalInfo": {
+ "type": "string",
+ "description": "Informazioni aggiuntive sul rimborso visibili solo al partner"
+ },
+ "paymentMethodId": {
+ "type": "string",
+ "format": "uuid",
+ "description": "ID del metodo di pagamento utilizzato per il rimborso, se applicabile."
+ },
+ "customerId": {
+ "type": "string",
+ "format": "uuid",
+ "description": "ID del cliente associato al rimborso."
},
- "500": {
- "$ref": "#/components/responses/InternalServerError"
+ "emailStatus": {
+ "type": "string",
+ "enum": [
+ "notSent",
+ "sent",
+ "failed"
+ ],
+ "description": "Stato dell'invio dell'email di notifica al cliente. La notifica è inviata automaticamente al cliente al momento del rimborso solo se è stato fornito un indirizzo email valido durante la creazione della richiesta di pagamento ."
}
},
- "tags": [
- "Transfers"
+ "required": [
+ "sessionId",
+ "amount",
+ "createdAt",
+ "status",
+ "reason",
+ "paymentMethodId"
]
+ },
+ "RefundReason": {
+ "type": "string",
+ "enum": [
+ "customerRequest",
+ "fraudulentTransaction",
+ "technicalError",
+ "other"
+ ],
+ "description": "Motivo del rimborso."
}
}
}
diff --git a/redocly.yaml b/redocly.yaml
index 77c4070..c83ffd5 100644
--- a/redocly.yaml
+++ b/redocly.yaml
@@ -28,4 +28,49 @@ theme:
- lang: Python
disableSearch: false
requiredPropsFirst: true
- sortPropsAlphabetically: false
\ No newline at end of file
+ sortPropsAlphabetically: true
+ codeSamples:
+ languages:
+ - lang: curl
+ - lang: Node.js
+ - lang: Python
+ hideDownloadButton: false
+ mockServer:
+ description: "Mock server for testing purposes"
+ position: first
+ url: "https://mock.flowpay.it/v2s"
+ feedback:
+ type: mood
+
+
+
+
+ # theme:
+
+ # colorMode:
+ # default: system
+ # disableSwitch: false
+
+ # sidebar:
+ # backgroundColor: "#121212"
+ # textColor: "#e0e0e0"
+
+ # rightPanel:
+ # backgroundColor: "#1e1e1e"
+ # textColor: "#e0e0e0"
+
+ # typography:
+ # fontSize: "14px"
+ # links:
+ # color: "#8ab4f8"
+
+ # colors:
+ # primary:
+ # main: "#8ab4f8"
+ # text:
+ # primary: "#e0e0e0"
+ # secondary: "#cfcfcf"
+
+ # codeBlock:
+ # backgroundColor: "#1f1f1f"
+ # textColor: "#e0e0e0"
\ No newline at end of file
diff --git a/theme/components.html b/theme/components.html
new file mode 100644
index 0000000..0753cb8
--- /dev/null
+++ b/theme/components.html
@@ -0,0 +1,57 @@
+
+
+
+
Errore
+
+ è un messaggio di esempio per mostrare come appare un messaggio di avviso critico . Si prega di
+ prestare attenzione a questo messaggio, in quanto contiene informazioni importanti che potrebbero influenzare
+ il funzionamento del sistema o la sicurezza dei dati. Assicurati di leggere attentamente e seguire le
+ istruzioni fornite. Se hai domande o dubbi, contatta il supporto tecnico o l'amministratore del sistema per
+ ulteriori chiarimenti.
+
+
+
+
+
Info
+
+ Questo è un messaggio di esempio per mostrare come appare un messaggio di avviso informativo . Si prega
+ di prestare attenzione a questo messaggio, in quanto contiene informazioni utili che potrebbero migliorare
+ l'esperienza utente o fornire indicazioni su come utilizzare al meglio il sistema. Assicurati di leggere
+ attentamente e seguire le istruzioni fornite. Se hai domande o dubbi, contatta il supporto tecnico o
+ l'amministratore del sistema per ulteriori chiarimenti.
+
+
+
+
+
Attenzione
+
+ Questo è un messaggio di esempio per mostrare come appare un messaggio di avviso di avviso . Si prega
+ di prestare attenzione a questo messaggio, in quanto contiene informazioni importanti che potrebbero
+ influenzare il funzionamento del sistema o la sicurezza dei dati. Assicurati di leggere attentamente e
+ seguire le istruzioni fornite. Se hai domande o dubbi, contatta il supporto tecnico o l'amministratore del
+ sistema per ulteriori chiarimenti.
+
+
+
+
+
Consiglio
+
+ Questo è un messaggio di esempio per mostrare come appare un messaggio di avviso di avviso . Si prega
+ di prestare attenzione a questo messaggio, in quanto contiene informazioni importanti che potrebbero
+ influenzare il funzionamento del sistema o la sicurezza dei dati. Assicurati di leggere attentamente e
+ seguire le istruzioni fornite. Se hai domande o dubbi, contatta il supporto tecnico o l'amministratore del
+ sistema per ulteriori chiarimenti.
+
+
+
+
+
+
+
+ Questo è un messaggio di esempio per mostrare come appare un messaggio di avviso di avviso . Si prega
+ di prestare attenzione a questo messaggio, in quanto contiene informazioni importanti che potrebbero
+ influenzare il funzionamento del sistema o la sicurezza dei dati. Assicurati di leggere attentamente e
+ seguire le istruzioni fornite. Se hai domande o dubbi, contatta il supporto tecnico o l'amministratore del
+ sistema per ulteriori chiarimenti.
+
+
\ No newline at end of file
diff --git a/theme/darkmode.css b/theme/darkmode.css
new file mode 100644
index 0000000..e69de29
diff --git a/theme/messages.css b/theme/messages.css
new file mode 100644
index 0000000..29c9049
--- /dev/null
+++ b/theme/messages.css
@@ -0,0 +1,185 @@
+:root {
+ --alert-padding: 1rem;
+ --alert-margin: 1rem 0;
+ --alert-border-radius: 0.25rem;
+ --alert-font-size: 1rem;
+ --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
+
+ --color-warning: #ff9800;
+ --bg-warning: #fff8e1;
+ --emoji-warning: "⚠️";
+
+ --color-critical: #c62828;
+ --bg-critical: #ffebee;
+ --emoji-critical: "🛑";
+
+ --color-success: #388e3c;
+ --bg-success: #e8f5e9;
+ --emoji-success: "✅";
+
+ --color-info: #0288d1;
+ --bg-info: #e3f2fd;
+ --emoji-info: "ℹ️";
+}
+
+/* Stili per i messaggi di avviso */
+
+/* Avviso */
+.warning {
+ border-left: none;
+ border-top: 4px solid var(--color-warning);
+ background: linear-gradient(
+ 90deg,
+ var(--bg-warning) 0%,
+ var(--bg-warning) 100%
+ );
+ padding: var(--alert-padding);
+ margin: var(--alert-margin);
+ border-radius: 0.5rem;
+ box-shadow: var(--box-shadow);
+ font-size: var(--alert-font-size);
+ display: grid;
+ grid-template-columns: 1fr;
+ grid-gap: 0.75rem;
+ align-items: start;
+}
+.warning span {
+ font-size: 1.25em;
+ margin-right: 0.5rem;
+}
+.warning .title {
+ color: var(--color-warning);
+ font-weight: bold;
+ font-size: 1.125rem;
+ text-transform: uppercase;
+ letter-spacing: 0.05em;
+ margin: 0 0 0.5rem;
+ position: relative;
+ padding-left: 1.5rem;
+}
+.warning .title::before {
+ content: var(--emoji-warning);
+ position: absolute;
+ left: 0;
+ top: 0;
+ font-size: 1.25rem;
+}
+
+/* Avviso critico */
+.critical {
+ border-left: none;
+ border-top: 4px solid var(--color-critical);
+ background: linear-gradient(
+ 90deg,
+ var(--bg-critical) 0%,
+ var(--bg-critical) 100%
+ );
+ padding: var(--alert-padding);
+ margin: var(--alert-margin);
+ border-radius: 0.5rem;
+ box-shadow: var(--box-shadow);
+ font-size: var(--alert-font-size);
+ display: grid;
+ grid-template-columns: 1fr;
+ grid-gap: 0.75rem;
+ align-items: start;
+}
+.critical span {
+ font-size: 1.25em;
+ margin-right: 0.5rem;
+}
+.critical .title {
+ color: var(--color-critical);
+ font-weight: bold;
+ font-size: 1.125rem;
+ text-transform: uppercase;
+ letter-spacing: 0.05em;
+ margin: 0 0 0.5rem;
+ position: relative;
+ padding-left: 1.5rem;
+}
+.critical .title::before {
+ content: var(--emoji-critical);
+ position: absolute;
+ left: 0;
+ top: 0;
+ font-size: 1.25rem;
+}
+
+/* Avviso green */
+.success {
+ border-left: none;
+ border-top: 4px solid var(--color-success);
+ background: linear-gradient(
+ 90deg,
+ var(--bg-success) 0%,
+ var(--bg-success) 100%
+ );
+ padding: var(--alert-padding);
+ margin: var(--alert-margin);
+ border-radius: 0.5rem;
+ box-shadow: var(--box-shadow);
+ font-size: var(--alert-font-size);
+ display: grid;
+ grid-template-columns: 1fr;
+ grid-gap: 0.75rem;
+ align-items: start;
+}
+.success span {
+ font-size: 1.25em;
+ margin-right: 0.5rem;
+}
+.success .title {
+ color: var(--color-success);
+ font-weight: bold;
+ font-size: 1.125rem;
+ text-transform: uppercase;
+ letter-spacing: 0.05em;
+ margin: 0 0 0.5rem;
+ position: relative;
+ padding-left: 1.5rem;
+}
+.success .title::before {
+ content: var(--emoji-success);
+ position: absolute;
+ left: 0;
+ top: 0;
+ font-size: 1.25rem;
+}
+
+/* Avviso di informazione */
+.info {
+ border-left: none;
+ border-top: 4px solid var(--color-info);
+ background: linear-gradient(90deg, var(--bg-info) 0%, var(--bg-info) 100%);
+ padding: var(--alert-padding);
+ margin: var(--alert-margin);
+ border-radius: 0.5rem;
+ box-shadow: var(--box-shadow);
+ font-size: var(--alert-font-size);
+ display: grid;
+ grid-template-columns: 1fr;
+ grid-gap: 0.75rem;
+ align-items: start;
+}
+.info span {
+ font-size: 1.25em;
+ margin-right: 0.5rem;
+}
+.info .title {
+ color: var(--color-info);
+ font-weight: bold;
+ font-size: 1.125rem;
+ text-transform: uppercase;
+ letter-spacing: 0.05em;
+ margin: 0 0 0.5rem;
+ position: relative;
+ padding-left: 1.5rem;
+}
+.info .title::before {
+ content: var(--emoji-info);
+ position: absolute;
+ left: 0;
+ top: 0;
+ font-size: 1.25rem;
+}