Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add some fixes and updates to iso20022 api #180

Merged
merged 12 commits into from
Oct 10, 2024
153 changes: 111 additions & 42 deletions docs/fspiop-rest-v2.0-ISO20022-openapi3-snippets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1896,15 +1896,11 @@ components:
the sender side are to be borne by the debtor, transaction charges on the receiver side are to
be borne by the creditor. In a direct debit context, means that transaction charges on the sender side
are to be borne by the creditor, transaction charges on the receiver
SLEV : FollowingServiceLevel Charges are to be applied following the
rules
agreed in the service level.
type: string
enum:
- DEBT
- CRED
- SHAR
- SLEV
example: DEBT
ChargeType3Choice:
title: ChargeType3Choice
Expand Down Expand Up @@ -2288,6 +2284,12 @@ components:
- description: |
PaymentTypeInformation
Set of elements used to further specify the type of transaction.
UndrlygCstmrCdtTrf:
allOf:
- $ref: "#/components/schemas/UnderlyingCustomerCreditTransfer"
- description: |
Underlying Customer Credit Transfer
TBD
IntrBkSttlmAmt:
allOf:
- $ref: "#/components/schemas/ActiveCurrencyAndAmount"
Expand Down Expand Up @@ -2502,6 +2504,12 @@ components:
- description: |
PaymentTypeInformation
Set of elements used to further specify the type of transaction.
UndrlygCstmrCdtTrf:
allOf:
- $ref: "#/components/schemas/UnderlyingCustomerCreditTransfer"
- description: |
Underlying Customer Credit Transfer
TBD
IntrBkSttlmAmt:
allOf:
- $ref: "#/components/schemas/ActiveCurrencyAndAmount"
Expand Down Expand Up @@ -2636,6 +2644,32 @@ components:
- Sh256Sgntr
example:
IlpV4PrepPacket: 1234567890ABCDEF
DateAndDateTime2Choice:
title: StatusReason6Choice
description: |
Specifies the reason for the status.
type: object
anyOf:
- properties:
Dt:
allOf:
- $ref: "#/components/schemas/ISODate"
- description: |
Date
Specified date.
required:
- Dt
- properties:
DtTm:
allOf:
- $ref: "#/components/schemas/ISODateTime"
- description: |
DateTime
Specified date and time.
required:
- DtTm
example:
DtTm: "2020-01-01T00:00:00Z"
DateAndPlaceOfBirth1:
title: DateAndPlaceOfBirth1
description: |
Expand Down Expand Up @@ -2801,7 +2835,7 @@ components:
InstdAmt:
Amt: 123
Ccy: EUR
ChrgBr: SLEV
ChrgBr: SHAR
CdtrAgt:
FinInstnId:
BICFI: 123
Expand Down Expand Up @@ -2926,11 +2960,21 @@ components:
example: 1234
ExternalPaymentTransactionStatus1Code:
title: ExternalPaymentTransactionStatus1Code
description: Specifies the external payment transaction status code.
description: |
Specifies the external payment transaction status code.

For FSPIOP transfer state enumeration mappings:
{
"COMM": "COMMITED",
"RESV": "RESERVED",
"RECV": "RECEIVED",
"ABOR": "ABORTED",
"SETT": "SETTLED"
}
type: string
minLength: 1
maxLength: 4
example: 1234
example: SETT
ExternalPersonIdentification1Code:
title: ExternalPersonIdentification1Code
description: Specifies the external person identification code.
Expand Down Expand Up @@ -3304,7 +3348,7 @@ components:
IntrBkSttlmAmt:
Amt: 100
Ccy: EUR
ChrgBr: SLEV
ChrgBr: SHAR
Cdtr:
Nm: Creditor Name
CdtrAcct:
Expand Down Expand Up @@ -3363,7 +3407,7 @@ components:
initiating party to the executing party to request the execution of a
payment. It is used to request movement of funds from the debtor account
to the creditor account. The message can carry multiple credit transfer
instructions.
instructions.
properties:
GrpHdr:
allOf:
Expand Down Expand Up @@ -3420,7 +3464,7 @@ components:
IntrBkSttlmAmt:
Amt: 1000
Ccy: EUR
ChrgBr: SLEV
ChrgBr: SHAR
CdtrAgt:
FinInstnId:
BICFI: CCCCCCCC
Expand Down Expand Up @@ -3928,41 +3972,12 @@ components:
- description: |
CreationDateTime
Date and time at which the message was created.
TxInfAndSts:
allOf:
- $ref: "#/components/schemas/PaymentTransaction163"
- description: >
TransactionInformationAndStatus

Definition: Agent that instructs the next party in the chain to
carry out the (set of) instruction(s).

Usage: The instructing agent is the party sending the status
message and not the party that sent the original instruction
that is being reported on.
required:
- MsgId
- CreDtTm
example:
MsgId: 12345
CreDtTm: "2020-01-01T00:00:00Z"
TxInfAndSts:
StsId: 12345
OrgnlInstrId: 12345
OrgnlEndToEndId: 12345
OrgnlTxId: 12345
OrgnlUETR: 123e4567-e89b-12d3-a456-426614174000
TxSts: RJCT
StsRsnInf:
Rsn: RSN
AddtlInf: ADDITIONAL
AccptncDtTm: "2020-01-01T00:00:00Z"
AcctSvcrRef: ACCTSVCRREF
ClrSysRef: CLRSYSREF
ExctnConf: 1234567890ABCDEF
SplmtryData:
PlcAndNm: PLACE
Envlp: ENVELOPE
GroupHeader129:
title: GroupHeader129
description: >
Expand Down Expand Up @@ -4071,7 +4086,8 @@ components:
involved parties shall agree on the maximum number of digits that are
allowed.
type: string
format: datetime
pattern: >-
^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:(\.\d{3}))(?:Z|[+-][01]\d:[0-5]\d)$
example: "2013-03-07T14:44:30.000Z"
ISOYear:
title: ISOYear
Expand Down Expand Up @@ -4630,6 +4646,18 @@ components:
- description: >
Set of characteristics shared by all individual transactions
included in the message.
TxInfAndSts:
allOf:
- $ref: "#/components/schemas/PaymentTransaction163"
- description: >
Information concerning the original transactions, to which the
status report message refers.
SplmtryData:
allOf:
- $ref: "#/components/schemas/SupplementaryData1"
- description: >
Additional information that cannot be captured in the structured
elements and/or any other specific block.
required:
- GrpHdr
example:
Expand Down Expand Up @@ -4974,7 +5002,8 @@ components:
allOf:
- $ref: "#/components/schemas/Max35Text"
- description: >
TransactionIdentification (FSPIOP equivalent: quoteId)
TransactionIdentification (FSPIOP equivalent: quoteId in quote
request, transferId in transfer request)


Definition: Unique identification, as assigned by the first
Expand Down Expand Up @@ -5109,6 +5138,12 @@ components:
- description: >
Additional information that cannot be captured in the structured
elements and/or any other specific block.
PrcgDt:
allOf:
- $ref: "#/components/schemas/DateAndDateTime2Choice"
- description: >
Date/time at which the instruction was processed by the
specified party.
example:
StsId: 12345
OrgnlInstrId: 12345
Expand Down Expand Up @@ -6507,6 +6542,41 @@ components:
example: 8f3a3b2d-3b0a-4b3f-8e4e-1b2f3f4c5d6e
pattern: >-
^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
UnderlyingCustomerCreditTransfer:
title: UnderlyingCustomerCreditTransfer
type: object
properties:
InstdAmt:
allOf:
- $ref: "#/components/schemas/ActiveOrHistoricCurrencyAndAmount"
- description: >
InstructedAmount

Amount of money to be moved between the debtor and creditor,
before deduction of charges, expressed in the currency as
ordered by the initiating party.
Dbtr:
allOf:
- $ref: "#/components/schemas/PartyIdentification272"
- description: |
Party that owes an amount of money to the (ultimate) creditor.
Cdtr:
allOf:
- $ref: "#/components/schemas/PartyIdentification272"
- description: |
Party to which an amount of money is due.
DbtrAgt:
allOf:
- $ref: >-
#/components/schemas/BranchAndFinancialInstitutionIdentification8
- description: |
Financial institution servicing an account for the debtor.
CdtrAgt:
allOf:
- $ref: >-
#/components/schemas/BranchAndFinancialInstitutionIdentification8
- description: |
Financial institution servicing an account for the creditor.
VerificationReason1Choice:
title: VerificationReason1Choice
type: object
Expand Down Expand Up @@ -6589,7 +6659,6 @@ components:
required:
- OrgnlId
- Vrfctn
- UpdtdPtyAndAcctId
example:
OrgnlId: 1.2345678901234568e+33
Vrfctn: true
Expand Down
92 changes: 92 additions & 0 deletions docs/sdk-scheme-adapter-backend-v2_1_0-openapi3-snippets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,26 @@ paths:
$ref: '#/components/responses/400'
'500':
$ref: '#/components/responses/500'
patch:
description: The HTTP request `PATCH /fxTransfers/{commitRequestId}` is used to notify an FXP backend about the status of currency conversion.
summary: FX Update Conversion State Notification
tags:
- Fx
operationId: FxTransfersPatchById
requestBody:
description: Update and notify status of the FX transfer.
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/FxTransfersPatchBackendRequest'
responses:
'200':
$ref: '#/components/responses/200'
'400':
$ref: '#/components/responses/400'
'500':
$ref: '#/components/responses/500'
components:
parameters:
idSubValue:
Expand Down Expand Up @@ -2496,6 +2516,78 @@ components:
$ref: '#/components/schemas/ExtensionList'
required:
- conversionState
FxTransfersPatchBackendRequest:
title: fxTransfersPatchBackendRequest
description: PATCH /fxTransfers/{commitRequestId} object.
type: object
properties:
conversionId:
type: string
fxQuote:
properties:
fulfilment:
type: string
internalRequest:
type: object
mojaloopResponse:
type: object
request:
type: object
response:
type: object
type: object
fxQuoteRequest:
properties:
body:
type: object
headers:
type: object
type: object
fxQuoteResponse:
properties:
body:
type: string
headers:
type: object
type: object
direction:
enum:
- INBOUND
type: string
currentState:
type: string
enum:
- COMPLETED
- ABORTED
- ERROR_OCCURRED
initiatedTimestamp:
type: string
lastError:
type: string
fxPrepare:
properties:
body:
type: object
headers:
type: object
type: object
fulfil:
properties:
body:
type: object
headers:
type: object
type: object
finalNotification:
properties:
completedTimestamp:
type: string
conversionState:
type: string
required:
- completedTimestamp
- conversionState
type: object
responses:
'200':
description: OK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@ description: |
the sender side are to be borne by the debtor, transaction charges on the receiver side are to
be borne by the creditor. In a direct debit context, means that transaction charges on the sender side
are to be borne by the creditor, transaction charges on the receiver
SLEV : FollowingServiceLevel Charges are to be applied following the rules
agreed in the service level.
type: string
enum:
- DEBT
- CRED
- SHAR
- SLEV
example: DEBT
Loading