From 093b826f2bbb99bbd57d84301dc68d490a8739eb Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Tue, 28 Jan 2025 11:00:09 +0100 Subject: [PATCH 1/4] OVPAY-1433 - Added order fulfillment and order creation v2.2. --- src/openapi/orders/service_engine_orders.yaml | 451 +++++++++++++----- 1 file changed, 331 insertions(+), 120 deletions(-) diff --git a/src/openapi/orders/service_engine_orders.yaml b/src/openapi/orders/service_engine_orders.yaml index dbee45f..6242cf5 100644 --- a/src/openapi/orders/service_engine_orders.yaml +++ b/src/openapi/orders/service_engine_orders.yaml @@ -469,6 +469,101 @@ paths: ], }, } + v2.2: + summary: Order fulfillment v2.2 + description: Order fulfillment v2.2 + value: + { + "orderId": "a0ef57fa-395c-4a03-96e9-234c26dccea9", + "customerProfileId": 1337, + "languageId": 1, + "billingAddressId": 1, + "shippingAddressId": 1, + "createdOn": "2024-03-22T09:00:00", + "orderStatusId": 4, + "orderLines": + [ + { + "orderLineId": "2ba39cae-c401-446b-ae5c-2d6d85b3df1f", + "productId": 1, + "quantity": 1, + "createdOn": "2024-03-22T09:00:00", + "validFrom": "2024-03-22T09:00:00", + "validUntil": null, + "orderLineStatusId": 4, + "tokens": + [ + { + "tokenTypeId": 1, + "ovPayTokenId": 1, + "serviceReferenceId": "NLOV1234567ABCDEFG", + "amount": 34, + "ovpasNumber": "OV34567", + "verificationCode": "A7H6", + "personalAccountData": + { + "name": "Jan de Vries", + "dateOfBirth": "01-01-1970", + "photoReference": "DSC_0502.JPG", + "fileType": "image/jpg", + "challengeTypeId": 1, + "oneTimePassword": "H5Iiz3JTaQeIV8p", + }, + }, + ], + }, + ], + "payments": + [ + { + "createdOn": "2024-03-22T09:00:00", + "amountDebit": 121, + "paymentMethodId": 1, + "touchPointId": 1, + "isRefund": false, + "htmPaymentReference": "HTM-1234", + "pspPaymentReference": "Buckaroo-1234", + "paymentStatuses": + [ + { + "createdOn": "2024-03-22T09:00:00", + "statusCode": "190", + "statusDescription": "Success", + "statusSubCode": "S001", + "statusSubDescription": "PaymentSuccessFul", + }, + ], + "payPush": + { + "consumerIssuer": "ABN AMRO", + "transactionId": "0000000000000001", + "consumerName": "J. de Vries", + "consumerIBAN": "NL44RABO0123456789", + "consumerBIC": "RABONL2U", + }, + }, + ], + "customer": + { + "birthname": "Jan", + "surname": "Vries", + "prefix": "de", + "emailAddress": "jandevries@outlook.com", + "dateOfBirth": "1970-01-01", + "addresses": + [ + { + "addressTypeId": 1, + "street": "Kon. Julianaplein", + "houseNumber": 10, + "houseNumberSuffix": "a", + "postalCode": "2595 AA", + "city": "Den Haag", + "country": "NL", + }, + ], + }, + } responses: "201": description: Created @@ -858,131 +953,247 @@ paths: application/json: schema: $ref: "#/components/schemas/unavailable" - example: - { - "externalOrderId": null, - "customerProfileId": 1337, - "totalAmount": 121, - "touchPoint": + examples: + v2: + summary: Order creation v2.1 + description: Order creation v2.1 + value: { - "salesTouchpointId": 3, - "name": "Website (Perplex)", - "isActive": true, - "retailerId": 1001, - }, - "languageId": 1, - "billingAddressId": 1, - "shippingAddressId": 1, - "createdOn": "2024-03-22T09:00:00", - "order_OrderStatus": - [ - { - "orderStatusId": 1, - "createdOn": "2024-03-22T09:00:00", - "description": "Concept order", - }, - ], - "orderLines": - [ - { - "externalOrderLineId": null, - "productId": 1, - "productName": "HTM Maandkorting 20%", - "productCode": "HTM-MND-20", - "productDescription": "HTM Maandkorting 20%", - "taxAmount": 21, - "taxMetadataId": "7275b910-37d9-40c1-aaac-80d8ceb62ff9", - "amountExclTax": 100, - "amountInclTax": 121, - "quantity": 1, - "orderLineTerms": - [{ "termsUrl": "generalTermsAndConditions.pdf" }], - "validFrom": "2024-03-22T09:00:00", - "validUntil": "2025-03-22T09:00:00", - "orderLineStatusId": 4, - "createdOn": "2024-03-22T09:00:00", - "customerTokens": - [ - { - "tokenTypeId": 1, - "ovPayTokenId": 1, - "serviceReferenceId": "NLOV1234567ABCDEFG", - "amount": 34, - "ovpasNumber": "OV34567", - "verificationCode": "A7H6", - "personalAccountData": - { - "name": "Jan de Vries", - "dateOfBirth": "01-01-1970", - "photoReference": "DSC_0502.JPG", - "fileType": "image/jpg", - "challengeTypeId": 1, - "oneTimePassword": "H5Iiz3JTaQeIV8p", - }, - }, - ], - "orderAccountingStatuses": - [ - { - "accountingStatusId": 1, - "createdOn": "2024-03-22T09:00:00", - "description": "Financiele transactie voor de FIKO.", - }, - ], - }, - ], - "payments": - [ - { - "createdOn": "2024-03-22T09:00:00", - "amountDebit": 121, - "paymentMethodId": 1, - "touchPointId": 1, - "isRefund": false, - "htmPaymentReference": "HTM-1234", - "pspPaymentReference": "Buckaroo-1234", - "paymentStatuses": - [ - { - "createdOn": "2024-03-22T09:00:00", - "statusCode": "190", - "statusDescription": "Success", - "statusSubCode": "S001", - "statusSubDescription": "PaymentSuccessFul", - }, - ], - "mandateInput": - { - "directDebitMandateTypeId": 1, - "createdOn": "2024-03-22T09:00:00", - "bic": "RABONL2U", - "iban": "NL44RABO0123456789", - "ascription": "J. de Vries", - "place": "Den Haag", - }, - }, - ], - "orderCustomer": - { - "birthname": "Jan", - "surname": "Vries", - "prefix": "de", - "emailAddress": "jandevries@outlook.com", - "dateOfBirth": "1970-01-01", - "orderCustomerAddresses": + "externalOrderId": null, + "customerProfileId": 1337, + "totalAmount": 121, + "touchPoint": + { + "salesTouchpointId": 3, + "name": "Website (Perplex)", + "isActive": true, + "retailerId": 1001, + }, + "languageId": 1, + "billingAddressId": 1, + "shippingAddressId": 1, + "createdOn": "2024-03-22T09:00:00", + "order_OrderStatus": [ { - "addressTypeId": 1, - "street": "Kon. Julianaplein", - "houseNumber": 10, - "houseNumberSuffix": "a", - "postalCode": "2595 AA", - "city": "Den Haag", - "country": "NL", + "orderStatusId": 1, + "createdOn": "2024-03-22T09:00:00", + "description": "Concept order", }, ], - }, - } + "orderLines": + [ + { + "externalOrderLineId": null, + "productId": 1, + "productName": "HTM Maandkorting 20%", + "productCode": "HTM-MND-20", + "productDescription": "HTM Maandkorting 20%", + "taxAmount": 21, + "taxMetadataId": "7275b910-37d9-40c1-aaac-80d8ceb62ff9", + "amountExclTax": 100, + "amountInclTax": 121, + "quantity": 1, + "orderLineTerms": + [{ "termsUrl": "generalTermsAndConditions.pdf" }], + "validFrom": "2024-03-22T09:00:00", + "validUntil": "2025-03-22T09:00:00", + "orderLineStatusId": 4, + "createdOn": "2024-03-22T09:00:00", + "customerTokens": + [ + { + "tokenTypeId": 1, + "ovPayTokenId": 1, + "serviceReferenceId": "NLOV1234567ABCDEFG", + "amount": 34, + "ovpasNumber": "OV34567", + "verificationCode": "A7H6", + "personalAccountData": + { + "name": "Jan de Vries", + "dateOfBirth": "01-01-1970", + "photoReference": "DSC_0502.JPG", + "fileType": "image/jpg", + "challengeTypeId": 1, + "oneTimePassword": "H5Iiz3JTaQeIV8p", + }, + }, + ], + "orderAccountingStatuses": + [ + { + "accountingStatusId": 1, + "createdOn": "2024-03-22T09:00:00", + "description": "Financiele transactie voor de FIKO.", + }, + ], + }, + ], + "payments": + [ + { + "createdOn": "2024-03-22T09:00:00", + "amountDebit": 121, + "paymentMethodId": 1, + "touchPointId": 1, + "isRefund": false, + "htmPaymentReference": "HTM-1234", + "pspPaymentReference": "Buckaroo-1234", + "paymentStatuses": + [ + { + "createdOn": "2024-03-22T09:00:00", + "statusCode": "190", + "statusDescription": "Success", + "statusSubCode": "S001", + "statusSubDescription": "PaymentSuccessFul", + }, + ], + "mandateInput": + { + "directDebitMandateTypeId": 1, + "createdOn": "2024-03-22T09:00:00", + "bic": "RABONL2U", + "iban": "NL44RABO0123456789", + "ascription": "J. de Vries", + "place": "Den Haag", + }, + }, + ], + "orderCustomer": + { + "birthname": "Jan", + "surname": "Vries", + "prefix": "de", + "emailAddress": "jandevries@outlook.com", + "dateOfBirth": "1970-01-01", + "orderCustomerAddresses": + [ + { + "addressTypeId": 1, + "street": "Kon. Julianaplein", + "houseNumber": 10, + "houseNumberSuffix": "a", + "postalCode": "2595 AA", + "city": "Den Haag", + "country": "NL", + }, + ], + }, + } + v2.2: + summary: Order creation v2.2 + description: Order creation v2.2 + value: + { + "externalOrderId": null, + "customerProfileId": 1337, + "touchPointId": 3, + "languageId": 1, + "billingAddressId": 1, + "shippingAddressId": 1, + "createdOn": "2024-03-22T09:00:00", + "order_OrderStatus": + [ + { + "orderStatusId": 1, + "createdOn": "2024-03-22T09:00:00", + "description": "Concept order", + }, + ], + "orderLines": + [ + { + "externalOrderLineId": null, + "productId": 1, + "quantity": 1, + "validFrom": "2024-03-22T09:00:00", + "validUntil": "2025-03-22T09:00:00", + "orderLineStatusId": 4, + "createdOn": "2024-03-22T09:00:00", + "customerTokens": + [ + { + "tokenTypeId": 1, + "ovPayTokenId": 1, + "serviceReferenceId": "NLOV1234567ABCDEFG", + "amount": 34, + "ovpasNumber": "OV34567", + "verificationCode": "A7H6", + "personalAccountData": + { + "name": "Jan de Vries", + "dateOfBirth": "01-01-1970", + "photoReference": "DSC_0502.JPG", + "fileType": "image/jpg", + "challengeTypeId": 1, + "oneTimePassword": "H5Iiz3JTaQeIV8p", + }, + }, + ], + "orderAccountingStatuses": + [ + { + "accountingStatusId": 1, + "createdOn": "2024-03-22T09:00:00", + "description": "Financiele transactie voor de FIKO.", + }, + ], + }, + ], + "payments": + [ + { + "createdOn": "2024-03-22T09:00:00", + "amountDebit": 121, + "paymentMethodId": 1, + "touchPointId": 1, + "isRefund": false, + "htmPaymentReference": "HTM-1234", + "pspPaymentReference": "Buckaroo-1234", + "paymentStatuses": + [ + { + "createdOn": "2024-03-22T09:00:00", + "statusCode": "190", + "statusDescription": "Success", + "statusSubCode": "S001", + "statusSubDescription": "PaymentSuccessFul", + }, + ], + "mandateInput": + { + "directDebitMandateTypeId": 1, + "createdOn": "2024-03-22T09:00:00", + "bic": "RABONL2U", + "iban": "NL44RABO0123456789", + "ascription": "J. de Vries", + "place": "Den Haag", + }, + }, + ], + "orderCustomer": + { + "birthname": "Jan", + "surname": "Vries", + "prefix": "de", + "emailAddress": "jandevries@outlook.com", + "dateOfBirth": "1970-01-01", + "orderCustomerAddresses": + [ + { + "addressTypeId": 1, + "street": "Kon. Julianaplein", + "houseNumber": 10, + "houseNumberSuffix": "a", + "postalCode": "2595 AA", + "city": "Den Haag", + "country": "NL", + }, + ], + }, + } responses: "201": description: Created From 2a1641cd4abc73756c735d264b43c5f060c3fb38 Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Mon, 3 Feb 2025 13:28:00 +0100 Subject: [PATCH 2/4] OVPAY-1433 - Removed customerProfileId from v2.2. --- src/openapi/orders/service_engine_orders.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/openapi/orders/service_engine_orders.yaml b/src/openapi/orders/service_engine_orders.yaml index 6242cf5..8cb39bd 100644 --- a/src/openapi/orders/service_engine_orders.yaml +++ b/src/openapi/orders/service_engine_orders.yaml @@ -475,7 +475,6 @@ paths: value: { "orderId": "a0ef57fa-395c-4a03-96e9-234c26dccea9", - "customerProfileId": 1337, "languageId": 1, "billingAddressId": 1, "shippingAddressId": 1, @@ -1088,7 +1087,6 @@ paths: value: { "externalOrderId": null, - "customerProfileId": 1337, "touchPointId": 3, "languageId": 1, "billingAddressId": 1, From c6a5a456dd2409771775babda0cdd8b8ed3e2d63 Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Mon, 3 Feb 2025 13:46:43 +0100 Subject: [PATCH 3/4] OVPAY-1433 - Removed touchPointId from v2.2. --- src/openapi/orders/service_engine_orders.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/openapi/orders/service_engine_orders.yaml b/src/openapi/orders/service_engine_orders.yaml index 8cb39bd..12207f8 100644 --- a/src/openapi/orders/service_engine_orders.yaml +++ b/src/openapi/orders/service_engine_orders.yaml @@ -518,7 +518,6 @@ paths: "createdOn": "2024-03-22T09:00:00", "amountDebit": 121, "paymentMethodId": 1, - "touchPointId": 1, "isRefund": false, "htmPaymentReference": "HTM-1234", "pspPaymentReference": "Buckaroo-1234", @@ -1087,7 +1086,6 @@ paths: value: { "externalOrderId": null, - "touchPointId": 3, "languageId": 1, "billingAddressId": 1, "shippingAddressId": 1, @@ -1146,7 +1144,6 @@ paths: "createdOn": "2024-03-22T09:00:00", "amountDebit": 121, "paymentMethodId": 1, - "touchPointId": 1, "isRefund": false, "htmPaymentReference": "HTM-1234", "pspPaymentReference": "Buckaroo-1234", From 3f4001ed4d5650e42a17f9d2a2ea9814128c553e Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Mon, 3 Feb 2025 14:56:01 +0100 Subject: [PATCH 4/4] OVPAY-1433 - Fulfillment now accepts externalOrderId and externalOrderLineId. --- src/openapi/orders/service_engine_orders.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/openapi/orders/service_engine_orders.yaml b/src/openapi/orders/service_engine_orders.yaml index 12207f8..058a3dc 100644 --- a/src/openapi/orders/service_engine_orders.yaml +++ b/src/openapi/orders/service_engine_orders.yaml @@ -474,7 +474,7 @@ paths: description: Order fulfillment v2.2 value: { - "orderId": "a0ef57fa-395c-4a03-96e9-234c26dccea9", + "externalOrderId": "a0ef57fa-395c-4a03-96e9-234c26dccea9", "languageId": 1, "billingAddressId": 1, "shippingAddressId": 1, @@ -483,7 +483,7 @@ paths: "orderLines": [ { - "orderLineId": "2ba39cae-c401-446b-ae5c-2d6d85b3df1f", + "externalOrderLineId": "2ba39cae-c401-446b-ae5c-2d6d85b3df1f", "productId": 1, "quantity": 1, "createdOn": "2024-03-22T09:00:00", @@ -579,7 +579,8 @@ paths: description: Order fulfillment v2 value: { - "orderId": "a0ef57fa-395c-4a03-96e9-234c26dccea9", + "orderId": "c73ff153-72e0-403f-a276-e86f544406f9", + "externalOrderId": "a0ef57fa-395c-4a03-96e9-234c26dccea9", "orderNumber": "123456", "customerProfileId": 1337, "totalAmount": 121, @@ -591,7 +592,8 @@ paths: "orderLines": [ { - "orderLineId": "2ba39cae-c401-446b-ae5c-2d6d85b3df1f", + "orderLineId": "cccada2c-d5ea-48ab-b4be-f590e16b5468", + "externalOrderLineId": "2ba39cae-c401-446b-ae5c-2d6d85b3df1f", "productId": 1, "productName": "HTM Maandkorting 20%", "productCode": "HTM-MND-20",