Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
163 changes: 70 additions & 93 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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"
}
Comment on lines +3228 to 3230
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Allow technology field in composed paymentMethod branches

The new Technology.oneOf branches compose the discriminator object with payload schemas via allOf, but the referenced payload schemas (OpenbankingTechnology, CardPaymentMethodPayload, BPayTechnology) all have additionalProperties: false and do not declare technology. In JSON Schema composition this means a normal payload like {"technology":"openbanking","bank":"..."} fails validation because the second schema rejects technology, so the openbanking/card/BANCOMAT branches become effectively unreachable and only the saved-method branch can validate.

Useful? React with 👍 / 👎.

}
]
},
{
"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": [
Expand All @@ -3323,16 +3303,15 @@
},
"instant": {
"type": "boolean",
"default": true,
"description": "If true, requests an instant transfer when available."
},
"bank": {
"type": "string",
"description": "Bank identifier from /banks API"
}
},
"required": [
"bank"
],
"required": [],
"additionalProperties": false
},
"CardPaymentMethodPayload": {
Expand All @@ -3354,9 +3333,7 @@
}
},
"additionalProperties": false,
"required": [
"buyerPhoneNumber"
]
"required": []
},
"SDDPaymentMethodPayload": {
"type": "object",
Expand Down Expand Up @@ -4445,4 +4422,4 @@
}
}
}
}
}
Loading