From c9a27cc11ffe49b5b44e9a9403a647061eb251c4 Mon Sep 17 00:00:00 2001 From: Federico Giuntoli Date: Wed, 18 Feb 2026 14:02:36 +0100 Subject: [PATCH] Inserisci PaymentMethod in payment --- openapi.json | 163 ++++++++++++++++++++++----------------------------- 1 file changed, 70 insertions(+), 93 deletions(-) diff --git a/openapi.json b/openapi.json index a3c8439..84e5369 100644 --- a/openapi.json +++ b/openapi.json @@ -961,8 +961,7 @@ "description": "List of allowed payment technologies for this payment request. If not specified, all available technologies are allowed." }, "paymentMethod": { - "type": "object", - "description": "Payment method selection for the request. `tokenId` is optional and may be provided together with `technology` and payload fields when available.", + "description": "Payment method selection for the request.", "$ref": "#/components/schemas/Technology" }, "email": { @@ -3206,107 +3205,88 @@ "type": "string", "enum": [ "openbanking", - "wallet", - "sdd", - "externalCollection", "card", - "bancomatPay", - "bancomatPayDirect", - "pagoBancomat", - "samsungPay", - "escrow" + "bancomat_pay" ] - }, - "tokenId": { - "type": "string", - "format": "uuid", - "description": "Optional token identifier linked to the selected technology." - }, - "payload": { - "type": "object", - "description": "Technology-specific payload." } }, "oneOf": [ { - "title": "Openbanking", - "properties": { - "technology": { - "const": "openbanking" - } - } - }, - { - "title": "Wallet", - "properties": { - "technology": { - "const": "wallet" - } - } - }, - { - "title": "SDD", - "properties": { - "technology": { - "const": "sdd" - } - } - }, - { - "title": "External collection", - "properties": { - "technology": { - "const": "externalCollection" + "title": "Bank wire transfer", + "allOf": [ + { + "type": "object", + "properties": { + "technology": { + "const": "openbanking" + } + }, + "required": [ + "technology" + ] + }, + { + "$ref": "#/components/schemas/OpenbankingTechnology" } - } + ] }, { "title": "Card", - "properties": { - "technology": { - "const": "card" - } - } - }, - { - "title": "Bancomat pay", - "properties": { - "technology": { - "const": "bancomatPay" - } - } - }, - { - "title": "Bancomat pay direct", - "properties": { - "technology": { - "const": "bancomatPayDirect" - } - } - }, - { - "title": "Pago bancomat", - "properties": { - "technology": { - "const": "pagoBancomat" + "allOf": [ + { + "type": "object", + "properties": { + "technology": { + "const": "card" + } + }, + "required": [ + "technology" + ] + }, + { + "$ref": "#/components/schemas/CardPaymentMethodPayload" } - } + ] }, { - "title": "Samsung pay", - "properties": { - "technology": { - "const": "samsungPay" + "title": "BANCOMAT Pay", + "allOf": [ + { + "type": "object", + "properties": { + "technology": { + "const": "bancomat_pay" + } + }, + "required": [ + "technology" + ] + }, + { + "$ref": "#/components/schemas/BPayTechnology" } - } + ] }, { - "title": "Escrow", - "properties": { - "technology": { - "const": "escrow" + "title": "Use saved payment method", + "description": "Reference a saved payment method by ID.", + "allOf": [ + { + "type": "object", + "properties": { + "methodId": { + "type": "string", + "format": "uuid", + "description": "Identifier of the payment method to reuse (e.g. a saved wallet or AIS account)." + } + }, + "required": [ + "technology", + "methodId" + ] } - } + ] } ], "required": [ @@ -3323,6 +3303,7 @@ }, "instant": { "type": "boolean", + "default": true, "description": "If true, requests an instant transfer when available." }, "bank": { @@ -3330,9 +3311,7 @@ "description": "Bank identifier from /banks API" } }, - "required": [ - "bank" - ], + "required": [], "additionalProperties": false }, "CardPaymentMethodPayload": { @@ -3354,9 +3333,7 @@ } }, "additionalProperties": false, - "required": [ - "buyerPhoneNumber" - ] + "required": [] }, "SDDPaymentMethodPayload": { "type": "object", @@ -4445,4 +4422,4 @@ } } } -} +} \ No newline at end of file