openapi: 3.0.0 info: version: 4.0.1 title: Common Payment API description: > This specification defines a simple payment API for payment types used in Switzerland. The API is supposed to be used by customers who want to initiate a payment at their bank. Note that, consents and SCA will be handled in a dedicated specification file. This specification uses schema definitions from the Common Data Model v1.2.1. termsOfService: Tbd contact: email: info@common-api.ch license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html servers: - url: payment.common-api.ch externalDocs: description: Find out more about SFTI API specifications. url: https://www.common-api.ch security: - OAuth2: - read - write tags: - name: standing orders description: Third party payment service considering standing order operations (JSON). - name: payments description: Third party payment service considering bulk payments operations (JSON). PUT operation can be used for both payment submission and payment initiation (PSS/PIS), depending on security implementation. - name: single payments description: Third party payment service considering single payments operations (JSON). PUT operation can be used for both payment submission and payment initiation (PSS/PIS), depending on security implementation. - name: iso20022 description: Third party payment service considering pain.001 and pain.002 operations (XML). PUT operation can be used for both payment submission and payment initiation (PSS/PIS), depending on security implementation. paths: /standing-orders: get: tags: - standing orders summary: Get the list of all standing orders. description: Return the list of all standing orders for the authenticated context. parameters: - $ref: '#/components/parameters/authorization_in_header' - $ref: '#/components/parameters/clientid_in_header' - $ref: '#/components/parameters/correlation_in_header' - $ref: '#/components/parameters/agent_in_header' - $ref: '#/components/parameters/optional_targetid_in_header' - $ref: '#/components/parameters/optional_psu_ip_in_header' - $ref: '#/components/parameters/optional_psu_user_agent_in_header' responses: '200': description: List of standing orders. headers: X-Correlation-ID: $ref: '#/components/headers/X-Correlation-ID' content: application/json: schema: type: object properties: paymentList: type: array items: $ref: '#/components/schemas/standingorderSubmissionRequest' _links: $ref: '#/components/schemas/links' '400': $ref: '#/components/responses/standard400' '401': $ref: '#/components/responses/standard401' '403': $ref: '#/components/responses/standard403' '404': $ref: '#/components/responses/standard404' '405': $ref: '#/components/responses/standard405' '500': $ref: '#/components/responses/standard500' '501': $ref: '#/components/responses/standard501' '503': $ref: '#/components/responses/standard503' post: tags: - standing orders summary: Create a new Standing Order description: It is used to create a permanent order for the transfer of funds. parameters: - $ref: '#/components/parameters/authorization_in_header' - $ref: '#/components/parameters/clientid_in_header' - $ref: '#/components/parameters/correlation_in_header' - $ref: '#/components/parameters/agent_in_header' - $ref: '#/components/parameters/optional_targetid_in_header' - $ref: '#/components/parameters/optional_psu_ip_in_header' - $ref: '#/components/parameters/optional_psu_user_agent_in_header' requestBody: description: Details of standing orders submission to be added. required: true content: application/json: schema: $ref: '#/components/schemas/standingorderSubmissionRequest' responses: '201': description: Created. headers: Location: $ref: '#/components/headers/Location' X-Correlation-ID: $ref: '#/components/headers/X-Correlation-ID' '400': $ref: '#/components/responses/standard400' '401': $ref: '#/components/responses/standard401' '403': $ref: '#/components/responses/standard403' '404': $ref: '#/components/responses/standard404' '405': $ref: '#/components/responses/standard405' '500': $ref: '#/components/responses/standard500' '501': $ref: '#/components/responses/standard501' '503': $ref: '#/components/responses/standard503' /standing-orders/{submissionId}: get: tags: - standing orders summary: Get a specific standing order submission description: Retrieve a specific standing order submission. parameters: - $ref: '#/components/parameters/path_submissionId' - $ref: '#/components/parameters/authorization_in_header' - $ref: '#/components/parameters/clientid_in_header' - $ref: '#/components/parameters/correlation_in_header' - $ref: '#/components/parameters/agent_in_header' - $ref: '#/components/parameters/optional_targetid_in_header' - $ref: '#/components/parameters/optional_psu_ip_in_header' - $ref: '#/components/parameters/optional_psu_user_agent_in_header' responses: '200': description: The original standing order submission. headers: X-Correlation-ID: $ref: '#/components/headers/X-Correlation-ID' content: application/json: schema: $ref: '#/components/schemas/standingorderSubmissionRequest' '400': $ref: '#/components/responses/standard400' '401': $ref: '#/components/responses/standard401' '403': $ref: '#/components/responses/standard403' '404': $ref: '#/components/responses/standard404' '405': $ref: '#/components/responses/standard405' '500': $ref: '#/components/responses/standard500' '501': $ref: '#/components/responses/standard501' '503': $ref: '#/components/responses/standard503' delete: tags: - standing orders summary: Delete a specific standing order submission description: Delete a specific standing order submission. parameters: - $ref: '#/components/parameters/path_submissionId' - $ref: '#/components/parameters/authorization_in_header' - $ref: '#/components/parameters/clientid_in_header' - $ref: '#/components/parameters/correlation_in_header' - $ref: '#/components/parameters/agent_in_header' - $ref: '#/components/parameters/optional_targetid_in_header' - $ref: '#/components/parameters/optional_psu_ip_in_header' - $ref: '#/components/parameters/optional_psu_user_agent_in_header' responses: '200': description: Standing order has been deleted. headers: X-Correlation-ID: $ref: '#/components/headers/X-Correlation-ID' '201': description: Standing order is marked for deletion. headers: X-Correlation-ID: $ref: '#/components/headers/X-Correlation-ID' '400': $ref: '#/components/responses/standard400' '401': $ref: '#/components/responses/standard401' '403': $ref: '#/components/responses/standard403' '404': $ref: '#/components/responses/standard404' '405': $ref: '#/components/responses/standard405' '500': $ref: '#/components/responses/standard500' '501': $ref: '#/components/responses/standard501' '503': $ref: '#/components/responses/standard503' /standing-orders/{submissionId}/status: get: tags: - standing orders summary: Get status information for the specific standing order submission description: Retrieve a specific standing order submission's status. parameters: - $ref: '#/components/parameters/path_submissionId' - $ref: '#/components/parameters/authorization_in_header' - $ref: '#/components/parameters/clientid_in_header' - $ref: '#/components/parameters/correlation_in_header' - $ref: '#/components/parameters/agent_in_header' - $ref: '#/components/parameters/optional_targetid_in_header' - $ref: '#/components/parameters/optional_psu_ip_in_header' - $ref: '#/components/parameters/optional_psu_user_agent_in_header' responses: '200': description: Status information for the specific standing order submission. headers: X-Correlation-ID: $ref: '#/components/headers/X-Correlation-ID' content: application/json: schema: $ref: '#/components/schemas/standingorderSubmissionStatus' '400': $ref: '#/components/responses/standard400' '401': $ref: '#/components/responses/standard401' '403': $ref: '#/components/responses/standard403' '404': $ref: '#/components/responses/standard404' '405': $ref: '#/components/responses/standard405' '500': $ref: '#/components/responses/standard500' '501': $ref: '#/components/responses/standard501' '503': $ref: '#/components/responses/standard503' /payments: get: tags: - payments summary: Get the list of all payments. description: Return the list of all payments for the authenticated context. parameters: - $ref: '#/components/parameters/authorization_in_header' - $ref: '#/components/parameters/clientid_in_header' - $ref: '#/components/parameters/correlation_in_header' - $ref: '#/components/parameters/agent_in_header' - $ref: '#/components/parameters/optional_targetid_in_header' - $ref: '#/components/parameters/optional_psu_ip_in_header' - $ref: '#/components/parameters/optional_psu_user_agent_in_header' responses: '200': description: List of payments. headers: X-Correlation-ID: $ref: '#/components/headers/X-Correlation-ID' content: application/json: schema: type: object properties: paymentList: type: array items: $ref: '#/components/schemas/paymentSubmissionRequest' _links: $ref: '#/components/schemas/links' '400': $ref: '#/components/responses/standard400' '401': $ref: '#/components/responses/standard401' '403': $ref: '#/components/responses/standard403' '404': $ref: '#/components/responses/standard404' '405': $ref: '#/components/responses/standard405' '500': $ref: '#/components/responses/standard500' '501': $ref: '#/components/responses/standard501' '503': $ref: '#/components/responses/standard503' post: tags: - payments summary: Initiate new payments submission description: Create new payments submission. parameters: - $ref: '#/components/parameters/authorization_in_header' - $ref: '#/components/parameters/clientid_in_header' - $ref: '#/components/parameters/correlation_in_header' - $ref: '#/components/parameters/agent_in_header' - $ref: '#/components/parameters/optional_targetid_in_header' - $ref: '#/components/parameters/optional_psu_ip_in_header' - $ref: '#/components/parameters/optional_psu_user_agent_in_header' requestBody: description: Details of payments submission to be added. required: true content: application/json: schema: $ref: '#/components/schemas/paymentSubmissionRequest' responses: '201': description: Created. headers: Location: $ref: '#/components/headers/Location' X-Correlation-ID: $ref: '#/components/headers/X-Correlation-ID' '400': $ref: '#/components/responses/standard400' '401': $ref: '#/components/responses/standard401' '403': $ref: '#/components/responses/standard403' '404': $ref: '#/components/responses/standard404' '405': $ref: '#/components/responses/standard405' '500': $ref: '#/components/responses/standard500' '501': $ref: '#/components/responses/standard501' '503': $ref: '#/components/responses/standard503' /payments/{submissionId}: delete: tags: - payments summary: Delete a specific payment submission before executed description: Delete a specific payment submission before executed. parameters: - $ref: '#/components/parameters/path_submissionId' - $ref: '#/components/parameters/authorization_in_header' - $ref: '#/components/parameters/clientid_in_header' - $ref: '#/components/parameters/correlation_in_header' - $ref: '#/components/parameters/agent_in_header' - $ref: '#/components/parameters/optional_targetid_in_header' - $ref: '#/components/parameters/optional_psu_ip_in_header' - $ref: '#/components/parameters/optional_psu_user_agent_in_header' responses: '200': description: Payment submission has been deleted. headers: X-Correlation-ID: $ref: '#/components/headers/X-Correlation-ID' '201': description: Payment submission is marked for deletion. headers: X-Correlation-ID: $ref: '#/components/headers/X-Correlation-ID' '400': $ref: '#/components/responses/standard400' '401': $ref: '#/components/responses/standard401' '403': $ref: '#/components/responses/standard403' '404': $ref: '#/components/responses/standard404' '405': $ref: '#/components/responses/standard405' '500': $ref: '#/components/responses/standard500' '501': $ref: '#/components/responses/standard501' '503': $ref: '#/components/responses/standard503' /payments/{submissionId}/status: get: tags: - payments summary: Get status information for the specific payment submission description: Retrieve a specific payment submission's status. parameters: - $ref: '#/components/parameters/path_submissionId' - $ref: '#/components/parameters/authorization_in_header' - $ref: '#/components/parameters/clientid_in_header' - $ref: '#/components/parameters/correlation_in_header' - $ref: '#/components/parameters/agent_in_header' - $ref: '#/components/parameters/optional_targetid_in_header' - $ref: '#/components/parameters/optional_psu_ip_in_header' - $ref: '#/components/parameters/optional_psu_user_agent_in_header' responses: '200': description: Status information for the specific payment submission. headers: X-Correlation-ID: $ref: '#/components/headers/X-Correlation-ID' content: application/json: schema: $ref: '#/components/schemas/paymentSubmissionStatus' '400': $ref: '#/components/responses/standard400' '401': $ref: '#/components/responses/standard401' '403': $ref: '#/components/responses/standard403' '404': $ref: '#/components/responses/standard404' '405': $ref: '#/components/responses/standard405' '500': $ref: '#/components/responses/standard500' '501': $ref: '#/components/responses/standard501' '503': $ref: '#/components/responses/standard503' /single-payments: get: tags: - single payments summary: Get the list of all payments (all payment types) description: Return the list of all initiated payments of all types for the authenticated context. parameters: - in: query name: entryReferenceFrom schema: type: string description: Get all objects after the one with the given ID. - in: query name: limit schema: type: integer description: Number of items to be returned. - in: query name: dateFrom schema: $ref: '#/components/schemas/date' - in: query name: dateTo schema: $ref: '#/components/schemas/date' - $ref: '#/components/parameters/authorization_in_header' - $ref: '#/components/parameters/clientid_in_header' - $ref: '#/components/parameters/correlation_in_header' - $ref: '#/components/parameters/agent_in_header' - $ref: '#/components/parameters/optional_targetid_in_header' - $ref: '#/components/parameters/optional_psu_ip_in_header' - $ref: '#/components/parameters/optional_psu_user_agent_in_header' responses: '200': description: Paginated list of all payments. headers: X-Correlation-ID: $ref: '#/components/headers/X-Correlation-ID' content: application/json: schema: type: object properties: paymentList: type: array items: $ref: '#/components/schemas/singlepaymentsSubmissionRequest' _links: $ref: '#/components/schemas/links' '400': $ref: '#/components/responses/standard400' '401': $ref: '#/components/responses/standard401' '403': $ref: '#/components/responses/standard403' '404': $ref: '#/components/responses/standard404' '405': $ref: '#/components/responses/standard405' '500': $ref: '#/components/responses/standard500' '501': $ref: '#/components/responses/standard501' '503': $ref: '#/components/responses/standard503' post: tags: - single payments summary: Initiate new single payments submission description: Create new single payments submission. parameters: - $ref: '#/components/parameters/authorization_in_header' - $ref: '#/components/parameters/clientid_in_header' - $ref: '#/components/parameters/correlation_in_header' - $ref: '#/components/parameters/agent_in_header' - $ref: '#/components/parameters/optional_targetid_in_header' - $ref: '#/components/parameters/optional_psu_ip_in_header' - $ref: '#/components/parameters/optional_psu_user_agent_in_header' requestBody: description: Details of single payments submission to be added. required: true content: application/json: schema: $ref: '#/components/schemas/singlepaymentsSubmissionRequest' responses: '201': description: Created. headers: Location: $ref: '#/components/headers/Location' X-Correlation-ID: $ref: '#/components/headers/X-Correlation-ID' '400': $ref: '#/components/responses/standard400' '401': $ref: '#/components/responses/standard401' '403': $ref: '#/components/responses/standard403' '404': $ref: '#/components/responses/standard404' '405': $ref: '#/components/responses/standard405' '500': $ref: '#/components/responses/standard500' '501': $ref: '#/components/responses/standard501' '503': $ref: '#/components/responses/standard503' /single-payments/{submissionId}: get: tags: - single payments summary: Get a specific payment description: Receive payment with corresponding submissionId. parameters: - $ref: '#/components/parameters/path_submissionId' - $ref: '#/components/parameters/authorization_in_header' - $ref: '#/components/parameters/clientid_in_header' - $ref: '#/components/parameters/correlation_in_header' - $ref: '#/components/parameters/agent_in_header' - $ref: '#/components/parameters/optional_targetid_in_header' - $ref: '#/components/parameters/optional_psu_ip_in_header' - $ref: '#/components/parameters/optional_psu_user_agent_in_header' responses: '200': description: Details on the chosen payment. headers: X-Correlation-ID: $ref: '#/components/headers/X-Correlation-ID' content: application/json: schema: $ref: '#/components/schemas/singlepaymentsSubmissionRequest' '400': $ref: '#/components/responses/standard400' '401': $ref: '#/components/responses/standard401' '403': $ref: '#/components/responses/standard403' '404': $ref: '#/components/responses/standard404' '405': $ref: '#/components/responses/standard405' '500': $ref: '#/components/responses/standard500' '501': $ref: '#/components/responses/standard501' '503': $ref: '#/components/responses/standard503' delete: tags: - single payments summary: Delete a single payment description: Delete single payment with corresponding submissionId. parameters: - $ref: '#/components/parameters/path_submissionId' - $ref: '#/components/parameters/authorization_in_header' - $ref: '#/components/parameters/clientid_in_header' - $ref: '#/components/parameters/correlation_in_header' - $ref: '#/components/parameters/agent_in_header' - $ref: '#/components/parameters/optional_targetid_in_header' - $ref: '#/components/parameters/optional_psu_ip_in_header' - $ref: '#/components/parameters/optional_psu_user_agent_in_header' responses: '200': description: Payment has been deleted. headers: X-Correlation-ID: $ref: '#/components/headers/X-Correlation-ID' '201': description: Payment is marked for deletion. headers: X-Correlation-ID: $ref: '#/components/headers/X-Correlation-ID' '400': $ref: '#/components/responses/standard400' '401': $ref: '#/components/responses/standard401' '403': $ref: '#/components/responses/standard403' '404': $ref: '#/components/responses/standard404' '405': $ref: '#/components/responses/standard405' '500': $ref: '#/components/responses/standard500' '501': $ref: '#/components/responses/standard501' '503': $ref: '#/components/responses/standard503' /single-payments/{submissionId}/status: get: tags: - single payments summary: Get status information for the specific single payment description: Retrieve a specific single payment submission's status. parameters: - $ref: '#/components/parameters/path_submissionId' - $ref: '#/components/parameters/authorization_in_header' - $ref: '#/components/parameters/clientid_in_header' - $ref: '#/components/parameters/correlation_in_header' - $ref: '#/components/parameters/agent_in_header' - $ref: '#/components/parameters/optional_targetid_in_header' - $ref: '#/components/parameters/optional_psu_ip_in_header' - $ref: '#/components/parameters/optional_psu_user_agent_in_header' responses: '200': description: Status information for the specific payment submission. headers: X-Correlation-ID: $ref: '#/components/headers/X-Correlation-ID' content: application/json: schema: $ref: '#/components/schemas/paymentSubmissionStatus' '400': $ref: '#/components/responses/standard400' '401': $ref: '#/components/responses/standard401' '403': $ref: '#/components/responses/standard403' '404': $ref: '#/components/responses/standard404' '405': $ref: '#/components/responses/standard405' '500': $ref: '#/components/responses/standard500' '501': $ref: '#/components/responses/standard501' '503': $ref: '#/components/responses/standard503' /iso20022/payments: post: tags: - iso20022 summary: Submit ISO20022 XML payment instruction (pain.001) description: Submit an XML pain.001 payment instruction according to the ISO20022 specification. parameters: - $ref: '#/components/parameters/authorization_in_header' - $ref: '#/components/parameters/clientid_in_header' - $ref: '#/components/parameters/correlation_in_header' - $ref: '#/components/parameters/agent_in_header' - $ref: '#/components/parameters/optional_targetid_in_header' - $ref: '#/components/parameters/optional_psu_ip_in_header' - $ref: '#/components/parameters/optional_psu_user_agent_in_header' requestBody: description: The XML pain.001. required: true content: application/xml: schema: type: string responses: '201': description: Created. headers: Location: $ref: '#/components/headers/Location' X-Correlation-ID: $ref: '#/components/headers/X-Correlation-ID' '400': $ref: '#/components/responses/standard400' '401': $ref: '#/components/responses/standard401' '403': $ref: '#/components/responses/standard403' '404': $ref: '#/components/responses/standard404' '405': $ref: '#/components/responses/standard405' '500': $ref: '#/components/responses/standard500' '501': $ref: '#/components/responses/standard501' '503': $ref: '#/components/responses/standard503' /iso20022/payments/{submissionId}: get: tags: - iso20022 summary: Retrieve a submitted ISO20022 XML pain.001 message parameters: - $ref: '#/components/parameters/path_submissionId' - $ref: '#/components/parameters/authorization_in_header' - $ref: '#/components/parameters/clientid_in_header' - $ref: '#/components/parameters/correlation_in_header' - $ref: '#/components/parameters/agent_in_header' - $ref: '#/components/parameters/optional_targetid_in_header' - $ref: '#/components/parameters/optional_psu_ip_in_header' - $ref: '#/components/parameters/optional_psu_user_agent_in_header' responses: '200': description: Returns the requested ISO20022 XML pain.001 message. headers: X-Correlation-ID: $ref: '#/components/headers/X-Correlation-ID' content: application/xml: schema: type: string '400': $ref: '#/components/responses/standard400' '401': $ref: '#/components/responses/standard401' '403': $ref: '#/components/responses/standard403' '404': $ref: '#/components/responses/standard404' '405': $ref: '#/components/responses/standard405' '500': $ref: '#/components/responses/standard500' '501': $ref: '#/components/responses/standard501' '503': $ref: '#/components/responses/standard503' delete: tags: - iso20022 summary: Delete a submitted ISO20022 XML PAIN.001 message before execution parameters: - $ref: '#/components/parameters/path_submissionId' - $ref: '#/components/parameters/authorization_in_header' - $ref: '#/components/parameters/clientid_in_header' - $ref: '#/components/parameters/correlation_in_header' - $ref: '#/components/parameters/agent_in_header' - $ref: '#/components/parameters/optional_targetid_in_header' - $ref: '#/components/parameters/optional_psu_ip_in_header' - $ref: '#/components/parameters/optional_psu_user_agent_in_header' responses: '200': description: ISO20022 XML pain.001 message submission has been deleted. headers: X-Correlation-ID: $ref: '#/components/headers/X-Correlation-ID' '201': description: ISO20022 XML pain.001 message submission is marked for deletion. headers: X-Correlation-ID: $ref: '#/components/headers/X-Correlation-ID' '400': $ref: '#/components/responses/standard400' '401': $ref: '#/components/responses/standard401' '403': $ref: '#/components/responses/standard403' '404': $ref: '#/components/responses/standard404' '405': $ref: '#/components/responses/standard405' '500': $ref: '#/components/responses/standard500' '501': $ref: '#/components/responses/standard501' '503': $ref: '#/components/responses/standard503' /iso20022/payments/{submissionId}/status: get: tags: - iso20022 summary: Get the ISO20022 XML status report (PAIN.002) for a specific payment instruction description: The status report for the requested XML ISO20022 payment instruction (PAIN.002). parameters: - $ref: '#/components/parameters/path_submissionId' - $ref: '#/components/parameters/authorization_in_header' - $ref: '#/components/parameters/clientid_in_header' - $ref: '#/components/parameters/correlation_in_header' - $ref: '#/components/parameters/agent_in_header' - $ref: '#/components/parameters/optional_targetid_in_header' - $ref: '#/components/parameters/optional_psu_ip_in_header' - $ref: '#/components/parameters/optional_psu_user_agent_in_header' responses: '200': description: Returns the requested ISO20022 XML pain.002 message. headers: X-Correlation-ID: $ref: '#/components/headers/X-Correlation-ID' content: application/xml: schema: type: string '400': $ref: '#/components/responses/standard400' '401': $ref: '#/components/responses/standard401' '403': $ref: '#/components/responses/standard403' '404': $ref: '#/components/responses/standard404' '405': $ref: '#/components/responses/standard405' '500': $ref: '#/components/responses/standard500' '501': $ref: '#/components/responses/standard501' '503': $ref: '#/components/responses/standard503' # ------------------------- # -------- Models --------- # ------------------------- components: securitySchemes: OAuth2: type: oauth2 flows: authorizationCode: authorizationUrl: https://example.com/oauth/authorize tokenUrl: https://example.com/oauth/token scopes: read: Grants read access write: Grants write access schemas: # /payments paymentSubmissionRequest: title: Payment Submission Request type: object required: - messageId - initiatingPartyId - debtorAccount - bookingInstruction - transactions - requestedExecutionDate properties: messageId: type: string maxLength: 35 example: eb6305c91f7f49deaed016487c27b42d initiatingPartyId: type: string maxLength: 32 example: TPP01746 requestedExecutionDate: $ref: '#/components/schemas/date' debtorAccount: $ref: '#/components/schemas/paymentIbanAccount' bookingInstruction: $ref: '#/components/schemas/paymentBookingInstruction' transactions: type: array items: $ref: '#/components/schemas/paymentInstructionItem' paymentInstructionItem: title: Payment Instruction Item type: object required: - instructionId - endToEndId - instructedAmount properties: instructionId: type: string maxLength: 35 example: INSTR-001 endToEndId: type: string maxLength: 35 example: ENDTOENDID-001 instructedAmount: $ref: '#/components/schemas/paymentCurrencyAmount' ibanDetails: $ref: '#/components/schemas/paymentIBANDetail' isrDetails: $ref: '#/components/schemas/paymentISRDetail' otherDetails: $ref: '#/components/schemas/paymentOtherDetail' qrDetails: $ref: '#/components/schemas/paymentQRDetail' paymentIBANDetail: title: Payment IBAN Detail type: object required: - creditorAccount - creditor properties: sepaIndicator: type: boolean example: true creditorAccount: $ref: '#/components/schemas/paymentIbanAccount' creditorAgent: $ref: '#/components/schemas/paymentCreditorAgent' creditor: $ref: '#/components/schemas/paymentCreditor' chargeBearer: $ref: '#/components/schemas/paymentChargeBearerMethod' remittanceReference: $ref: '#/components/schemas/paymentIbanRemittanceReference' remittanceInformation: $ref: '#/components/schemas/paymentRemittanceInformation' paymentOtherDetail: title: Payment Other Detail type: object required: - creditorAccount - creditorAgent - creditor properties: creditorAccount: $ref: '#/components/schemas/paymentOtherAccount' creditorAgent: $ref: '#/components/schemas/paymentCreditorAgent' creditor: $ref: '#/components/schemas/paymentCreditor' chargeBearer: $ref: '#/components/schemas/paymentChargeBearerMethod' remittanceReference: $ref: '#/components/schemas/paymentOtherRemittanceReference' paymentQRDetail: title: Payment QR Detail type: object required: - creditor - creditorAccount properties: creditorAccount: $ref: '#/components/schemas/paymentQrIbanAccount' creditor: $ref: '#/components/schemas/paymentCreditor' ultimateCreditor: $ref: '#/components/schemas/paymentCreditor' ultimateDebtor: $ref: '#/components/schemas/paymentDebtor' remittanceReference: $ref: '#/components/schemas/paymentIbanRemittanceReference' remittanceInformation: $ref: '#/components/schemas/paymentRemittanceInformation' paymentISRDetail: title: Payment ISR Detail type: object required: - remittanceReference properties: creditorAccount: $ref: '#/components/schemas/paymentOtherAccount' creditor: $ref: '#/components/schemas/paymentCreditor' remittanceReference: $ref: '#/components/schemas/paymentIsrRemittanceReference' paymentCreditor: title: Payment Creditor type: object required: - name - postalAddress properties: name: type: string maxLength: 140 postalAddress: $ref: '#/components/schemas/paymentStructuredOrUnstructuredAddress' paymentDebtor: title: Payment Debtor type: object required: - name - postalAddress properties: name: type: string maxLength: 70 example: Hans Muster postalAddress: $ref: '#/components/schemas/paymentStructuredOrUnstructuredAddress' paymentChargeBearerMethod: title: Payment Charge Bearer Method type: string enum: - DEBT - CRED - SHAR - SLEV example: SHAR paymentBookingInstruction: title: Payment Booking Instruction type: string enum: - SINGLEBOOKING_SIA - SINGLEBOOKING_NOA - BATCHBOOKING_SALA_NOA - BATCHBOOKING_SALA_CND - BATCHBOOKING_NOA - BATCHBOOKING_CND - BATCHBOOKING_CWD example: BATCHBOOKING_SALA_CND paymentSubmissionStatus: title: Payment Submission Status type: object required: - statusCode properties: messageId: type: string example: eb6305c91f7f49deaed016487c27b42d statusCode: type: string enum: - ACCP - RJCT - PART - RCVD example: PART transactions: type: array items: $ref: '#/components/schemas/paymentInstructionItemStatus' paymentInstructionItemStatus: title: Payment Instruction Item Status type: object required: - instructionId - statusCode properties: instructionId: type: string maxLength: 35 example: DNCS-20180322-IXN0-TXN0 statusCode: type: string enum: - ACCP - RJCT example: RJCT reasonCode: type: string example: CURR reasonInformation: type: string maxLength: 105 example: currency USD not allowed for payment type IBAN paymentCreditorAgent: type: object properties: bic: type: string maxLength: 11 example: BDEMMXMM clearingSystemMemberIdentification: $ref: '#/components/schemas/commonClearingSystemMemberIdentification' paymentIbanAccount: title: Payment IBAN Account type: object required: - type - identification properties: type: type: string description: The allowed account identification type for the creditor account depends on the payment type. The debtor account must always be an IBAN. enum: - IBAN identification: type: string maxLength: 34 pattern: '[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}' example: CH9300762011623852957 paymentQrIbanAccount: title: Payment QR-IBAN Account type: object required: - type - identification properties: type: type: string description: IBAN or QR-IBAN of the creditor, only IBANs with CH or LI country code permitted. enum: - IBAN - QR_IBAN identification: type: string maxLength: 34 example: CH9300762011623852957 pattern: '[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}' paymentOtherAccount: title: Payment Other Account type: object required: - type - identification properties: type: type: string description: The allowed account identification type for the creditor account depends on the payment type. The debtor account must always be an IBAN. enum: - OTHER identification: type: string maxLength: 34 example: 01-39139-1 paymentCurrencyAmount: title: Payment Currency-Amount type: object required: - currency - amount properties: currency: type: string maxLength: 3 minLength: 3 example: CHF amount: type: string pattern: '[0-9]{1,12}([.][0-9]{1,5})?' maxLength: 18 example: 10.25 paymentIbanRemittanceReference: title: Payment Remittance Reference description: either remittanceReference or remittanceInformation must be set type: object properties: type: type: string enum: - SCOR - QRR reference: type: string maxLength: 35 example: 210000000003139471430009017 paymentOtherRemittanceReference: title: Payment Remittance Reference description: either remittanceReference or remittanceInformation must be set type: object properties: type: type: string enum: - SCOR reference: type: string maxLength: 35 example: 210000000003139471430009017 paymentIsrRemittanceReference: title: Payment Remittance Reference description: either remittanceReference or remittanceInformation must be set type: object properties: type: type: string enum: - ISR reference: type: string maxLength: 35 example: 210000000003139471430009017 paymentRemittanceInformation: title: Payment Remittance Information description: either remittanceReference or remittanceInformation must be set type: string maxLength: 140 example: Rechnung Nr. 408 paymentStructuredAddress: title: Structured Address for Payments type: object required: - streetName - postCode - townName - country properties: streetName: type: string maxLength: 70 example: Rue de la gare buildingNumber: type: string maxLength: 16 example: 24 postCode: type: string maxLength: 16 example: 2501 townName: type: string maxLength: 35 example: Biel country: type: string maxLength: 2 example: CH paymentUnstructuredAddress: title: Unstructured Address for Payments type: object required: - addressLines - country properties: addressLines: type: array description: max 2 lines of 70 characters maxItems: 2 example: - Robert Schneider SA - Rue de la gare 24 items: type: string maxLength: 70 country: type: string maxLength: 2 example: CH paymentStructuredOrUnstructuredAddress: title: Payment Structured or Unstructured Address description: Either structured or unstructured must be set type: object properties: structured: $ref: '#/components/schemas/paymentStructuredAddress' unstructured: $ref: '#/components/schemas/paymentUnstructuredAddress' commonClearingSystemMemberIdentification: title: Common Clearing System Member Identification type: object required: - code - memberId properties: code: type: string maxLength: 5 example: CHBCC memberId: type: string maxLength: 35 example: 00230 # ---- Payment Data Model - not supported by SIX bLink ---- singlepaymentsSubmissionRequest: title: Single Payment Submission Request type: object required: - messageId - initiatingPartyId - debtorAccount - instructionId - endToEndId - instructedAmount - startDate - frequency properties: messageId: type: string maxLength: 35 example: eb6305c91f7f49deaed016487c27b42d initiatingPartyId: type: string maxLength: 32 example: TPP01746 requestedExecutionDate: $ref: '#/components/schemas/date' debtorAccount: $ref: '#/components/schemas/paymentIbanAccount' instructionId: type: string maxLength: 35 example: INSTR-001 endToEndId: type: string maxLength: 35 example: ENDTOENDID-001 instructedAmount: $ref: '#/components/schemas/paymentCurrencyAmount' ibanDetails: $ref: '#/components/schemas/paymentIBANDetail' isrDetails: $ref: '#/components/schemas/paymentISRDetail' otherDetails: $ref: '#/components/schemas/paymentOtherDetail' qrDetails: $ref: '#/components/schemas/paymentQRDetail' standingorderSubmissionRequest: title: Standing Order Submission Request type: object required: - messageId - initiatingPartyId - debtorAccount - instructionId - endToEndId - instructedAmount - startDate - frequency properties: messageId: type: string maxLength: 35 example: eb6305c91f7f49deaed016487c27b42d initiatingPartyId: type: string maxLength: 32 example: TPP01746 requestedExecutionDate: $ref: '#/components/schemas/date' debtorAccount: $ref: '#/components/schemas/paymentIbanAccount' instructionId: type: string maxLength: 35 example: INSTR-001 endToEndId: type: string maxLength: 35 example: ENDTOENDID-001 instructedAmount: $ref: '#/components/schemas/paymentCurrencyAmount' ibanDetails: $ref: '#/components/schemas/paymentIBANDetail' isrDetails: $ref: '#/components/schemas/paymentISRDetail' otherDetails: $ref: '#/components/schemas/paymentOtherDetail' qrDetails: $ref: '#/components/schemas/paymentQRDetail' # Additional Information according NextGenPSD2 for periodic orders startDate: $ref: '#/components/schemas/startDate' endDate: $ref: '#/components/schemas/endDate' executionRule: $ref: '#/components/schemas/executionRule' frequency: $ref: '#/components/schemas/frequencyCode' dayOfExecution: $ref: '#/components/schemas/dayOfExecution' # Additional Optional Information Standing Orders executionMode: type: string description: | The code of execution mode defines when or how standing order will be cancelled, processed the last time. * UNTIL_DATE - standing order is valid until specific date - field endDate. * UNTIL_CANCELLATION - standing order is valid forever and must be cancelled by client. example: UNTIL_DATE enum: - UNTIL_DATE - UNTIL_CANCELLATION executionBreaks: description: List of break periods. type: array items: type: object properties: validFromDate: description: > Start date of one break period. Standing order will not be processed from this date. Date format YYYY-MM-DD. $ref: '#/components/schemas/date' validToDate: description: > End date of one break period. Standing order will not be processed to this date. Date format YYYY-MM-DD. $ref: '#/components/schemas/date' standingorderSubmissionStatus: title: Standing Order Submission Status type: object required: - statusCode properties: messageId: type: string example: eb6305c91f7f49deaed016487c27b42d statusCode: type: string enum: - ACCP - RJCT - PART example: PART transactions: type: array items: $ref: '#/components/schemas/paymentInstructionItemStatus' # Schema information NextGenPSD2 for periodic orders startDate: title: Start Date description: | The first applicable day of execution starting from this date is the first payment. type: string format: date example: 2018-04-13 endDate: title: End Date description: The last applicable day of execution. If not given, it is an infinite standing order. type: string format: date example: 2018-04-13 executionRule: title: Execution Rule description: | *following* or *preceding* supported as values. This data attribute defines the behaviour when recurring payment dates falls on a weekend or bank holiday. The payment is then executed either the *preceding* or *following* working day. ASPSP might reject the request due to the communicated value, if rules in Online-Banking are not supporting this execution rule. type: string enum: - following - preceding frequencyCode: title: Frequency Code description: | The following codes from the EventFrequency7Code of ISO 20022 are supported. - Daily - Weekly - EveryTwoWeeks - Monthly - EveryTwoMonths - Quarterly - SemiAnnual - Annual type: string enum: - Daily - Weekly - EveryTwoWeeks - Monthly - EveryTwoMonths - Quarterly - SemiAnnual - Annual dayOfExecution: title: Day of Execution description: | Day of execution as string. This string consists of up two characters. Leading zeroes are not allowed. 31 is ultimo of the month. type: string maxLength: 2 enum: - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 20 - 21 - 22 - 23 - 24 - 25 - 26 - 27 - 28 - 29 - 30 - 31 # ---- Common Data Model ---- date: type: string format: date example: 2018-04-13 dateTime: type: string format: date-time example: 2018-04-13T11:11:11Z links: title: Links description: links returned in the answer of an API call type: object properties: self: type: string first: type: string previous: type: string next: type: string last: type: string currency: title: Currency description: ISO 4217 code type: string pattern: '[A-Z]{3}' amount: title: Amount description: amount with currency type: object required: - currency - content properties: currency: $ref: '#/components/schemas/currency' content: description: amount given with fractional digits, the separator is a dot type: string pattern: '-?\d{1,14}(?:\.\d{1,3})?' # ---- Common Error Response (compliant to SIX b.Link) ---- commonErrorResponse: title: Common Error Response type: object properties: type: $ref: '#/components/schemas/commonErrorType' title: type: string example: This is the general problem description detail: type: string example: Detailed problem description with respect to the current request instance: type: string example: path/to/corresponding/resource commonErrorType: title: Common Error Type description: Error Types for commonErrorResponse. type: string enum: - /problems/INVALID_PAYLOAD - /problems/MALFORMED_PAYLOAD - /problems/INVALID_TOKEN - /problems/EXPIRED_TOKEN - /problems/INSUFFICIENT_PRIVILEGES - /problems/NO_ACCESS_TO_RESOURCE - /problems/RESOURCE_DOES_NOT_EXIST - /problems/RESOURCE_NOT_READY - /problems/RESOURCE_TOO_LARGE - /problems/WRONG_METHOD - /problems/OPERATION_NOT_ALLOWED - /problems/TECHNICAL_ERROR - /problems/NOT_IMPLEMENTED - /problems/SERVICE_UNAVAILABLE example: /problems/TECHNICAL_ERROR # ---- Global Common Header Parameters ---- parameters: path_submissionId: name: submissionId in: path description: ID of payment submission to be retrieved. required: true schema: maxLength: 35 type: string example: submissionId clientid_in_header: name: X-CorAPI-Client-ID in: header schema: type: string description: 'ID of the client forwarded to the provider. (SCOPE: FI)' required: true authorization_in_header: name: Authorization in: header description: Bearer followed by a base64 encoded OAuth access token required: true schema: type: string correlation_in_header: name: X-Correlation-ID in: header schema: type: string description: Unique ID (defined by the caller) which will be reflected back in the response. required: true agent_in_header: name: User-Agent in: header schema: type: string description: Name and version of the of the Client software. required: true optional_targetid_in_header: name: X-CorAPI-Target-ID in: header description: 'ID of the target, e.g., a financial institution. (SCOPE: FI - optional)' required: false schema: type: string optional_psu_ip_in_header: name: X-PSU-IP-Address in: header description: 'IP address of the user initiating the operation (SCOPE: FI - optional)' required: false schema: type: string optional_psu_user_agent_in_header: name: X-PSU-User-Agent in: header description: 'User of the client software (SCOPE: FI - optional)' required: false schema: type: string # ---- Response Headers - used by Standard Responses ---- headers: Content-Language: description: Response language - always en schema: type: string Content-Type: description: application/problem+json; charset=utf-8 according to RFC7807 schema: type: string Location: description: Location (URI-reference) of the submitted message. The relativ path shall be returned as URI-reference. schema: type: string example: /single-payments/618d4ac6e8a64e3d9f26aa3d8c4f323e X-Correlation-ID: description: Client defined ID from request to correlates HTTP requests between a client and server schema: type: string example: f058ebd6-02f7-4d3f-942e-904344e8cde5 # ---- Responses - Standard Errors Common Data Model ---- responses: standard202: headers: X-Correlation-ID: $ref: '#/components/headers/X-Correlation-ID' description: | Accepted - Valid request, requested data not available yet. The request may be attempted at a later time. content: application/json: schema: type: object # properties: ?? standard204: headers: X-Correlation-ID: $ref: '#/components/headers/X-Correlation-ID' description: | No content - The server has successfully fulfilled the request. There is no content to return and never will be. standard400: headers: Content-Type: $ref: '#/components/headers/Content-Type' Content-Language: $ref: '#/components/headers/Content-Language' X-Correlation-ID: $ref: '#/components/headers/X-Correlation-ID' description: | Bad Request - The format of the request was invalid. Examples: - InvalidPayload: type: /problems/INVALID_PAYLOAD title: Payload does not comply with API specification detail: Malformed JSON instance: path/to/corresponding/resource - InvalidParameter: type: /problems/INVALID_PAYLOAD title: Invalid parameter values have been detected detail: Sent data could not processed instance: path/to/corresponding/resource - MissingId: type: /problems/INVALID_PAYLOAD title: The payload was not valid detail: ID is missing instance: path/to/corresponding/resource content: application/problem+json: schema: $ref: '#/components/schemas/commonErrorResponse' standard401: headers: Content-Type: $ref: '#/components/headers/Content-Type' Content-Language: $ref: '#/components/headers/Content-Language' X-Correlation-ID: $ref: '#/components/headers/X-Correlation-ID' description: | Unauthorized - The request has not been applied because it provides no valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/commonErrorResponse' standard403: headers: Content-Type: $ref: '#/components/headers/Content-Type' Content-Language: $ref: '#/components/headers/Content-Language' X-Correlation-ID: $ref: '#/components/headers/X-Correlation-ID' description: | Forbidden - A valid OAuth Token was received, but access was denied. (Depending on the security requirements, providers can return 404 instead) Examples: - InsufficientPrivileges: type: /problems/INSUFFICIENT_PRIVILEGES title: No privileges for the requested operation detail: Insufficient privileges for the requested operation instance: path/to/corresponding/resource - ExpiredToken: type: /problems/EXPIRED_TOKEN title: The OAuth Token is expired detail: The token is no longer valid instance: path/to/corresponding/resource - NoFutureDateSupported: type: /problems/MALFORMED_PAYLOAD title: Invalid parameter values have been detected detail: Data for date in the future cannot be requested instance: path/to/corresponding/resource content: application/problem+json: schema: $ref: '#/components/schemas/commonErrorResponse' standard404: headers: Content-Type: $ref: '#/components/headers/Content-Type' Content-Language: $ref: '#/components/headers/Content-Language' X-Correlation-ID: $ref: '#/components/headers/X-Correlation-ID' description: | Not Found - Either the endpoint does not exist or a requested resource is not yet available (e.g., account statements) Examples: - InvalidAccounts: type: /problems/INSUFFICIENT_PRIVILEGES title: Insufficient privileges to access resource detail: The provided token does not grant access to the requested account instance: path/to/corresponding/resource - InvalidToken: type: /problems/INSUFFICIENT_PRIVILEGES title: Insufficient privileges to access resource detail: The provided token is not valid instance: path/to/corresponding/resource - WrongEndpointUrl: type: /problems/TECHNICAL_ERROR title: URL not found detail: The requested endpoint does not exist instance: path/to/corresponding/resource - NoIntradayDataSupported: type: /problems/NOT_IMPLEMENTED title: Feature is not implemented detail: This interface does not support intraday data instance: path/to/corresponding/resource content: application/problem+json: schema: $ref: '#/components/schemas/commonErrorResponse' standard405: headers: Content-Type: $ref: '#/components/headers/Content-Type' Content-Language: $ref: '#/components/headers/Content-Language' X-Correlation-ID: $ref: '#/components/headers/X-Correlation-ID' description: | Method Not Allowed - The method received in the request-line is known by the origin server but not supported by the target resource. Examples: - NotSupportedOperation: type: /problems/WRONG_METHOD title: This HTTP operation is not allowed on this endpoint detail: Only GET operations are allowed instance: path/to/corresponding/resource content: application/problem+json: schema: $ref: '#/components/schemas/commonErrorResponse' standard500: headers: Content-Type: $ref: '#/components/headers/Content-Type' Content-Language: $ref: '#/components/headers/Content-Language' X-Correlation-ID: $ref: '#/components/headers/X-Correlation-ID' description: | Internal Server Error - The server encountered an unexpected condition that prevented it from fulfilling the request. Examples: - TechnicalServerError: type: /problems/TECHNICAL_ERROR title: Technical error on server side detail: Processing yielded a technical error instance: path/to/corresponding/resource - ResourceTooLarge: type: /problems/RESOURCE_TOO_LARGE title: Generated resource was too large detail: The generated resource exceeded the size limit instance: path/to/corresponding/resource content: application/problem+json: schema: $ref: '#/components/schemas/commonErrorResponse' standard501: headers: Content-Type: $ref: '#/components/headers/Content-Type' Content-Language: $ref: '#/components/headers/Content-Language' X-Correlation-ID: $ref: '#/components/headers/X-Correlation-ID' description: | Not Implemented - The server does not support the functionality required to fulfill the request. Examples: - EndpointNotImplemented: type: /problems/NOT_IMPLEMENTED title: Target endpoint is not implemented detail: This endpoint is not implemented instance: path/to/corresponding/resource content: application/problem+json: schema: $ref: '#/components/schemas/commonErrorResponse' standard503: headers: Content-Type: $ref: '#/components/headers/Content-Type' Content-Language: $ref: '#/components/headers/Content-Language' X-Correlation-ID: $ref: '#/components/headers/X-Correlation-ID' description: | Service Unavailable - The server is currently unable to handle the request due to a temporary overload or scheduled maintenance. content: application/problem+json: schema: $ref: '#/components/schemas/commonErrorResponse'