+source +destination in payments

This commit is contained in:
Stephan D
2026-03-10 19:15:20 +01:00
parent 9c2b3bf8bd
commit e5b4de5d48
16 changed files with 716 additions and 56 deletions

View File

@@ -116,6 +116,51 @@ components:
description: Unique identifier of the wallet.
type: string
BankAccountEndpoint:
description: Domestic bank-account payout endpoint.
type: object
additionalProperties: false
required:
- recipientName
- inn
- kpp
- bankName
- bik
- accountNumber
- correspondentAccount
properties:
recipientName:
type: string
inn:
type: string
kpp:
type: string
bankName:
type: string
bik:
type: string
accountNumber:
type: string
correspondentAccount:
type: string
IBANEndpoint:
description: International bank-account payout endpoint.
type: object
additionalProperties: false
required:
- iban
- accountHolder
properties:
iban:
type: string
accountHolder:
type: string
bic:
type: string
bankName:
type: string
Endpoint:
description: Polymorphic payment endpoint definition.
type: object
@@ -142,6 +187,41 @@ components:
additionalProperties:
type: string
PaymentResponseEndpoint:
description: Endpoint snapshot attached to a persisted payment.
type: object
additionalProperties: false
properties:
paymentMethodRef:
description: Reference to a stored payment method when endpoint is referenced by ID.
type: string
payeeRef:
description: Reference to a payee profile when endpoint is resolved by payee.
type: string
type:
description: Endpoint type for inline endpoint snapshots.
type: string
enum:
- ledger
- managedWallet
- cryptoAddress
- card
- cardToken
- wallet
- bankAccount
- iban
data:
description: Inline endpoint payload snapshot; shape depends on `type`.
oneOf:
- $ref: ./payment.yaml#/components/schemas/LedgerEndpoint
- $ref: ./payment.yaml#/components/schemas/ManagedWalletEndpoint
- $ref: ./payment.yaml#/components/schemas/ExternalChainEndpoint
- $ref: ./payment.yaml#/components/schemas/CardEndpoint
- $ref: ./payment.yaml#/components/schemas/CardTokenEndpoint
- $ref: ./payment.yaml#/components/schemas/WalletEndpoint
- $ref: ./payment.yaml#/components/schemas/BankAccountEndpoint
- $ref: ./payment.yaml#/components/schemas/IBANEndpoint
Customer:
description: Customer identity and address attributes for compliance and routing.
type: object
@@ -262,6 +342,9 @@ components:
type: object
additionalProperties:
type: string
comment:
description: Optional free-form comment attached to the payment intent.
type: string
customer:
description: Optional customer information attached to the payment intent.
$ref: ./payment.yaml#/components/schemas/Customer
@@ -432,12 +515,18 @@ components:
paymentRef:
description: Unique payment reference identifier.
type: string
idempotencyKey:
description: Idempotency key used to safely deduplicate create requests.
type: string
state:
description: Current lifecycle state of the payment.
$ref: ../../external/payment_state.yaml#/components/schemas/PaymentState
comment:
description: Optional comment copied from the original payment intent.
type: string
source:
description: Source endpoint snapshot captured from intent.
$ref: ./payment.yaml#/components/schemas/PaymentResponseEndpoint
destination:
description: Destination endpoint snapshot captured from intent.
$ref: ./payment.yaml#/components/schemas/PaymentResponseEndpoint
failureCode:
description: Failure code set when the payment cannot be completed.
type: string