Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

ci(postman): fix `archipel` configs and test cases (#8360)

Arindam Sahoo0a06ad91252d
diff --git a/postman/collection-dir/archipel/.meta.json b/postman/collection-dir/archipel/.meta.json
index 91b6a65c5b..51840da897 100644
--- a/postman/collection-dir/archipel/.meta.json
+++ b/postman/collection-dir/archipel/.meta.json
@@ -1,6 +1,7 @@
{
"childrenOrder": [
"Health check",
- "Flow Testcases"
+ "Flow Testcases",
+ "Netcetera Testcases"
]
}
diff --git a/postman/collection-dir/archipel/.variable.json b/postman/collection-dir/archipel/.variable.json
index ab4ff9928f..7336b0b89c 100644
--- a/postman/collection-dir/archipel/.variable.json
+++ b/postman/collection-dir/archipel/.variable.json
@@ -83,6 +83,31 @@
{
"key": "archipel_transaction_uuid",
"value": ""
+ },
+ {
+ "key": "netcetera_certificate",
+ "value": "",
+ "type": "string"
+ },
+ {
+ "key": "netcetera_private_key",
+ "value": "",
+ "type": "string"
+ },
+ {
+ "key": "netcetera_merchant_configuration_id",
+ "value": "",
+ "type": "string"
+ },
+ {
+ "key": "netcetera_requestor_url",
+ "value": "",
+ "type": "string"
+ },
+ {
+ "key": "netcetera_requestor_app_url",
+ "value": "",
+ "type": "string"
}
]
}
\ No newline at end of file
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/.meta.json
index 1baf077be5..c3befab645 100644
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/.meta.json
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/.meta.json
@@ -5,14 +5,19 @@
"Scenario3a-Create payment with Manual capture",
"Scenario3b-Create payment with partial capture",
"Scenario3c-Create payment with confirm false and manual capture",
- "Scenario4-Zero auth mandates",
- "Scenario5-Create a mandate and recurring payment",
- "Scenario6-Saved card flow",
+ "Scenario4a-Void a payment",
+ "Scenario4b-Void a partially captured payment",
+ "Scenario4c-Void a successful payment",
+ "Scenario5a-Create a zero auth mandate and recurring payment (using mandate_id)",
+ "Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)",
+ "Scenario6a-Create a mandate and recurring payment (using mandate_id)",
+ "Scenario6b-Create a mandate and recurring payment (using connector agnostic)",
+ "Scenario7-Save card flow",
"Scenario8a-Incremental authorization",
"Scenario8b-Incremental authorization with partial capture",
"Scenario9a-Refund full payment",
"Scenario9b-Refund partial payment",
"Scenario9c-Refund full incremented payment",
- "Scenario10-Create 3DS payment"
+ "Scenario10-Create 3DS payment without external 3ds authentication"
]
}
\ No newline at end of file
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment without external 3ds authentication /.meta.json
similarity index 57%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/.meta.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment without external 3ds authentication /.meta.json
index 4ad2095438..e7cd44d47b 100644
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/.meta.json
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment without external 3ds authentication /.meta.json
@@ -2,8 +2,6 @@
"childrenOrder": [
"Payments - Create",
"Payments - Confirm",
- "Payments - External 3ds authentication",
- "Payments - Authorize request intent",
"Payments - Retrieve after confirm"
]
}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Confirm/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment without external 3ds authentication /Payments - Confirm/.event.meta.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Confirm/.event.meta.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment without external 3ds authentication /Payments - Confirm/.event.meta.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Confirm/event.prerequest.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment without external 3ds authentication /Payments - Confirm/event.prerequest.js
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Confirm/event.prerequest.js
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment without external 3ds authentication /Payments - Confirm/event.prerequest.js
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment without external 3ds authentication /Payments - Confirm/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment without external 3ds authentication /Payments - Confirm/event.test.js
new file mode 100644
index 0000000000..98f6c9e517
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment without external 3ds authentication /Payments - Confirm/event.test.js
@@ -0,0 +1,60 @@
+// Validate status 400
+pm.test("[POST]::/payments/:id/confirm - Status code is 400", function () {
+ pm.response.to.have.status(400);
+});
+
+// Validate if response header has matching content-type
+pm.test(
+ "[POST]::/payments/:id/confirm - Content-Type is application/json",
+ function () {
+ pm.expect(pm.response.headers.get("Content-Type")).to.include(
+ "application/json",
+ );
+ },
+);
+
+// Validate if response has JSON Body
+pm.test("[POST]::/payments/:id/confirm - Response has JSON Body", function () {
+ pm.response.to.have.jsonBody();
+});
+
+// Set response object as internal variable
+let jsonData = {};
+try {
+ jsonData = pm.response.json();
+} catch (e) {}
+
+// Validate if response has error body
+pm.test("[POST]::/payments/:id/confirm - Response has error body", function () {
+ pm.expect(jsonData).to.have.property("error");
+});
+
+// Validate if error type is "invalid_request"
+pm.test(
+ "[POST]::/payments/:id/confirm - Error type is 'invalid_request'",
+ function () {
+ pm.expect(jsonData.error).to.have.property("type", "invalid_request");
+ },
+);
+
+// Validate if error message is "Payment method type not supported"
+pm.test(
+ "[POST]::/payments/:id/confirm - Error message is 'Payment method type not supported'",
+ function () {
+ pm.expect(jsonData.error).to.have.property(
+ "message",
+ "Payment method type not supported",
+ );
+ },
+);
+
+// Validate if error reason is "Selected 3DS authentication method is not supported by archipel"
+pm.test(
+ "[POST]::/payments/:id/confirm - Error reason is 'Selected 3DS authentication method is not supported by archipel'",
+ function () {
+ pm.expect(jsonData.error).to.have.property(
+ "reason",
+ "Selected 3DS authentication method is not supported by archipel",
+ );
+ },
+);
\ No newline at end of file
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Confirm/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment without external 3ds authentication /Payments - Confirm/request.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Confirm/request.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment without external 3ds authentication /Payments - Confirm/request.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Authorize request intent/response.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment without external 3ds authentication /Payments - Confirm/response.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Authorize request intent/response.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment without external 3ds authentication /Payments - Confirm/response.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Create/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment without external 3ds authentication /Payments - Create/.event.meta.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Create/.event.meta.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment without external 3ds authentication /Payments - Create/.event.meta.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Create/event.prerequest.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment without external 3ds authentication /Payments - Create/event.prerequest.js
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Create/event.prerequest.js
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment without external 3ds authentication /Payments - Create/event.prerequest.js
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Create/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment without external 3ds authentication /Payments - Create/event.test.js
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Create/event.test.js
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment without external 3ds authentication /Payments - Create/event.test.js
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Create/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment without external 3ds authentication /Payments - Create/request.json
similarity index 97%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Create/request.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment without external 3ds authentication /Payments - Create/request.json
index 49feac4989..3c72b8ce48 100644
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Create/request.json
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment without external 3ds authentication /Payments - Create/request.json
@@ -24,7 +24,7 @@
"confirm": false,
"capture_method": "automatic",
"authentication_type": "three_ds",
- "request_external_three_ds_authentication": true,
+ "request_external_three_ds_authentication": false,
"profile_id": "{{profile_id}}",
"email": "[email protected]",
"name": "John Doe",
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Confirm/response.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment without external 3ds authentication /Payments - Create/response.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Confirm/response.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment without external 3ds authentication /Payments - Create/response.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Authorize request intent/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment without external 3ds authentication /Payments - Retrieve after confirm/.event.meta.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Authorize request intent/.event.meta.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment without external 3ds authentication /Payments - Retrieve after confirm/.event.meta.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment without external 3ds authentication /Payments - Retrieve after confirm/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment without external 3ds authentication /Payments - Retrieve after confirm/event.test.js
new file mode 100644
index 0000000000..277ad78634
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment without external 3ds authentication /Payments - Retrieve after confirm/event.test.js
@@ -0,0 +1,60 @@
+// Validate status 2xx
+pm.test("[GET]::/payments/:id - Status code is 2xx", function () {
+ pm.response.to.be.success;
+});
+
+// Validate if response header has matching content-type
+pm.test("[GET]::/payments/:id - Content-Type is application/json", function () {
+ pm.expect(pm.response.headers.get("Content-Type")).to.include(
+ "application/json",
+ );
+});
+
+// Validate if response has JSON Body
+pm.test("[GET]::/payments/:id - Response has JSON Body", function () {
+ pm.response.to.have.jsonBody();
+});
+
+// Set response object as internal variable
+let jsonData = {};
+try {
+ jsonData = pm.response.json();
+} catch (e) {}
+
+// Response body should have value "requires_payment_method" for "status"
+pm.test(
+ "[POST]::/payments/:id - Content check if value for 'status' matches 'requires_payment_method'",
+ function () {
+ pm.expect(jsonData.status).to.eql("requires_payment_method");
+ },
+);
+
+pm.test(
+ "[POST]::/payments/:id - Content check if value for 'amount' equal 500",
+ function () {
+ pm.expect(jsonData.amount).to.eql(500);
+ },
+);
+
+pm.test(
+ "[POST]::/payments/:id - Content check if value for 'net_amount' equal 500",
+ function () {
+ pm.expect(jsonData.net_amount).to.eql(500);
+ },
+);
+
+pm.test(
+ "[POST]::/payments/:id - Content check if value for 'amount_capturable' equal 0",
+ function () {
+ pm.expect(jsonData.amount_capturable).to.eql(0);
+ },
+);
+
+// Response body should have "connector_transaction_id"
+pm.test(
+ "[POST]::/payments - Content check if 'connector_transaction_id' exists",
+ function () {
+ pm.expect(typeof jsonData.connector_transaction_id !== "undefined").to.be
+ .true;
+ },
+);
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Retrieve after confirm/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment without external 3ds authentication /Payments - Retrieve after confirm/request.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Retrieve after confirm/request.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment without external 3ds authentication /Payments - Retrieve after confirm/request.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Create/response.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment without external 3ds authentication /Payments - Retrieve after confirm/response.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Create/response.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment without external 3ds authentication /Payments - Retrieve after confirm/response.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Authorize request intent/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Authorize request intent/event.test.js
deleted file mode 100644
index 5a76256cd9..0000000000
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Authorize request intent/event.test.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// Validate status 2xx
-pm.test("[GET]::/payments/:id - Status code is 2xx", function () {
- pm.response.to.be.success;
-});
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Confirm/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Confirm/event.test.js
deleted file mode 100644
index ee1ac3796b..0000000000
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Confirm/event.test.js
+++ /dev/null
@@ -1,49 +0,0 @@
-// Validate status 2xx
-pm.test("[POST]::/payments/:id/confirm - Status code is 2xx", function () {
- pm.response.to.be.success;
-});
-
-// Validate if response header has matching content-type
-pm.test(
- "[POST]::/payments/:id/confirm - Content-Type is application/json",
- function () {
- pm.expect(pm.response.headers.get("Content-Type")).to.include(
- "application/json",
- );
- },
-);
-
-// Validate if response has JSON Body
-pm.test("[POST]::/payments/:id/confirm - Response has JSON Body", function () {
- pm.response.to.have.jsonBody();
-});
-
-// Set response object as internal variable
-let jsonData = {};
-try {
- jsonData = pm.response.json();
-} catch (e) {}
-
-// Response body should have value "requires_customer_action" for "status"
-pm.test(
-"[POST]::/payments/:id/confirm - Content check if value for 'status' matches 'requires_customer_action'",
- function () {
- pm.expect(jsonData.status).to.eql("requires_customer_action");
- },
-);
-
-pm.test(
- "[POST]::/payments - Content check if 'connector_transaction_id' exists",
- function () {
- pm.expect(typeof jsonData.connector_transaction_id !== "undefined").to.be
- .true;
- pm.collectionVariables.set("connector_transaction_id", jsonData.connector_transaction_id)
- },
-);
-
-pm.test(
- "[POST]::/payments - Content check if 'connector' is archipel",
- function () {
- pm.expect(jsonData.connector).to.be.equal("archipel");
- },
-);
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - External 3ds authentication/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - External 3ds authentication/event.test.js
deleted file mode 100644
index ef774a4df8..0000000000
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - External 3ds authentication/event.test.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// Validate status 2xx
-pm.test("[POST]::/payments/:id/confirm - Status code is 2xx", function () {
- pm.response.to.be.success;
-});
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/.meta.json
deleted file mode 100644
index 34e1413308..0000000000
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/.meta.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "childrenOrder": [
- "Payments - Create mandate",
- "Payments - Confirm mandate",
- "Payments - Create recurring",
- "Payments - Retrieve recurring"
- ]
-}
\ No newline at end of file
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/Payments - Retrieve recurring/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/Payments - Retrieve recurring/event.test.js
deleted file mode 100644
index 115e821b7e..0000000000
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/Payments - Retrieve recurring/event.test.js
+++ /dev/null
@@ -1,82 +0,0 @@
-// Validate status 2xx
-pm.test("[GET]::/payments/:id - Status code is 2xx", function () {
- pm.response.to.be.success;
-});
-
-// Validate if response header has matching content-type
-pm.test("[GET]::/payments/:id - Content-Type is application/json", function () {
- pm.expect(pm.response.headers.get("Content-Type")).to.include(
- "application/json",
- );
-});
-
-// Validate if response has JSON Body
-pm.test("[GET]::/payments/:id - Response has JSON Body", function () {
- pm.response.to.have.jsonBody();
-});
-
-// Set response object as internal variable
-let jsonData = {};
-try {
- jsonData = pm.response.json();
-} catch (e) {}
-
-// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
-if (jsonData?.payment_id) {
- pm.collectionVariables.set("payment_id", jsonData.payment_id);
- console.log(
- "- use {{payment_id}} as collection variable for value",
- jsonData.payment_id,
- );
-} else {
- console.log(
- "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
- );
-}
-
-
-// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
-if (jsonData?.client_secret) {
- pm.collectionVariables.set("client_secret", jsonData.client_secret);
- console.log(
- "- use {{client_secret}} as collection variable for value",
- jsonData.client_secret,
- );
-} else {
- console.log(
- "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
- );
-}
-
-// Response body should have value "Succeeded" for "status"
-pm.test(
-"[POST]::/payments/:id - Content check if value for 'status' matches 'succeeded'",
- function () {
- pm.expect(jsonData.status).to.eql("succeeded");
- },
-);
-
-
-// Response body should have "mandate_id"
-pm.test(
- "[POST]::/payments - Content check if 'mandate_id' exists",
- function () {
- pm.expect(typeof jsonData.mandate_id !== "undefined").to.be.true;
- },
-);
-
-// Response body should have "mandate_id"
-pm.test(
- "[POST]::/payments - Content check if 'mandate_id' exists is correct ",
- function () {
- pm.expect(jsonData.mandate_id).to.eql(pm.collectionVariables.get("mandate_id"));
- },
-);
-
-// Response body should have "mandate_data"
-pm.test(
- "[POST]::/payments - Content check if 'mandate_data' exists",
- function () {
- pm.expect(typeof jsonData.mandate_data !== "undefined").to.be.true;
- },
-);
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4a-Void a payment/.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4a-Void a payment/.meta.json
new file mode 100644
index 0000000000..14bab2fbd2
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4a-Void a payment/.meta.json
@@ -0,0 +1,7 @@
+{
+ "childrenOrder": [
+ "Payments - Create",
+ "Payments - Cancel",
+ "Payments - Retrieve"
+ ]
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4a-Void a payment/Payments - Cancel/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4a-Void a payment/Payments - Cancel/.event.meta.json
new file mode 100644
index 0000000000..0731450e6b
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4a-Void a payment/Payments - Cancel/.event.meta.json
@@ -0,0 +1,3 @@
+{
+ "eventOrder": ["event.test.js"]
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Void the payment/Payments - Cancel/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4a-Void a payment/Payments - Cancel/event.test.js
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Void the payment/Payments - Cancel/event.test.js
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4a-Void a payment/Payments - Cancel/event.test.js
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Void the payment/Payments - Cancel/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4a-Void a payment/Payments - Cancel/request.json
similarity index 87%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Void the payment/Payments - Cancel/request.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4a-Void a payment/Payments - Cancel/request.json
index f64e37a125..3a1d8aa178 100644
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Void the payment/Payments - Cancel/request.json
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4a-Void a payment/Payments - Cancel/request.json
@@ -23,14 +23,8 @@
},
"url": {
"raw": "{{baseUrl}}/payments/:id/cancel",
- "host": [
- "{{baseUrl}}"
- ],
- "path": [
- "payments",
- ":id",
- "cancel"
- ],
+ "host": ["{{baseUrl}}"],
+ "path": ["payments", ":id", "cancel"],
"variable": [
{
"key": "id",
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - External 3ds authentication/response.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4a-Void a payment/Payments - Cancel/response.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - External 3ds authentication/response.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4a-Void a payment/Payments - Cancel/response.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4a-Void a payment/Payments - Create/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4a-Void a payment/Payments - Create/.event.meta.json
new file mode 100644
index 0000000000..0731450e6b
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4a-Void a payment/Payments - Create/.event.meta.json
@@ -0,0 +1,3 @@
+{
+ "eventOrder": ["event.test.js"]
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4a-Void a payment/Payments - Create/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4a-Void a payment/Payments - Create/event.test.js
new file mode 100644
index 0000000000..55dc35b912
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4a-Void a payment/Payments - Create/event.test.js
@@ -0,0 +1,71 @@
+// Validate status 2xx
+pm.test("[POST]::/payments - Status code is 2xx", function () {
+ pm.response.to.be.success;
+});
+
+// Validate if response header has matching content-type
+pm.test("[POST]::/payments - Content-Type is application/json", function () {
+ pm.expect(pm.response.headers.get("Content-Type")).to.include(
+ "application/json",
+ );
+});
+
+// Validate if response has JSON Body
+pm.test("[POST]::/payments - Response has JSON Body", function () {
+ pm.response.to.have.jsonBody();
+});
+
+// Set response object as internal variable
+let jsonData = {};
+try {
+ jsonData = pm.response.json();
+} catch (e) {}
+
+// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
+if (jsonData?.payment_id) {
+ pm.collectionVariables.set("payment_id", jsonData.payment_id);
+ console.log(
+ "- use {{payment_id}} as collection variable for value",
+ jsonData.payment_id,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
+ );
+}
+
+// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
+if (jsonData?.mandate_id) {
+ pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
+ console.log(
+ "- use {{mandate_id}} as collection variable for value",
+ jsonData.mandate_id,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
+ );
+}
+
+// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
+if (jsonData?.client_secret) {
+ pm.collectionVariables.set("client_secret", jsonData.client_secret);
+ console.log(
+ "- use {{client_secret}} as collection variable for value",
+ jsonData.client_secret,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
+ );
+}
+
+// Response body should have value "requires_confirmation" for "status"
+if (jsonData?.status) {
+ pm.test(
+ "[POST]::/payments - Content check if value for 'status' matches 'requires_confirmation'",
+ function () {
+ pm.expect(jsonData.status).to.eql("requires_confirmation");
+ },
+ );
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Create second/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4a-Void a payment/Payments - Create/request.json
similarity index 68%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Create second/request.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4a-Void a payment/Payments - Create/request.json
index d9143d2288..582070052c 100644
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Create second/request.json
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4a-Void a payment/Payments - Create/request.json
@@ -19,14 +19,28 @@
},
"raw_json_formatted": {
"amount": 500,
+ "amount_to_capture": 500,
"currency": "EUR",
- "capture_on": "{{$isoTimestamp}}",
+ "confirm": false,
"capture_method": "automatic",
"authentication_type": "no_three_ds",
+ "payment_method": "card",
+ "payment_method_type": "credit",
+ "payment_method_data": {
+ "card": {
+ "card_cvc": "123",
+ "card_exp_month": "01",
+ "card_exp_year": "50",
+ "card_holder_name": "John Doe",
+ "card_number": "5185570141917102"
+ }
+ },
"profile_id": "{{profile_id}}",
- "customer_id": "{{customer_id}}",
- "setup_future_usage": "off_session",
- "description": "[Archipel Connector][Scenario6] - Create payment with already saved card",
+ "email": "[email protected]",
+ "name": "John Doe",
+ "phone": "8056594427",
+ "phone_country_code": "+91",
+ "description": "{{$randomLoremSentence}}",
"billing": {
"address": {
"line1": "2 ter",
@@ -58,7 +72,9 @@
"number": "8056594427",
"country_code": "+91"
}
- }
+ },
+ "statement_descriptor_name": "Joseph Doe",
+ "statement_descriptor_suffix": "JS"
}
},
"url": {
@@ -69,6 +85,5 @@
"path": [
"payments"
]
- },
- "description": "To process a payment you will have to create a payment, attach a payment method and confirm. Depending on the user journey you wish to achieve, you may opt to all the steps in a single request or in a sequence of API request using following APIs: (i) Payments - Update, (ii) Payments - Confirm, and (iii) Payments - Capture"
+ }
}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Retrieve after confirm/response.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4a-Void a payment/Payments - Create/response.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Retrieve after confirm/response.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4a-Void a payment/Payments - Create/response.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4a-Void a payment/Payments - Retrieve/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4a-Void a payment/Payments - Retrieve/.event.meta.json
new file mode 100644
index 0000000000..0731450e6b
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4a-Void a payment/Payments - Retrieve/.event.meta.json
@@ -0,0 +1,3 @@
+{
+ "eventOrder": ["event.test.js"]
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4a-Void a payment/Payments - Retrieve/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4a-Void a payment/Payments - Retrieve/event.test.js
new file mode 100644
index 0000000000..5e52e13a59
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4a-Void a payment/Payments - Retrieve/event.test.js
@@ -0,0 +1,71 @@
+// Validate status 2xx
+pm.test("[GET]::/payments/:id - Status code is 2xx", function () {
+ pm.response.to.be.success;
+});
+
+// Validate if response header has matching content-type
+pm.test("[GET]::/payments/:id - Content-Type is application/json", function () {
+ pm.expect(pm.response.headers.get("Content-Type")).to.include(
+ "application/json",
+ );
+});
+
+// Validate if response has JSON Body
+pm.test("[GET]::/payments/:id - Response has JSON Body", function () {
+ pm.response.to.have.jsonBody();
+});
+
+// Set response object as internal variable
+let jsonData = {};
+try {
+ jsonData = pm.response.json();
+} catch (e) {}
+
+// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
+if (jsonData?.payment_id) {
+ pm.collectionVariables.set("payment_id", jsonData.payment_id);
+ console.log(
+ "- use {{payment_id}} as collection variable for value",
+ jsonData.payment_id,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
+ );
+}
+
+// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
+if (jsonData?.mandate_id) {
+ pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
+ console.log(
+ "- use {{mandate_id}} as collection variable for value",
+ jsonData.mandate_id,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
+ );
+}
+
+// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
+if (jsonData?.client_secret) {
+ pm.collectionVariables.set("client_secret", jsonData.client_secret);
+ console.log(
+ "- use {{client_secret}} as collection variable for value",
+ jsonData.client_secret,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
+ );
+}
+
+// Response body should have value "cancelled" for "status"
+if (jsonData?.status) {
+ pm.test(
+ "[POST]::/payments/:id - Content check if value for 'status' matches 'cancelled'",
+ function () {
+ pm.expect(jsonData.status).to.eql("cancelled");
+ },
+ );
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4a-Void a payment/Payments - Retrieve/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4a-Void a payment/Payments - Retrieve/request.json
new file mode 100644
index 0000000000..6cd4b7d96c
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4a-Void a payment/Payments - Retrieve/request.json
@@ -0,0 +1,28 @@
+{
+ "method": "GET",
+ "header": [
+ {
+ "key": "Accept",
+ "value": "application/json"
+ }
+ ],
+ "url": {
+ "raw": "{{baseUrl}}/payments/:id?force_sync=true",
+ "host": ["{{baseUrl}}"],
+ "path": ["payments", ":id"],
+ "query": [
+ {
+ "key": "force_sync",
+ "value": "true"
+ }
+ ],
+ "variable": [
+ {
+ "key": "id",
+ "value": "{{payment_id}}",
+ "description": "(Required) unique payment id"
+ }
+ ]
+ },
+ "description": "To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment"
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/Payments - Confirm mandate/response.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4a-Void a payment/Payments - Retrieve/response.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/Payments - Confirm mandate/response.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4a-Void a payment/Payments - Retrieve/response.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/.meta.json
new file mode 100644
index 0000000000..5348348889
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/.meta.json
@@ -0,0 +1,8 @@
+{
+ "childrenOrder": [
+ "Payments - Create",
+ "Payments - Capture",
+ "Payments - Cancel",
+ "Payments - Retrieve"
+ ]
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Cancel/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Cancel/.event.meta.json
new file mode 100644
index 0000000000..0731450e6b
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Cancel/.event.meta.json
@@ -0,0 +1,3 @@
+{
+ "eventOrder": ["event.test.js"]
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Confirm first and save card/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Cancel/event.test.js
similarity index 71%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Confirm first and save card/event.test.js
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Cancel/event.test.js
index 061689b073..dcf3f19164 100644
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Confirm first and save card/event.test.js
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Cancel/event.test.js
@@ -1,11 +1,11 @@
// Validate status 2xx
-pm.test("[POST]::/payments/:id/confirm - Status code is 2xx", function () {
+pm.test("[POST]::/payments/:id/cancel - Status code is 2xx", function () {
pm.response.to.be.success;
});
// Validate if response header has matching content-type
pm.test(
- "[POST]::/payments/:id/confirm - Content-Type is application/json",
+ "[POST]::/payments/:id/cancel - Content-Type is application/json",
function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include(
"application/json",
@@ -14,7 +14,7 @@ pm.test(
);
// Validate if response has JSON Body
-pm.test("[POST]::/payments/:id/confirm - Response has JSON Body", function () {
+pm.test("[POST]::/payments/:id/cancel - Response has JSON Body", function () {
pm.response.to.have.jsonBody();
});
@@ -37,7 +37,6 @@ if (jsonData?.payment_id) {
);
}
-
// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
if (jsonData?.client_secret) {
pm.collectionVariables.set("client_secret", jsonData.client_secret);
@@ -51,11 +50,12 @@ if (jsonData?.client_secret) {
);
}
-// Response body should have value "succeeded" for "status"
-pm.test(
-"[POST]::/payments/:id/confirm - Content check if value for 'status' matches 'succeeded'",
-function () {
- pm.expect(jsonData.status).to.eql("succeeded");
- },
-);
-
+// Response body should have value "cancelled" for "status"
+if (jsonData?.status) {
+ pm.test(
+ "[POST]::/payments/:id/cancel - Content check if value for 'status' matches 'cancelled'",
+ function () {
+ pm.expect(jsonData.status).to.eql("cancelled");
+ },
+ );
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Cancel/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Cancel/request.json
new file mode 100644
index 0000000000..3a1d8aa178
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Cancel/request.json
@@ -0,0 +1,37 @@
+{
+ "method": "POST",
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ },
+ {
+ "key": "Accept",
+ "value": "application/json"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ },
+ "raw_json_formatted": {
+ "cancellation_reason": "requested_by_customer"
+ }
+ },
+ "url": {
+ "raw": "{{baseUrl}}/payments/:id/cancel",
+ "host": ["{{baseUrl}}"],
+ "path": ["payments", ":id", "cancel"],
+ "variable": [
+ {
+ "key": "id",
+ "value": "{{payment_id}}",
+ "description": "(Required) unique payment id"
+ }
+ ]
+ },
+ "description": "A Payment could can be cancelled when it is in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_customer_action"
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/Payments - Create mandate/response.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Cancel/response.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/Payments - Create mandate/response.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Cancel/response.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - External 3ds authentication/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Capture/.event.meta.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - External 3ds authentication/.event.meta.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Capture/.event.meta.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - External 3ds authentication/event.prerequest.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Capture/event.prerequest.js
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - External 3ds authentication/event.prerequest.js
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Capture/event.prerequest.js
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Capture/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Capture/event.test.js
new file mode 100644
index 0000000000..61e9ea7b21
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Capture/event.test.js
@@ -0,0 +1,107 @@
+// Validate status 2xx
+pm.test("[POST]::/payments/:id/capture - Status code is 2xx", function () {
+ pm.response.to.be.success;
+});
+
+// Validate if response header has matching content-type
+pm.test(
+ "[POST]::/payments/:id/capture - Content-Type is application/json",
+ function () {
+ pm.expect(pm.response.headers.get("Content-Type")).to.include(
+ "application/json",
+ );
+ },
+);
+
+// Validate if response has JSON Body
+pm.test("[POST]::/payments/:id/capture - Response has JSON Body", function () {
+ pm.response.to.have.jsonBody();
+});
+
+// Set response object as internal variable
+let jsonData = {};
+try {
+ jsonData = pm.response.json();
+} catch (e) {}
+
+// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
+if (jsonData?.payment_id) {
+ pm.collectionVariables.set("payment_id", jsonData.payment_id);
+ console.log(
+ "- use {{payment_id}} as collection variable for value",
+ jsonData.payment_id,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
+ );
+}
+
+// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
+if (jsonData?.client_secret) {
+ pm.collectionVariables.set("client_secret", jsonData.client_secret);
+ console.log(
+ "- use {{client_secret}} as collection variable for value",
+ jsonData.client_secret,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
+ );
+}
+
+// Response body should have value "partially_captured" for "status"
+pm.test(
+"[POST]:://payments/:id/capture - Content check if value for 'status' matches 'partially_captured'",
+function () {
+ pm.expect(jsonData.status).to.eql("partially_captured");
+},
+);
+
+// Response body should have value "500" for "amount"
+pm.test(
+"[post]:://payments/:id/capture - Content check if value for 'amount' matches '500'",
+ function () {
+ pm.expect(jsonData.amount).to.eql(500);
+ },
+);
+
+// Response body should have value "500" for "net_amount"
+pm.test(
+"[post]:://payments/:id/capture - Content check if value for 'net_amount' matches '500'",
+ function () {
+ pm.expect(jsonData.net_amount).to.eql(500);
+ },
+);
+
+// Response body should have value "500" for "amount_capturable"
+pm.test(
+"[post]:://payments/:id/capture - Content check if value for 'amount_capturable' matches '0'",
+ function () {
+ pm.expect(jsonData.amount_capturable).to.eql(0);
+ },
+);
+
+pm.test(
+"[POST]::/payments:id/capture - Content check if value for 'amount_received' equal 200",
+ function () {
+ pm.expect(jsonData.amount_received).to.eql(200);
+ },
+);
+
+
+pm.test(
+ "[POST]::/payments - Content check if 'connector_transaction_id' exists",
+ function () {
+ pm.expect(typeof jsonData.connector_transaction_id !== "undefined").to.be
+ .true;
+ pm.collectionVariables.set("connector_transaction_id", jsonData.connector_transaction_id)
+ },
+);
+
+pm.test(
+ "[POST]::/payments - Content check if 'connector' is archipel",
+ function () {
+ pm.expect(jsonData.connector).to.be.equal("archipel");
+ },
+);
\ No newline at end of file
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Capture/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Capture/request.json
new file mode 100644
index 0000000000..262c5e9352
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Capture/request.json
@@ -0,0 +1,44 @@
+{
+ "method": "POST",
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ },
+ {
+ "key": "Accept",
+ "value": "application/json"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ },
+ "raw_json_formatted": {
+ "amount_to_capture": 200,
+ "statement_descriptor_name": "John",
+ "statement_descriptor_suffix": "JD"
+ }
+ },
+ "url": {
+ "raw": "{{baseUrl}}/payments/:id/capture",
+ "host": [
+ "{{baseUrl}}"
+ ],
+ "path": [
+ "payments",
+ ":id",
+ "capture"
+ ],
+ "variable": [
+ {
+ "key": "id",
+ "value": "{{payment_id}}"
+ }
+ ]
+ },
+ "description": "To process a payment you will have to create a payment, attach a payment method and confirm. Depending on the user journey you wish to achieve, you may opt to all the steps in a single request or in a sequence of API request using following APIs: (i) Payments - Update, (ii) Payments - Confirm, and (iii) Payments - Capture"
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/Payments - Create recurring/response.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Capture/response.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/Payments - Create recurring/response.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Capture/response.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Create/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Create/.event.meta.json
new file mode 100644
index 0000000000..0731450e6b
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Create/.event.meta.json
@@ -0,0 +1,3 @@
+{
+ "eventOrder": ["event.test.js"]
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Create/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Create/event.test.js
new file mode 100644
index 0000000000..d683186aa0
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Create/event.test.js
@@ -0,0 +1,71 @@
+// Validate status 2xx
+pm.test("[POST]::/payments - Status code is 2xx", function () {
+ pm.response.to.be.success;
+});
+
+// Validate if response header has matching content-type
+pm.test("[POST]::/payments - Content-Type is application/json", function () {
+ pm.expect(pm.response.headers.get("Content-Type")).to.include(
+ "application/json",
+ );
+});
+
+// Validate if response has JSON Body
+pm.test("[POST]::/payments - Response has JSON Body", function () {
+ pm.response.to.have.jsonBody();
+});
+
+// Set response object as internal variable
+let jsonData = {};
+try {
+ jsonData = pm.response.json();
+} catch (e) {}
+
+// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
+if (jsonData?.payment_id) {
+ pm.collectionVariables.set("payment_id", jsonData.payment_id);
+ console.log(
+ "- use {{payment_id}} as collection variable for value",
+ jsonData.payment_id,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
+ );
+}
+
+// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
+if (jsonData?.mandate_id) {
+ pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
+ console.log(
+ "- use {{mandate_id}} as collection variable for value",
+ jsonData.mandate_id,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
+ );
+}
+
+// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
+if (jsonData?.client_secret) {
+ pm.collectionVariables.set("client_secret", jsonData.client_secret);
+ console.log(
+ "- use {{client_secret}} as collection variable for value",
+ jsonData.client_secret,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
+ );
+}
+
+// Response body should have value "requires_capture" for "status"
+if (jsonData?.status) {
+ pm.test(
+ "[POST]::/payments - Content check if value for 'status' matches 'requires_capture'",
+ function () {
+ pm.expect(jsonData.status).to.eql("requires_capture");
+ },
+ );
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Void the payment/Payments - Create/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Create/request.json
similarity index 66%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Void the payment/Payments - Create/request.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Create/request.json
index db982ee59b..466242b3ae 100644
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Void the payment/Payments - Create/request.json
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Create/request.json
@@ -24,9 +24,6 @@
"confirm": true,
"capture_method": "manual",
"authentication_type": "no_three_ds",
- "profile_id": "{{profile_id}}",
- "phone_country_code": "+91",
- "description": "[Archipel][Connector][Scenario7] - Create payment and cancel it",
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_data": {
@@ -38,6 +35,12 @@
"card_number": "5185570141917102"
}
},
+ "profile_id": "{{profile_id}}",
+ "email": "[email protected]",
+ "name": "John Doe",
+ "phone": "8056594427",
+ "phone_country_code": "+91",
+ "description": "{{$randomLoremSentence}}",
"billing": {
"address": {
"line1": "2 ter",
@@ -52,7 +55,26 @@
"number": "8056594427",
"country_code": "+91"
}
- }
+ },
+ "shipping": {
+ "address": {
+ "line1": "1467",
+ "line2": "Harrison Street",
+ "line3": "Harrison Street",
+ "city": "San Fransico",
+ "state": "California",
+ "zip": "94122",
+ "country": "US",
+ "first_name": "joseph",
+ "last_name": "Doe"
+ },
+ "phone": {
+ "number": "8056594427",
+ "country_code": "+91"
+ }
+ },
+ "statement_descriptor_name": "Joseph Doe",
+ "statement_descriptor_suffix": "JS"
}
},
"url": {
@@ -63,6 +85,5 @@
"path": [
"payments"
]
- },
- "description": "To process a payment you will have to create a payment, attach a payment method and confirm. Depending on the user journey you wish to achieve, you may opt to all the steps in a single request or in a sequence of API request using following APIs: (i) Payments - Update, (ii) Payments - Confirm, and (iii) Payments - Capture"
+ }
}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/Payments - Retrieve recurring/response.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Create/response.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/Payments - Retrieve recurring/response.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Create/response.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Retrieve/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Retrieve/.event.meta.json
new file mode 100644
index 0000000000..0731450e6b
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Retrieve/.event.meta.json
@@ -0,0 +1,3 @@
+{
+ "eventOrder": ["event.test.js"]
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Retrieve/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Retrieve/event.test.js
new file mode 100644
index 0000000000..5e52e13a59
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Retrieve/event.test.js
@@ -0,0 +1,71 @@
+// Validate status 2xx
+pm.test("[GET]::/payments/:id - Status code is 2xx", function () {
+ pm.response.to.be.success;
+});
+
+// Validate if response header has matching content-type
+pm.test("[GET]::/payments/:id - Content-Type is application/json", function () {
+ pm.expect(pm.response.headers.get("Content-Type")).to.include(
+ "application/json",
+ );
+});
+
+// Validate if response has JSON Body
+pm.test("[GET]::/payments/:id - Response has JSON Body", function () {
+ pm.response.to.have.jsonBody();
+});
+
+// Set response object as internal variable
+let jsonData = {};
+try {
+ jsonData = pm.response.json();
+} catch (e) {}
+
+// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
+if (jsonData?.payment_id) {
+ pm.collectionVariables.set("payment_id", jsonData.payment_id);
+ console.log(
+ "- use {{payment_id}} as collection variable for value",
+ jsonData.payment_id,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
+ );
+}
+
+// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
+if (jsonData?.mandate_id) {
+ pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
+ console.log(
+ "- use {{mandate_id}} as collection variable for value",
+ jsonData.mandate_id,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
+ );
+}
+
+// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
+if (jsonData?.client_secret) {
+ pm.collectionVariables.set("client_secret", jsonData.client_secret);
+ console.log(
+ "- use {{client_secret}} as collection variable for value",
+ jsonData.client_secret,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
+ );
+}
+
+// Response body should have value "cancelled" for "status"
+if (jsonData?.status) {
+ pm.test(
+ "[POST]::/payments/:id - Content check if value for 'status' matches 'cancelled'",
+ function () {
+ pm.expect(jsonData.status).to.eql("cancelled");
+ },
+ );
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Retrieve/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Retrieve/request.json
new file mode 100644
index 0000000000..6cd4b7d96c
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Retrieve/request.json
@@ -0,0 +1,28 @@
+{
+ "method": "GET",
+ "header": [
+ {
+ "key": "Accept",
+ "value": "application/json"
+ }
+ ],
+ "url": {
+ "raw": "{{baseUrl}}/payments/:id?force_sync=true",
+ "host": ["{{baseUrl}}"],
+ "path": ["payments", ":id"],
+ "query": [
+ {
+ "key": "force_sync",
+ "value": "true"
+ }
+ ],
+ "variable": [
+ {
+ "key": "id",
+ "value": "{{payment_id}}",
+ "description": "(Required) unique payment id"
+ }
+ ]
+ },
+ "description": "To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment"
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/List payment methods for a Customer/response.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Retrieve/response.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/List payment methods for a Customer/response.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4b-Void a partially captured payment/Payments - Retrieve/response.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/.meta.json
new file mode 100644
index 0000000000..90778e889e
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/.meta.json
@@ -0,0 +1,8 @@
+{
+ "childrenOrder": [
+ "Payments - Create",
+ "Payments - Capture",
+ "Payments - Sync payment",
+ "Payments - Cancel"
+ ]
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Cancel/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Cancel/.event.meta.json
new file mode 100644
index 0000000000..0731450e6b
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Cancel/.event.meta.json
@@ -0,0 +1,3 @@
+{
+ "eventOrder": ["event.test.js"]
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Cancel/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Cancel/event.test.js
new file mode 100644
index 0000000000..5834ff3012
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Cancel/event.test.js
@@ -0,0 +1,43 @@
+// Validate status 400
+pm.test("[POST]::/payments/:id/cancel - Status code is 400", function () {
+ pm.response.to.have.status(400);
+});
+
+// Validate if response header has matching content-type
+pm.test(
+ "[POST]::/payments/:id/cancel - Content-Type is application/json",
+ function () {
+ pm.expect(pm.response.headers.get("Content-Type")).to.include(
+ "application/json",
+ );
+ },
+);
+
+// Validate if response has JSON Body
+pm.test("[POST]::/payments/:id/cancel - Response has JSON Body", function () {
+ pm.response.to.have.jsonBody();
+});
+
+// Validate if response has error body
+pm.test("[POST]::/payments/:id/cancel - Response has error body", function () {
+ pm.expect(pm.response.json()).to.have.property("error");
+});
+
+// Validate if response has "invalid_request" error type
+pm.test(
+ "[POST]::/payments/:id/cancel - Response has 'invalid_request' error type",
+ function () {
+ pm.expect(pm.response.json().error).to.have.property("type", "invalid_request");
+ },
+);
+
+// Validate if response has "You cannot cancel this payment because it has status succeeded" error message
+pm.test(
+ "[POST]::/payments/:id/cancel - Response has 'You cannot cancel this payment because it has status succeeded' error message",
+ function () {
+ pm.expect(pm.response.json().error).to.have.property(
+ "message",
+ "You cannot cancel this payment because it has status succeeded",
+ );
+ },
+);
\ No newline at end of file
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Cancel/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Cancel/request.json
new file mode 100644
index 0000000000..3a1d8aa178
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Cancel/request.json
@@ -0,0 +1,37 @@
+{
+ "method": "POST",
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ },
+ {
+ "key": "Accept",
+ "value": "application/json"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ },
+ "raw_json_formatted": {
+ "cancellation_reason": "requested_by_customer"
+ }
+ },
+ "url": {
+ "raw": "{{baseUrl}}/payments/:id/cancel",
+ "host": ["{{baseUrl}}"],
+ "path": ["payments", ":id", "cancel"],
+ "variable": [
+ {
+ "key": "id",
+ "value": "{{payment_id}}",
+ "description": "(Required) unique payment id"
+ }
+ ]
+ },
+ "description": "A Payment could can be cancelled when it is in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_customer_action"
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Confirm mandate/response.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Cancel/response.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Confirm mandate/response.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Cancel/response.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Confirm mandate/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Capture/.event.meta.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Confirm mandate/.event.meta.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Capture/.event.meta.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Confirm mandate/event.prerequest.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Capture/event.prerequest.js
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Confirm mandate/event.prerequest.js
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Capture/event.prerequest.js
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Capture/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Capture/event.test.js
new file mode 100644
index 0000000000..616804d6b6
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Capture/event.test.js
@@ -0,0 +1,108 @@
+// Validate status 2xx
+pm.test("[POST]::/payments/:id/capture - Status code is 2xx", function () {
+ pm.response.to.be.success;
+});
+
+// Validate if response header has matching content-type
+pm.test(
+ "[POST]::/payments/:id/capture - Content-Type is application/json",
+ function () {
+ pm.expect(pm.response.headers.get("Content-Type")).to.include(
+ "application/json",
+ );
+ },
+);
+
+// Validate if response has JSON Body
+pm.test("[POST]::/payments/:id/capture - Response has JSON Body", function () {
+ pm.response.to.have.jsonBody();
+});
+
+// Set response object as internal variable
+let jsonData = {};
+try {
+ jsonData = pm.response.json();
+} catch (e) {}
+
+// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
+if (jsonData?.payment_id) {
+ pm.collectionVariables.set("payment_id", jsonData.payment_id);
+ console.log(
+ "- use {{payment_id}} as collection variable for value",
+ jsonData.payment_id,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
+ );
+}
+
+// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
+if (jsonData?.client_secret) {
+ pm.collectionVariables.set("client_secret", jsonData.client_secret);
+ console.log(
+ "- use {{client_secret}} as collection variable for value",
+ jsonData.client_secret,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
+ );
+}
+
+// Response body should have value "succeeded" for "status"
+pm.test(
+"[POST]:://payments/:id/capture - Content check if value for 'status' matches 'succeeded'",
+function () {
+ pm.expect(jsonData.status).to.eql("succeeded");
+},
+);
+
+// Response body should have value "500" for "amount"
+pm.test(
+"[post]:://payments/:id/capture - Content check if value for 'amount' matches '500'",
+ function () {
+ pm.expect(jsonData.amount).to.eql(500);
+ },
+);
+
+// Response body should have value "500" for "net_amount"
+pm.test(
+"[post]:://payments/:id/capture - Content check if value for 'net_amount' matches '500'",
+ function () {
+ pm.expect(jsonData.net_amount).to.eql(500);
+ },
+);
+
+// Response body should have value "500" for "amount_capturable"
+pm.test(
+"[post]:://payments/:id/capture - Content check if value for 'amount_capturable' matches '0'",
+ function () {
+ pm.expect(jsonData.amount_capturable).to.eql(0);
+ },
+);
+
+pm.test(
+"[POST]::/payments:id/capture - Content check if value for 'amount_received' equal 500",
+ function () {
+ pm.expect(jsonData.amount_received).to.eql(500);
+ },
+);
+
+
+pm.test(
+ "[POST]::/payments - Content check if 'connector_transaction_id' exists",
+ function () {
+ pm.expect(typeof jsonData.connector_transaction_id !== "undefined").to.be
+ .true;
+ pm.collectionVariables.set("connector_transaction_id", jsonData.connector_transaction_id)
+ },
+);
+
+pm.test(
+ "[POST]::/payments - Content check if 'connector' is archipel",
+ function () {
+ pm.expect(jsonData.connector).to.be.equal("archipel");
+ },
+);
+
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Capture/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Capture/request.json
new file mode 100644
index 0000000000..88957428e8
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Capture/request.json
@@ -0,0 +1,44 @@
+{
+ "method": "POST",
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ },
+ {
+ "key": "Accept",
+ "value": "application/json"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ },
+ "raw_json_formatted": {
+ "amount_to_capture": 500,
+ "statement_descriptor_name": "John",
+ "statement_descriptor_suffix": "JD"
+ }
+ },
+ "url": {
+ "raw": "{{baseUrl}}/payments/:id/capture",
+ "host": [
+ "{{baseUrl}}"
+ ],
+ "path": [
+ "payments",
+ ":id",
+ "capture"
+ ],
+ "variable": [
+ {
+ "key": "id",
+ "value": "{{payment_id}}"
+ }
+ ]
+ },
+ "description": "To process a payment you will have to create a payment, attach a payment method and confirm. Depending on the user journey you wish to achieve, you may opt to all the steps in a single request or in a sequence of API request using following APIs: (i) Payments - Update, (ii) Payments - Confirm, and (iii) Payments - Capture"
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Create mandate/response.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Capture/response.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Create mandate/response.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Capture/response.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Confirm first and save card/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Create/.event.meta.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Confirm first and save card/.event.meta.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Create/.event.meta.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Confirm first and save card/event.prerequest.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Create/event.prerequest.js
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Confirm first and save card/event.prerequest.js
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Create/event.prerequest.js
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Void the payment/Payments - Create/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Create/event.test.js
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Void the payment/Payments - Create/event.test.js
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Create/event.test.js
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Create first/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Create/request.json
similarity index 75%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Create first/request.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Create/request.json
index c2a7c3b22d..fb4c86242d 100644
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Create first/request.json
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Create/request.json
@@ -19,12 +19,28 @@
},
"raw_json_formatted": {
"amount": 500,
+ "amount_to_capture": 500,
"currency": "EUR",
- "capture_method": "automatic",
+ "confirm": true,
+ "capture_method": "manual",
"authentication_type": "no_three_ds",
"profile_id": "{{profile_id}}",
- "customer_id": "{{customer_id}}",
- "description": "[Archipel Connector][Scenario6] - Create payment and save card",
+ "email": "[email protected]",
+ "name": "John Doe",
+ "phone": "8056594427",
+ "phone_country_code": "+91",
+ "description": "{{$randomLoremSentence}}",
+ "payment_method": "card",
+ "payment_method_type": "credit",
+ "payment_method_data": {
+ "card": {
+ "card_cvc": "123",
+ "card_exp_month": "01",
+ "card_exp_year": "50",
+ "card_holder_name": "John Doe",
+ "card_number": "5185570141917102"
+ }
+ },
"billing": {
"address": {
"line1": "2 ter",
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Create recurring/response.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Create/response.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Create recurring/response.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Create/response.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Retrieve after confirm/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Sync payment/.event.meta.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Retrieve after confirm/.event.meta.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Sync payment/.event.meta.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Retrieve after confirm/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Sync payment/event.test.js
similarity index 99%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Retrieve after confirm/event.test.js
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Sync payment/event.test.js
index 344e0a0ac8..becb5cfa9b 100644
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Retrieve after confirm/event.test.js
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Sync payment/event.test.js
@@ -65,4 +65,4 @@ pm.test(
pm.expect(typeof jsonData.connector_transaction_id !== "undefined").to.be
.true;
},
-);
+);
\ No newline at end of file
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/Payments - Retrieve recurring/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Sync payment/request.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/Payments - Retrieve recurring/request.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Sync payment/request.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Retrieve mandate/response.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Sync payment/response.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Retrieve mandate/response.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4c-Void a successful payment/Payments - Sync payment/response.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/.meta.json
deleted file mode 100644
index 857ad43fd5..0000000000
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/.meta.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "childrenOrder": [
- "Payments - Create mandate",
- "Payments - Confirm mandate",
- "Payments - Retrieve mandate",
- "List payment methods for a Customer",
- "Payments - Create recurring",
- "Payments - Retrieve recurring"
- ]
-}
\ No newline at end of file
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/List payment methods for a Customer/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/List payment methods for a Customer/request.json
deleted file mode 100644
index cff6d6d715..0000000000
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/List payment methods for a Customer/request.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "method": "GET",
- "header": [
- {
- "key": "Accept",
- "value": "application/json"
- }
- ],
- "url": {
- "raw": "{{baseUrl}}/customers/:customer_id/payment_methods",
- "host": [
- "{{baseUrl}}"
- ],
- "path": [
- "customers",
- ":customer_id",
- "payment_methods"
- ],
- "variable": [
- {
- "key": "customer_id",
- "value": "{{customer_id}}",
- "description": "//Pass the customer id"
- }
- ]
- },
- "description": "To filter and list the applicable payment methods for a particular Customer ID"
-}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Confirm mandate/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Confirm mandate/event.test.js
deleted file mode 100644
index 148440eff5..0000000000
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Confirm mandate/event.test.js
+++ /dev/null
@@ -1,80 +0,0 @@
-// Validate status 2xx
-pm.test("[POST]::/payments/:id/confirm - Status code is 2xx", function () {
- pm.response.to.be.success;
-});
-
-// Validate if response header has matching content-type
-pm.test(
- "[POST]::/payments/:id/confirm - Content-Type is application/json",
- function () {
- pm.expect(pm.response.headers.get("Content-Type")).to.include(
- "application/json",
- );
- },
-);
-
-// Validate if response has JSON Body
-pm.test("[POST]::/payments/:id/confirm - Response has JSON Body", function () {
- pm.response.to.have.jsonBody();
-});
-
-// Set response object as internal variable
-let jsonData = {};
-try {
- jsonData = pm.response.json();
-} catch (e) {}
-
-// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
-if (jsonData?.payment_id) {
- pm.collectionVariables.set("payment_id", jsonData.payment_id);
- console.log(
- "- use {{payment_id}} as collection variable for value",
- jsonData.payment_id,
- );
-} else {
- console.log(
- "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
- );
-}
-
-
-// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
-if (jsonData?.client_secret) {
- pm.collectionVariables.set("client_secret", jsonData.client_secret);
- console.log(
- "- use {{client_secret}} as collection variable for value",
- jsonData.client_secret,
- );
-} else {
- console.log(
- "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
- );
-}
-
-// Response body must not have value "failed" for "status"
-if (jsonData?.status) {
- pm.test(
- "[POST]::/payments/:id/confirm - Content check if value for 'status' not matches 'failed'",
- function () {
- pm.expect(jsonData.status).to.not.eql("failed");
- },
- );
-}
-
-// Response body should have value "succeeded" for "status"
-if (jsonData?.status) {
- pm.test(
- "[POST]::/payments/:id/confirm - Content check if value for 'status' matches 'succeeded'",
- function () {
- pm.expect(jsonData.status).to.eql("succeeded");
- },
- );
-}
-
-// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
-if (jsonData?.mandate_id) {
- pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
- console.log("- use {{mandate_id}} as collection variable for value",jsonData.mandate_id);
-} else {
- console.log('INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.');
-};
\ No newline at end of file
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Confirm mandate/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Confirm mandate/request.json
deleted file mode 100644
index 151c35e652..0000000000
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Confirm mandate/request.json
+++ /dev/null
@@ -1,103 +0,0 @@
-{
- "auth": {
- "type": "apikey",
- "apikey": [
- {
- "key": "value",
- "value": "{{api_key}}",
- "type": "string"
- },
- {
- "key": "key",
- "value": "api-key",
- "type": "string"
- },
- {
- "key": "in",
- "value": "header",
- "type": "string"
- }
- ]
- },
- "method": "POST",
- "header": [
- {
- "key": "Content-Type",
- "value": "application/json"
- },
- {
- "key": "Accept",
- "value": "application/json"
- }
- ],
- "body": {
- "mode": "raw",
- "options": {
- "raw": {
- "language": "json"
- }
- },
- "raw_json_formatted": {
- "customer_id": "{{customer_id}}",
- "payment_method": "card",
- "payment_method_data": {
- "card": {
- "card_cvc": "123",
- "card_exp_month": "01",
- "card_exp_year": "50",
- "card_holder_name": "John Doe",
- "card_number": "5185570141917102",
- "card_network": "Visa"
- }
- },
- "setup_future_usage": "off_session",
- "mandate_data": {
- "customer_acceptance": {
- "acceptance_type": "offline",
- "accepted_at": "{{$isoTimestamp}}",
- "online": {
- "ip_address": "127.0.0.1",
- "user_agent": "amet irure esse"
- }
- },
- "mandate_type": {
- "single_use": {
- "amount": 1000,
- "currency": "EUR"
- }
- }
- },
- "browser_info": {
- "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
- "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
- "language": "nl-NL",
- "color_depth": 24,
- "screen_height": 723,
- "screen_width": 1536,
- "time_zone": 0,
- "java_enabled": true,
- "java_script_enabled": true,
- "ip_address": "125.0.0.1"
- }
- }
- },
- "url": {
- "raw": "{{baseUrl}}/payments/:id/confirm",
- "host": [
- "{{baseUrl}}"
- ],
- "path": [
- "payments",
- ":id",
- "confirm"
- ],
- "variable": [
- {
- "key": "id",
- "value": "{{payment_id}}",
- "description": "(Required) unique payment id"
- }
- ]
- },
- "description": "This API is to confirm the payment request and forward payment to the payment processor. This API provides more granular control upon when the API is forwarded to the payment processor. Alternatively you can confirm the payment within the Payments-Create API"
-}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5a-Create a zero auth mandate and recurring payment (using mandate_id)/.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5a-Create a zero auth mandate and recurring payment (using mandate_id)/.meta.json
new file mode 100644
index 0000000000..5a828a2779
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5a-Create a zero auth mandate and recurring payment (using mandate_id)/.meta.json
@@ -0,0 +1,7 @@
+{
+ "childrenOrder": [
+ "Mandate Payments - Create",
+ "Payments - Confirm",
+ "Recurring Payments - Create"
+ ]
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/Payments - Confirm mandate/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5a-Create a zero auth mandate and recurring payment (using mandate_id)/Mandate Payments - Create/.event.meta.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/Payments - Confirm mandate/.event.meta.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5a-Create a zero auth mandate and recurring payment (using mandate_id)/Mandate Payments - Create/.event.meta.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/Payments - Create mandate/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5a-Create a zero auth mandate and recurring payment (using mandate_id)/Mandate Payments - Create/event.test.js
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/Payments - Create mandate/event.test.js
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5a-Create a zero auth mandate and recurring payment (using mandate_id)/Mandate Payments - Create/event.test.js
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/Payments - Create recurring/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5a-Create a zero auth mandate and recurring payment (using mandate_id)/Mandate Payments - Create/request.json
similarity index 76%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/Payments - Create recurring/request.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5a-Create a zero auth mandate and recurring payment (using mandate_id)/Mandate Payments - Create/request.json
index aac94668f6..a85980b5da 100644
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/Payments - Create recurring/request.json
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5a-Create a zero auth mandate and recurring payment (using mandate_id)/Mandate Payments - Create/request.json
@@ -38,26 +38,30 @@
}
},
"raw_json_formatted": {
- "amount": 799,
- "currency": "EUR",
- "confirm": true,
- "profile_id": "{{profile_id}}",
+ "amount": 0,
+ "currency": "USD",
+ "confirm": false,
"capture_method": "automatic",
- "capture_on": "{{$isoTimestamp}}",
"customer_id": "{{customer_id}}",
- "description": "[Archipel Connector][Scenario4] - Create recurring payment",
+ "email": "[email protected]",
+ "profile_id": "{{profile_id}}",
+ "name": "John Doe",
+ "setup_future_usage": "off_session",
+ "phone": "8056594427",
+ "phone_country_code": "+91",
+ "description": "{{$randomLoremSentence}}",
"authentication_type": "no_three_ds",
- "mandate_id": "{{mandate_id}}",
- "off_session": true,
"billing": {
"address": {
- "line1": "2 ter",
- "line2": "rue du château",
- "line3": "",
- "city": "Neuilly-sur-Seine",
- "state": "France",
- "zip": "92200",
- "country": "FR"
+ "line1": "1467",
+ "line2": "Harrison Street",
+ "line3": "Harrison Street",
+ "city": "San Fransico",
+ "state": "California",
+ "zip": "94122",
+ "country": "US",
+ "first_name": "John",
+ "last_name": "Doe"
},
"phone": {
"number": "8056594427",
@@ -73,7 +77,7 @@
"state": "California",
"zip": "94122",
"country": "US",
- "first_name": "joseph",
+ "first_name": "John",
"last_name": "Doe"
},
"phone": {
@@ -93,11 +97,13 @@
"java_script_enabled": true,
"ip_address": "125.0.0.1"
},
+ "statement_descriptor_name": "joseph",
+ "statement_descriptor_suffix": "JS",
"order_details": [
{
- "product_name": "VOD subscription",
+ "product_name": "Apple iphone 15",
"quantity": 1,
- "amount": 799,
+ "amount": 0,
"account_name": "transaction_processing"
}
]
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Retrieve recurring/response.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5a-Create a zero auth mandate and recurring payment (using mandate_id)/Mandate Payments - Create/response.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Retrieve recurring/response.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5a-Create a zero auth mandate and recurring payment (using mandate_id)/Mandate Payments - Create/response.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/Payments - Create mandate/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5a-Create a zero auth mandate and recurring payment (using mandate_id)/Payments - Confirm/.event.meta.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/Payments - Create mandate/.event.meta.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5a-Create a zero auth mandate and recurring payment (using mandate_id)/Payments - Confirm/.event.meta.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/Payments - Confirm mandate/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5a-Create a zero auth mandate and recurring payment (using mandate_id)/Payments - Confirm/event.test.js
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/Payments - Confirm mandate/event.test.js
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5a-Create a zero auth mandate and recurring payment (using mandate_id)/Payments - Confirm/event.test.js
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/Payments - Confirm mandate/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5a-Create a zero auth mandate and recurring payment (using mandate_id)/Payments - Confirm/request.json
similarity index 80%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/Payments - Confirm mandate/request.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5a-Create a zero auth mandate and recurring payment (using mandate_id)/Payments - Confirm/request.json
index 838f3aab5f..9acf65cb25 100644
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/Payments - Confirm mandate/request.json
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5a-Create a zero auth mandate and recurring payment (using mandate_id)/Payments - Confirm/request.json
@@ -31,7 +31,7 @@
},
{
"key": "publishable_key",
- "value": "pk_snd_8798c6a9114646f8b970b93ad5765ddf",
+ "value": "{{publishable_key}}",
"type": "text",
"disabled": true
}
@@ -44,17 +44,15 @@
}
},
"raw_json_formatted": {
- "customer_id": "{{customer_id}}",
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_data": {
"card": {
- "card_cvc": "123",
+ "card_number": "5185570141917102",
"card_exp_month": "01",
"card_exp_year": "50",
"card_holder_name": "John Doe",
- "card_number": "5185570141917102",
- "card_network": "Mastercard"
+ "card_cvc": "737"
}
},
"setup_future_usage": "off_session",
@@ -62,7 +60,7 @@
"mandate_data": {
"customer_acceptance": {
"acceptance_type": "offline",
- "accepted_at": "{{$isoTimestamp}}",
+ "accepted_at": "1963-05-03T04:07:52.723Z",
"online": {
"ip_address": "125.0.0.1",
"user_agent": "amet irure esse"
@@ -70,10 +68,10 @@
},
"mandate_type": {
"multi_use": {
- "amount": 799,
- "currency": "EUR",
- "start_date": "{{$isoTimestamp}}",
- "end_date": "2099-01-01T00:00:00Z",
+ "amount": 1000,
+ "currency": "USD",
+ "start_date": "2023-04-21T00:00:00Z",
+ "end_date": "2023-05-21T00:00:00Z",
"metadata": {
"frequency": "13"
}
@@ -84,14 +82,8 @@
},
"url": {
"raw": "{{baseUrl}}/payments/:id/confirm",
- "host": [
- "{{baseUrl}}"
- ],
- "path": [
- "payments",
- ":id",
- "confirm"
- ],
+ "host": ["{{baseUrl}}"],
+ "path": ["payments", ":id", "confirm"],
"variable": [
{
"key": "id",
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payment methods - List and get token/response.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5a-Create a zero auth mandate and recurring payment (using mandate_id)/Payments - Confirm/response.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payment methods - List and get token/response.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5a-Create a zero auth mandate and recurring payment (using mandate_id)/Payments - Confirm/response.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/Payments - Create recurring/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5a-Create a zero auth mandate and recurring payment (using mandate_id)/Recurring Payments - Create/.event.meta.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/Payments - Create recurring/.event.meta.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5a-Create a zero auth mandate and recurring payment (using mandate_id)/Recurring Payments - Create/.event.meta.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/Payments - Create recurring/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5a-Create a zero auth mandate and recurring payment (using mandate_id)/Recurring Payments - Create/event.test.js
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/Payments - Create recurring/event.test.js
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5a-Create a zero auth mandate and recurring payment (using mandate_id)/Recurring Payments - Create/event.test.js
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Create recurring/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5a-Create a zero auth mandate and recurring payment (using mandate_id)/Recurring Payments - Create/request.json
similarity index 65%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Create recurring/request.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5a-Create a zero auth mandate and recurring payment (using mandate_id)/Recurring Payments - Create/request.json
index 7b7ea0f185..1a7a642cac 100644
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Create recurring/request.json
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5a-Create a zero auth mandate and recurring payment (using mandate_id)/Recurring Payments - Create/request.json
@@ -18,32 +18,21 @@
}
},
"raw_json_formatted": {
- "amount": 900,
- "currency": "EUR",
+ "amount": 500,
+ "currency": "USD",
"confirm": true,
- "profile_id": "{{profile_id}}",
"capture_method": "automatic",
- "capture_on": "{{$isoTimestamp}}",
+ "amount_to_capture": 500,
+ "profile_id": "{{profile_id}}",
"customer_id": "{{customer_id}}",
- "description": "[Archipel Connector][Scenario5] - Create recurring payment",
+ "email": "[email protected]",
+ "name": "John Doe",
+ "phone": "8056594427",
+ "phone_country_code": "+91",
+ "description": "{{$randomLoremSentence}}",
"authentication_type": "no_three_ds",
"mandate_id": "{{mandate_id}}",
"off_session": true,
- "billing": {
- "address": {
- "line1": "2 ter",
- "line2": "rue du château",
- "line3": "",
- "city": "Neuilly-sur-Seine",
- "state": "France",
- "zip": "92200",
- "country": "FR"
- },
- "phone": {
- "number": "8056594427",
- "country_code": "+91"
- }
- },
"shipping": {
"address": {
"line1": "1467",
@@ -53,14 +42,11 @@
"state": "California",
"zip": "94122",
"country": "US",
- "first_name": "joseph",
- "last_name": "Doe"
- },
- "phone": {
- "number": "8056594427",
- "country_code": "+91"
+ "first_name": "joseph"
}
- }
+ },
+ "statement_descriptor_name": "joseph",
+ "statement_descriptor_suffix": "JS"
}
},
"url": {
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Confirm first and save card/response.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5a-Create a zero auth mandate and recurring payment (using mandate_id)/Recurring Payments - Create/response.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Confirm first and save card/response.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5a-Create a zero auth mandate and recurring payment (using mandate_id)/Recurring Payments - Create/response.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/.meta.json
new file mode 100644
index 0000000000..780cd4df24
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/.meta.json
@@ -0,0 +1,9 @@
+{
+ "childrenOrder": [
+ "Mandate Payments - Create",
+ "Payments - Confirm",
+ "Recurring Payments - Create",
+ "List payment methods for a Customer",
+ "Recurring Payments - Confirm"
+ ]
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/Payments - Retrieve recurring/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/List payment methods for a Customer/.event.meta.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/Payments - Retrieve recurring/.event.meta.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/List payment methods for a Customer/.event.meta.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/List payment methods for a Customer/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/List payment methods for a Customer/event.test.js
similarity index 75%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/List payment methods for a Customer/event.test.js
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/List payment methods for a Customer/event.test.js
index 036d9ce047..f844efad42 100644
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/List payment methods for a Customer/event.test.js
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/List payment methods for a Customer/event.test.js
@@ -1,4 +1,4 @@
-// Validate status 2xx
+// Validate status 2xx
pm.test("[GET]::/payment_methods/:customer_id - Status code is 2xx", function () {
pm.response.to.be.success;
});
@@ -17,12 +17,4 @@ if (jsonData?.customer_payment_methods[0]?.payment_token) {
console.log("- use {{payment_token}} as collection variable for value", jsonData.customer_payment_methods[0].payment_token);
} else {
console.log('INFO - Unable to assign variable {{payment_token}}, as jsonData.customer_payment_methods[0].payment_token is undefined.');
-}
-
-// Response body should have at least one card payment method"
-pm.test(
-"[GET]::/payment_methods/:customer_id - Content check body has at least one customer_payment_methods",
-function () {
- pm.expect(jsonData.customer_payment_methods.length).greaterThan(0);
- },
-);
+}
\ No newline at end of file
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/List payment methods for a Customer/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/List payment methods for a Customer/request.json
new file mode 100644
index 0000000000..40843aac2a
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/List payment methods for a Customer/request.json
@@ -0,0 +1,70 @@
+{
+ "method": "GET",
+ "header": [
+ {
+ "key": "Accept",
+ "value": "application/json"
+ }
+ ],
+ "url": {
+ "raw": "{{baseUrl}}/customers/:customer_id/payment_methods",
+ "host": [
+ "{{baseUrl}}"
+ ],
+ "path": [
+ "customers",
+ ":customer_id",
+ "payment_methods"
+ ],
+ "query": [
+ {
+ "key": "accepted_country",
+ "value": "co",
+ "disabled": true
+ },
+ {
+ "key": "accepted_country",
+ "value": "pa",
+ "disabled": true
+ },
+ {
+ "key": "accepted_currency",
+ "value": "voluptate ea",
+ "disabled": true
+ },
+ {
+ "key": "accepted_currency",
+ "value": "exercitation",
+ "disabled": true
+ },
+ {
+ "key": "minimum_amount",
+ "value": "100",
+ "disabled": true
+ },
+ {
+ "key": "maximum_amount",
+ "value": "10000000",
+ "disabled": true
+ },
+ {
+ "key": "recurring_payment_enabled",
+ "value": "true",
+ "disabled": true
+ },
+ {
+ "key": "installment_payment_enabled",
+ "value": "true",
+ "disabled": true
+ }
+ ],
+ "variable": [
+ {
+ "key": "customer_id",
+ "value": "{{customer_id}}",
+ "description": "//Pass the customer id"
+ }
+ ]
+ },
+ "description": "To filter and list the applicable payment methods for a particular Customer ID"
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Confirm second and use saved card/response.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/List payment methods for a Customer/response.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Confirm second and use saved card/response.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/List payment methods for a Customer/response.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/List payment methods for a Customer/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Mandate Payments - Create/.event.meta.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/List payment methods for a Customer/.event.meta.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Mandate Payments - Create/.event.meta.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Mandate Payments - Create/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Mandate Payments - Create/event.test.js
new file mode 100644
index 0000000000..17c0ca2950
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Mandate Payments - Create/event.test.js
@@ -0,0 +1,51 @@
+// Validate status 2xx
+pm.test("[POST]::/payments - Status code is 2xx", function () {
+ pm.response.to.be.success;
+});
+
+// Validate if response header has matching content-type
+pm.test("[POST]::/payments - Content-Type is application/json", function () {
+ pm.expect(pm.response.headers.get("Content-Type")).to.include("application/json");
+});
+
+// Validate if response has JSON Body
+pm.test("[POST]::/payments - Response has JSON Body", function () {
+ pm.response.to.have.jsonBody();
+});
+
+// Set response object as internal variable
+let jsonData = {};
+try {jsonData = pm.response.json();}catch(e){}
+
+// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
+if (jsonData?.payment_id) {
+ pm.collectionVariables.set("payment_id", jsonData.payment_id);
+ console.log("- use {{payment_id}} as collection variable for value",jsonData.payment_id);
+} else {
+ console.log('INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.');
+};
+
+// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
+if (jsonData?.client_secret) {
+ pm.collectionVariables.set("client_secret", jsonData.client_secret);
+ console.log("- use {{client_secret}} as collection variable for value",jsonData.client_secret);
+} else {
+ console.log('INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.');
+};
+
+
+// Response body should have value "requires_payment_method" for "status"
+if (jsonData?.status) {
+pm.test("[POST]::/payments - Content check if value for 'status' matches 'requires_payment_method'", function() {
+ pm.expect(jsonData.status).to.eql("requires_payment_method");
+})};
+
+// Response body should have "mandate_id"
+pm.test("[POST]::/payments - Content check if 'mandate_id' exists", function() {
+ pm.expect((typeof jsonData.mandate_id !== "undefined")).to.be.true;
+});
+
+// Response body should have "mandate_data"
+pm.test("[POST]::/payments - Content check if 'mandate_data' exists", function() {
+ pm.expect((typeof jsonData.mandate_data !== "undefined")).to.be.true;
+});
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/Payments - Create mandate/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Mandate Payments - Create/request.json
similarity index 56%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/Payments - Create mandate/request.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Mandate Payments - Create/request.json
index 7a5ac3b460..a85980b5da 100644
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario4-Zero auth mandates/Payments - Create mandate/request.json
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Mandate Payments - Create/request.json
@@ -39,21 +39,29 @@
},
"raw_json_formatted": {
"amount": 0,
- "currency": "EUR",
+ "currency": "USD",
"confirm": false,
"capture_method": "automatic",
- "authentication_type": "no_three_ds",
+ "customer_id": "{{customer_id}}",
+ "email": "[email protected]",
"profile_id": "{{profile_id}}",
- "description": "[Archipel Connector][Scenario4] - Create Zero auth mandate",
+ "name": "John Doe",
+ "setup_future_usage": "off_session",
+ "phone": "8056594427",
+ "phone_country_code": "+91",
+ "description": "{{$randomLoremSentence}}",
+ "authentication_type": "no_three_ds",
"billing": {
"address": {
- "line1": "2 ter",
- "line2": "rue du château",
- "line3": "",
- "city": "Neuilly-sur-Seine",
- "state": "France",
- "zip": "92200",
- "country": "FR"
+ "line1": "1467",
+ "line2": "Harrison Street",
+ "line3": "Harrison Street",
+ "city": "San Fransico",
+ "state": "California",
+ "zip": "94122",
+ "country": "US",
+ "first_name": "John",
+ "last_name": "Doe"
},
"phone": {
"number": "8056594427",
@@ -69,7 +77,7 @@
"state": "California",
"zip": "94122",
"country": "US",
- "first_name": "joseph",
+ "first_name": "John",
"last_name": "Doe"
},
"phone": {
@@ -77,8 +85,28 @@
"country_code": "+91"
}
},
- "statement_descriptor_name": "Joseph Doe",
- "statement_descriptor_suffix": "JS"
+ "browser_info": {
+ "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
+ "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
+ "language": "nl-NL",
+ "color_depth": 24,
+ "screen_height": 723,
+ "screen_width": 1536,
+ "time_zone": 0,
+ "java_enabled": true,
+ "java_script_enabled": true,
+ "ip_address": "125.0.0.1"
+ },
+ "statement_descriptor_name": "joseph",
+ "statement_descriptor_suffix": "JS",
+ "order_details": [
+ {
+ "product_name": "Apple iphone 15",
+ "quantity": 1,
+ "amount": 0,
+ "account_name": "transaction_processing"
+ }
+ ]
}
},
"url": {
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Create first/response.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Mandate Payments - Create/response.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Create first/response.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Mandate Payments - Create/response.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Create mandate/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Payments - Confirm/.event.meta.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Create mandate/.event.meta.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Payments - Confirm/.event.meta.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Payments - Confirm/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Payments - Confirm/event.test.js
new file mode 100644
index 0000000000..2b8a0318d3
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Payments - Confirm/event.test.js
@@ -0,0 +1,59 @@
+// Validate status 2xx
+pm.test("[POST]::/payments - Status code is 2xx", function () {
+ pm.response.to.be.success;
+});
+
+// Validate if response header has matching content-type
+pm.test("[POST]::/payments - Content-Type is application/json", function () {
+ pm.expect(pm.response.headers.get("Content-Type")).to.include("application/json");
+});
+
+// Validate if response has JSON Body
+pm.test("[POST]::/payments - Response has JSON Body", function () {
+ pm.response.to.have.jsonBody();
+});
+
+// Set response object as internal variable
+let jsonData = {};
+try {jsonData = pm.response.json();}catch(e){}
+
+// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
+if (jsonData?.payment_id) {
+ pm.collectionVariables.set("payment_id", jsonData.payment_id);
+ console.log("- use {{payment_id}} as collection variable for value",jsonData.payment_id);
+} else {
+ console.log('INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.');
+};
+
+
+// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
+if (jsonData?.mandate_id) {
+ pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
+ console.log("- use {{mandate_id}} as collection variable for value",jsonData.mandate_id);
+} else {
+ console.log('INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.');
+};
+
+// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
+if (jsonData?.client_secret) {
+ pm.collectionVariables.set("client_secret", jsonData.client_secret);
+ console.log("- use {{client_secret}} as collection variable for value",jsonData.client_secret);
+} else {
+ console.log('INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.');
+};
+
+// Response body should have value "succeeded" for "status"
+if (jsonData?.status) {
+pm.test("[POST]::/payments - Content check if value for 'status' matches 'succeeded'", function() {
+ pm.expect(jsonData.status).to.eql("succeeded");
+})};
+
+// Response body should have "mandate_id"
+pm.test("[POST]::/payments - Content check if 'mandate_id' exists", function() {
+ pm.expect((typeof jsonData.mandate_id !== "undefined")).to.be.true;
+});
+
+// Response body should have "mandate_data"
+pm.test("[POST]::/payments - Content check if 'mandate_data' exists", function() {
+ pm.expect((typeof jsonData.mandate_data !== "undefined")).to.be.true;
+});
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Payments - Confirm/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Payments - Confirm/request.json
new file mode 100644
index 0000000000..7ffe71d42a
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Payments - Confirm/request.json
@@ -0,0 +1,74 @@
+{
+ "auth": {
+ "type": "apikey",
+ "apikey": [
+ {
+ "key": "value",
+ "value": "{{api_key}}",
+ "type": "string"
+ },
+ {
+ "key": "key",
+ "value": "api-key",
+ "type": "string"
+ },
+ {
+ "key": "in",
+ "value": "header",
+ "type": "string"
+ }
+ ]
+ },
+ "method": "POST",
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ },
+ {
+ "key": "Accept",
+ "value": "application/json"
+ },
+ {
+ "key": "publishable_key",
+ "value": "{{publishable_key}}",
+ "type": "text",
+ "disabled": true
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ },
+ "raw_json_formatted": {
+ "payment_method": "card",
+ "payment_method_type": "credit",
+ "payment_method_data": {
+ "card": {
+ "card_number": "5185570141917102",
+ "card_exp_month": "01",
+ "card_exp_year": "50",
+ "card_holder_name": "John Doe",
+ "card_cvc": "737"
+ }
+ },
+ "setup_future_usage": "off_session",
+ "payment_type": "setup_mandate"
+ }
+ },
+ "url": {
+ "raw": "{{baseUrl}}/payments/:id/confirm",
+ "host": ["{{baseUrl}}"],
+ "path": ["payments", ":id", "confirm"],
+ "variable": [
+ {
+ "key": "id",
+ "value": "{{payment_id}}"
+ }
+ ]
+ },
+ "description": "This API is to confirm the payment request and forward payment to the payment processor. This API provides more granular control upon when the API is forwarded to the payment processor. Alternatively you can confirm the payment within the Payments-Create API"
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Create second/response.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Payments - Confirm/response.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Create second/response.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Payments - Confirm/response.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Create recurring/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Recurring Payments - Confirm/.event.meta.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Create recurring/.event.meta.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Recurring Payments - Confirm/.event.meta.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Recurring Payments - Confirm/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Recurring Payments - Confirm/event.test.js
new file mode 100644
index 0000000000..2b8a0318d3
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Recurring Payments - Confirm/event.test.js
@@ -0,0 +1,59 @@
+// Validate status 2xx
+pm.test("[POST]::/payments - Status code is 2xx", function () {
+ pm.response.to.be.success;
+});
+
+// Validate if response header has matching content-type
+pm.test("[POST]::/payments - Content-Type is application/json", function () {
+ pm.expect(pm.response.headers.get("Content-Type")).to.include("application/json");
+});
+
+// Validate if response has JSON Body
+pm.test("[POST]::/payments - Response has JSON Body", function () {
+ pm.response.to.have.jsonBody();
+});
+
+// Set response object as internal variable
+let jsonData = {};
+try {jsonData = pm.response.json();}catch(e){}
+
+// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
+if (jsonData?.payment_id) {
+ pm.collectionVariables.set("payment_id", jsonData.payment_id);
+ console.log("- use {{payment_id}} as collection variable for value",jsonData.payment_id);
+} else {
+ console.log('INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.');
+};
+
+
+// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
+if (jsonData?.mandate_id) {
+ pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
+ console.log("- use {{mandate_id}} as collection variable for value",jsonData.mandate_id);
+} else {
+ console.log('INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.');
+};
+
+// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
+if (jsonData?.client_secret) {
+ pm.collectionVariables.set("client_secret", jsonData.client_secret);
+ console.log("- use {{client_secret}} as collection variable for value",jsonData.client_secret);
+} else {
+ console.log('INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.');
+};
+
+// Response body should have value "succeeded" for "status"
+if (jsonData?.status) {
+pm.test("[POST]::/payments - Content check if value for 'status' matches 'succeeded'", function() {
+ pm.expect(jsonData.status).to.eql("succeeded");
+})};
+
+// Response body should have "mandate_id"
+pm.test("[POST]::/payments - Content check if 'mandate_id' exists", function() {
+ pm.expect((typeof jsonData.mandate_id !== "undefined")).to.be.true;
+});
+
+// Response body should have "mandate_data"
+pm.test("[POST]::/payments - Content check if 'mandate_data' exists", function() {
+ pm.expect((typeof jsonData.mandate_data !== "undefined")).to.be.true;
+});
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - External 3ds authentication/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Recurring Payments - Confirm/request.json
similarity index 69%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - External 3ds authentication/request.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Recurring Payments - Confirm/request.json
index 4326c6a2f2..43ee2be3e4 100644
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - External 3ds authentication/request.json
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Recurring Payments - Confirm/request.json
@@ -4,7 +4,7 @@
"apikey": [
{
"key": "value",
- "value": "{{publishable_key}}",
+ "value": "{{api_key}}",
"type": "string"
},
{
@@ -28,6 +28,12 @@
{
"key": "Accept",
"value": "application/json"
+ },
+ {
+ "key": "publishable_key",
+ "value": "{{publishable_key}}",
+ "type": "text",
+ "disabled": true
}
],
"body": {
@@ -38,27 +44,19 @@
}
},
"raw_json_formatted": {
- "client_secret": "{{client_secret}}",
- "device_channel": "BRW",
- "threeds_method_comp_ind": "Y"
+ "customer_id": "{{customer_id}}",
+ "payment_method": "card",
+ "payment_token": "{{payment_token}}"
}
},
"url": {
- "raw": "{{baseUrl}}/payments/:id/3ds/authentication",
- "host": [
- "{{baseUrl}}"
- ],
- "path": [
- "payments",
- ":id",
- "3ds",
- "authentication"
- ],
+ "raw": "{{baseUrl}}/payments/:id/confirm",
+ "host": ["{{baseUrl}}"],
+ "path": ["payments", ":id", "confirm"],
"variable": [
{
"key": "id",
- "value": "{{payment_id}}",
- "description": "(Required) unique payment id"
+ "value": "{{payment_id}}"
}
]
},
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Retrieve/response.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Recurring Payments - Confirm/response.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Retrieve/response.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Recurring Payments - Confirm/response.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Retrieve mandate/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Recurring Payments - Create/.event.meta.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Retrieve mandate/.event.meta.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Recurring Payments - Create/.event.meta.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Recurring Payments - Create/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Recurring Payments - Create/event.test.js
new file mode 100644
index 0000000000..7e9e20d141
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Recurring Payments - Create/event.test.js
@@ -0,0 +1,56 @@
+// Validate status 2xx
+pm.test("[POST]::/payments - Status code is 2xx", function () {
+ pm.response.to.be.success;
+});
+
+// Validate if response header has matching content-type
+pm.test("[POST]::/payments - Content-Type is application/json", function () {
+ pm.expect(pm.response.headers.get("Content-Type")).to.include("application/json");
+});
+
+// Validate if response has JSON Body
+pm.test("[POST]::/payments - Response has JSON Body", function () {
+ pm.response.to.have.jsonBody();
+});
+
+// Set response object as internal variable
+let jsonData = {};
+try {jsonData = pm.response.json();}catch(e){}
+
+// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
+if (jsonData?.payment_id) {
+ pm.collectionVariables.set("payment_id", jsonData.payment_id);
+ console.log("- use {{payment_id}} as collection variable for value",jsonData.payment_id);
+} else {
+ console.log('INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.');
+};
+
+// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
+if (jsonData?.client_secret) {
+ pm.collectionVariables.set("client_secret", jsonData.client_secret);
+ console.log("- use {{client_secret}} as collection variable for value",jsonData.client_secret);
+} else {
+ console.log('INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.');
+};
+
+
+// Response body should have value "requires_payment_method" for "status"
+if (jsonData?.status) {
+pm.test("[POST]::/payments - Content check if value for 'status' matches 'requires_payment_method'", function() {
+ pm.expect(jsonData.status).to.eql("requires_payment_method");
+})};
+
+// Response body should have "mandate_id"
+pm.test("[POST]::/payments - Content check if 'mandate_id' exists", function() {
+ pm.expect((typeof jsonData.mandate_id !== "undefined")).to.be.true;
+});
+
+// Response body should have "mandate_data"
+pm.test("[POST]::/payments - Content check if 'mandate_data' exists", function() {
+ pm.expect((typeof jsonData.mandate_data !== "undefined")).to.be.true;
+});
+
+// Response body should have "payment_method_data"
+pm.test("[POST]::/payments - Content check if 'payment_method_data' exists", function() {
+ pm.expect((typeof jsonData.payment_method_data !== "undefined")).to.be.true;
+});
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Recurring Payments - Create/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Recurring Payments - Create/request.json
new file mode 100644
index 0000000000..8f51b303a9
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Recurring Payments - Create/request.json
@@ -0,0 +1,61 @@
+{
+ "method": "POST",
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ },
+ {
+ "key": "Accept",
+ "value": "application/json"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ },
+ "raw_json_formatted": {
+ "amount": 500,
+ "currency": "USD",
+ "confirm": false,
+ "capture_method": "automatic",
+ "amount_to_capture": 500,
+ "profile_id": "{{profile_id}}",
+ "customer_id": "{{customer_id}}",
+ "email": "[email protected]",
+ "name": "John Doe",
+ "phone": "8056594427",
+ "phone_country_code": "+91",
+ "description": "{{$randomLoremSentence}}",
+ "authentication_type": "no_three_ds",
+ "setup_future_usage": "off_session",
+ "shipping": {
+ "address": {
+ "line1": "1467",
+ "line2": "Harrison Street",
+ "line3": "Harrison Street",
+ "city": "San Fransico",
+ "state": "California",
+ "zip": "94122",
+ "country": "US",
+ "first_name": "joseph"
+ }
+ },
+ "statement_descriptor_name": "joseph",
+ "statement_descriptor_suffix": "JS"
+ }
+ },
+ "url": {
+ "raw": "{{baseUrl}}/payments",
+ "host": [
+ "{{baseUrl}}"
+ ],
+ "path": [
+ "payments"
+ ]
+ },
+ "description": "To process a payment you will have to create a payment, attach a payment method and confirm. Depending on the user journey you wish to achieve, you may opt to all the steps in a single request or in a sequence of API request using following APIs: (i) Payments - Update, (ii) Payments - Confirm, and (iii) Payments - Capture"
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Void the payment/Payments - Cancel/response.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Recurring Payments - Create/response.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Void the payment/Payments - Cancel/response.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5b-Create a zero auth mandate and recurring payment (using connector agnostic)/Recurring Payments - Create/response.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/.meta.json
deleted file mode 100644
index 480eee064e..0000000000
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/.meta.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "childrenOrder": [
- "Payments - Create first",
- "Payments - Confirm first and save card",
- "Payment methods - List and get token",
- "Payments - Create second",
- "Payments - Confirm second and use saved card",
- "Payments - Retrieve"
- ]
-}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payment methods - List and get token/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payment methods - List and get token/request.json
deleted file mode 100644
index cff6d6d715..0000000000
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payment methods - List and get token/request.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "method": "GET",
- "header": [
- {
- "key": "Accept",
- "value": "application/json"
- }
- ],
- "url": {
- "raw": "{{baseUrl}}/customers/:customer_id/payment_methods",
- "host": [
- "{{baseUrl}}"
- ],
- "path": [
- "customers",
- ":customer_id",
- "payment_methods"
- ],
- "variable": [
- {
- "key": "customer_id",
- "value": "{{customer_id}}",
- "description": "//Pass the customer id"
- }
- ]
- },
- "description": "To filter and list the applicable payment methods for a particular Customer ID"
-}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/.meta.json
new file mode 100644
index 0000000000..e8bbb39e2c
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/.meta.json
@@ -0,0 +1,8 @@
+{
+ "childrenOrder": [
+ "Payments - Create",
+ "Payments - Retrieve",
+ "Recurring Payments - Create",
+ "Recurring Payments - Retrieve"
+ ]
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Retrieve recurring/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Payments - Create/.event.meta.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Retrieve recurring/.event.meta.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Payments - Create/.event.meta.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Create mandate/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Payments - Create/event.test.js
similarity index 85%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Create mandate/event.test.js
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Payments - Create/event.test.js
index 8b198f9f6f..1b37dc2c7d 100644
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Create mandate/event.test.js
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Payments - Create/event.test.js
@@ -60,12 +60,22 @@ if (jsonData?.client_secret) {
);
}
-// Response body should have value "requires_payment_method" for "status"
+// Response body should have value "succeeded" for "status"
if (jsonData?.status) {
pm.test(
- "[POST]::/payments - Content check if value for 'status' matches 'requires_payment_method'",
+ "[POST]::/payments - Content check if value for 'status' matches 'succeeded'",
function () {
- pm.expect(jsonData.status).to.eql("requires_payment_method");
+ pm.expect(jsonData.status).to.eql("succeeded");
+ },
+ );
+}
+
+// Response body should have value "succeeded" for "status"
+if (jsonData?.status) {
+ pm.test(
+ "[POST]::/payments - Content check if value for 'status' matches 'succeeded'",
+ function () {
+ pm.expect(jsonData.status).to.eql("succeeded");
},
);
}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Payments - Create/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Payments - Create/request.json
new file mode 100644
index 0000000000..744d36a82e
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Payments - Create/request.json
@@ -0,0 +1,103 @@
+{
+ "method": "POST",
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ },
+ {
+ "key": "Accept",
+ "value": "application/json"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ },
+ "raw_json_formatted": {
+ "amount": 500,
+ "currency": "USD",
+ "confirm": true,
+ "capture_method": "automatic",
+ "amount_to_capture": 500,
+ "profile_id": "{{profile_id}}",
+ "customer_id": "{{customer_id}}",
+ "email": "[email protected]",
+ "name": "John Doe",
+ "phone": "8056594427",
+ "phone_country_code": "+91",
+ "description": "{{$randomLoremSentence}}",
+ "authentication_type": "no_three_ds",
+ "payment_method": "card",
+ "payment_method_data": {
+ "card": {
+ "card_number": "5185570141917102",
+ "card_exp_month": "10",
+ "card_exp_year": "50",
+ "card_holder_name": "John Doe",
+ "card_cvc": "123"
+ }
+ },
+ "setup_future_usage": "off_session",
+ "mandate_data": {
+ "customer_acceptance": {
+ "acceptance_type": "offline",
+ "accepted_at": "1963-05-03T04:07:52.723Z",
+ "online": {
+ "ip_address": "127.0.0.1",
+ "user_agent": "amet irure esse"
+ }
+ },
+ "mandate_type": {
+ "single_use": {
+ "amount": 7000,
+ "currency": "USD"
+ }
+ }
+ },
+ "customer_acceptance": {
+ "acceptance_type": "offline",
+ "accepted_at": "1963-05-03T04:07:52.723Z",
+ "online": {
+ "ip_address": "127.0.0.1",
+ "user_agent": "amet irure esse"
+ }
+ },
+ "billing": {
+ "address": {
+ "line1": "1467",
+ "line2": "Harrison Street",
+ "line3": "Harrison Street",
+ "city": "San Fransico",
+ "state": "California",
+ "zip": "94122",
+ "country": "US",
+ "first_name": "joseph"
+ }
+ },
+ "shipping": {
+ "address": {
+ "line1": "1467",
+ "line2": "Harrison Street",
+ "line3": "Harrison Street",
+ "city": "San Fransico",
+ "state": "California",
+ "zip": "94122",
+ "country": "US",
+ "first_name": "joseph"
+ }
+ },
+ "statement_descriptor_name": "Joseph Doe",
+ "statement_descriptor_suffix": "JS"
+ }
+ },
+ "url": {
+ "raw": "{{baseUrl}}/payments",
+ "host": ["{{baseUrl}}"],
+ "path": ["payments"]
+ },
+ "description": "To process a payment you will have to create a payment, attach a payment method and confirm. Depending on the user journey you wish to achieve, you may opt to all the steps in a single request or in a sequence of API request using following APIs: (i) Payments - Update, (ii) Payments - Confirm, and (iii) Payments - Capture"
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Void the payment/Payments - Create/response.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Payments - Create/response.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Void the payment/Payments - Create/response.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Payments - Create/response.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payment methods - List and get token/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Payments - Retrieve/.event.meta.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payment methods - List and get token/.event.meta.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Payments - Retrieve/.event.meta.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Retrieve mandate/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Payments - Retrieve/event.test.js
similarity index 94%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Retrieve mandate/event.test.js
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Payments - Retrieve/event.test.js
index 033167061b..db584da226 100644
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Retrieve mandate/event.test.js
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Payments - Retrieve/event.test.js
@@ -46,6 +46,7 @@ if (jsonData?.mandate_id) {
"INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
);
}
+
// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
if (jsonData?.client_secret) {
pm.collectionVariables.set("client_secret", jsonData.client_secret);
@@ -71,7 +72,7 @@ if (jsonData?.status) {
// Response body should have "mandate_id"
pm.test(
- "[POST]::/payments/:id - Content check if 'mandate_id' exists",
+ "[POST]::/payments - Content check if 'mandate_id' exists",
function () {
pm.expect(typeof jsonData.mandate_id !== "undefined").to.be.true;
},
@@ -79,7 +80,7 @@ pm.test(
// Response body should have "mandate_data"
pm.test(
- "[POST]::/payments/:id - Content check if 'mandate_data' exists",
+ "[POST]::/payments - Content check if 'mandate_data' exists",
function () {
pm.expect(typeof jsonData.mandate_data !== "undefined").to.be.true;
},
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Retrieve mandate/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Payments - Retrieve/request.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Retrieve mandate/request.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Payments - Retrieve/request.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Payments - Retrieve/response.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Payments - Retrieve/response.json
new file mode 100644
index 0000000000..fe51488c70
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Payments - Retrieve/response.json
@@ -0,0 +1 @@
+[]
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Confirm second and use saved card/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Recurring Payments - Create/.event.meta.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Confirm second and use saved card/.event.meta.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Recurring Payments - Create/.event.meta.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Create recurring/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Recurring Payments - Create/event.test.js
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Create recurring/event.test.js
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Recurring Payments - Create/event.test.js
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Recurring Payments - Create/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Recurring Payments - Create/request.json
new file mode 100644
index 0000000000..1a7a642cac
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Recurring Payments - Create/request.json
@@ -0,0 +1,62 @@
+{
+ "method": "POST",
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ },
+ {
+ "key": "Accept",
+ "value": "application/json"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ },
+ "raw_json_formatted": {
+ "amount": 500,
+ "currency": "USD",
+ "confirm": true,
+ "capture_method": "automatic",
+ "amount_to_capture": 500,
+ "profile_id": "{{profile_id}}",
+ "customer_id": "{{customer_id}}",
+ "email": "[email protected]",
+ "name": "John Doe",
+ "phone": "8056594427",
+ "phone_country_code": "+91",
+ "description": "{{$randomLoremSentence}}",
+ "authentication_type": "no_three_ds",
+ "mandate_id": "{{mandate_id}}",
+ "off_session": true,
+ "shipping": {
+ "address": {
+ "line1": "1467",
+ "line2": "Harrison Street",
+ "line3": "Harrison Street",
+ "city": "San Fransico",
+ "state": "California",
+ "zip": "94122",
+ "country": "US",
+ "first_name": "joseph"
+ }
+ },
+ "statement_descriptor_name": "joseph",
+ "statement_descriptor_suffix": "JS"
+ }
+ },
+ "url": {
+ "raw": "{{baseUrl}}/payments",
+ "host": [
+ "{{baseUrl}}"
+ ],
+ "path": [
+ "payments"
+ ]
+ },
+ "description": "To process a payment you will have to create a payment, attach a payment method and confirm. Depending on the user journey you wish to achieve, you may opt to all the steps in a single request or in a sequence of API request using following APIs: (i) Payments - Update, (ii) Payments - Confirm, and (iii) Payments - Capture"
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Recurring Payments - Create/response.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Recurring Payments - Create/response.json
new file mode 100644
index 0000000000..fe51488c70
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Recurring Payments - Create/response.json
@@ -0,0 +1 @@
+[]
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Create first/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Recurring Payments - Retrieve/.event.meta.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Create first/.event.meta.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Recurring Payments - Retrieve/.event.meta.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Retrieve recurring/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Recurring Payments - Retrieve/event.test.js
similarity index 84%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Retrieve recurring/event.test.js
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Recurring Payments - Retrieve/event.test.js
index fe8fa706b9..db584da226 100644
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Retrieve recurring/event.test.js
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Recurring Payments - Retrieve/event.test.js
@@ -34,6 +34,18 @@ if (jsonData?.payment_id) {
);
}
+// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
+if (jsonData?.mandate_id) {
+ pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
+ console.log(
+ "- use {{mandate_id}} as collection variable for value",
+ jsonData.mandate_id,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
+ );
+}
// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
if (jsonData?.client_secret) {
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Retrieve recurring/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Recurring Payments - Retrieve/request.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Retrieve recurring/request.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Recurring Payments - Retrieve/request.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Recurring Payments - Retrieve/response.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Recurring Payments - Retrieve/response.json
new file mode 100644
index 0000000000..fe51488c70
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6a-Create a mandate and recurring payment (using mandate_id)/Recurring Payments - Retrieve/response.json
@@ -0,0 +1 @@
+[]
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/.meta.json
new file mode 100644
index 0000000000..780cd4df24
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/.meta.json
@@ -0,0 +1,9 @@
+{
+ "childrenOrder": [
+ "Mandate Payments - Create",
+ "Payments - Confirm",
+ "Recurring Payments - Create",
+ "List payment methods for a Customer",
+ "Recurring Payments - Confirm"
+ ]
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Create second/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/List payment methods for a Customer/.event.meta.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Create second/.event.meta.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/List payment methods for a Customer/.event.meta.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payment methods - List and get token/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/List payment methods for a Customer/event.test.js
similarity index 75%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payment methods - List and get token/event.test.js
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/List payment methods for a Customer/event.test.js
index 75e5de2760..f844efad42 100644
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payment methods - List and get token/event.test.js
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/List payment methods for a Customer/event.test.js
@@ -1,4 +1,4 @@
-// Validate status 2xx
+// Validate status 2xx
pm.test("[GET]::/payment_methods/:customer_id - Status code is 2xx", function () {
pm.response.to.be.success;
});
@@ -12,17 +12,9 @@ pm.test("[GET]::/payment_methods/:customer_id - Content-Type is application/json
let jsonData = {};
try {jsonData = pm.response.json();}catch(e){}
-// Response body should have at least one card payment method"
-pm.test(
-"[GET]::/payment_methods/:customer_id - Content check body has at least one customer_payment_methods",
-function () {
- pm.expect(jsonData.customer_payment_methods.length).greaterThan(0);
- },
-);
-
if (jsonData?.customer_payment_methods[0]?.payment_token) {
pm.collectionVariables.set("payment_token", jsonData.customer_payment_methods[0].payment_token);
console.log("- use {{payment_token}} as collection variable for value", jsonData.customer_payment_methods[0].payment_token);
} else {
console.log('INFO - Unable to assign variable {{payment_token}}, as jsonData.customer_payment_methods[0].payment_token is undefined.');
-}
+}
\ No newline at end of file
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/List payment methods for a Customer/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/List payment methods for a Customer/request.json
new file mode 100644
index 0000000000..40843aac2a
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/List payment methods for a Customer/request.json
@@ -0,0 +1,70 @@
+{
+ "method": "GET",
+ "header": [
+ {
+ "key": "Accept",
+ "value": "application/json"
+ }
+ ],
+ "url": {
+ "raw": "{{baseUrl}}/customers/:customer_id/payment_methods",
+ "host": [
+ "{{baseUrl}}"
+ ],
+ "path": [
+ "customers",
+ ":customer_id",
+ "payment_methods"
+ ],
+ "query": [
+ {
+ "key": "accepted_country",
+ "value": "co",
+ "disabled": true
+ },
+ {
+ "key": "accepted_country",
+ "value": "pa",
+ "disabled": true
+ },
+ {
+ "key": "accepted_currency",
+ "value": "voluptate ea",
+ "disabled": true
+ },
+ {
+ "key": "accepted_currency",
+ "value": "exercitation",
+ "disabled": true
+ },
+ {
+ "key": "minimum_amount",
+ "value": "100",
+ "disabled": true
+ },
+ {
+ "key": "maximum_amount",
+ "value": "10000000",
+ "disabled": true
+ },
+ {
+ "key": "recurring_payment_enabled",
+ "value": "true",
+ "disabled": true
+ },
+ {
+ "key": "installment_payment_enabled",
+ "value": "true",
+ "disabled": true
+ }
+ ],
+ "variable": [
+ {
+ "key": "customer_id",
+ "value": "{{customer_id}}",
+ "description": "//Pass the customer id"
+ }
+ ]
+ },
+ "description": "To filter and list the applicable payment methods for a particular Customer ID"
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/List payment methods for a Customer/response.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/List payment methods for a Customer/response.json
new file mode 100644
index 0000000000..fe51488c70
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/List payment methods for a Customer/response.json
@@ -0,0 +1 @@
+[]
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Retrieve/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Mandate Payments - Create/.event.meta.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Retrieve/.event.meta.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Mandate Payments - Create/.event.meta.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Mandate Payments - Create/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Mandate Payments - Create/event.test.js
new file mode 100644
index 0000000000..17c0ca2950
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Mandate Payments - Create/event.test.js
@@ -0,0 +1,51 @@
+// Validate status 2xx
+pm.test("[POST]::/payments - Status code is 2xx", function () {
+ pm.response.to.be.success;
+});
+
+// Validate if response header has matching content-type
+pm.test("[POST]::/payments - Content-Type is application/json", function () {
+ pm.expect(pm.response.headers.get("Content-Type")).to.include("application/json");
+});
+
+// Validate if response has JSON Body
+pm.test("[POST]::/payments - Response has JSON Body", function () {
+ pm.response.to.have.jsonBody();
+});
+
+// Set response object as internal variable
+let jsonData = {};
+try {jsonData = pm.response.json();}catch(e){}
+
+// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
+if (jsonData?.payment_id) {
+ pm.collectionVariables.set("payment_id", jsonData.payment_id);
+ console.log("- use {{payment_id}} as collection variable for value",jsonData.payment_id);
+} else {
+ console.log('INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.');
+};
+
+// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
+if (jsonData?.client_secret) {
+ pm.collectionVariables.set("client_secret", jsonData.client_secret);
+ console.log("- use {{client_secret}} as collection variable for value",jsonData.client_secret);
+} else {
+ console.log('INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.');
+};
+
+
+// Response body should have value "requires_payment_method" for "status"
+if (jsonData?.status) {
+pm.test("[POST]::/payments - Content check if value for 'status' matches 'requires_payment_method'", function() {
+ pm.expect(jsonData.status).to.eql("requires_payment_method");
+})};
+
+// Response body should have "mandate_id"
+pm.test("[POST]::/payments - Content check if 'mandate_id' exists", function() {
+ pm.expect((typeof jsonData.mandate_id !== "undefined")).to.be.true;
+});
+
+// Response body should have "mandate_data"
+pm.test("[POST]::/payments - Content check if 'mandate_data' exists", function() {
+ pm.expect((typeof jsonData.mandate_data !== "undefined")).to.be.true;
+});
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Mandate Payments - Create/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Mandate Payments - Create/request.json
new file mode 100644
index 0000000000..b083d2c5b2
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Mandate Payments - Create/request.json
@@ -0,0 +1,122 @@
+{
+ "auth": {
+ "type": "apikey",
+ "apikey": [
+ {
+ "key": "value",
+ "value": "{{api_key}}",
+ "type": "string"
+ },
+ {
+ "key": "key",
+ "value": "api-key",
+ "type": "string"
+ },
+ {
+ "key": "in",
+ "value": "header",
+ "type": "string"
+ }
+ ]
+ },
+ "method": "POST",
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ },
+ {
+ "key": "Accept",
+ "value": "application/json"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ },
+ "raw_json_formatted": {
+ "amount": 500,
+ "currency": "USD",
+ "confirm": false,
+ "capture_method": "automatic",
+ "customer_id": "{{customer_id}}",
+ "email": "[email protected]",
+ "profile_id": "{{profile_id}}",
+ "name": "John Doe",
+ "setup_future_usage": "off_session",
+ "phone": "8056594427",
+ "phone_country_code": "+91",
+ "description": "{{$randomLoremSentence}}",
+ "authentication_type": "no_three_ds",
+ "billing": {
+ "address": {
+ "line1": "1467",
+ "line2": "Harrison Street",
+ "line3": "Harrison Street",
+ "city": "San Fransico",
+ "state": "California",
+ "zip": "94122",
+ "country": "US",
+ "first_name": "John",
+ "last_name": "Doe"
+ },
+ "phone": {
+ "number": "8056594427",
+ "country_code": "+91"
+ }
+ },
+ "shipping": {
+ "address": {
+ "line1": "1467",
+ "line2": "Harrison Street",
+ "line3": "Harrison Street",
+ "city": "San Fransico",
+ "state": "California",
+ "zip": "94122",
+ "country": "US",
+ "first_name": "John",
+ "last_name": "Doe"
+ },
+ "phone": {
+ "number": "8056594427",
+ "country_code": "+91"
+ }
+ },
+ "browser_info": {
+ "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
+ "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
+ "language": "nl-NL",
+ "color_depth": 24,
+ "screen_height": 723,
+ "screen_width": 1536,
+ "time_zone": 0,
+ "java_enabled": true,
+ "java_script_enabled": true,
+ "ip_address": "125.0.0.1"
+ },
+ "statement_descriptor_name": "joseph",
+ "statement_descriptor_suffix": "JS",
+ "order_details": [
+ {
+ "product_name": "Apple iphone 15",
+ "quantity": 1,
+ "amount": 0,
+ "account_name": "transaction_processing"
+ }
+ ]
+ }
+ },
+ "url": {
+ "raw": "{{baseUrl}}/payments",
+ "host": [
+ "{{baseUrl}}"
+ ],
+ "path": [
+ "payments"
+ ]
+ },
+ "description": "To process a payment you will have to create a payment, attach a payment method and confirm. Depending on the user journey you wish to achieve, you may opt to all the steps in a single request or in a sequence of API request using following APIs: (i) Payments - Update, (ii) Payments - Confirm, and (iii) Payments - Capture"
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Mandate Payments - Create/response.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Mandate Payments - Create/response.json
new file mode 100644
index 0000000000..fe51488c70
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Mandate Payments - Create/response.json
@@ -0,0 +1 @@
+[]
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Void the payment/Payments - Cancel/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Payments - Confirm/.event.meta.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Void the payment/Payments - Cancel/.event.meta.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Payments - Confirm/.event.meta.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Payments - Confirm/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Payments - Confirm/event.test.js
new file mode 100644
index 0000000000..2b8a0318d3
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Payments - Confirm/event.test.js
@@ -0,0 +1,59 @@
+// Validate status 2xx
+pm.test("[POST]::/payments - Status code is 2xx", function () {
+ pm.response.to.be.success;
+});
+
+// Validate if response header has matching content-type
+pm.test("[POST]::/payments - Content-Type is application/json", function () {
+ pm.expect(pm.response.headers.get("Content-Type")).to.include("application/json");
+});
+
+// Validate if response has JSON Body
+pm.test("[POST]::/payments - Response has JSON Body", function () {
+ pm.response.to.have.jsonBody();
+});
+
+// Set response object as internal variable
+let jsonData = {};
+try {jsonData = pm.response.json();}catch(e){}
+
+// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
+if (jsonData?.payment_id) {
+ pm.collectionVariables.set("payment_id", jsonData.payment_id);
+ console.log("- use {{payment_id}} as collection variable for value",jsonData.payment_id);
+} else {
+ console.log('INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.');
+};
+
+
+// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
+if (jsonData?.mandate_id) {
+ pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
+ console.log("- use {{mandate_id}} as collection variable for value",jsonData.mandate_id);
+} else {
+ console.log('INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.');
+};
+
+// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
+if (jsonData?.client_secret) {
+ pm.collectionVariables.set("client_secret", jsonData.client_secret);
+ console.log("- use {{client_secret}} as collection variable for value",jsonData.client_secret);
+} else {
+ console.log('INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.');
+};
+
+// Response body should have value "succeeded" for "status"
+if (jsonData?.status) {
+pm.test("[POST]::/payments - Content check if value for 'status' matches 'succeeded'", function() {
+ pm.expect(jsonData.status).to.eql("succeeded");
+})};
+
+// Response body should have "mandate_id"
+pm.test("[POST]::/payments - Content check if 'mandate_id' exists", function() {
+ pm.expect((typeof jsonData.mandate_id !== "undefined")).to.be.true;
+});
+
+// Response body should have "mandate_data"
+pm.test("[POST]::/payments - Content check if 'mandate_data' exists", function() {
+ pm.expect((typeof jsonData.mandate_data !== "undefined")).to.be.true;
+});
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Payments - Confirm/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Payments - Confirm/request.json
new file mode 100644
index 0000000000..7ffe71d42a
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Payments - Confirm/request.json
@@ -0,0 +1,74 @@
+{
+ "auth": {
+ "type": "apikey",
+ "apikey": [
+ {
+ "key": "value",
+ "value": "{{api_key}}",
+ "type": "string"
+ },
+ {
+ "key": "key",
+ "value": "api-key",
+ "type": "string"
+ },
+ {
+ "key": "in",
+ "value": "header",
+ "type": "string"
+ }
+ ]
+ },
+ "method": "POST",
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ },
+ {
+ "key": "Accept",
+ "value": "application/json"
+ },
+ {
+ "key": "publishable_key",
+ "value": "{{publishable_key}}",
+ "type": "text",
+ "disabled": true
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ },
+ "raw_json_formatted": {
+ "payment_method": "card",
+ "payment_method_type": "credit",
+ "payment_method_data": {
+ "card": {
+ "card_number": "5185570141917102",
+ "card_exp_month": "01",
+ "card_exp_year": "50",
+ "card_holder_name": "John Doe",
+ "card_cvc": "737"
+ }
+ },
+ "setup_future_usage": "off_session",
+ "payment_type": "setup_mandate"
+ }
+ },
+ "url": {
+ "raw": "{{baseUrl}}/payments/:id/confirm",
+ "host": ["{{baseUrl}}"],
+ "path": ["payments", ":id", "confirm"],
+ "variable": [
+ {
+ "key": "id",
+ "value": "{{payment_id}}"
+ }
+ ]
+ },
+ "description": "This API is to confirm the payment request and forward payment to the payment processor. This API provides more granular control upon when the API is forwarded to the payment processor. Alternatively you can confirm the payment within the Payments-Create API"
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Payments - Confirm/response.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Payments - Confirm/response.json
new file mode 100644
index 0000000000..fe51488c70
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Payments - Confirm/response.json
@@ -0,0 +1 @@
+[]
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Recurring Payments - Confirm/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Recurring Payments - Confirm/.event.meta.json
new file mode 100644
index 0000000000..688c85746e
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Recurring Payments - Confirm/.event.meta.json
@@ -0,0 +1,5 @@
+{
+ "eventOrder": [
+ "event.test.js"
+ ]
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Recurring Payments - Confirm/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Recurring Payments - Confirm/event.test.js
new file mode 100644
index 0000000000..2b8a0318d3
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Recurring Payments - Confirm/event.test.js
@@ -0,0 +1,59 @@
+// Validate status 2xx
+pm.test("[POST]::/payments - Status code is 2xx", function () {
+ pm.response.to.be.success;
+});
+
+// Validate if response header has matching content-type
+pm.test("[POST]::/payments - Content-Type is application/json", function () {
+ pm.expect(pm.response.headers.get("Content-Type")).to.include("application/json");
+});
+
+// Validate if response has JSON Body
+pm.test("[POST]::/payments - Response has JSON Body", function () {
+ pm.response.to.have.jsonBody();
+});
+
+// Set response object as internal variable
+let jsonData = {};
+try {jsonData = pm.response.json();}catch(e){}
+
+// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
+if (jsonData?.payment_id) {
+ pm.collectionVariables.set("payment_id", jsonData.payment_id);
+ console.log("- use {{payment_id}} as collection variable for value",jsonData.payment_id);
+} else {
+ console.log('INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.');
+};
+
+
+// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
+if (jsonData?.mandate_id) {
+ pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
+ console.log("- use {{mandate_id}} as collection variable for value",jsonData.mandate_id);
+} else {
+ console.log('INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.');
+};
+
+// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
+if (jsonData?.client_secret) {
+ pm.collectionVariables.set("client_secret", jsonData.client_secret);
+ console.log("- use {{client_secret}} as collection variable for value",jsonData.client_secret);
+} else {
+ console.log('INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.');
+};
+
+// Response body should have value "succeeded" for "status"
+if (jsonData?.status) {
+pm.test("[POST]::/payments - Content check if value for 'status' matches 'succeeded'", function() {
+ pm.expect(jsonData.status).to.eql("succeeded");
+})};
+
+// Response body should have "mandate_id"
+pm.test("[POST]::/payments - Content check if 'mandate_id' exists", function() {
+ pm.expect((typeof jsonData.mandate_id !== "undefined")).to.be.true;
+});
+
+// Response body should have "mandate_data"
+pm.test("[POST]::/payments - Content check if 'mandate_data' exists", function() {
+ pm.expect((typeof jsonData.mandate_data !== "undefined")).to.be.true;
+});
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Recurring Payments - Confirm/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Recurring Payments - Confirm/request.json
new file mode 100644
index 0000000000..43ee2be3e4
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Recurring Payments - Confirm/request.json
@@ -0,0 +1,64 @@
+{
+ "auth": {
+ "type": "apikey",
+ "apikey": [
+ {
+ "key": "value",
+ "value": "{{api_key}}",
+ "type": "string"
+ },
+ {
+ "key": "key",
+ "value": "api-key",
+ "type": "string"
+ },
+ {
+ "key": "in",
+ "value": "header",
+ "type": "string"
+ }
+ ]
+ },
+ "method": "POST",
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ },
+ {
+ "key": "Accept",
+ "value": "application/json"
+ },
+ {
+ "key": "publishable_key",
+ "value": "{{publishable_key}}",
+ "type": "text",
+ "disabled": true
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ },
+ "raw_json_formatted": {
+ "customer_id": "{{customer_id}}",
+ "payment_method": "card",
+ "payment_token": "{{payment_token}}"
+ }
+ },
+ "url": {
+ "raw": "{{baseUrl}}/payments/:id/confirm",
+ "host": ["{{baseUrl}}"],
+ "path": ["payments", ":id", "confirm"],
+ "variable": [
+ {
+ "key": "id",
+ "value": "{{payment_id}}"
+ }
+ ]
+ },
+ "description": "This API is to confirm the payment request and forward payment to the payment processor. This API provides more granular control upon when the API is forwarded to the payment processor. Alternatively you can confirm the payment within the Payments-Create API"
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Recurring Payments - Confirm/response.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Recurring Payments - Confirm/response.json
new file mode 100644
index 0000000000..fe51488c70
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Recurring Payments - Confirm/response.json
@@ -0,0 +1 @@
+[]
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Recurring Payments - Create/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Recurring Payments - Create/.event.meta.json
new file mode 100644
index 0000000000..688c85746e
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Recurring Payments - Create/.event.meta.json
@@ -0,0 +1,5 @@
+{
+ "eventOrder": [
+ "event.test.js"
+ ]
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Recurring Payments - Create/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Recurring Payments - Create/event.test.js
new file mode 100644
index 0000000000..7e9e20d141
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Recurring Payments - Create/event.test.js
@@ -0,0 +1,56 @@
+// Validate status 2xx
+pm.test("[POST]::/payments - Status code is 2xx", function () {
+ pm.response.to.be.success;
+});
+
+// Validate if response header has matching content-type
+pm.test("[POST]::/payments - Content-Type is application/json", function () {
+ pm.expect(pm.response.headers.get("Content-Type")).to.include("application/json");
+});
+
+// Validate if response has JSON Body
+pm.test("[POST]::/payments - Response has JSON Body", function () {
+ pm.response.to.have.jsonBody();
+});
+
+// Set response object as internal variable
+let jsonData = {};
+try {jsonData = pm.response.json();}catch(e){}
+
+// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
+if (jsonData?.payment_id) {
+ pm.collectionVariables.set("payment_id", jsonData.payment_id);
+ console.log("- use {{payment_id}} as collection variable for value",jsonData.payment_id);
+} else {
+ console.log('INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.');
+};
+
+// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
+if (jsonData?.client_secret) {
+ pm.collectionVariables.set("client_secret", jsonData.client_secret);
+ console.log("- use {{client_secret}} as collection variable for value",jsonData.client_secret);
+} else {
+ console.log('INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.');
+};
+
+
+// Response body should have value "requires_payment_method" for "status"
+if (jsonData?.status) {
+pm.test("[POST]::/payments - Content check if value for 'status' matches 'requires_payment_method'", function() {
+ pm.expect(jsonData.status).to.eql("requires_payment_method");
+})};
+
+// Response body should have "mandate_id"
+pm.test("[POST]::/payments - Content check if 'mandate_id' exists", function() {
+ pm.expect((typeof jsonData.mandate_id !== "undefined")).to.be.true;
+});
+
+// Response body should have "mandate_data"
+pm.test("[POST]::/payments - Content check if 'mandate_data' exists", function() {
+ pm.expect((typeof jsonData.mandate_data !== "undefined")).to.be.true;
+});
+
+// Response body should have "payment_method_data"
+pm.test("[POST]::/payments - Content check if 'payment_method_data' exists", function() {
+ pm.expect((typeof jsonData.payment_method_data !== "undefined")).to.be.true;
+});
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Recurring Payments - Create/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Recurring Payments - Create/request.json
new file mode 100644
index 0000000000..8f51b303a9
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Recurring Payments - Create/request.json
@@ -0,0 +1,61 @@
+{
+ "method": "POST",
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ },
+ {
+ "key": "Accept",
+ "value": "application/json"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ },
+ "raw_json_formatted": {
+ "amount": 500,
+ "currency": "USD",
+ "confirm": false,
+ "capture_method": "automatic",
+ "amount_to_capture": 500,
+ "profile_id": "{{profile_id}}",
+ "customer_id": "{{customer_id}}",
+ "email": "[email protected]",
+ "name": "John Doe",
+ "phone": "8056594427",
+ "phone_country_code": "+91",
+ "description": "{{$randomLoremSentence}}",
+ "authentication_type": "no_three_ds",
+ "setup_future_usage": "off_session",
+ "shipping": {
+ "address": {
+ "line1": "1467",
+ "line2": "Harrison Street",
+ "line3": "Harrison Street",
+ "city": "San Fransico",
+ "state": "California",
+ "zip": "94122",
+ "country": "US",
+ "first_name": "joseph"
+ }
+ },
+ "statement_descriptor_name": "joseph",
+ "statement_descriptor_suffix": "JS"
+ }
+ },
+ "url": {
+ "raw": "{{baseUrl}}/payments",
+ "host": [
+ "{{baseUrl}}"
+ ],
+ "path": [
+ "payments"
+ ]
+ },
+ "description": "To process a payment you will have to create a payment, attach a payment method and confirm. Depending on the user journey you wish to achieve, you may opt to all the steps in a single request or in a sequence of API request using following APIs: (i) Payments - Update, (ii) Payments - Confirm, and (iii) Payments - Capture"
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Recurring Payments - Create/response.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Recurring Payments - Create/response.json
new file mode 100644
index 0000000000..fe51488c70
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6b-Create a mandate and recurring payment (using connector agnostic)/Recurring Payments - Create/response.json
@@ -0,0 +1 @@
+[]
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/.meta.json
new file mode 100644
index 0000000000..6c5ca8e2cb
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/.meta.json
@@ -0,0 +1,10 @@
+{
+ "childrenOrder": [
+ "Payments - Create",
+ "Payments - Retrieve",
+ "List payment methods for a Customer",
+ "Save card payments - Create",
+ "Save card payments - Confirm",
+ "Save card payments - Retrieve"
+ ]
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/List payment methods for a Customer/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/List payment methods for a Customer/.event.meta.json
new file mode 100644
index 0000000000..688c85746e
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/List payment methods for a Customer/.event.meta.json
@@ -0,0 +1,5 @@
+{
+ "eventOrder": [
+ "event.test.js"
+ ]
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/List payment methods for a Customer/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/List payment methods for a Customer/event.test.js
new file mode 100644
index 0000000000..f844efad42
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/List payment methods for a Customer/event.test.js
@@ -0,0 +1,20 @@
+// Validate status 2xx
+pm.test("[GET]::/payment_methods/:customer_id - Status code is 2xx", function () {
+ pm.response.to.be.success;
+});
+
+// Validate if response header has matching content-type
+pm.test("[GET]::/payment_methods/:customer_id - Content-Type is application/json", function () {
+ pm.expect(pm.response.headers.get("Content-Type")).to.include("application/json");
+});
+
+// Set response object as internal variable
+let jsonData = {};
+try {jsonData = pm.response.json();}catch(e){}
+
+if (jsonData?.customer_payment_methods[0]?.payment_token) {
+ pm.collectionVariables.set("payment_token", jsonData.customer_payment_methods[0].payment_token);
+ console.log("- use {{payment_token}} as collection variable for value", jsonData.customer_payment_methods[0].payment_token);
+} else {
+ console.log('INFO - Unable to assign variable {{payment_token}}, as jsonData.customer_payment_methods[0].payment_token is undefined.');
+}
\ No newline at end of file
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/List payment methods for a Customer/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/List payment methods for a Customer/request.json
new file mode 100644
index 0000000000..40843aac2a
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/List payment methods for a Customer/request.json
@@ -0,0 +1,70 @@
+{
+ "method": "GET",
+ "header": [
+ {
+ "key": "Accept",
+ "value": "application/json"
+ }
+ ],
+ "url": {
+ "raw": "{{baseUrl}}/customers/:customer_id/payment_methods",
+ "host": [
+ "{{baseUrl}}"
+ ],
+ "path": [
+ "customers",
+ ":customer_id",
+ "payment_methods"
+ ],
+ "query": [
+ {
+ "key": "accepted_country",
+ "value": "co",
+ "disabled": true
+ },
+ {
+ "key": "accepted_country",
+ "value": "pa",
+ "disabled": true
+ },
+ {
+ "key": "accepted_currency",
+ "value": "voluptate ea",
+ "disabled": true
+ },
+ {
+ "key": "accepted_currency",
+ "value": "exercitation",
+ "disabled": true
+ },
+ {
+ "key": "minimum_amount",
+ "value": "100",
+ "disabled": true
+ },
+ {
+ "key": "maximum_amount",
+ "value": "10000000",
+ "disabled": true
+ },
+ {
+ "key": "recurring_payment_enabled",
+ "value": "true",
+ "disabled": true
+ },
+ {
+ "key": "installment_payment_enabled",
+ "value": "true",
+ "disabled": true
+ }
+ ],
+ "variable": [
+ {
+ "key": "customer_id",
+ "value": "{{customer_id}}",
+ "description": "//Pass the customer id"
+ }
+ ]
+ },
+ "description": "To filter and list the applicable payment methods for a particular Customer ID"
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/List payment methods for a Customer/response.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/List payment methods for a Customer/response.json
new file mode 100644
index 0000000000..fe51488c70
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/List payment methods for a Customer/response.json
@@ -0,0 +1 @@
+[]
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Payments - Create/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Payments - Create/.event.meta.json
new file mode 100644
index 0000000000..eb871bbcb9
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Payments - Create/.event.meta.json
@@ -0,0 +1,3 @@
+{
+ "eventOrder": ["event.prerequest.js", "event.test.js"]
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Create second/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Payments - Create/event.test.js
similarity index 72%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Create second/event.test.js
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Payments - Create/event.test.js
index 31c6af0dfb..b7c7c3384d 100644
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Create second/event.test.js
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Payments - Create/event.test.js
@@ -25,6 +25,15 @@ if (jsonData?.payment_id) {
console.log('INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.');
};
+
+// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
+if (jsonData?.mandate_id) {
+ pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
+ console.log("- use {{mandate_id}} as collection variable for value",jsonData.mandate_id);
+} else {
+ console.log('INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.');
+};
+
// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
if (jsonData?.client_secret) {
pm.collectionVariables.set("client_secret", jsonData.client_secret);
@@ -38,4 +47,14 @@ if (jsonData?.customer_id) {
console.log("- use {{customer_id}} as collection variable for value",jsonData.customer_id);
} else {
console.log('INFO - Unable to assign variable {{customer_id}}, as jsonData.customer_id is undefined.');
-};
\ No newline at end of file
+};
+
+// Response body should have value "succeeded" for "status"
+if (jsonData?.status) {
+ pm.test(
+ "[POST]::/payments - Content check if value for 'status' matches 'succeeded'",
+ function () {
+ pm.expect(jsonData.status).to.eql("succeeded");
+ },
+ );
+}
\ No newline at end of file
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Payments - Create/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Payments - Create/request.json
new file mode 100644
index 0000000000..d08b675a2a
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Payments - Create/request.json
@@ -0,0 +1,98 @@
+{
+ "method": "POST",
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ },
+ {
+ "key": "Accept",
+ "value": "application/json"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ },
+ "raw_json_formatted": {
+ "amount": 500,
+ "currency": "USD",
+ "confirm": true,
+ "capture_method": "automatic",
+ "amount_to_capture": 500,
+ "customer_id": "{{customer_id}}",
+ "profile_id": "{{profile_id}}",
+ "email": "[email protected]",
+ "name": "John Doe",
+ "phone": "8056594427",
+ "phone_country_code": "+91",
+ "description": "{{$randomLoremSentence}}",
+ "authentication_type": "no_three_ds",
+ "setup_future_usage": "on_session",
+ "customer_acceptance": {
+ "acceptance_type": "online",
+ "accepted_at": "2022-09-10T10:11:12Z",
+ "online": {
+ "ip_address": "123.32.25.123",
+ "user_agent": "Mozilla/5.0 (Linux; Android 12; SM-S906N Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/80.0.3987.119 Mobile Safari/537.36"
+ }
+ },
+ "payment_method": "card",
+ "payment_method_type": "credit",
+ "payment_method_data": {
+ "card": {
+ "card_number": "5185570141917102",
+ "card_exp_month": "01",
+ "card_exp_year": "50",
+ "card_holder_name": "John Doe",
+ "card_cvc": "123"
+ }
+ },
+ "billing": {
+ "address": {
+ "line1": "1467",
+ "line2": "Harrison Street",
+ "line3": "Harrison Street",
+ "city": "San Fransico",
+ "state": "California",
+ "zip": "94122",
+ "country": "US",
+ "first_name": "joseph",
+ "last_name": "Doe"
+ },
+ "phone": {
+ "number": "9123456789",
+ "country_code": "+91"
+ }
+ },
+ "shipping": {
+ "address": {
+ "line1": "1467",
+ "line2": "Harrison Street",
+ "line3": "Harrison Street",
+ "city": "San Fransico",
+ "state": "California",
+ "zip": "94122",
+ "country": "US",
+ "first_name": "joseph",
+ "last_name": "Doe"
+ },
+ "phone": {
+ "number": "9123456789",
+ "country_code": "+91"
+ }
+ },
+ "statement_descriptor_name": "joseph",
+ "statement_descriptor_suffix": "JS"
+ }
+ },
+ "url": {
+ "raw": "{{baseUrl}}/payments",
+ "host": ["{{baseUrl}}"],
+ "path": ["payments"]
+ },
+ "description": "To process a payment you will have to create a payment, attach a payment method and confirm. Depending on the user journey you wish to achieve, you may opt to all the steps in a single request or in a sequence of API request using following APIs: (i) Payments - Update, (ii) Payments - Confirm, and (iii) Payments - Capture"
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Payments - Create/response.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Payments - Create/response.json
new file mode 100644
index 0000000000..fe51488c70
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Payments - Create/response.json
@@ -0,0 +1 @@
+[]
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Payments - Retrieve/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Payments - Retrieve/.event.meta.json
new file mode 100644
index 0000000000..688c85746e
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Payments - Retrieve/.event.meta.json
@@ -0,0 +1,5 @@
+{
+ "eventOrder": [
+ "event.test.js"
+ ]
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Payments - Retrieve/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Payments - Retrieve/event.test.js
new file mode 100644
index 0000000000..315585065f
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Payments - Retrieve/event.test.js
@@ -0,0 +1,106 @@
+// Validate status 2xx
+pm.test("[GET]::/payments/:id - Status code is 2xx", function () {
+ pm.response.to.be.success;
+});
+
+// Validate if response header has matching content-type
+pm.test("[GET]::/payments/:id - Content-Type is application/json", function () {
+ pm.expect(pm.response.headers.get("Content-Type")).to.include(
+ "application/json",
+ );
+});
+
+// Validate if response has JSON Body
+pm.test("[GET]::/payments/:id - Response has JSON Body", function () {
+ pm.response.to.have.jsonBody();
+});
+
+// Set response object as internal variable
+let jsonData = {};
+try {
+ jsonData = pm.response.json();
+} catch (e) {}
+
+// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
+if (jsonData?.payment_id) {
+ pm.collectionVariables.set("payment_id", jsonData.payment_id);
+ console.log(
+ "- use {{payment_id}} as collection variable for value",
+ jsonData.payment_id,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
+ );
+}
+
+// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
+if (jsonData?.mandate_id) {
+ pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
+ console.log(
+ "- use {{mandate_id}} as collection variable for value",
+ jsonData.mandate_id,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
+ );
+}
+
+// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
+if (jsonData?.client_secret) {
+ pm.collectionVariables.set("client_secret", jsonData.client_secret);
+ console.log(
+ "- use {{client_secret}} as collection variable for value",
+ jsonData.client_secret,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
+ );
+}
+
+// Response body should have value "Succeeded" for "status"
+if (jsonData?.status) {
+ pm.test(
+ "[POST]::/payments/:id - Content check if value for 'status' matches 'succeeded'",
+ function () {
+ pm.expect(jsonData.status).to.eql("succeeded");
+ },
+ );
+}
+
+// Validate the connector
+pm.test("[POST]::/payments - connector", function () {
+ pm.expect(jsonData.connector).to.eql("archipel");
+});
+
+// Response body should have value "500" for "amount"
+if (jsonData?.amount) {
+ pm.test(
+ "[post]:://payments/:id/capture - Content check if value for 'amount' matches '500'",
+ function () {
+ pm.expect(jsonData.amount).to.eql(500);
+ },
+ );
+}
+
+// Response body should have value "6000" for "amount_received"
+if (jsonData?.amount_received) {
+ pm.test(
+ "[POST]::/payments:id/capture - Content check if value for 'amount_received' matches '500'",
+ function () {
+ pm.expect(jsonData.amount_received).to.eql(500);
+ },
+ );
+}
+
+// Response body should have value "6540" for "amount_capturable"
+if (jsonData?.amount) {
+ pm.test(
+ "[post]:://payments/:id/capture - Content check if value for 'amount_capturable' matches '0'",
+ function () {
+ pm.expect(jsonData.amount_capturable).to.eql(0);
+ },
+ );
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Retrieve/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Payments - Retrieve/request.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Retrieve/request.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Payments - Retrieve/request.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Payments - Retrieve/response.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Payments - Retrieve/response.json
new file mode 100644
index 0000000000..fe51488c70
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Payments - Retrieve/response.json
@@ -0,0 +1 @@
+[]
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Confirm/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Confirm/.event.meta.json
new file mode 100644
index 0000000000..688c85746e
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Confirm/.event.meta.json
@@ -0,0 +1,5 @@
+{
+ "eventOrder": [
+ "event.test.js"
+ ]
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Confirm second and use saved card/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Confirm/event.test.js
similarity index 81%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Confirm second and use saved card/event.test.js
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Confirm/event.test.js
index c42829b354..0e567b10be 100644
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Confirm second and use saved card/event.test.js
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Confirm/event.test.js
@@ -37,6 +37,19 @@ if (jsonData?.payment_id) {
);
}
+// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
+if (jsonData?.mandate_id) {
+ pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
+ console.log(
+ "- use {{mandate_id}} as collection variable for value",
+ jsonData.mandate_id,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
+ );
+}
+
// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
if (jsonData?.client_secret) {
pm.collectionVariables.set("client_secret", jsonData.client_secret);
@@ -61,7 +74,7 @@ if (jsonData?.status) {
}
-// Response body should have value "cybersource" for "connector"
+// Response body should have value "archipel" for "connector"
if (jsonData?.connector) {
pm.test(
"[POST]::/payments/:id/confirm - Content check if value for 'connector' matches 'archipel'",
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Confirm second and use saved card/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Confirm/request.json
similarity index 98%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Confirm second and use saved card/request.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Confirm/request.json
index 1bc98ba4a2..5d78ead7de 100644
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Confirm second and use saved card/request.json
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Confirm/request.json
@@ -41,7 +41,7 @@
"client_secret": "{{client_secret}}",
"payment_method": "card",
"payment_token": "{{payment_token}}",
- "card_cvc": "123"
+ "card_cvc": "7373"
}
},
"url": {
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Confirm/response.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Confirm/response.json
new file mode 100644
index 0000000000..fe51488c70
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Confirm/response.json
@@ -0,0 +1 @@
+[]
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Create/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Create/.event.meta.json
new file mode 100644
index 0000000000..688c85746e
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Create/.event.meta.json
@@ -0,0 +1,5 @@
+{
+ "eventOrder": [
+ "event.test.js"
+ ]
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Create first/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Create/event.test.js
similarity index 81%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Create first/event.test.js
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Create/event.test.js
index 24c0c554d7..5c88ff0253 100644
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Create first/event.test.js
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Create/event.test.js
@@ -26,6 +26,14 @@ if (jsonData?.payment_id) {
};
+// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
+if (jsonData?.mandate_id) {
+ pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
+ console.log("- use {{mandate_id}} as collection variable for value",jsonData.mandate_id);
+} else {
+ console.log('INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.');
+};
+
// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
if (jsonData?.client_secret) {
pm.collectionVariables.set("client_secret", jsonData.client_secret);
@@ -39,10 +47,4 @@ if (jsonData?.customer_id) {
console.log("- use {{customer_id}} as collection variable for value",jsonData.customer_id);
} else {
console.log('INFO - Unable to assign variable {{customer_id}}, as jsonData.customer_id is undefined.');
-};
-
-// Response body should have value "requires_payment_method" for "status"
-if (jsonData?.status) {
- pm.test("[POST]::/payments/:id/confirm - Content check if value for 'status' matches 'requires_payment_method'", function() {
- pm.expect(jsonData.status).to.eql("requires_payment_method");
- })};
\ No newline at end of file
+};
\ No newline at end of file
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Create/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Create/request.json
new file mode 100644
index 0000000000..553be17bfc
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Create/request.json
@@ -0,0 +1,82 @@
+{
+ "method": "POST",
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ },
+ {
+ "key": "Accept",
+ "value": "application/json"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ },
+ "raw_json_formatted": {
+ "amount": 500,
+ "currency": "USD",
+ "confirm": false,
+ "capture_method": "automatic",
+ "amount_to_capture": 500,
+ "customer_id": "{{customer_id}}",
+ "profile_id": "{{profile_id}}",
+ "email": "[email protected]",
+ "name": "John Doe",
+ "phone": "8056594427",
+ "phone_country_code": "+91",
+ "description": "Its my first payment request",
+ "authentication_type": "no_three_ds",
+ "billing": {
+ "address": {
+ "line1": "1467",
+ "line2": "Harrison Street",
+ "line3": "Harrison Street",
+ "city": "San Fransico",
+ "state": "California",
+ "zip": "94122",
+ "country": "US",
+ "first_name": "joseph",
+ "last_name": "Doe"
+ },
+ "phone": {
+ "number": "9123456789",
+ "country_code": "+91"
+ }
+ },
+ "shipping": {
+ "address": {
+ "line1": "1467",
+ "line2": "Harrison Street",
+ "line3": "Harrison Street",
+ "city": "San Fransico",
+ "state": "California",
+ "zip": "94122",
+ "country": "US",
+ "first_name": "joseph",
+ "last_name": "Doe"
+ },
+ "phone": {
+ "number": "9123456789",
+ "country_code": "+91"
+ }
+ },
+ "statement_descriptor_name": "joseph",
+ "statement_descriptor_suffix": "JS"
+ }
+ },
+ "url": {
+ "raw": "{{baseUrl}}/payments",
+ "host": [
+ "{{baseUrl}}"
+ ],
+ "path": [
+ "payments"
+ ]
+ },
+ "description": "To process a payment you will have to create a payment, attach a payment method and confirm. Depending on the user journey you wish to achieve, you may opt to all the steps in a single request or in a sequence of API request using following APIs: (i) Payments - Update, (ii) Payments - Confirm, and (iii) Payments - Capture"
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Create/response.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Create/response.json
new file mode 100644
index 0000000000..fe51488c70
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Create/response.json
@@ -0,0 +1 @@
+[]
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Retrieve/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Retrieve/.event.meta.json
new file mode 100644
index 0000000000..688c85746e
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Retrieve/.event.meta.json
@@ -0,0 +1,5 @@
+{
+ "eventOrder": [
+ "event.test.js"
+ ]
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Retrieve/event.prerequest.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Retrieve/event.prerequest.js
new file mode 100644
index 0000000000..97b68c987b
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Retrieve/event.prerequest.js
@@ -0,0 +1,3 @@
+setTimeout(function(){
+ console.log("Sleeping for 3 seconds before next request.");
+}, 3000);
\ No newline at end of file
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Retrieve/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Retrieve/event.test.js
new file mode 100644
index 0000000000..9acc96e85a
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Retrieve/event.test.js
@@ -0,0 +1,106 @@
+// Validate status 2xx
+pm.test("[GET]::/payments/:id - Status code is 2xx", function () {
+ pm.response.to.be.success;
+});
+
+// Validate if response header has matching content-type
+pm.test("[GET]::/payments/:id - Content-Type is application/json", function () {
+ pm.expect(pm.response.headers.get("Content-Type")).to.include(
+ "application/json",
+ );
+});
+
+// Validate if response has JSON Body
+pm.test("[GET]::/payments/:id - Response has JSON Body", function () {
+ pm.response.to.have.jsonBody();
+});
+
+// Set response object as internal variable
+let jsonData = {};
+try {
+ jsonData = pm.response.json();
+} catch (e) {}
+
+// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
+if (jsonData?.payment_id) {
+ pm.collectionVariables.set("payment_id", jsonData.payment_id);
+ console.log(
+ "- use {{payment_id}} as collection variable for value",
+ jsonData.payment_id,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
+ );
+}
+
+// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
+if (jsonData?.mandate_id) {
+ pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
+ console.log(
+ "- use {{mandate_id}} as collection variable for value",
+ jsonData.mandate_id,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
+ );
+}
+
+// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
+if (jsonData?.client_secret) {
+ pm.collectionVariables.set("client_secret", jsonData.client_secret);
+ console.log(
+ "- use {{client_secret}} as collection variable for value",
+ jsonData.client_secret,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
+ );
+}
+
+// Response body should have value "Succeeded" for "status"
+if (jsonData?.status) {
+ pm.test(
+ "[POST]::/payments/:id - Content check if value for 'status' matches 'succeeded'",
+ function () {
+ pm.expect(jsonData.status).to.eql("succeeded");
+ },
+ );
+}
+
+// Validate the connector
+pm.test("[POST]::/payments - connector", function () {
+ pm.expect(jsonData.connector).to.eql("archipel");
+});
+
+// Response body should have value "500" for "amount"
+if (jsonData?.amount) {
+ pm.test(
+ "[post]:://payments/:id/capture - Content check if value for 'amount' matches '500'",
+ function () {
+ pm.expect(jsonData.amount).to.eql(500);
+ },
+ );
+}
+
+// Response body should have value "500" for "amount_received"
+if (jsonData?.amount_received) {
+ pm.test(
+ "[POST]::/payments:id/capture - Content check if value for 'amount_received' matches '500'",
+ function () {
+ pm.expect(jsonData.amount_received).to.eql(500);
+ },
+ );
+}
+
+// Response body should have value "0" for "amount_capturable"
+if (jsonData?.amount) {
+ pm.test(
+ "[post]:://payments/:id/capture - Content check if value for 'amount_capturable' matches '0'",
+ function () {
+ pm.expect(jsonData.amount_capturable).to.eql(0);
+ },
+ );
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Authorize request intent/request.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Retrieve/request.json
similarity index 51%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Authorize request intent/request.json
rename to postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Retrieve/request.json
index 4c4a9dc5af..b9ebc1be4a 100644
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario10-Create 3DS payment/Payments - Authorize request intent/request.json
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Retrieve/request.json
@@ -1,5 +1,5 @@
{
- "method": "POST",
+ "method": "GET",
"header": [
{
"key": "Accept",
@@ -7,16 +7,26 @@
}
],
"url": {
- "raw": "{{baseUrl}}/payments/{{payment_id}}/{{merchant_id}}/authorize/archipel",
+ "raw": "{{baseUrl}}/payments/:id?force_sync=true",
"host": [
"{{baseUrl}}"
],
"path": [
"payments",
- "{{payment_id}}",
- "{{merchant_id}}",
- "authorize",
- "archipel"
+ ":id"
+ ],
+ "query": [
+ {
+ "key": "force_sync",
+ "value": "true"
+ }
+ ],
+ "variable": [
+ {
+ "key": "id",
+ "value": "{{payment_id}}",
+ "description": "(Required) unique payment id"
+ }
]
},
"description": "To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment"
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Retrieve/response.json b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Retrieve/response.json
new file mode 100644
index 0000000000..fe51488c70
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Save card flow/Save card payments - Retrieve/response.json
@@ -0,0 +1 @@
+[]
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario9a-Refund full payment/Refunds - Create/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario9a-Refund full payment/Refunds - Create/event.test.js
index 8c56e30984..ca6a4ecc6e 100644
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario9a-Refund full payment/Refunds - Create/event.test.js
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario9a-Refund full payment/Refunds - Create/event.test.js
@@ -29,10 +29,13 @@ if (jsonData?.refund_id) {
);
}
-// Response body should have value "succeeded" for "status"
-pm.test("[POST]::/refunds - Content check if value for 'status' matches 'succeeded'",
+// Response body should have value "failed" for "status" and error message should contain "[/refund/{{connector_transaction_id}}] Cannot find any remitted transaction with given order id"
+pm.test("[POST]::/refunds - Content check if value for 'status' matches 'failed'",
function () {
- pm.expect(jsonData.status).to.eql("succeeded");
+ pm.expect(jsonData.status).to.eql("failed");
+ pm.expect(jsonData.error_message).to.include(
+ "[/refund/"
+ ) + pm.collectionVariables.get("connector_transaction_id") + "] Cannot find any remitted transaction with given order id";
});
// Response body should have value "500" for "amount"
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario9a-Refund full payment/Refunds - Retrieve/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario9a-Refund full payment/Refunds - Retrieve/event.test.js
index 8c56e30984..ca6a4ecc6e 100644
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario9a-Refund full payment/Refunds - Retrieve/event.test.js
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario9a-Refund full payment/Refunds - Retrieve/event.test.js
@@ -29,10 +29,13 @@ if (jsonData?.refund_id) {
);
}
-// Response body should have value "succeeded" for "status"
-pm.test("[POST]::/refunds - Content check if value for 'status' matches 'succeeded'",
+// Response body should have value "failed" for "status" and error message should contain "[/refund/{{connector_transaction_id}}] Cannot find any remitted transaction with given order id"
+pm.test("[POST]::/refunds - Content check if value for 'status' matches 'failed'",
function () {
- pm.expect(jsonData.status).to.eql("succeeded");
+ pm.expect(jsonData.status).to.eql("failed");
+ pm.expect(jsonData.error_message).to.include(
+ "[/refund/"
+ ) + pm.collectionVariables.get("connector_transaction_id") + "] Cannot find any remitted transaction with given order id";
});
// Response body should have value "500" for "amount"
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario9b-Refund partial payment/Refunds - Create/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario9b-Refund partial payment/Refunds - Create/event.test.js
index 6c9824d340..2e4e237979 100644
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario9b-Refund partial payment/Refunds - Create/event.test.js
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario9b-Refund partial payment/Refunds - Create/event.test.js
@@ -29,10 +29,13 @@ if (jsonData?.refund_id) {
);
}
-// Response body should have value "succeeded" for "status"
-pm.test("[POST]::/refunds - Content check if value for 'status' matches 'succeeded'",
+// Response body should have value "failed" for "status" and error message should contain "[/refund/{{connector_transaction_id}}] Cannot find any remitted transaction with given order id"
+pm.test("[POST]::/refunds - Content check if value for 'status' matches 'failed'",
function () {
- pm.expect(jsonData.status).to.eql("succeeded");
+ pm.expect(jsonData.status).to.eql("failed");
+ pm.expect(jsonData.error_message).to.include(
+ "[/refund/"
+ ) + pm.collectionVariables.get("connector_transaction_id") + "] Cannot find any remitted transaction with given order id";
});
// Response body should have value "200" for "amount"
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario9b-Refund partial payment/Refunds - Retrieve/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario9b-Refund partial payment/Refunds - Retrieve/event.test.js
index 6c9824d340..2e4e237979 100644
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario9b-Refund partial payment/Refunds - Retrieve/event.test.js
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario9b-Refund partial payment/Refunds - Retrieve/event.test.js
@@ -29,10 +29,13 @@ if (jsonData?.refund_id) {
);
}
-// Response body should have value "succeeded" for "status"
-pm.test("[POST]::/refunds - Content check if value for 'status' matches 'succeeded'",
+// Response body should have value "failed" for "status" and error message should contain "[/refund/{{connector_transaction_id}}] Cannot find any remitted transaction with given order id"
+pm.test("[POST]::/refunds - Content check if value for 'status' matches 'failed'",
function () {
- pm.expect(jsonData.status).to.eql("succeeded");
+ pm.expect(jsonData.status).to.eql("failed");
+ pm.expect(jsonData.error_message).to.include(
+ "[/refund/"
+ ) + pm.collectionVariables.get("connector_transaction_id") + "] Cannot find any remitted transaction with given order id";
});
// Response body should have value "200" for "amount"
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario9c-Refund full incremented payment/Refunds - Create/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario9c-Refund full incremented payment/Refunds - Create/event.test.js
index 804d3e4a58..9ae0d27f88 100644
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario9c-Refund full incremented payment/Refunds - Create/event.test.js
+++ b/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario9c-Refund full incremented payment/Refunds - Create/event.test.js
@@ -29,10 +29,13 @@ if (jsonData?.refund_id) {
);
}
-// Response body should have value "succeeded" for "status"
-pm.test("[POST]::/refunds - Content check if value for 'status' matches 'succeeded'",
+// Response body should have value "failed" for "status" and error message should contain "[/refund/{{connector_transaction_id}}] Cannot find any remitted transaction with given order id"
+pm.test("[POST]::/refunds - Content check if value for 'status' matches 'failed'",
function () {
- pm.expect(jsonData.status).to.eql("succeeded");
+ pm.expect(jsonData.status).to.eql("failed");
+ pm.expect(jsonData.error_message).to.include(
+ "[/refund/"
+ ) + pm.collectionVariables.get("connector_transaction_id") + "] Cannot find any remitted transaction with given order id";
});
// Response body should have value "1001" for "amount"
diff --git a/postman/collection-dir/archipel/Flow Testcases/Negative Cases/Scenario3-Create payment with Manual capture but wrong pan/.meta.json b/postman/collection-dir/archipel/Flow Testcases/Negative Cases/Scenario3-Create payment with Manual capture but wrong pan/.meta.json
index 60051ecca2..e4ef30e39e 100644
--- a/postman/collection-dir/archipel/Flow Testcases/Negative Cases/Scenario3-Create payment with Manual capture but wrong pan/.meta.json
+++ b/postman/collection-dir/archipel/Flow Testcases/Negative Cases/Scenario3-Create payment with Manual capture but wrong pan/.meta.json
@@ -1,6 +1,7 @@
{
"childrenOrder": [
"Payments - Create",
+ "Payments - Capture",
"Payments - Retrieve"
]
}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Void the payment/Payments - Create/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/Negative Cases/Scenario3-Create payment with Manual capture but wrong pan/Payments - Capture/.event.meta.json
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Void the payment/Payments - Create/.event.meta.json
rename to postman/collection-dir/archipel/Flow Testcases/Negative Cases/Scenario3-Create payment with Manual capture but wrong pan/Payments - Capture/.event.meta.json
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Void the payment/Payments - Create/event.prerequest.js b/postman/collection-dir/archipel/Flow Testcases/Negative Cases/Scenario3-Create payment with Manual capture but wrong pan/Payments - Capture/event.prerequest.js
similarity index 100%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Void the payment/Payments - Create/event.prerequest.js
rename to postman/collection-dir/archipel/Flow Testcases/Negative Cases/Scenario3-Create payment with Manual capture but wrong pan/Payments - Capture/event.prerequest.js
diff --git a/postman/collection-dir/archipel/Flow Testcases/Negative Cases/Scenario3-Create payment with Manual capture but wrong pan/Payments - Capture/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Negative Cases/Scenario3-Create payment with Manual capture but wrong pan/Payments - Capture/event.test.js
new file mode 100644
index 0000000000..9fe737a164
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Negative Cases/Scenario3-Create payment with Manual capture but wrong pan/Payments - Capture/event.test.js
@@ -0,0 +1,75 @@
+// Validate status 400
+pm.test("[POST]::/payments/:id/capture - Status code is 400", function () {
+ pm.response.to.have.status(400);
+});
+
+// Validate if response header has matching content-type
+pm.test(
+ "[POST]::/payments/:id/capture - Content-Type is application/json",
+ function () {
+ pm.expect(pm.response.headers.get("Content-Type")).to.include(
+ "application/json",
+ );
+ },
+);
+
+// Validate if response has JSON Body
+pm.test("[POST]::/payments/:id/capture - Response has JSON Body", function () {
+ pm.response.to.have.jsonBody();
+});
+
+// Set response object as internal variable
+let jsonData = {};
+try {
+ jsonData = pm.response.json();
+} catch (e) {}
+
+// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
+if (jsonData?.payment_id) {
+ pm.collectionVariables.set("payment_id", jsonData.payment_id);
+ console.log(
+ "- use {{payment_id}} as collection variable for value",
+ jsonData.payment_id,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
+ );
+}
+
+// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
+if (jsonData?.client_secret) {
+ pm.collectionVariables.set("client_secret", jsonData.client_secret);
+ console.log(
+ "- use {{client_secret}} as collection variable for value",
+ jsonData.client_secret,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
+ );
+}
+
+// Validate if response has error body
+pm.test("[POST]::/payments/:id/confirm - Response has error body", function () {
+ pm.expect(jsonData).to.have.property("error");
+});
+
+// Validate if error type is "invalid_request"
+pm.test(
+ "[POST]::/payments/:id/confirm - Error type is 'invalid_request'",
+ function () {
+ pm.expect(jsonData.error).to.have.property("type", "invalid_request");
+ },
+);
+
+// Validate if error message is "This Payment could not be captured because it has a payment.status of failed. The expected state is requires_capture, partially_captured_and_capturable, processing"
+pm.test(
+ "[POST]::/payments/:id/confirm - Error message is 'This Payment could not be captured because it has a payment.status of failed. The expected state is requires_capture, partially_captured_and_capturable, processing'",
+ function () {
+ pm.expect(jsonData.error).to.have.property(
+ "message",
+ "This Payment could not be captured because it has a payment.status of failed. The expected state is requires_capture, partially_captured_and_capturable, processing",
+ );
+ },
+);
\ No newline at end of file
diff --git a/postman/collection-dir/archipel/Flow Testcases/Negative Cases/Scenario3-Create payment with Manual capture but wrong pan/Payments - Capture/request.json b/postman/collection-dir/archipel/Flow Testcases/Negative Cases/Scenario3-Create payment with Manual capture but wrong pan/Payments - Capture/request.json
new file mode 100644
index 0000000000..88957428e8
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Negative Cases/Scenario3-Create payment with Manual capture but wrong pan/Payments - Capture/request.json
@@ -0,0 +1,44 @@
+{
+ "method": "POST",
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ },
+ {
+ "key": "Accept",
+ "value": "application/json"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ },
+ "raw_json_formatted": {
+ "amount_to_capture": 500,
+ "statement_descriptor_name": "John",
+ "statement_descriptor_suffix": "JD"
+ }
+ },
+ "url": {
+ "raw": "{{baseUrl}}/payments/:id/capture",
+ "host": [
+ "{{baseUrl}}"
+ ],
+ "path": [
+ "payments",
+ ":id",
+ "capture"
+ ],
+ "variable": [
+ {
+ "key": "id",
+ "value": "{{payment_id}}"
+ }
+ ]
+ },
+ "description": "To process a payment you will have to create a payment, attach a payment method and confirm. Depending on the user journey you wish to achieve, you may opt to all the steps in a single request or in a sequence of API request using following APIs: (i) Payments - Update, (ii) Payments - Confirm, and (iii) Payments - Capture"
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Negative Cases/Scenario3-Create payment with Manual capture but wrong pan/Payments - Capture/response.json b/postman/collection-dir/archipel/Flow Testcases/Negative Cases/Scenario3-Create payment with Manual capture but wrong pan/Payments - Capture/response.json
new file mode 100644
index 0000000000..fe51488c70
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/Negative Cases/Scenario3-Create payment with Manual capture but wrong pan/Payments - Capture/response.json
@@ -0,0 +1 @@
+[]
diff --git a/postman/collection-dir/archipel/Flow Testcases/Negative Cases/Scenario3-Create payment with Manual capture but wrong pan/Payments - Create/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Negative Cases/Scenario3-Create payment with Manual capture but wrong pan/Payments - Create/event.test.js
index 6293ba1938..39fcf438a4 100644
--- a/postman/collection-dir/archipel/Flow Testcases/Negative Cases/Scenario3-Create payment with Manual capture but wrong pan/Payments - Create/event.test.js
+++ b/postman/collection-dir/archipel/Flow Testcases/Negative Cases/Scenario3-Create payment with Manual capture but wrong pan/Payments - Create/event.test.js
@@ -47,6 +47,13 @@ if (jsonData?.client_secret) {
);
}
+pm.test(
+ "[POST]::/payments - Content check if 'connector' is archipel",
+ function () {
+ pm.expect(jsonData.connector).to.be.equal("archipel");
+ },
+);
+
// Response body should have value "failed" for "status"
if (jsonData?.status) {
pm.test(
@@ -57,12 +64,15 @@ if (jsonData?.status) {
);
}
-pm.test(
- "[POST]::/payments - Content check if 'connector' is archipel",
- function () {
- pm.expect(jsonData.connector).to.be.equal("archipel");
- },
-);
+// Response body should have value "Transaction error: No Response from acquirer" for "error_message"
+if (jsonData?.status) {
+ pm.test(
+ "[POST]::/payments - Content check if value for 'error_message' matches 'Transaction error: No Response from acquirer'",
+ function () {
+ pm.expect(jsonData.error_message).to.eql("Transaction error: No Response from acquirer");
+ },
+ );
+}
// Response body should have "connector_transaction_id"
pm.test(
diff --git a/postman/collection-dir/archipel/Flow Testcases/Negative Cases/Scenario3-Create payment with Manual capture but wrong pan/Payments - Retrieve/event.test.js b/postman/collection-dir/archipel/Flow Testcases/Negative Cases/Scenario3-Create payment with Manual capture but wrong pan/Payments - Retrieve/event.test.js
index 83c414a41f..5e74c4a9b1 100644
--- a/postman/collection-dir/archipel/Flow Testcases/Negative Cases/Scenario3-Create payment with Manual capture but wrong pan/Payments - Retrieve/event.test.js
+++ b/postman/collection-dir/archipel/Flow Testcases/Negative Cases/Scenario3-Create payment with Manual capture but wrong pan/Payments - Retrieve/event.test.js
@@ -49,33 +49,22 @@ pm.test(
);
pm.test(
- "[POST]::/payments - Payment Attempt has 'authorization_failed' status",
+ "[POST]::/payments - Payment Attempt has 'failure' status",
function () {
- pm.expect(payment_attempt.status).to.be.equal("authorization_failed");
+ pm.expect(payment_attempt.status).to.be.equal("failure");
},
);
-
pm.test(
- "[POST]::/payments - Payment Attempt has 'connector_transaction_id'",
+ "[POST]::/payments - Payment Attempt has 'archipel' connector",
function () {
- pm.expect(payment_attempt.connector_transaction_id).to.be.equal(
- pm.collectionVariables.get("connector_transaction_id")
- );
+ pm.expect(payment_attempt.connector).to.be.equal("archipel");
},
);
pm.test(
- "[POST]::/payments - Payment Attempt has archiepl response 'transactionId' in connector_metadata",
+ "[POST]::/payments - Payment Attempt has 'Transaction error: No Response from acquirer' error_message",
function () {
- pm.expect(payment_attempt.connector_metadata.transactionId).to.be.not.null;
- pm.collectionVariables.set("archipel_transaction_uuid", payment_attempt.connector_metadata.transactionId)
+ pm.expect(payment_attempt.error_message).to.be.equal("Transaction error: No Response from acquirer");
},
-);
-
-pm.test(
- "[POST]::/payments - Payment Attempt has no error",
- function () {
- pm.expect(payment_attempt.error_message).to.be.null;
- },
-);
+);
\ No newline at end of file
diff --git a/postman/collection-dir/archipel/Flow Testcases/Negative Cases/Scenario6-Create a recurring payment with greater mandate amount/Payments - Confirm/request.json b/postman/collection-dir/archipel/Flow Testcases/Negative Cases/Scenario6-Create a recurring payment with greater mandate amount/Payments - Confirm/request.json
index 838f3aab5f..88e5331ad8 100644
--- a/postman/collection-dir/archipel/Flow Testcases/Negative Cases/Scenario6-Create a recurring payment with greater mandate amount/Payments - Confirm/request.json
+++ b/postman/collection-dir/archipel/Flow Testcases/Negative Cases/Scenario6-Create a recurring payment with greater mandate amount/Payments - Confirm/request.json
@@ -31,7 +31,7 @@
},
{
"key": "publishable_key",
- "value": "pk_snd_8798c6a9114646f8b970b93ad5765ddf",
+ "value": "{{publishable_key}}",
"type": "text",
"disabled": true
}
diff --git a/postman/collection-dir/archipel/Flow Testcases/QuickStart/.meta.json b/postman/collection-dir/archipel/Flow Testcases/QuickStart/.meta.json
index 883fe751ef..a826c27311 100644
--- a/postman/collection-dir/archipel/Flow Testcases/QuickStart/.meta.json
+++ b/postman/collection-dir/archipel/Flow Testcases/QuickStart/.meta.json
@@ -5,6 +5,9 @@
"API Key - Create",
"Business Profile - Create",
"Payment Connector - Create",
+ "3DS Authenticator - Create",
+ "3DS Authenticator - Configure",
+ "Connector Agnostic MIT - Enable",
"Customer - Create",
"Payments - Create",
"Payments - Retrieve"
diff --git a/postman/collection-dir/archipel/Flow Testcases/QuickStart/3DS Authenticator - Configure/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/QuickStart/3DS Authenticator - Configure/.event.meta.json
new file mode 100644
index 0000000000..688c85746e
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/QuickStart/3DS Authenticator - Configure/.event.meta.json
@@ -0,0 +1,5 @@
+{
+ "eventOrder": [
+ "event.test.js"
+ ]
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/QuickStart/3DS Authenticator - Configure/event.test.js b/postman/collection-dir/archipel/Flow Testcases/QuickStart/3DS Authenticator - Configure/event.test.js
new file mode 100644
index 0000000000..f2d3445316
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/QuickStart/3DS Authenticator - Configure/event.test.js
@@ -0,0 +1,74 @@
+// Validate status 2xx
+pm.test(
+ "[POST]::/account/:account_id/business_profile - Status code is 2xx",
+ function () {
+ pm.response.to.be.success;
+ },
+);
+
+// Validate if response header has matching content-type
+pm.test(
+ "[POST]::/account/:account_id/business_profile - Content-Type is application/json",
+ function () {
+ pm.expect(pm.response.headers.get("Content-Type")).to.include(
+ "application/json",
+ );
+ },
+);
+
+// Set response object as internal variable
+let jsonData = {};
+try {
+ jsonData = pm.response.json();
+} catch (e) {}
+
+// Validate if response has correct merchant_id
+pm.test(
+ "[POST]::/account/:account_id/business_profile - Validate merchant_id",
+ function () {
+ pm.expect(jsonData.merchant_id).to.eql(
+ pm.collectionVariables.get("merchant_id")
+ );
+ }
+);
+
+// Validate if response has correct profile_id
+pm.test(
+ "[POST]::/account/:account_id/business_profile - Validate profile_id",
+ function () {
+ pm.expect(jsonData.profile_id).to.eql(
+ pm.collectionVariables.get("profile_id")
+ );
+ }
+);
+
+// Validate if authentication_connector_details is present
+pm.test(
+ "[POST]::/account/:account_id/business_profile - Validate authentication_connector_details is present",
+ function () {
+ pm.expect(jsonData.authentication_connector_details).to.be.an("object");
+ }
+);
+
+// Validate if authentication_connector_details has netcetera as authentication_connectors
+pm.test(
+ "[POST]::/account/:account_id/business_profile - Validate authentication_connector_details has netcetera",
+ function () {
+ pm.expect(jsonData.authentication_connector_details.authentication_connectors[0]).to.eql(
+ "netcetera",
+ );
+ },
+);
+
+// Validate if authentication_connector_details has three_ds_requestor_url and three_ds_requestor_app_url
+pm.test(
+ "[POST]::/account/:account_id/business_profile - Validate authentication_connector_details has three_ds_requestor_url and three_ds_requestor_app_url",
+ function () {
+ pm.expect(jsonData.authentication_connector_details).to.have.property(
+ "three_ds_requestor_url",
+ );
+ pm.expect(jsonData.authentication_connector_details).to.have.property(
+ "three_ds_requestor_app_url",
+ );
+ },
+);
\ No newline at end of file
diff --git a/postman/collection-dir/archipel/Flow Testcases/QuickStart/3DS Authenticator - Configure/request.json b/postman/collection-dir/archipel/Flow Testcases/QuickStart/3DS Authenticator - Configure/request.json
new file mode 100644
index 0000000000..39df15244b
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/QuickStart/3DS Authenticator - Configure/request.json
@@ -0,0 +1,101 @@
+{
+ "auth": {
+ "type": "apikey",
+ "apikey": [
+ {
+ "key": "value",
+ "value": "{{api_key}}",
+ "type": "string"
+ },
+ {
+ "key": "key",
+ "value": "api-key",
+ "type": "string"
+ },
+ {
+ "key": "in",
+ "value": "header",
+ "type": "string"
+ }
+ ]
+ },
+ "method": "POST",
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ },
+ {
+ "key": "Accept",
+ "value": "application/json"
+ },
+ {
+ "key": "x-merchant-id",
+ "value": "{{merchant_id}}"
+ },
+ {
+ "key": "x-profile-id",
+ "value": "{{profile_id}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ },
+ "raw_json_formatted": {
+ "return_url": "https://abc.com/",
+ "collect_shipping_details_from_wallet_connector": false,
+ "always_collect_shipping_details_from_wallet_connector": false,
+ "collect_billing_details_from_wallet_connector": false,
+ "always_collect_billing_details_from_wallet_connector": false,
+ "is_auto_retries_enabled": false,
+ "is_connector_agnostic_mit_enabled": false,
+ "force_3ds_challenge": false,
+ "is_debit_routing_enabled": false,
+ "webhook_details": {
+ "webhook_version": null,
+ "webhook_username": null,
+ "webhook_password": null,
+ "webhook_url": null,
+ "payment_created_enabled": null,
+ "payment_succeeded_enabled": null,
+ "payment_failed_enabled": null
+ },
+ "authentication_connector_details": {
+ "authentication_connectors": [
+ "netcetera"
+ ],
+ "three_ds_requestor_url": "{{netcetera_requestor_url}}",
+ "three_ds_requestor_app_url": "{{netcetera_requestor_app_url}}"
+ },
+ "is_click_to_pay_enabled": false
+ }
+ },
+ "url": {
+ "raw": "{{baseUrl}}/account/:account_id/business_profile/:profile_id",
+ "host": [
+ "{{baseUrl}}"
+ ],
+ "path": [
+ "account",
+ ":account_id",
+ "business_profile",
+ ":profile_id"
+ ],
+ "variable": [
+ {
+ "key": "account_id",
+ "value": "{{merchant_id}}",
+ "description": "(Required) The unique identifier for the merchant account"
+ },
+ {
+ "key": "profile_id",
+ "value": "{{profile_id}}",
+ "description": "(Required) The unique identifier for the business profile"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/postman/collection-dir/archipel/Flow Testcases/QuickStart/3DS Authenticator - Configure/response.json b/postman/collection-dir/archipel/Flow Testcases/QuickStart/3DS Authenticator - Configure/response.json
new file mode 100644
index 0000000000..0637a088a0
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/QuickStart/3DS Authenticator - Configure/response.json
@@ -0,0 +1 @@
+[]
\ No newline at end of file
diff --git a/postman/collection-dir/archipel/Flow Testcases/QuickStart/3DS Authenticator - Create/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/QuickStart/3DS Authenticator - Create/.event.meta.json
new file mode 100644
index 0000000000..688c85746e
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/QuickStart/3DS Authenticator - Create/.event.meta.json
@@ -0,0 +1,5 @@
+{
+ "eventOrder": [
+ "event.test.js"
+ ]
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/QuickStart/3DS Authenticator - Create/event.test.js b/postman/collection-dir/archipel/Flow Testcases/QuickStart/3DS Authenticator - Create/event.test.js
new file mode 100644
index 0000000000..31bdb9a4f1
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/QuickStart/3DS Authenticator - Create/event.test.js
@@ -0,0 +1,84 @@
+// Validate status 2xx
+pm.test(
+ "[POST]::/account/:account_id/connectors - Status code is 2xx",
+ function () {
+ pm.response.to.have.status(200);
+ },
+);
+
+// Validate if response header has matching content-type
+pm.test(
+ "[POST]::/account/:account_id/connectors - Content-Type is application/json",
+ function () {
+ pm.expect(pm.response.headers.get("Content-Type")).to.include(
+ "application/json",
+ );
+ },
+);
+
+// Set response object as internal variable
+let jsonData = pm.response.json();
+
+// Validate if connector_type is authentication_processor
+pm.test(
+ "[POST]::/account/:account_id/connectors - Validate connector_type",
+ function () {
+ pm.expect(jsonData.connector_type).to.equal(
+ "authentication_processor",
+ );
+ },
+);
+
+// Validate if connector_name is netcetera
+pm.test(
+ "[POST]::/account/:account_id/connectors - Validate connector_name",
+ function () {
+ pm.expect(jsonData.connector_name).to.equal(
+ "netcetera",
+ );
+ },
+);
+
+// Validate if auth_type is CertificateAuth
+pm.test(
+ "[POST]::/account/:account_id/connectors - Validate auth_type is CertificateAuth",
+ function () {
+ pm.expect(jsonData.connector_account_details.auth_type).to.equal(
+ "CertificateAuth"
+ );
+ },
+);
+
+// Validate if metadata contains merchant_configuration_id
+pm.test(
+ "[POST]::/account/:account_id/connectors - Validate metadata contains merchant_configuration_id",
+ function () {
+ pm.expect(jsonData.metadata.merchant_configuration_id).to.not.be.null;
+ },
+);
+
+// Validate if test_mode is true
+pm.test(
+ "[POST]::/account/:account_id/connectors - Validate is not test_mode",
+ function () {
+ pm.expect(jsonData.test_mode).to.be.true;
+ },
+);
+
+// Validate if disabled is false
+pm.test(
+ "[POST]::/account/:account_id/connectors - Validate is not disabled",
+ function () {
+ pm.expect(jsonData.disabled).to.be.false;
+ },
+);
+
+// Validate if status is active
+pm.test(
+ "[POST]::/account/:account_id/connectors - Validate have active status",
+ function () {
+ pm.expect(jsonData.status).to.equal(
+ "active"
+ );
+ },
+);
\ No newline at end of file
diff --git a/postman/collection-dir/archipel/Flow Testcases/QuickStart/3DS Authenticator - Create/request.json b/postman/collection-dir/archipel/Flow Testcases/QuickStart/3DS Authenticator - Create/request.json
new file mode 100644
index 0000000000..f1a895fd10
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/QuickStart/3DS Authenticator - Create/request.json
@@ -0,0 +1,87 @@
+{
+ "auth": {
+ "type": "apikey",
+ "apikey": [
+ {
+ "key": "value",
+ "value": "{{api_key}}",
+ "type": "string"
+ },
+ {
+ "key": "key",
+ "value": "api-key",
+ "type": "string"
+ },
+ {
+ "key": "in",
+ "value": "header",
+ "type": "string"
+ }
+ ]
+ },
+ "method": "POST",
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ },
+ {
+ "key": "Accept",
+ "value": "application/json"
+ },
+ {
+ "key": "x-merchant-id",
+ "value": "{{merchant_id}}"
+ },
+ {
+ "key": "x-profile-id",
+ "value": "{{profile_id}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ },
+ "raw_json_formatted": {
+ "connector_type": "authentication_processor",
+ "connector_name": "netcetera",
+ "connector_account_details": {
+ "auth_type": "CertificateAuth",
+ "certificate": "{{netcetera_certificate}}",
+ "private_key": "{{netcetera_private_key}}"
+ },
+ "metadata": {
+ "merchant_configuration_id": "{{netcetera_merchant_configuration_id}}",
+ "endpoint_prefix": "flowbird",
+ "pull_mechanism_for_external_3ds_enabled": false
+ },
+ "profile_id": "{{profile_id}}",
+ "test_mode": true,
+ "disabled": false,
+ "status": "active",
+ "additional_merchant_data": null
+ }
+ },
+ "url": {
+ "raw": "{{baseUrl}}/account/:account_id/connectors",
+ "host": [
+ "{{baseUrl}}"
+ ],
+ "path": [
+ "account",
+ ":account_id",
+ "connectors"
+ ],
+ "variable": [
+ {
+ "key": "account_id",
+ "value": "{{merchant_id}}",
+ "description": "(Required) The unique identifier for the merchant account"
+ }
+ ]
+ },
+ "description": "Create a new 3DS Authenticator for the merchant account. This endpoint allows you to set up a 3DS Authenticator that can be used for processing 3D Secure transactions."
+}
\ No newline at end of file
diff --git a/postman/collection-dir/archipel/Flow Testcases/QuickStart/3DS Authenticator - Create/response.json b/postman/collection-dir/archipel/Flow Testcases/QuickStart/3DS Authenticator - Create/response.json
new file mode 100644
index 0000000000..fe51488c70
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/QuickStart/3DS Authenticator - Create/response.json
@@ -0,0 +1 @@
+[]
diff --git a/postman/collection-dir/archipel/Flow Testcases/QuickStart/Connector Agnostic MIT - Enable/.event.meta.json b/postman/collection-dir/archipel/Flow Testcases/QuickStart/Connector Agnostic MIT - Enable/.event.meta.json
new file mode 100644
index 0000000000..688c85746e
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/QuickStart/Connector Agnostic MIT - Enable/.event.meta.json
@@ -0,0 +1,5 @@
+{
+ "eventOrder": [
+ "event.test.js"
+ ]
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/QuickStart/Connector Agnostic MIT - Enable/event.test.js b/postman/collection-dir/archipel/Flow Testcases/QuickStart/Connector Agnostic MIT - Enable/event.test.js
new file mode 100644
index 0000000000..784a662b1f
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/QuickStart/Connector Agnostic MIT - Enable/event.test.js
@@ -0,0 +1,82 @@
+// Validate status 2xx
+pm.test(
+ "[POST]::/account/:account_id/business_profile - Status code is 2xx",
+ function () {
+ pm.response.to.be.success;
+ },
+);
+
+// Validate if response header has matching content-type
+pm.test(
+ "[POST]::/account/:account_id/business_profile - Content-Type is application/json",
+ function () {
+ pm.expect(pm.response.headers.get("Content-Type")).to.include(
+ "application/json",
+ );
+ },
+);
+
+// Set response object as internal variable
+let jsonData = {};
+try {
+ jsonData = pm.response.json();
+} catch (e) {}
+
+// Validate if response has correct merchant_id
+pm.test(
+ "[POST]::/account/:account_id/business_profile - Validate merchant_id",
+ function () {
+ pm.expect(jsonData.merchant_id).to.eql(
+ pm.collectionVariables.get("merchant_id")
+ );
+ }
+);
+
+// Validate if response has correct profile_id
+pm.test(
+ "[POST]::/account/:account_id/business_profile - Validate profile_id",
+ function () {
+ pm.expect(jsonData.profile_id).to.eql(
+ pm.collectionVariables.get("profile_id")
+ );
+ }
+);
+
+// Validate if authentication_connector_details is present
+pm.test(
+ "[POST]::/account/:account_id/business_profile - Validate authentication_connector_details is present",
+ function () {
+ pm.expect(jsonData.authentication_connector_details).to.be.an("object");
+ }
+);
+
+// Validate if authentication_connector_details has netcetera as authentication_connectors
+pm.test(
+ "[POST]::/account/:account_id/business_profile - Validate authentication_connector_details has netcetera",
+ function () {
+ pm.expect(jsonData.authentication_connector_details.authentication_connectors[0]).to.eql(
+ "netcetera",
+ );
+ },
+);
+
+// Validate if authentication_connector_details has three_ds_requestor_url and three_ds_requestor_app_url
+pm.test(
+ "[POST]::/account/:account_id/business_profile - Validate authentication_connector_details has three_ds_requestor_url and three_ds_requestor_app_url",
+ function () {
+ pm.expect(jsonData.authentication_connector_details).to.have.property(
+ "three_ds_requestor_url",
+ );
+ pm.expect(jsonData.authentication_connector_details).to.have.property(
+ "three_ds_requestor_app_url",
+ );
+ },
+);
+
+// Validate if is_connector_agnostic_mit_enabled true or not
+pm.test(
+ "[POST]::/account/:account_id/business_profile - Validate is_connector_agnostic_mit_enabled is true",
+ function () {
+ pm.expect(jsonData.is_connector_agnostic_mit_enabled).to.eql(true);
+ }
+);
\ No newline at end of file
diff --git a/postman/collection-dir/archipel/Flow Testcases/QuickStart/Connector Agnostic MIT - Enable/request.json b/postman/collection-dir/archipel/Flow Testcases/QuickStart/Connector Agnostic MIT - Enable/request.json
new file mode 100644
index 0000000000..1ec7f40b82
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/QuickStart/Connector Agnostic MIT - Enable/request.json
@@ -0,0 +1,76 @@
+{
+ "auth": {
+ "type": "apikey",
+ "apikey": [
+ {
+ "key": "value",
+ "value": "{{api_key}}",
+ "type": "string"
+ },
+ {
+ "key": "key",
+ "value": "api-key",
+ "type": "string"
+ },
+ {
+ "key": "in",
+ "value": "header",
+ "type": "string"
+ }
+ ]
+ },
+ "method": "POST",
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ },
+ {
+ "key": "Accept",
+ "value": "application/json"
+ },
+ {
+ "key": "x-merchant-id",
+ "value": "{{merchant_id}}"
+ },
+ {
+ "key": "x-profile-id",
+ "value": "{{profile_id}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ },
+ "raw_json_formatted": {
+ "is_connector_agnostic_mit_enabled": true
+ }
+ },
+ "url": {
+ "raw": "{{baseUrl}}/account/:account_id/business_profile/:profile_id",
+ "host": [
+ "{{baseUrl}}"
+ ],
+ "path": [
+ "account",
+ ":account_id",
+ "business_profile",
+ ":profile_id"
+ ],
+ "variable": [
+ {
+ "key": "account_id",
+ "value": "{{merchant_id}}",
+ "description": "(Required) The unique identifier for the merchant account"
+ },
+ {
+ "key": "profile_id",
+ "value": "{{profile_id}}",
+ "description": "(Required) The unique identifier for the business profile"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/postman/collection-dir/archipel/Flow Testcases/QuickStart/Connector Agnostic MIT - Enable/response.json b/postman/collection-dir/archipel/Flow Testcases/QuickStart/Connector Agnostic MIT - Enable/response.json
new file mode 100644
index 0000000000..0637a088a0
--- /dev/null
+++ b/postman/collection-dir/archipel/Flow Testcases/QuickStart/Connector Agnostic MIT - Enable/response.json
@@ -0,0 +1 @@
+[]
\ No newline at end of file
diff --git a/postman/collection-dir/archipel/Flow Testcases/QuickStart/Customer - Create/event.test.js b/postman/collection-dir/archipel/Flow Testcases/QuickStart/Customer - Create/event.test.js
index 8d97e350aa..8f3e8655a6 100644
--- a/postman/collection-dir/archipel/Flow Testcases/QuickStart/Customer - Create/event.test.js
+++ b/postman/collection-dir/archipel/Flow Testcases/QuickStart/Customer - Create/event.test.js
@@ -17,7 +17,7 @@ pm.test("[POST]::/customers - Response has JSON Body", function () {
let jsonData = {};
try {jsonData = pm.response.json();}catch(e){}
-// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
+// pm.collectionVariables - Set payment_id as variable for jsonData.customer_id
if (jsonData?.customer_id) {
pm.collectionVariables.set("customer_id", jsonData.customer_id);
console.log("- use {{customer_id}} as collection variable for value",jsonData.customer_id);
diff --git a/postman/collection-dir/archipel/Flow Testcases/QuickStart/Merchant Account - Create/request.json b/postman/collection-dir/archipel/Flow Testcases/QuickStart/Merchant Account - Create/request.json
index fb84d55caf..278b3ec64d 100644
--- a/postman/collection-dir/archipel/Flow Testcases/QuickStart/Merchant Account - Create/request.json
+++ b/postman/collection-dir/archipel/Flow Testcases/QuickStart/Merchant Account - Create/request.json
@@ -38,7 +38,7 @@
}
},
"raw_json_formatted": {
- "merchant_id": "flowbird",
+ "merchant_id": "postman_merchant_GHAction_{{$guid}}",
"organization_id": "{{organization_id}}",
"merchant_name": "Flowbird",
"merchant_details": {
diff --git a/postman/collection-dir/archipel/Flow Testcases/QuickStart/Payment Connector - Create/event.test.js b/postman/collection-dir/archipel/Flow Testcases/QuickStart/Payment Connector - Create/event.test.js
index 17583e8bcc..74965e2949 100644
--- a/postman/collection-dir/archipel/Flow Testcases/QuickStart/Payment Connector - Create/event.test.js
+++ b/postman/collection-dir/archipel/Flow Testcases/QuickStart/Payment Connector - Create/event.test.js
@@ -19,6 +19,7 @@ pm.test(
// Set response object as internal variable
let jsonData = pm.response.json();
+// Validate if connector_type is payment_processor
pm.test(
"[POST]::/account/:account_id/connectors - Validate connector_type",
function () {
@@ -28,6 +29,7 @@ pm.test(
},
);
+// Validate if connector_name is archipel
pm.test(
"[POST]::/account/:account_id/connectors - Validate connector_name",
function () {
@@ -37,6 +39,7 @@ pm.test(
},
);
+// Validate if connector_account_details are not empty
pm.test(
"[POST]::/account/:account_id/connectors - Validate merchant_connector_id",
function () {
@@ -61,15 +64,17 @@ pm.test(
},
);
+// Validate if auth_type is HeaderKey
pm.test(
- "[POST]::/account/:account_id/connectors - Validate auth_type is NoKey",
+ "[POST]::/account/:account_id/connectors - Validate auth_type is HeaderKey",
function () {
pm.expect(jsonData.connector_account_details.auth_type).to.equal(
- "NoKey"
+ "HeaderKey"
);
},
);
+// Validate if metadata contains tenant_id
pm.test(
"[POST]::/account/:account_id/connectors - Validate metadata contains tenant_id",
function () {
@@ -77,21 +82,23 @@ pm.test(
},
);
+// Validate if test_mode is true
pm.test(
"[POST]::/account/:account_id/connectors - Validate is not test_mode",
function () {
- pm.expect(jsonData.test_mode).to.be.false;
+ pm.expect(jsonData.test_mode).to.be.true;
},
);
-
+// Validate if disabled is false
pm.test(
"[POST]::/account/:account_id/connectors - Validate is not disabled",
function () {
- pm.expect(jsonData.test_mode).to.be.false;
+ pm.expect(jsonData.disabled).to.be.false;
},
);
+// Validate if status is active
pm.test(
"[POST]::/account/:account_id/connectors - Validate have active status",
function () {
diff --git a/postman/collection-dir/archipel/Flow Testcases/QuickStart/Payment Connector - Create/request.json b/postman/collection-dir/archipel/Flow Testcases/QuickStart/Payment Connector - Create/request.json
index db7e3aebfc..77751d14b9 100644
--- a/postman/collection-dir/archipel/Flow Testcases/QuickStart/Payment Connector - Create/request.json
+++ b/postman/collection-dir/archipel/Flow Testcases/QuickStart/Payment Connector - Create/request.json
@@ -42,7 +42,7 @@
"connector_name": "archipel",
"connector_account_details": {
"auth_type": "HeaderKey",
- "api_key": "connector_api_key"
+ "api_key": "{{connector_api_key}}"
},
"metadata": {
"tenant_id": "{{archipel_tenant_id}}",
@@ -77,7 +77,7 @@
}
},
"profile_id": "{{profile_id}}",
- "test_mode": false,
+ "test_mode": true,
"disabled": false,
"payment_methods_enabled": [
{
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/.meta.json b/postman/collection-dir/archipel/Netcetera Testcases/.meta.json
new file mode 100644
index 0000000000..bfad5c5574
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/.meta.json
@@ -0,0 +1,9 @@
+{
+ "childrenOrder": [
+ "Scenario1-Create 3DS payment with confirm true",
+ "Scenario2-Create 3DS payment with confirm false",
+ "Scenario3-Create 3DS Frictionless payment with Visa",
+ "Scenario4-Create 3DS Frictionless payment with Mastercard",
+ "Scenario5-Create 3DS Challenge payment with Mastercard"
+ ]
+}
\ No newline at end of file
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Void the payment/.meta.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario1-Create 3DS payment with confirm true/.meta.json
similarity index 67%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Void the payment/.meta.json
rename to postman/collection-dir/archipel/Netcetera Testcases/Scenario1-Create 3DS payment with confirm true/.meta.json
index afba25ab6d..60051ecca2 100644
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario7-Void the payment/.meta.json
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario1-Create 3DS payment with confirm true/.meta.json
@@ -1,6 +1,6 @@
{
"childrenOrder": [
"Payments - Create",
- "Payments - Cancel"
+ "Payments - Retrieve"
]
}
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario1-Create 3DS payment with confirm true/Payments - Create/.event.meta.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario1-Create 3DS payment with confirm true/Payments - Create/.event.meta.json
new file mode 100644
index 0000000000..688c85746e
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario1-Create 3DS payment with confirm true/Payments - Create/.event.meta.json
@@ -0,0 +1,5 @@
+{
+ "eventOrder": [
+ "event.test.js"
+ ]
+}
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario1-Create 3DS payment with confirm true/Payments - Create/event.test.js b/postman/collection-dir/archipel/Netcetera Testcases/Scenario1-Create 3DS payment with confirm true/Payments - Create/event.test.js
new file mode 100644
index 0000000000..cbc6626902
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario1-Create 3DS payment with confirm true/Payments - Create/event.test.js
@@ -0,0 +1,138 @@
+// Validate status 2xx
+pm.test("[POST]::/payments - Status code is 2xx", function () {
+ pm.response.to.be.success;
+});
+
+// Validate if response header has matching content-type
+pm.test("[POST]::/payments - Content-Type is application/json", function () {
+ pm.expect(pm.response.headers.get("Content-Type")).to.include(
+ "application/json",
+ );
+});
+
+// Validate if response has JSON Body
+pm.test("[POST]::/payments - Response has JSON Body", function () {
+ pm.response.to.have.jsonBody();
+});
+
+// Set response object as internal variable
+let jsonData = {};
+try {
+ jsonData = pm.response.json();
+} catch (e) {}
+
+// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
+if (jsonData?.payment_id) {
+ pm.collectionVariables.set("payment_id", jsonData.payment_id);
+ console.log(
+ "- use {{payment_id}} as collection variable for value",
+ jsonData.payment_id,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
+ );
+}
+
+// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
+if (jsonData?.client_secret) {
+ pm.collectionVariables.set("client_secret", jsonData.client_secret);
+ console.log(
+ "- use {{client_secret}} as collection variable for value",
+ jsonData.client_secret,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
+ );
+}
+
+// Verify if 'external_3ds_authentication_attempted' is true
+pm.test("[POST]::/payments - 'external_3ds_authentication_attempted' should be true", function () {
+ pm.expect(jsonData.external_3ds_authentication_attempted).to.be.true;
+});
+
+// Response body should have value "requires_customer_action" for "status"
+if (jsonData?.status) {
+ pm.test(
+ "[POST]::/payments - Content Verify if value for 'status' matches 'requires_customer_action'",
+ function () {
+ pm.expect(jsonData.status).to.eql("requires_customer_action");
+ },
+ );
+}
+
+// Verify if 'next_action' exists
+pm.test("[POST]::/payments - Should contain 'next_action'", function () {
+ pm.expect(jsonData).to.have.property("next_action");
+});
+
+// Verify if 'next_action.type' is 'three_ds_invoke'
+pm.test("[POST]::/payments - 'next_action.type' should be 'three_ds_invoke'", function () {
+ pm.expect(jsonData.next_action.type).to.eql("three_ds_invoke");
+});
+
+// Verify if 'three_ds_data' exists inside 'next_action'
+pm.test("[POST]::/payments - Should contain 'three_ds_data' under 'next_action'", function () {
+ pm.expect(jsonData.next_action).to.have.property("three_ds_data");
+});
+
+// Verify if 'three_ds_authentication_url' exists
+pm.test("[POST]::/payments - Should contain 'three_ds_authentication_url'", function () {
+ pm.expect(jsonData.next_action.three_ds_data).to.have.property("three_ds_authentication_url");
+});
+
+// Verify if 'three_ds_authorize_url' exists
+pm.test("[POST]::/payments - Should contain 'three_ds_authorize_url'", function () {
+ pm.expect(jsonData.next_action.three_ds_data).to.have.property("three_ds_authorize_url");
+});
+
+// Verify if 'three_ds_method_url' exists
+pm.test("[POST]::/payments - Should contain 'three_ds_method_url'", function () {
+ pm.expect(jsonData.next_action.three_ds_data.three_ds_method_details).to.have.property("three_ds_method_url");
+});
+
+// Verify if 'three_ds_method_data' exists and is not empty
+// Carries session-specific metadata for fingerprinting — must exist and be valid Base64.
+pm.test("[POST]::/payments - Should contain non-empty 'three_ds_method_data'", function () {
+ pm.expect(jsonData.next_action.three_ds_data.three_ds_method_details).to.have.property("three_ds_method_data").that.is.a('string').and.is.not.empty;
+});
+
+// Verify if 'poll_id' exists inside 'poll_config'
+// Polling is required to check 3DS status asynchronously while Netcetera finishes auth.
+pm.test("[POST]::/payments - Should contain 'poll_id' inside 'poll_config'", function () {
+ pm.expect(jsonData.next_action.three_ds_data.poll_config).to.have.property("poll_id");
+});
+
+// Verify if 'message_version' exists and is 2.1.0 or higher
+// Ensures compatibility with supported Netcetera protocol versions (2.1.0 and above).
+pm.test("[POST]::/payments - 'message_version' should exist and be >= 2.1.0", function () {
+ const version = jsonData.next_action.three_ds_data.message_version;
+ pm.expect(version).to.match(/^2\.(1|2|3)(\.\d+)?$/);
+});
+
+// Verify if 'directory_server_id' exists
+// Identifies the card network’s Directory Server (e.g., Visa = A000000003) for Netcetera routing.
+pm.test("[POST]::/payments - Should contain 'directory_server_id'", function () {
+ pm.expect(jsonData.next_action.three_ds_data).to.have.property("directory_server_id").that.is.a('string');
+});
+
+// Assert 'external_authentication_details' exists
+pm.test("[POST]::/payments - Should contain 'external_authentication_details'", function () {
+ pm.expect(jsonData).to.have.property("external_authentication_details");
+});
+
+// Assert 'status' is 'pending' at the start of 3DS
+pm.test("[POST]::/payments - external_authentication_details.status should be 'pending'", function () {
+ pm.expect(jsonData.external_authentication_details.status).to.eql("pending");
+});
+
+// Assert 'ds_transaction_id' exists (required for Netcetera 3DS tracking)
+pm.test("[POST]::/payments - Should contain 'ds_transaction_id'", function () {
+ pm.expect(jsonData.external_authentication_details.ds_transaction_id).to.be.a('string').and.is.not.empty;
+});
+
+// Assert 'version' is present and valid
+pm.test("[POST]::/payments - Should contain 3DS version", function () {
+ pm.expect(jsonData.external_authentication_details.version).to.match(/^2\.(1|2|3)(\.\d+)?$/);
+});
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario1-Create 3DS payment with confirm true/Payments - Create/request.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario1-Create 3DS payment with confirm true/Payments - Create/request.json
new file mode 100644
index 0000000000..115eb9753c
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario1-Create 3DS payment with confirm true/Payments - Create/request.json
@@ -0,0 +1,86 @@
+{
+ "method": "POST",
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ },
+ {
+ "key": "Accept",
+ "value": "application/json"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ },
+ "raw_json_formatted": {
+ "amount": 500,
+ "amount_to_capture": 500,
+ "currency": "EUR",
+ "confirm": true,
+ "capture_method": "automatic",
+ "authentication_type": "three_ds",
+ "request_external_three_ds_authentication": true,
+ "payment_method": "card",
+ "payment_method_type": "credit",
+ "payment_method_data": {
+ "card": {
+ "card_number": "4123400073320224",
+ "card_exp_month": "01",
+ "card_exp_year": "50",
+ "card_holder_name": "John Doe",
+ "card_cvc": "123"
+ }
+ },
+ "profile_id": "{{profile_id}}",
+ "email": "[email protected]",
+ "name": "John Doe",
+ "phone": "8056594427",
+ "phone_country_code": "+91",
+ "description": "{{$randomLoremSentence}}",
+ "billing": {
+ "address": {
+ "line1": "2 ter",
+ "line2": "rue du château",
+ "line3": "",
+ "city": "Neuilly-sur-Seine",
+ "state": "France",
+ "zip": "92200",
+ "country": "FR"
+ },
+ "phone": {
+ "number": "8056594427",
+ "country_code": "+91"
+ }
+ },
+ "shipping": {
+ "address": {
+ "line1": "1467",
+ "line2": "Harrison Street",
+ "line3": "Harrison Street",
+ "city": "San Fransico",
+ "state": "California",
+ "zip": "94122",
+ "country": "US",
+ "first_name": "joseph",
+ "last_name": "Doe"
+ },
+ "phone": {
+ "number": "8056594427",
+ "country_code": "+91"
+ }
+ },
+ "statement_descriptor_name": "Joseph Doe",
+ "statement_descriptor_suffix": "JS"
+ }
+ },
+ "url": {
+ "raw": "{{baseUrl}}/payments",
+ "host": ["{{baseUrl}}"],
+ "path": ["payments"]
+ }
+}
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario1-Create 3DS payment with confirm true/Payments - Create/response.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario1-Create 3DS payment with confirm true/Payments - Create/response.json
new file mode 100644
index 0000000000..fe51488c70
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario1-Create 3DS payment with confirm true/Payments - Create/response.json
@@ -0,0 +1 @@
+[]
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario1-Create 3DS payment with confirm true/Payments - Retrieve/.event.meta.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario1-Create 3DS payment with confirm true/Payments - Retrieve/.event.meta.json
new file mode 100644
index 0000000000..0731450e6b
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario1-Create 3DS payment with confirm true/Payments - Retrieve/.event.meta.json
@@ -0,0 +1,3 @@
+{
+ "eventOrder": ["event.test.js"]
+}
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario1-Create 3DS payment with confirm true/Payments - Retrieve/event.test.js b/postman/collection-dir/archipel/Netcetera Testcases/Scenario1-Create 3DS payment with confirm true/Payments - Retrieve/event.test.js
new file mode 100644
index 0000000000..02ab01502c
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario1-Create 3DS payment with confirm true/Payments - Retrieve/event.test.js
@@ -0,0 +1,71 @@
+// Validate status 2xx
+pm.test("[GET]::/payments/:id - Status code is 2xx", function () {
+ pm.response.to.be.success;
+});
+
+// Validate if response header has matching content-type
+pm.test("[GET]::/payments/:id - Content-Type is application/json", function () {
+ pm.expect(pm.response.headers.get("Content-Type")).to.include(
+ "application/json",
+ );
+});
+
+// Validate if response has JSON Body
+pm.test("[GET]::/payments/:id - Response has JSON Body", function () {
+ pm.response.to.have.jsonBody();
+});
+
+// Set response object as internal variable
+let jsonData = {};
+try {
+ jsonData = pm.response.json();
+} catch (e) {}
+
+// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
+if (jsonData?.payment_id) {
+ pm.collectionVariables.set("payment_id", jsonData.payment_id);
+ console.log(
+ "- use {{payment_id}} as collection variable for value",
+ jsonData.payment_id,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
+ );
+}
+
+// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
+if (jsonData?.mandate_id) {
+ pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
+ console.log(
+ "- use {{mandate_id}} as collection variable for value",
+ jsonData.mandate_id,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
+ );
+}
+
+// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
+if (jsonData?.client_secret) {
+ pm.collectionVariables.set("client_secret", jsonData.client_secret);
+ console.log(
+ "- use {{client_secret}} as collection variable for value",
+ jsonData.client_secret,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
+ );
+}
+
+// Response body should have value "requires_customer_action" for "status"
+if (jsonData?.status) {
+ pm.test(
+ "[POST]::/payments/:id - Content check if value for 'status' matches 'requires_customer_action'",
+ function () {
+ pm.expect(jsonData.status).to.eql("requires_customer_action");
+ },
+ );
+}
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario1-Create 3DS payment with confirm true/Payments - Retrieve/request.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario1-Create 3DS payment with confirm true/Payments - Retrieve/request.json
new file mode 100644
index 0000000000..6cd4b7d96c
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario1-Create 3DS payment with confirm true/Payments - Retrieve/request.json
@@ -0,0 +1,28 @@
+{
+ "method": "GET",
+ "header": [
+ {
+ "key": "Accept",
+ "value": "application/json"
+ }
+ ],
+ "url": {
+ "raw": "{{baseUrl}}/payments/:id?force_sync=true",
+ "host": ["{{baseUrl}}"],
+ "path": ["payments", ":id"],
+ "query": [
+ {
+ "key": "force_sync",
+ "value": "true"
+ }
+ ],
+ "variable": [
+ {
+ "key": "id",
+ "value": "{{payment_id}}",
+ "description": "(Required) unique payment id"
+ }
+ ]
+ },
+ "description": "To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment"
+}
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario1-Create 3DS payment with confirm true/Payments - Retrieve/response.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario1-Create 3DS payment with confirm true/Payments - Retrieve/response.json
new file mode 100644
index 0000000000..fe51488c70
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario1-Create 3DS payment with confirm true/Payments - Retrieve/response.json
@@ -0,0 +1 @@
+[]
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/.meta.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/.meta.json
new file mode 100644
index 0000000000..57d3f8e2bc
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/.meta.json
@@ -0,0 +1,7 @@
+{
+ "childrenOrder": [
+ "Payments - Create",
+ "Payments - Confirm",
+ "Payments - Retrieve"
+ ]
+}
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/Payments - Confirm/.event.meta.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/Payments - Confirm/.event.meta.json
new file mode 100644
index 0000000000..220b1a6723
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/Payments - Confirm/.event.meta.json
@@ -0,0 +1,3 @@
+{
+ "eventOrder": ["event.test.js", "event.prerequest.js"]
+}
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/Payments - Confirm/event.test.js b/postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/Payments - Confirm/event.test.js
new file mode 100644
index 0000000000..cbc6626902
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/Payments - Confirm/event.test.js
@@ -0,0 +1,138 @@
+// Validate status 2xx
+pm.test("[POST]::/payments - Status code is 2xx", function () {
+ pm.response.to.be.success;
+});
+
+// Validate if response header has matching content-type
+pm.test("[POST]::/payments - Content-Type is application/json", function () {
+ pm.expect(pm.response.headers.get("Content-Type")).to.include(
+ "application/json",
+ );
+});
+
+// Validate if response has JSON Body
+pm.test("[POST]::/payments - Response has JSON Body", function () {
+ pm.response.to.have.jsonBody();
+});
+
+// Set response object as internal variable
+let jsonData = {};
+try {
+ jsonData = pm.response.json();
+} catch (e) {}
+
+// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
+if (jsonData?.payment_id) {
+ pm.collectionVariables.set("payment_id", jsonData.payment_id);
+ console.log(
+ "- use {{payment_id}} as collection variable for value",
+ jsonData.payment_id,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
+ );
+}
+
+// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
+if (jsonData?.client_secret) {
+ pm.collectionVariables.set("client_secret", jsonData.client_secret);
+ console.log(
+ "- use {{client_secret}} as collection variable for value",
+ jsonData.client_secret,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
+ );
+}
+
+// Verify if 'external_3ds_authentication_attempted' is true
+pm.test("[POST]::/payments - 'external_3ds_authentication_attempted' should be true", function () {
+ pm.expect(jsonData.external_3ds_authentication_attempted).to.be.true;
+});
+
+// Response body should have value "requires_customer_action" for "status"
+if (jsonData?.status) {
+ pm.test(
+ "[POST]::/payments - Content Verify if value for 'status' matches 'requires_customer_action'",
+ function () {
+ pm.expect(jsonData.status).to.eql("requires_customer_action");
+ },
+ );
+}
+
+// Verify if 'next_action' exists
+pm.test("[POST]::/payments - Should contain 'next_action'", function () {
+ pm.expect(jsonData).to.have.property("next_action");
+});
+
+// Verify if 'next_action.type' is 'three_ds_invoke'
+pm.test("[POST]::/payments - 'next_action.type' should be 'three_ds_invoke'", function () {
+ pm.expect(jsonData.next_action.type).to.eql("three_ds_invoke");
+});
+
+// Verify if 'three_ds_data' exists inside 'next_action'
+pm.test("[POST]::/payments - Should contain 'three_ds_data' under 'next_action'", function () {
+ pm.expect(jsonData.next_action).to.have.property("three_ds_data");
+});
+
+// Verify if 'three_ds_authentication_url' exists
+pm.test("[POST]::/payments - Should contain 'three_ds_authentication_url'", function () {
+ pm.expect(jsonData.next_action.three_ds_data).to.have.property("three_ds_authentication_url");
+});
+
+// Verify if 'three_ds_authorize_url' exists
+pm.test("[POST]::/payments - Should contain 'three_ds_authorize_url'", function () {
+ pm.expect(jsonData.next_action.three_ds_data).to.have.property("three_ds_authorize_url");
+});
+
+// Verify if 'three_ds_method_url' exists
+pm.test("[POST]::/payments - Should contain 'three_ds_method_url'", function () {
+ pm.expect(jsonData.next_action.three_ds_data.three_ds_method_details).to.have.property("three_ds_method_url");
+});
+
+// Verify if 'three_ds_method_data' exists and is not empty
+// Carries session-specific metadata for fingerprinting — must exist and be valid Base64.
+pm.test("[POST]::/payments - Should contain non-empty 'three_ds_method_data'", function () {
+ pm.expect(jsonData.next_action.three_ds_data.three_ds_method_details).to.have.property("three_ds_method_data").that.is.a('string').and.is.not.empty;
+});
+
+// Verify if 'poll_id' exists inside 'poll_config'
+// Polling is required to check 3DS status asynchronously while Netcetera finishes auth.
+pm.test("[POST]::/payments - Should contain 'poll_id' inside 'poll_config'", function () {
+ pm.expect(jsonData.next_action.three_ds_data.poll_config).to.have.property("poll_id");
+});
+
+// Verify if 'message_version' exists and is 2.1.0 or higher
+// Ensures compatibility with supported Netcetera protocol versions (2.1.0 and above).
+pm.test("[POST]::/payments - 'message_version' should exist and be >= 2.1.0", function () {
+ const version = jsonData.next_action.three_ds_data.message_version;
+ pm.expect(version).to.match(/^2\.(1|2|3)(\.\d+)?$/);
+});
+
+// Verify if 'directory_server_id' exists
+// Identifies the card network’s Directory Server (e.g., Visa = A000000003) for Netcetera routing.
+pm.test("[POST]::/payments - Should contain 'directory_server_id'", function () {
+ pm.expect(jsonData.next_action.three_ds_data).to.have.property("directory_server_id").that.is.a('string');
+});
+
+// Assert 'external_authentication_details' exists
+pm.test("[POST]::/payments - Should contain 'external_authentication_details'", function () {
+ pm.expect(jsonData).to.have.property("external_authentication_details");
+});
+
+// Assert 'status' is 'pending' at the start of 3DS
+pm.test("[POST]::/payments - external_authentication_details.status should be 'pending'", function () {
+ pm.expect(jsonData.external_authentication_details.status).to.eql("pending");
+});
+
+// Assert 'ds_transaction_id' exists (required for Netcetera 3DS tracking)
+pm.test("[POST]::/payments - Should contain 'ds_transaction_id'", function () {
+ pm.expect(jsonData.external_authentication_details.ds_transaction_id).to.be.a('string').and.is.not.empty;
+});
+
+// Assert 'version' is present and valid
+pm.test("[POST]::/payments - Should contain 3DS version", function () {
+ pm.expect(jsonData.external_authentication_details.version).to.match(/^2\.(1|2|3)(\.\d+)?$/);
+});
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Confirm first and save card/request.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/Payments - Confirm/request.json
similarity index 85%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Confirm first and save card/request.json
rename to postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/Payments - Confirm/request.json
index f1a7642455..c120287e58 100644
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Confirm first and save card/request.json
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/Payments - Confirm/request.json
@@ -47,17 +47,7 @@
"card_exp_month": "01",
"card_exp_year": "50",
"card_holder_name": "John Doe",
- "card_number": "5185570141917102",
- "card_network": "Visa"
- }
- },
- "setup_future_usage": "off_session",
- "customer_acceptance": {
- "acceptance_type": "offline",
- "accepted_at": "{{$isoTimestamp}}",
- "online": {
- "ip_address": "127.0.0.1",
- "user_agent": "amet irure esse"
+ "card_number": "4123400073320224"
}
},
"browser_info": {
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/Payments - Confirm/response.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/Payments - Confirm/response.json
new file mode 100644
index 0000000000..fe51488c70
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/Payments - Confirm/response.json
@@ -0,0 +1 @@
+[]
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/Payments - Create/.event.meta.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/Payments - Create/.event.meta.json
new file mode 100644
index 0000000000..0731450e6b
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/Payments - Create/.event.meta.json
@@ -0,0 +1,3 @@
+{
+ "eventOrder": ["event.test.js"]
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Retrieve/event.test.js b/postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/Payments - Create/event.test.js
similarity index 70%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Retrieve/event.test.js
rename to postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/Payments - Create/event.test.js
index 4ae08a2606..905cc47900 100644
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario6-Saved card flow/Payments - Retrieve/event.test.js
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/Payments - Create/event.test.js
@@ -1,26 +1,26 @@
// Validate status 2xx
-pm.test("[GET]::/payments/:id - Status code is 2xx", function () {
+pm.test("[POST]::/payments - Status code is 2xx", function () {
pm.response.to.be.success;
});
// Validate if response header has matching content-type
-pm.test("[GET]::/payments/:id - Content-Type is application/json", function () {
+pm.test("[POST]::/payments - Content-Type is application/json", function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include(
"application/json",
);
});
+// Validate if response has JSON Body
+pm.test("[POST]::/payments - Response has JSON Body", function () {
+ pm.response.to.have.jsonBody();
+});
+
// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
-// Validate if response has JSON Body
-pm.test("[GET]::/payments/:id - Response has JSON Body", function () {
- pm.response.to.have.jsonBody();
-});
-
// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
if (jsonData?.payment_id) {
pm.collectionVariables.set("payment_id", jsonData.payment_id);
@@ -34,7 +34,6 @@ if (jsonData?.payment_id) {
);
}
-
// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
if (jsonData?.client_secret) {
pm.collectionVariables.set("client_secret", jsonData.client_secret);
@@ -47,3 +46,13 @@ if (jsonData?.client_secret) {
"INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
);
}
+
+// Response body should have value "requires_payment_method" for "status"
+if (jsonData?.status) {
+ pm.test(
+ "[POST]::/payments - Content check if value for 'status' matches 'requires_payment_method'",
+ function () {
+ pm.expect(jsonData.status).to.eql("requires_payment_method");
+ },
+ );
+}
diff --git a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Create mandate/request.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/Payments - Create/request.json
similarity index 84%
rename from postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Create mandate/request.json
rename to postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/Payments - Create/request.json
index f1215dc2b0..00cc0d9d75 100644
--- a/postman/collection-dir/archipel/Flow Testcases/Happy Cases/Scenario5-Create a mandate and recurring payment/Payments - Create mandate/request.json
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/Payments - Create/request.json
@@ -19,11 +19,18 @@
},
"raw_json_formatted": {
"amount": 500,
+ "amount_to_capture": 500,
"currency": "EUR",
+ "confirm": false,
"capture_method": "automatic",
- "authentication_type": "no_three_ds",
+ "authentication_type": "three_ds",
+ "request_external_three_ds_authentication": true,
"profile_id": "{{profile_id}}",
- "description": "[Archipel Connector][Scenario5] - Create mandate with payment",
+ "email": "[email protected]",
+ "name": "John Doe",
+ "phone": "8056594427",
+ "phone_country_code": "+91",
+ "description": "{{$randomLoremSentence}}",
"billing": {
"address": {
"line1": "2 ter",
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/Payments - Create/response.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/Payments - Create/response.json
new file mode 100644
index 0000000000..fe51488c70
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/Payments - Create/response.json
@@ -0,0 +1 @@
+[]
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/Payments - Retrieve/.event.meta.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/Payments - Retrieve/.event.meta.json
new file mode 100644
index 0000000000..0731450e6b
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/Payments - Retrieve/.event.meta.json
@@ -0,0 +1,3 @@
+{
+ "eventOrder": ["event.test.js"]
+}
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/Payments - Retrieve/event.test.js b/postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/Payments - Retrieve/event.test.js
new file mode 100644
index 0000000000..9053ddab13
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/Payments - Retrieve/event.test.js
@@ -0,0 +1,71 @@
+// Validate status 2xx
+pm.test("[GET]::/payments/:id - Status code is 2xx", function () {
+ pm.response.to.be.success;
+});
+
+// Validate if response header has matching content-type
+pm.test("[GET]::/payments/:id - Content-Type is application/json", function () {
+ pm.expect(pm.response.headers.get("Content-Type")).to.include(
+ "application/json",
+ );
+});
+
+// Validate if response has JSON Body
+pm.test("[GET]::/payments/:id - Response has JSON Body", function () {
+ pm.response.to.have.jsonBody();
+});
+
+// Set response object as internal variable
+let jsonData = {};
+try {
+ jsonData = pm.response.json();
+} catch (e) {}
+
+// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
+if (jsonData?.payment_id) {
+ pm.collectionVariables.set("payment_id", jsonData.payment_id);
+ console.log(
+ "- use {{payment_id}} as collection variable for value",
+ jsonData.payment_id,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
+ );
+}
+
+// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
+if (jsonData?.mandate_id) {
+ pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
+ console.log(
+ "- use {{mandate_id}} as collection variable for value",
+ jsonData.mandate_id,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
+ );
+}
+
+// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
+if (jsonData?.client_secret) {
+ pm.collectionVariables.set("client_secret", jsonData.client_secret);
+ console.log(
+ "- use {{client_secret}} as collection variable for value",
+ jsonData.client_secret,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
+ );
+}
+
+// Response body should have value "requires_customer_action" for "status"
+if (jsonData?.status) {
+ pm.test(
+ "[POST]::/payments:id - Content check if value for 'status' matches 'requires_customer_action'",
+ function () {
+ pm.expect(jsonData.status).to.eql("requires_customer_action");
+ },
+ );
+}
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/Payments - Retrieve/request.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/Payments - Retrieve/request.json
new file mode 100644
index 0000000000..6cd4b7d96c
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/Payments - Retrieve/request.json
@@ -0,0 +1,28 @@
+{
+ "method": "GET",
+ "header": [
+ {
+ "key": "Accept",
+ "value": "application/json"
+ }
+ ],
+ "url": {
+ "raw": "{{baseUrl}}/payments/:id?force_sync=true",
+ "host": ["{{baseUrl}}"],
+ "path": ["payments", ":id"],
+ "query": [
+ {
+ "key": "force_sync",
+ "value": "true"
+ }
+ ],
+ "variable": [
+ {
+ "key": "id",
+ "value": "{{payment_id}}",
+ "description": "(Required) unique payment id"
+ }
+ ]
+ },
+ "description": "To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment"
+}
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/Payments - Retrieve/response.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/Payments - Retrieve/response.json
new file mode 100644
index 0000000000..fe51488c70
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario2-Create 3DS payment with confirm false/Payments - Retrieve/response.json
@@ -0,0 +1 @@
+[]
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario3-Create 3DS Frictionless payment with Visa/.meta.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario3-Create 3DS Frictionless payment with Visa/.meta.json
new file mode 100644
index 0000000000..60051ecca2
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario3-Create 3DS Frictionless payment with Visa/.meta.json
@@ -0,0 +1,6 @@
+{
+ "childrenOrder": [
+ "Payments - Create",
+ "Payments - Retrieve"
+ ]
+}
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario3-Create 3DS Frictionless payment with Visa/Payments - Create/.event.meta.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario3-Create 3DS Frictionless payment with Visa/Payments - Create/.event.meta.json
new file mode 100644
index 0000000000..688c85746e
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario3-Create 3DS Frictionless payment with Visa/Payments - Create/.event.meta.json
@@ -0,0 +1,5 @@
+{
+ "eventOrder": [
+ "event.test.js"
+ ]
+}
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario3-Create 3DS Frictionless payment with Visa/Payments - Create/event.test.js b/postman/collection-dir/archipel/Netcetera Testcases/Scenario3-Create 3DS Frictionless payment with Visa/Payments - Create/event.test.js
new file mode 100644
index 0000000000..cbc6626902
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario3-Create 3DS Frictionless payment with Visa/Payments - Create/event.test.js
@@ -0,0 +1,138 @@
+// Validate status 2xx
+pm.test("[POST]::/payments - Status code is 2xx", function () {
+ pm.response.to.be.success;
+});
+
+// Validate if response header has matching content-type
+pm.test("[POST]::/payments - Content-Type is application/json", function () {
+ pm.expect(pm.response.headers.get("Content-Type")).to.include(
+ "application/json",
+ );
+});
+
+// Validate if response has JSON Body
+pm.test("[POST]::/payments - Response has JSON Body", function () {
+ pm.response.to.have.jsonBody();
+});
+
+// Set response object as internal variable
+let jsonData = {};
+try {
+ jsonData = pm.response.json();
+} catch (e) {}
+
+// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
+if (jsonData?.payment_id) {
+ pm.collectionVariables.set("payment_id", jsonData.payment_id);
+ console.log(
+ "- use {{payment_id}} as collection variable for value",
+ jsonData.payment_id,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
+ );
+}
+
+// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
+if (jsonData?.client_secret) {
+ pm.collectionVariables.set("client_secret", jsonData.client_secret);
+ console.log(
+ "- use {{client_secret}} as collection variable for value",
+ jsonData.client_secret,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
+ );
+}
+
+// Verify if 'external_3ds_authentication_attempted' is true
+pm.test("[POST]::/payments - 'external_3ds_authentication_attempted' should be true", function () {
+ pm.expect(jsonData.external_3ds_authentication_attempted).to.be.true;
+});
+
+// Response body should have value "requires_customer_action" for "status"
+if (jsonData?.status) {
+ pm.test(
+ "[POST]::/payments - Content Verify if value for 'status' matches 'requires_customer_action'",
+ function () {
+ pm.expect(jsonData.status).to.eql("requires_customer_action");
+ },
+ );
+}
+
+// Verify if 'next_action' exists
+pm.test("[POST]::/payments - Should contain 'next_action'", function () {
+ pm.expect(jsonData).to.have.property("next_action");
+});
+
+// Verify if 'next_action.type' is 'three_ds_invoke'
+pm.test("[POST]::/payments - 'next_action.type' should be 'three_ds_invoke'", function () {
+ pm.expect(jsonData.next_action.type).to.eql("three_ds_invoke");
+});
+
+// Verify if 'three_ds_data' exists inside 'next_action'
+pm.test("[POST]::/payments - Should contain 'three_ds_data' under 'next_action'", function () {
+ pm.expect(jsonData.next_action).to.have.property("three_ds_data");
+});
+
+// Verify if 'three_ds_authentication_url' exists
+pm.test("[POST]::/payments - Should contain 'three_ds_authentication_url'", function () {
+ pm.expect(jsonData.next_action.three_ds_data).to.have.property("three_ds_authentication_url");
+});
+
+// Verify if 'three_ds_authorize_url' exists
+pm.test("[POST]::/payments - Should contain 'three_ds_authorize_url'", function () {
+ pm.expect(jsonData.next_action.three_ds_data).to.have.property("three_ds_authorize_url");
+});
+
+// Verify if 'three_ds_method_url' exists
+pm.test("[POST]::/payments - Should contain 'three_ds_method_url'", function () {
+ pm.expect(jsonData.next_action.three_ds_data.three_ds_method_details).to.have.property("three_ds_method_url");
+});
+
+// Verify if 'three_ds_method_data' exists and is not empty
+// Carries session-specific metadata for fingerprinting — must exist and be valid Base64.
+pm.test("[POST]::/payments - Should contain non-empty 'three_ds_method_data'", function () {
+ pm.expect(jsonData.next_action.three_ds_data.three_ds_method_details).to.have.property("three_ds_method_data").that.is.a('string').and.is.not.empty;
+});
+
+// Verify if 'poll_id' exists inside 'poll_config'
+// Polling is required to check 3DS status asynchronously while Netcetera finishes auth.
+pm.test("[POST]::/payments - Should contain 'poll_id' inside 'poll_config'", function () {
+ pm.expect(jsonData.next_action.three_ds_data.poll_config).to.have.property("poll_id");
+});
+
+// Verify if 'message_version' exists and is 2.1.0 or higher
+// Ensures compatibility with supported Netcetera protocol versions (2.1.0 and above).
+pm.test("[POST]::/payments - 'message_version' should exist and be >= 2.1.0", function () {
+ const version = jsonData.next_action.three_ds_data.message_version;
+ pm.expect(version).to.match(/^2\.(1|2|3)(\.\d+)?$/);
+});
+
+// Verify if 'directory_server_id' exists
+// Identifies the card network’s Directory Server (e.g., Visa = A000000003) for Netcetera routing.
+pm.test("[POST]::/payments - Should contain 'directory_server_id'", function () {
+ pm.expect(jsonData.next_action.three_ds_data).to.have.property("directory_server_id").that.is.a('string');
+});
+
+// Assert 'external_authentication_details' exists
+pm.test("[POST]::/payments - Should contain 'external_authentication_details'", function () {
+ pm.expect(jsonData).to.have.property("external_authentication_details");
+});
+
+// Assert 'status' is 'pending' at the start of 3DS
+pm.test("[POST]::/payments - external_authentication_details.status should be 'pending'", function () {
+ pm.expect(jsonData.external_authentication_details.status).to.eql("pending");
+});
+
+// Assert 'ds_transaction_id' exists (required for Netcetera 3DS tracking)
+pm.test("[POST]::/payments - Should contain 'ds_transaction_id'", function () {
+ pm.expect(jsonData.external_authentication_details.ds_transaction_id).to.be.a('string').and.is.not.empty;
+});
+
+// Assert 'version' is present and valid
+pm.test("[POST]::/payments - Should contain 3DS version", function () {
+ pm.expect(jsonData.external_authentication_details.version).to.match(/^2\.(1|2|3)(\.\d+)?$/);
+});
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario3-Create 3DS Frictionless payment with Visa/Payments - Create/request.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario3-Create 3DS Frictionless payment with Visa/Payments - Create/request.json
new file mode 100644
index 0000000000..115eb9753c
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario3-Create 3DS Frictionless payment with Visa/Payments - Create/request.json
@@ -0,0 +1,86 @@
+{
+ "method": "POST",
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ },
+ {
+ "key": "Accept",
+ "value": "application/json"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ },
+ "raw_json_formatted": {
+ "amount": 500,
+ "amount_to_capture": 500,
+ "currency": "EUR",
+ "confirm": true,
+ "capture_method": "automatic",
+ "authentication_type": "three_ds",
+ "request_external_three_ds_authentication": true,
+ "payment_method": "card",
+ "payment_method_type": "credit",
+ "payment_method_data": {
+ "card": {
+ "card_number": "4123400073320224",
+ "card_exp_month": "01",
+ "card_exp_year": "50",
+ "card_holder_name": "John Doe",
+ "card_cvc": "123"
+ }
+ },
+ "profile_id": "{{profile_id}}",
+ "email": "[email protected]",
+ "name": "John Doe",
+ "phone": "8056594427",
+ "phone_country_code": "+91",
+ "description": "{{$randomLoremSentence}}",
+ "billing": {
+ "address": {
+ "line1": "2 ter",
+ "line2": "rue du château",
+ "line3": "",
+ "city": "Neuilly-sur-Seine",
+ "state": "France",
+ "zip": "92200",
+ "country": "FR"
+ },
+ "phone": {
+ "number": "8056594427",
+ "country_code": "+91"
+ }
+ },
+ "shipping": {
+ "address": {
+ "line1": "1467",
+ "line2": "Harrison Street",
+ "line3": "Harrison Street",
+ "city": "San Fransico",
+ "state": "California",
+ "zip": "94122",
+ "country": "US",
+ "first_name": "joseph",
+ "last_name": "Doe"
+ },
+ "phone": {
+ "number": "8056594427",
+ "country_code": "+91"
+ }
+ },
+ "statement_descriptor_name": "Joseph Doe",
+ "statement_descriptor_suffix": "JS"
+ }
+ },
+ "url": {
+ "raw": "{{baseUrl}}/payments",
+ "host": ["{{baseUrl}}"],
+ "path": ["payments"]
+ }
+}
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario3-Create 3DS Frictionless payment with Visa/Payments - Create/response.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario3-Create 3DS Frictionless payment with Visa/Payments - Create/response.json
new file mode 100644
index 0000000000..fe51488c70
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario3-Create 3DS Frictionless payment with Visa/Payments - Create/response.json
@@ -0,0 +1 @@
+[]
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario3-Create 3DS Frictionless payment with Visa/Payments - Retrieve/.event.meta.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario3-Create 3DS Frictionless payment with Visa/Payments - Retrieve/.event.meta.json
new file mode 100644
index 0000000000..0731450e6b
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario3-Create 3DS Frictionless payment with Visa/Payments - Retrieve/.event.meta.json
@@ -0,0 +1,3 @@
+{
+ "eventOrder": ["event.test.js"]
+}
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario3-Create 3DS Frictionless payment with Visa/Payments - Retrieve/event.test.js b/postman/collection-dir/archipel/Netcetera Testcases/Scenario3-Create 3DS Frictionless payment with Visa/Payments - Retrieve/event.test.js
new file mode 100644
index 0000000000..02ab01502c
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario3-Create 3DS Frictionless payment with Visa/Payments - Retrieve/event.test.js
@@ -0,0 +1,71 @@
+// Validate status 2xx
+pm.test("[GET]::/payments/:id - Status code is 2xx", function () {
+ pm.response.to.be.success;
+});
+
+// Validate if response header has matching content-type
+pm.test("[GET]::/payments/:id - Content-Type is application/json", function () {
+ pm.expect(pm.response.headers.get("Content-Type")).to.include(
+ "application/json",
+ );
+});
+
+// Validate if response has JSON Body
+pm.test("[GET]::/payments/:id - Response has JSON Body", function () {
+ pm.response.to.have.jsonBody();
+});
+
+// Set response object as internal variable
+let jsonData = {};
+try {
+ jsonData = pm.response.json();
+} catch (e) {}
+
+// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
+if (jsonData?.payment_id) {
+ pm.collectionVariables.set("payment_id", jsonData.payment_id);
+ console.log(
+ "- use {{payment_id}} as collection variable for value",
+ jsonData.payment_id,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
+ );
+}
+
+// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
+if (jsonData?.mandate_id) {
+ pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
+ console.log(
+ "- use {{mandate_id}} as collection variable for value",
+ jsonData.mandate_id,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
+ );
+}
+
+// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
+if (jsonData?.client_secret) {
+ pm.collectionVariables.set("client_secret", jsonData.client_secret);
+ console.log(
+ "- use {{client_secret}} as collection variable for value",
+ jsonData.client_secret,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
+ );
+}
+
+// Response body should have value "requires_customer_action" for "status"
+if (jsonData?.status) {
+ pm.test(
+ "[POST]::/payments/:id - Content check if value for 'status' matches 'requires_customer_action'",
+ function () {
+ pm.expect(jsonData.status).to.eql("requires_customer_action");
+ },
+ );
+}
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario3-Create 3DS Frictionless payment with Visa/Payments - Retrieve/request.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario3-Create 3DS Frictionless payment with Visa/Payments - Retrieve/request.json
new file mode 100644
index 0000000000..6cd4b7d96c
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario3-Create 3DS Frictionless payment with Visa/Payments - Retrieve/request.json
@@ -0,0 +1,28 @@
+{
+ "method": "GET",
+ "header": [
+ {
+ "key": "Accept",
+ "value": "application/json"
+ }
+ ],
+ "url": {
+ "raw": "{{baseUrl}}/payments/:id?force_sync=true",
+ "host": ["{{baseUrl}}"],
+ "path": ["payments", ":id"],
+ "query": [
+ {
+ "key": "force_sync",
+ "value": "true"
+ }
+ ],
+ "variable": [
+ {
+ "key": "id",
+ "value": "{{payment_id}}",
+ "description": "(Required) unique payment id"
+ }
+ ]
+ },
+ "description": "To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment"
+}
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario3-Create 3DS Frictionless payment with Visa/Payments - Retrieve/response.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario3-Create 3DS Frictionless payment with Visa/Payments - Retrieve/response.json
new file mode 100644
index 0000000000..fe51488c70
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario3-Create 3DS Frictionless payment with Visa/Payments - Retrieve/response.json
@@ -0,0 +1 @@
+[]
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario4-Create 3DS Frictionless payment with Mastercard/.meta.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario4-Create 3DS Frictionless payment with Mastercard/.meta.json
new file mode 100644
index 0000000000..60051ecca2
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario4-Create 3DS Frictionless payment with Mastercard/.meta.json
@@ -0,0 +1,6 @@
+{
+ "childrenOrder": [
+ "Payments - Create",
+ "Payments - Retrieve"
+ ]
+}
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario4-Create 3DS Frictionless payment with Mastercard/Payments - Create/.event.meta.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario4-Create 3DS Frictionless payment with Mastercard/Payments - Create/.event.meta.json
new file mode 100644
index 0000000000..688c85746e
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario4-Create 3DS Frictionless payment with Mastercard/Payments - Create/.event.meta.json
@@ -0,0 +1,5 @@
+{
+ "eventOrder": [
+ "event.test.js"
+ ]
+}
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario4-Create 3DS Frictionless payment with Mastercard/Payments - Create/event.test.js b/postman/collection-dir/archipel/Netcetera Testcases/Scenario4-Create 3DS Frictionless payment with Mastercard/Payments - Create/event.test.js
new file mode 100644
index 0000000000..cbc6626902
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario4-Create 3DS Frictionless payment with Mastercard/Payments - Create/event.test.js
@@ -0,0 +1,138 @@
+// Validate status 2xx
+pm.test("[POST]::/payments - Status code is 2xx", function () {
+ pm.response.to.be.success;
+});
+
+// Validate if response header has matching content-type
+pm.test("[POST]::/payments - Content-Type is application/json", function () {
+ pm.expect(pm.response.headers.get("Content-Type")).to.include(
+ "application/json",
+ );
+});
+
+// Validate if response has JSON Body
+pm.test("[POST]::/payments - Response has JSON Body", function () {
+ pm.response.to.have.jsonBody();
+});
+
+// Set response object as internal variable
+let jsonData = {};
+try {
+ jsonData = pm.response.json();
+} catch (e) {}
+
+// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
+if (jsonData?.payment_id) {
+ pm.collectionVariables.set("payment_id", jsonData.payment_id);
+ console.log(
+ "- use {{payment_id}} as collection variable for value",
+ jsonData.payment_id,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
+ );
+}
+
+// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
+if (jsonData?.client_secret) {
+ pm.collectionVariables.set("client_secret", jsonData.client_secret);
+ console.log(
+ "- use {{client_secret}} as collection variable for value",
+ jsonData.client_secret,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
+ );
+}
+
+// Verify if 'external_3ds_authentication_attempted' is true
+pm.test("[POST]::/payments - 'external_3ds_authentication_attempted' should be true", function () {
+ pm.expect(jsonData.external_3ds_authentication_attempted).to.be.true;
+});
+
+// Response body should have value "requires_customer_action" for "status"
+if (jsonData?.status) {
+ pm.test(
+ "[POST]::/payments - Content Verify if value for 'status' matches 'requires_customer_action'",
+ function () {
+ pm.expect(jsonData.status).to.eql("requires_customer_action");
+ },
+ );
+}
+
+// Verify if 'next_action' exists
+pm.test("[POST]::/payments - Should contain 'next_action'", function () {
+ pm.expect(jsonData).to.have.property("next_action");
+});
+
+// Verify if 'next_action.type' is 'three_ds_invoke'
+pm.test("[POST]::/payments - 'next_action.type' should be 'three_ds_invoke'", function () {
+ pm.expect(jsonData.next_action.type).to.eql("three_ds_invoke");
+});
+
+// Verify if 'three_ds_data' exists inside 'next_action'
+pm.test("[POST]::/payments - Should contain 'three_ds_data' under 'next_action'", function () {
+ pm.expect(jsonData.next_action).to.have.property("three_ds_data");
+});
+
+// Verify if 'three_ds_authentication_url' exists
+pm.test("[POST]::/payments - Should contain 'three_ds_authentication_url'", function () {
+ pm.expect(jsonData.next_action.three_ds_data).to.have.property("three_ds_authentication_url");
+});
+
+// Verify if 'three_ds_authorize_url' exists
+pm.test("[POST]::/payments - Should contain 'three_ds_authorize_url'", function () {
+ pm.expect(jsonData.next_action.three_ds_data).to.have.property("three_ds_authorize_url");
+});
+
+// Verify if 'three_ds_method_url' exists
+pm.test("[POST]::/payments - Should contain 'three_ds_method_url'", function () {
+ pm.expect(jsonData.next_action.three_ds_data.three_ds_method_details).to.have.property("three_ds_method_url");
+});
+
+// Verify if 'three_ds_method_data' exists and is not empty
+// Carries session-specific metadata for fingerprinting — must exist and be valid Base64.
+pm.test("[POST]::/payments - Should contain non-empty 'three_ds_method_data'", function () {
+ pm.expect(jsonData.next_action.three_ds_data.three_ds_method_details).to.have.property("three_ds_method_data").that.is.a('string').and.is.not.empty;
+});
+
+// Verify if 'poll_id' exists inside 'poll_config'
+// Polling is required to check 3DS status asynchronously while Netcetera finishes auth.
+pm.test("[POST]::/payments - Should contain 'poll_id' inside 'poll_config'", function () {
+ pm.expect(jsonData.next_action.three_ds_data.poll_config).to.have.property("poll_id");
+});
+
+// Verify if 'message_version' exists and is 2.1.0 or higher
+// Ensures compatibility with supported Netcetera protocol versions (2.1.0 and above).
+pm.test("[POST]::/payments - 'message_version' should exist and be >= 2.1.0", function () {
+ const version = jsonData.next_action.three_ds_data.message_version;
+ pm.expect(version).to.match(/^2\.(1|2|3)(\.\d+)?$/);
+});
+
+// Verify if 'directory_server_id' exists
+// Identifies the card network’s Directory Server (e.g., Visa = A000000003) for Netcetera routing.
+pm.test("[POST]::/payments - Should contain 'directory_server_id'", function () {
+ pm.expect(jsonData.next_action.three_ds_data).to.have.property("directory_server_id").that.is.a('string');
+});
+
+// Assert 'external_authentication_details' exists
+pm.test("[POST]::/payments - Should contain 'external_authentication_details'", function () {
+ pm.expect(jsonData).to.have.property("external_authentication_details");
+});
+
+// Assert 'status' is 'pending' at the start of 3DS
+pm.test("[POST]::/payments - external_authentication_details.status should be 'pending'", function () {
+ pm.expect(jsonData.external_authentication_details.status).to.eql("pending");
+});
+
+// Assert 'ds_transaction_id' exists (required for Netcetera 3DS tracking)
+pm.test("[POST]::/payments - Should contain 'ds_transaction_id'", function () {
+ pm.expect(jsonData.external_authentication_details.ds_transaction_id).to.be.a('string').and.is.not.empty;
+});
+
+// Assert 'version' is present and valid
+pm.test("[POST]::/payments - Should contain 3DS version", function () {
+ pm.expect(jsonData.external_authentication_details.version).to.match(/^2\.(1|2|3)(\.\d+)?$/);
+});
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario4-Create 3DS Frictionless payment with Mastercard/Payments - Create/request.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario4-Create 3DS Frictionless payment with Mastercard/Payments - Create/request.json
new file mode 100644
index 0000000000..cb48f2fde3
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario4-Create 3DS Frictionless payment with Mastercard/Payments - Create/request.json
@@ -0,0 +1,86 @@
+{
+ "method": "POST",
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ },
+ {
+ "key": "Accept",
+ "value": "application/json"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ },
+ "raw_json_formatted": {
+ "amount": 500,
+ "amount_to_capture": 500,
+ "currency": "EUR",
+ "confirm": true,
+ "capture_method": "automatic",
+ "authentication_type": "three_ds",
+ "request_external_three_ds_authentication": true,
+ "payment_method": "card",
+ "payment_method_type": "credit",
+ "payment_method_data": {
+ "card": {
+ "card_number": "5367632000019972",
+ "card_exp_month": "01",
+ "card_exp_year": "50",
+ "card_holder_name": "John Doe",
+ "card_cvc": "123"
+ }
+ },
+ "profile_id": "{{profile_id}}",
+ "email": "[email protected]",
+ "name": "John Doe",
+ "phone": "8056594427",
+ "phone_country_code": "+91",
+ "description": "{{$randomLoremSentence}}",
+ "billing": {
+ "address": {
+ "line1": "2 ter",
+ "line2": "rue du château",
+ "line3": "",
+ "city": "Neuilly-sur-Seine",
+ "state": "France",
+ "zip": "92200",
+ "country": "FR"
+ },
+ "phone": {
+ "number": "8056594427",
+ "country_code": "+91"
+ }
+ },
+ "shipping": {
+ "address": {
+ "line1": "1467",
+ "line2": "Harrison Street",
+ "line3": "Harrison Street",
+ "city": "San Fransico",
+ "state": "California",
+ "zip": "94122",
+ "country": "US",
+ "first_name": "joseph",
+ "last_name": "Doe"
+ },
+ "phone": {
+ "number": "8056594427",
+ "country_code": "+91"
+ }
+ },
+ "statement_descriptor_name": "Joseph Doe",
+ "statement_descriptor_suffix": "JS"
+ }
+ },
+ "url": {
+ "raw": "{{baseUrl}}/payments",
+ "host": ["{{baseUrl}}"],
+ "path": ["payments"]
+ }
+}
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario4-Create 3DS Frictionless payment with Mastercard/Payments - Create/response.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario4-Create 3DS Frictionless payment with Mastercard/Payments - Create/response.json
new file mode 100644
index 0000000000..fe51488c70
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario4-Create 3DS Frictionless payment with Mastercard/Payments - Create/response.json
@@ -0,0 +1 @@
+[]
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario4-Create 3DS Frictionless payment with Mastercard/Payments - Retrieve/.event.meta.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario4-Create 3DS Frictionless payment with Mastercard/Payments - Retrieve/.event.meta.json
new file mode 100644
index 0000000000..0731450e6b
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario4-Create 3DS Frictionless payment with Mastercard/Payments - Retrieve/.event.meta.json
@@ -0,0 +1,3 @@
+{
+ "eventOrder": ["event.test.js"]
+}
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario4-Create 3DS Frictionless payment with Mastercard/Payments - Retrieve/event.test.js b/postman/collection-dir/archipel/Netcetera Testcases/Scenario4-Create 3DS Frictionless payment with Mastercard/Payments - Retrieve/event.test.js
new file mode 100644
index 0000000000..02ab01502c
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario4-Create 3DS Frictionless payment with Mastercard/Payments - Retrieve/event.test.js
@@ -0,0 +1,71 @@
+// Validate status 2xx
+pm.test("[GET]::/payments/:id - Status code is 2xx", function () {
+ pm.response.to.be.success;
+});
+
+// Validate if response header has matching content-type
+pm.test("[GET]::/payments/:id - Content-Type is application/json", function () {
+ pm.expect(pm.response.headers.get("Content-Type")).to.include(
+ "application/json",
+ );
+});
+
+// Validate if response has JSON Body
+pm.test("[GET]::/payments/:id - Response has JSON Body", function () {
+ pm.response.to.have.jsonBody();
+});
+
+// Set response object as internal variable
+let jsonData = {};
+try {
+ jsonData = pm.response.json();
+} catch (e) {}
+
+// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
+if (jsonData?.payment_id) {
+ pm.collectionVariables.set("payment_id", jsonData.payment_id);
+ console.log(
+ "- use {{payment_id}} as collection variable for value",
+ jsonData.payment_id,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
+ );
+}
+
+// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
+if (jsonData?.mandate_id) {
+ pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
+ console.log(
+ "- use {{mandate_id}} as collection variable for value",
+ jsonData.mandate_id,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
+ );
+}
+
+// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
+if (jsonData?.client_secret) {
+ pm.collectionVariables.set("client_secret", jsonData.client_secret);
+ console.log(
+ "- use {{client_secret}} as collection variable for value",
+ jsonData.client_secret,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
+ );
+}
+
+// Response body should have value "requires_customer_action" for "status"
+if (jsonData?.status) {
+ pm.test(
+ "[POST]::/payments/:id - Content check if value for 'status' matches 'requires_customer_action'",
+ function () {
+ pm.expect(jsonData.status).to.eql("requires_customer_action");
+ },
+ );
+}
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario4-Create 3DS Frictionless payment with Mastercard/Payments - Retrieve/request.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario4-Create 3DS Frictionless payment with Mastercard/Payments - Retrieve/request.json
new file mode 100644
index 0000000000..6cd4b7d96c
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario4-Create 3DS Frictionless payment with Mastercard/Payments - Retrieve/request.json
@@ -0,0 +1,28 @@
+{
+ "method": "GET",
+ "header": [
+ {
+ "key": "Accept",
+ "value": "application/json"
+ }
+ ],
+ "url": {
+ "raw": "{{baseUrl}}/payments/:id?force_sync=true",
+ "host": ["{{baseUrl}}"],
+ "path": ["payments", ":id"],
+ "query": [
+ {
+ "key": "force_sync",
+ "value": "true"
+ }
+ ],
+ "variable": [
+ {
+ "key": "id",
+ "value": "{{payment_id}}",
+ "description": "(Required) unique payment id"
+ }
+ ]
+ },
+ "description": "To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment"
+}
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario4-Create 3DS Frictionless payment with Mastercard/Payments - Retrieve/response.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario4-Create 3DS Frictionless payment with Mastercard/Payments - Retrieve/response.json
new file mode 100644
index 0000000000..fe51488c70
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario4-Create 3DS Frictionless payment with Mastercard/Payments - Retrieve/response.json
@@ -0,0 +1 @@
+[]
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario5-Create 3DS Challenge payment with Mastercard/.meta.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario5-Create 3DS Challenge payment with Mastercard/.meta.json
new file mode 100644
index 0000000000..60051ecca2
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario5-Create 3DS Challenge payment with Mastercard/.meta.json
@@ -0,0 +1,6 @@
+{
+ "childrenOrder": [
+ "Payments - Create",
+ "Payments - Retrieve"
+ ]
+}
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario5-Create 3DS Challenge payment with Mastercard/Payments - Create/.event.meta.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario5-Create 3DS Challenge payment with Mastercard/Payments - Create/.event.meta.json
new file mode 100644
index 0000000000..688c85746e
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario5-Create 3DS Challenge payment with Mastercard/Payments - Create/.event.meta.json
@@ -0,0 +1,5 @@
+{
+ "eventOrder": [
+ "event.test.js"
+ ]
+}
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario5-Create 3DS Challenge payment with Mastercard/Payments - Create/event.test.js b/postman/collection-dir/archipel/Netcetera Testcases/Scenario5-Create 3DS Challenge payment with Mastercard/Payments - Create/event.test.js
new file mode 100644
index 0000000000..cbc6626902
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario5-Create 3DS Challenge payment with Mastercard/Payments - Create/event.test.js
@@ -0,0 +1,138 @@
+// Validate status 2xx
+pm.test("[POST]::/payments - Status code is 2xx", function () {
+ pm.response.to.be.success;
+});
+
+// Validate if response header has matching content-type
+pm.test("[POST]::/payments - Content-Type is application/json", function () {
+ pm.expect(pm.response.headers.get("Content-Type")).to.include(
+ "application/json",
+ );
+});
+
+// Validate if response has JSON Body
+pm.test("[POST]::/payments - Response has JSON Body", function () {
+ pm.response.to.have.jsonBody();
+});
+
+// Set response object as internal variable
+let jsonData = {};
+try {
+ jsonData = pm.response.json();
+} catch (e) {}
+
+// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
+if (jsonData?.payment_id) {
+ pm.collectionVariables.set("payment_id", jsonData.payment_id);
+ console.log(
+ "- use {{payment_id}} as collection variable for value",
+ jsonData.payment_id,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
+ );
+}
+
+// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
+if (jsonData?.client_secret) {
+ pm.collectionVariables.set("client_secret", jsonData.client_secret);
+ console.log(
+ "- use {{client_secret}} as collection variable for value",
+ jsonData.client_secret,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
+ );
+}
+
+// Verify if 'external_3ds_authentication_attempted' is true
+pm.test("[POST]::/payments - 'external_3ds_authentication_attempted' should be true", function () {
+ pm.expect(jsonData.external_3ds_authentication_attempted).to.be.true;
+});
+
+// Response body should have value "requires_customer_action" for "status"
+if (jsonData?.status) {
+ pm.test(
+ "[POST]::/payments - Content Verify if value for 'status' matches 'requires_customer_action'",
+ function () {
+ pm.expect(jsonData.status).to.eql("requires_customer_action");
+ },
+ );
+}
+
+// Verify if 'next_action' exists
+pm.test("[POST]::/payments - Should contain 'next_action'", function () {
+ pm.expect(jsonData).to.have.property("next_action");
+});
+
+// Verify if 'next_action.type' is 'three_ds_invoke'
+pm.test("[POST]::/payments - 'next_action.type' should be 'three_ds_invoke'", function () {
+ pm.expect(jsonData.next_action.type).to.eql("three_ds_invoke");
+});
+
+// Verify if 'three_ds_data' exists inside 'next_action'
+pm.test("[POST]::/payments - Should contain 'three_ds_data' under 'next_action'", function () {
+ pm.expect(jsonData.next_action).to.have.property("three_ds_data");
+});
+
+// Verify if 'three_ds_authentication_url' exists
+pm.test("[POST]::/payments - Should contain 'three_ds_authentication_url'", function () {
+ pm.expect(jsonData.next_action.three_ds_data).to.have.property("three_ds_authentication_url");
+});
+
+// Verify if 'three_ds_authorize_url' exists
+pm.test("[POST]::/payments - Should contain 'three_ds_authorize_url'", function () {
+ pm.expect(jsonData.next_action.three_ds_data).to.have.property("three_ds_authorize_url");
+});
+
+// Verify if 'three_ds_method_url' exists
+pm.test("[POST]::/payments - Should contain 'three_ds_method_url'", function () {
+ pm.expect(jsonData.next_action.three_ds_data.three_ds_method_details).to.have.property("three_ds_method_url");
+});
+
+// Verify if 'three_ds_method_data' exists and is not empty
+// Carries session-specific metadata for fingerprinting — must exist and be valid Base64.
+pm.test("[POST]::/payments - Should contain non-empty 'three_ds_method_data'", function () {
+ pm.expect(jsonData.next_action.three_ds_data.three_ds_method_details).to.have.property("three_ds_method_data").that.is.a('string').and.is.not.empty;
+});
+
+// Verify if 'poll_id' exists inside 'poll_config'
+// Polling is required to check 3DS status asynchronously while Netcetera finishes auth.
+pm.test("[POST]::/payments - Should contain 'poll_id' inside 'poll_config'", function () {
+ pm.expect(jsonData.next_action.three_ds_data.poll_config).to.have.property("poll_id");
+});
+
+// Verify if 'message_version' exists and is 2.1.0 or higher
+// Ensures compatibility with supported Netcetera protocol versions (2.1.0 and above).
+pm.test("[POST]::/payments - 'message_version' should exist and be >= 2.1.0", function () {
+ const version = jsonData.next_action.three_ds_data.message_version;
+ pm.expect(version).to.match(/^2\.(1|2|3)(\.\d+)?$/);
+});
+
+// Verify if 'directory_server_id' exists
+// Identifies the card network’s Directory Server (e.g., Visa = A000000003) for Netcetera routing.
+pm.test("[POST]::/payments - Should contain 'directory_server_id'", function () {
+ pm.expect(jsonData.next_action.three_ds_data).to.have.property("directory_server_id").that.is.a('string');
+});
+
+// Assert 'external_authentication_details' exists
+pm.test("[POST]::/payments - Should contain 'external_authentication_details'", function () {
+ pm.expect(jsonData).to.have.property("external_authentication_details");
+});
+
+// Assert 'status' is 'pending' at the start of 3DS
+pm.test("[POST]::/payments - external_authentication_details.status should be 'pending'", function () {
+ pm.expect(jsonData.external_authentication_details.status).to.eql("pending");
+});
+
+// Assert 'ds_transaction_id' exists (required for Netcetera 3DS tracking)
+pm.test("[POST]::/payments - Should contain 'ds_transaction_id'", function () {
+ pm.expect(jsonData.external_authentication_details.ds_transaction_id).to.be.a('string').and.is.not.empty;
+});
+
+// Assert 'version' is present and valid
+pm.test("[POST]::/payments - Should contain 3DS version", function () {
+ pm.expect(jsonData.external_authentication_details.version).to.match(/^2\.(1|2|3)(\.\d+)?$/);
+});
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario5-Create 3DS Challenge payment with Mastercard/Payments - Create/request.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario5-Create 3DS Challenge payment with Mastercard/Payments - Create/request.json
new file mode 100644
index 0000000000..a13cde1e08
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario5-Create 3DS Challenge payment with Mastercard/Payments - Create/request.json
@@ -0,0 +1,86 @@
+{
+ "method": "POST",
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ },
+ {
+ "key": "Accept",
+ "value": "application/json"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ },
+ "raw_json_formatted": {
+ "amount": 500,
+ "amount_to_capture": 500,
+ "currency": "EUR",
+ "confirm": true,
+ "capture_method": "automatic",
+ "authentication_type": "three_ds",
+ "request_external_three_ds_authentication": true,
+ "payment_method": "card",
+ "payment_method_type": "credit",
+ "payment_method_data": {
+ "card": {
+ "card_number": "5267648608924299",
+ "card_exp_month": "01",
+ "card_exp_year": "50",
+ "card_holder_name": "John Doe",
+ "card_cvc": "123"
+ }
+ },
+ "profile_id": "{{profile_id}}",
+ "email": "[email protected]",
+ "name": "John Doe",
+ "phone": "8056594427",
+ "phone_country_code": "+91",
+ "description": "{{$randomLoremSentence}}",
+ "billing": {
+ "address": {
+ "line1": "2 ter",
+ "line2": "rue du château",
+ "line3": "",
+ "city": "Neuilly-sur-Seine",
+ "state": "France",
+ "zip": "92200",
+ "country": "FR"
+ },
+ "phone": {
+ "number": "8056594427",
+ "country_code": "+91"
+ }
+ },
+ "shipping": {
+ "address": {
+ "line1": "1467",
+ "line2": "Harrison Street",
+ "line3": "Harrison Street",
+ "city": "San Fransico",
+ "state": "California",
+ "zip": "94122",
+ "country": "US",
+ "first_name": "joseph",
+ "last_name": "Doe"
+ },
+ "phone": {
+ "number": "8056594427",
+ "country_code": "+91"
+ }
+ },
+ "statement_descriptor_name": "Joseph Doe",
+ "statement_descriptor_suffix": "JS"
+ }
+ },
+ "url": {
+ "raw": "{{baseUrl}}/payments",
+ "host": ["{{baseUrl}}"],
+ "path": ["payments"]
+ }
+}
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario5-Create 3DS Challenge payment with Mastercard/Payments - Create/response.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario5-Create 3DS Challenge payment with Mastercard/Payments - Create/response.json
new file mode 100644
index 0000000000..fe51488c70
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario5-Create 3DS Challenge payment with Mastercard/Payments - Create/response.json
@@ -0,0 +1 @@
+[]
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario5-Create 3DS Challenge payment with Mastercard/Payments - Retrieve/.event.meta.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario5-Create 3DS Challenge payment with Mastercard/Payments - Retrieve/.event.meta.json
new file mode 100644
index 0000000000..0731450e6b
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario5-Create 3DS Challenge payment with Mastercard/Payments - Retrieve/.event.meta.json
@@ -0,0 +1,3 @@
+{
+ "eventOrder": ["event.test.js"]
+}
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario5-Create 3DS Challenge payment with Mastercard/Payments - Retrieve/event.test.js b/postman/collection-dir/archipel/Netcetera Testcases/Scenario5-Create 3DS Challenge payment with Mastercard/Payments - Retrieve/event.test.js
new file mode 100644
index 0000000000..02ab01502c
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario5-Create 3DS Challenge payment with Mastercard/Payments - Retrieve/event.test.js
@@ -0,0 +1,71 @@
+// Validate status 2xx
+pm.test("[GET]::/payments/:id - Status code is 2xx", function () {
+ pm.response.to.be.success;
+});
+
+// Validate if response header has matching content-type
+pm.test("[GET]::/payments/:id - Content-Type is application/json", function () {
+ pm.expect(pm.response.headers.get("Content-Type")).to.include(
+ "application/json",
+ );
+});
+
+// Validate if response has JSON Body
+pm.test("[GET]::/payments/:id - Response has JSON Body", function () {
+ pm.response.to.have.jsonBody();
+});
+
+// Set response object as internal variable
+let jsonData = {};
+try {
+ jsonData = pm.response.json();
+} catch (e) {}
+
+// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
+if (jsonData?.payment_id) {
+ pm.collectionVariables.set("payment_id", jsonData.payment_id);
+ console.log(
+ "- use {{payment_id}} as collection variable for value",
+ jsonData.payment_id,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
+ );
+}
+
+// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
+if (jsonData?.mandate_id) {
+ pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
+ console.log(
+ "- use {{mandate_id}} as collection variable for value",
+ jsonData.mandate_id,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
+ );
+}
+
+// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
+if (jsonData?.client_secret) {
+ pm.collectionVariables.set("client_secret", jsonData.client_secret);
+ console.log(
+ "- use {{client_secret}} as collection variable for value",
+ jsonData.client_secret,
+ );
+} else {
+ console.log(
+ "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
+ );
+}
+
+// Response body should have value "requires_customer_action" for "status"
+if (jsonData?.status) {
+ pm.test(
+ "[POST]::/payments/:id - Content check if value for 'status' matches 'requires_customer_action'",
+ function () {
+ pm.expect(jsonData.status).to.eql("requires_customer_action");
+ },
+ );
+}
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario5-Create 3DS Challenge payment with Mastercard/Payments - Retrieve/request.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario5-Create 3DS Challenge payment with Mastercard/Payments - Retrieve/request.json
new file mode 100644
index 0000000000..6cd4b7d96c
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario5-Create 3DS Challenge payment with Mastercard/Payments - Retrieve/request.json
@@ -0,0 +1,28 @@
+{
+ "method": "GET",
+ "header": [
+ {
+ "key": "Accept",
+ "value": "application/json"
+ }
+ ],
+ "url": {
+ "raw": "{{baseUrl}}/payments/:id?force_sync=true",
+ "host": ["{{baseUrl}}"],
+ "path": ["payments", ":id"],
+ "query": [
+ {
+ "key": "force_sync",
+ "value": "true"
+ }
+ ],
+ "variable": [
+ {
+ "key": "id",
+ "value": "{{payment_id}}",
+ "description": "(Required) unique payment id"
+ }
+ ]
+ },
+ "description": "To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment"
+}
diff --git a/postman/collection-dir/archipel/Netcetera Testcases/Scenario5-Create 3DS Challenge payment with Mastercard/Payments - Retrieve/response.json b/postman/collection-dir/archipel/Netcetera Testcases/Scenario5-Create 3DS Challenge payment with Mastercard/Payments - Retrieve/response.json
new file mode 100644
index 0000000000..fe51488c70
--- /dev/null
+++ b/postman/collection-dir/archipel/Netcetera Testcases/Scenario5-Create 3DS Challenge payment with Mastercard/Payments - Retrieve/response.json
@@ -0,0 +1 @@
+[]