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): add net_amount field test cases (#3286)

Hrithikesh19a605e7c135
diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/.meta.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/.meta.json
new file mode 100644
index 0000000000..32d6aee528
--- /dev/null
+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/.meta.json
@@ -0,0 +1,9 @@
+{
+ "childrenOrder": [
+ "upsert Surcharge rules",
+ "Payments - Create",
+ "List Payment Methods for a Merchant",
+ "Payments - Confirm",
+ "Payments - Retrieve"
+ ]
+}
diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/List Payment Methods for a Merchant/.event.meta.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/List Payment Methods for a Merchant/.event.meta.json
new file mode 100644
index 0000000000..688c85746e
--- /dev/null
+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/List Payment Methods for a Merchant/.event.meta.json
@@ -0,0 +1,5 @@
+{
+ "eventOrder": [
+ "event.test.js"
+ ]
+}
diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/List Payment Methods for a Merchant/event.test.js b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/List Payment Methods for a Merchant/event.test.js
new file mode 100644
index 0000000000..98006113bd
--- /dev/null
+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/List Payment Methods for a Merchant/event.test.js
@@ -0,0 +1,51 @@
+// Validate status 2xx
+pm.test("[GET]::/payment_methods/:merchant_id - Status code is 2xx", function () {
+ pm.response.to.be.success;
+});
+
+// Validate if response header has matching content-type
+pm.test("[GET]::/payment_methods/:merchant_id - Content-Type is application/json", function () {
+ pm.expect(pm.response.headers.get("Content-Type")).to.include("application/json");
+});
+
+// Parse the response body as JSON
+var responseBody = pm.response.json();
+
+// Check if "payment_methods" array contains a "payment_method" with the value "card"
+pm.test("[GET]::/payment_methods/:merchant_id -Content Check if payment_method matches 'card'", function () {
+ var paymentMethods = responseBody.payment_methods;
+ var cardPaymentMethod = paymentMethods.find(function (method) {
+ return method.payment_method == "card";
+ });
+});
+
+// Check if "payment_methods" array contains a "payment_method" with the value "pay_later"
+pm.test("[GET]::/payment_methods/:merchant_id -Content Check if payment_method matches 'pay_later'", function () {
+ var paymentMethods = responseBody.payment_methods;
+ var cardPaymentMethod = paymentMethods.find(function (method) {
+ return method.payment_method == "pay_later";
+ });
+});
+// Check if "payment_methods" array contains a "payment_method" with the value "wallet"
+pm.test("[GET]::/payment_methods/:merchant_id -Content Check if payment_method matches 'wallet'", function () {
+ var paymentMethods = responseBody.payment_methods;
+ var cardPaymentMethod = paymentMethods.find(function (method) {
+ return method.payment_method == "wallet";
+ });
+});
+
+// Check if "payment_methods" array contains a "payment_method" with the value "bank_debit"
+pm.test("[GET]::/payment_methods/:merchant_id -Content Check if payment_method matches 'bank_debit'", function () {
+ var paymentMethods = responseBody.payment_methods;
+ var cardPaymentMethod = paymentMethods.find(function (method) {
+ return method.payment_method == "bank_debit";
+ });
+});
+
+// Check if "payment_methods" array contains a "payment_method" with the value "bank_transfer"
+pm.test("[GET]::/payment_methods/:merchant_id -Content Check if payment_method matches 'bank_transfer'", function () {
+ var paymentMethods = responseBody.payment_methods;
+ var cardPaymentMethod = paymentMethods.find(function (method) {
+ return method.payment_method == "bank_transfer";
+ });
+});
\ No newline at end of file
diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/List Payment Methods for a Merchant/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/List Payment Methods for a Merchant/request.json
new file mode 100644
index 0000000000..fed600e09c
--- /dev/null
+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/List Payment Methods for a Merchant/request.json
@@ -0,0 +1,52 @@
+{
+ "auth": {
+ "type": "apikey",
+ "apikey": [
+ {
+ "key": "value",
+ "value": "{{publishable_key}}",
+ "type": "string"
+ },
+ {
+ "key": "key",
+ "value": "api-key",
+ "type": "string"
+ },
+ {
+ "key": "in",
+ "value": "header",
+ "type": "string"
+ }
+ ]
+ },
+ "method": "GET",
+ "header": [
+ {
+ "key": "Accept",
+ "value": "application/json"
+ },
+ {
+ "key": "x-feature",
+ "value": "router-custom",
+ "type": "text",
+ "disabled": true
+ }
+ ],
+ "url": {
+ "raw": "{{baseUrl}}/account/payment_methods?client_secret={{client_secret}}",
+ "host": [
+ "{{baseUrl}}"
+ ],
+ "path": [
+ "account",
+ "payment_methods"
+ ],
+ "query": [
+ {
+ "key": "client_secret",
+ "value": "{{client_secret}}"
+ }
+ ]
+ },
+ "description": "To filter and list the applicable payment methods for a particular merchant id."
+}
diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/List Payment Methods for a Merchant/response.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/List Payment Methods for a Merchant/response.json
new file mode 100644
index 0000000000..fe51488c70
--- /dev/null
+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/List Payment Methods for a Merchant/response.json
@@ -0,0 +1 @@
+[]
diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/Payments - Confirm/.event.meta.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/Payments - Confirm/.event.meta.json
new file mode 100644
index 0000000000..220b1a6723
--- /dev/null
+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/Payments - Confirm/.event.meta.json
@@ -0,0 +1,3 @@
+{
+ "eventOrder": ["event.test.js", "event.prerequest.js"]
+}
diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/Payments - Confirm/event.prerequest.js b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/Payments - Confirm/event.prerequest.js
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/Payments - Confirm/event.test.js b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/Payments - Confirm/event.test.js
new file mode 100644
index 0000000000..161f3f385f
--- /dev/null
+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/Payments - Confirm/event.test.js
@@ -0,0 +1,89 @@
+// 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 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.",
+ );
+}
+
+if (jsonData?.net_amount) {
+ pm.test(
+ "[POST]::/payments:id/confirm - Content check if value for 'amount' matches '5020'",
+ function () {
+ pm.expect(jsonData.net_amount).to.eql(5020);
+ },
+ );
+}
+
+if (jsonData?.surcharge_details) {
+ pm.test(
+ "[POST]::/payments:id/confirm - Content check if value for 'surcharge_details.surcharge_amount' matches '10'",
+ function () {
+ pm.expect(jsonData.surcharge_details.surcharge_amount).to.eql(10);
+ },
+ );
+ pm.test(
+ "[POST]::/payments:id/confirm - Content check if value for 'surcharge_details.tax_amount' matches '10'",
+ function () {
+ pm.expect(jsonData.surcharge_details.tax_amount).to.eql(10);
+ },
+ );
+}
+
diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/Payments - Confirm/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/Payments - Confirm/request.json
new file mode 100644
index 0000000000..df5a39a50e
--- /dev/null
+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/Payments - Confirm/request.json
@@ -0,0 +1,68 @@
+{
+ "auth": {
+ "type": "apikey",
+ "apikey": [
+ {
+ "key": "value",
+ "value": "{{publishable_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": {
+ "payment_method": "card",
+ "payment_method_data": {
+ "card": {
+ "card_number": "4242424242424242",
+ "card_exp_month": "10",
+ "card_exp_year": "25",
+ "card_holder_name": "joseph Doe",
+ "card_cvc": "123",
+ "card_network": "Visa"
+ }
+ },
+ "client_secret": "{{client_secret}}"
+ }
+ },
+ "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/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/Payments - Confirm/response.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/Payments - Confirm/response.json
new file mode 100644
index 0000000000..fe51488c70
--- /dev/null
+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/Payments - Confirm/response.json
@@ -0,0 +1 @@
+[]
diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/Payments - Create/.event.meta.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/Payments - Create/.event.meta.json
new file mode 100644
index 0000000000..0731450e6b
--- /dev/null
+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/Payments - Create/.event.meta.json
@@ -0,0 +1,3 @@
+{
+ "eventOrder": ["event.test.js"]
+}
diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/Payments - Create/event.test.js b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/Payments - Create/event.test.js
new file mode 100644
index 0000000000..6b4c4d7222
--- /dev/null
+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/Payments - Create/event.test.js
@@ -0,0 +1,81 @@
+// 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_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");
+ },
+ );
+}
+
+// Amount must be equal to 5020
+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/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/Payments - Create/request.json
new file mode 100644
index 0000000000..2d1710d0b1
--- /dev/null
+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/Payments - Create/request.json
@@ -0,0 +1,81 @@
+{
+ "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": 5000,
+ "currency": "USD",
+ "confirm": false,
+ "capture_method": "automatic",
+ "capture_on": "2022-09-10T10:11:12Z",
+ "surcharge_details": {
+ "surcharge_amount": 10,
+ "tax_amount":10
+ },
+ "customer_id": "StripeCustomer",
+ "email": "[email protected]",
+ "name": "John Doe",
+ "phone": "999999999",
+ "phone_country_code": "+65",
+ "description": "Its my first payment request",
+ "authentication_type": "no_three_ds",
+ "return_url": "https://duck.com",
+ "billing": {
+ "address": {
+ "line1": "1467",
+ "line2": "Harrison Street",
+ "line3": "Harrison Street",
+ "city": "San Fransico",
+ "state": "California",
+ "zip": "94122",
+ "country": "US",
+ "first_name": "sundari"
+ }
+ },
+ "shipping": {
+ "address": {
+ "line1": "1467",
+ "line2": "Harrison Street",
+ "line3": "Harrison Street",
+ "city": "San Fransico",
+ "state": "California",
+ "zip": "94122",
+ "country": "US",
+ "first_name": "sundari"
+ }
+ },
+ "statement_descriptor_name": "joseph",
+ "statement_descriptor_suffix": "JS",
+ "metadata": {
+ "udf1": "value1",
+ "new_customer": "true",
+ "login_date": "2019-09-10T10:11:12Z"
+ },
+ "routing": {
+ "type": "single",
+ "data": "stripe"
+ }
+ }
+ },
+ "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/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/Payments - Create/response.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/Payments - Create/response.json
new file mode 100644
index 0000000000..fe51488c70
--- /dev/null
+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/Payments - Create/response.json
@@ -0,0 +1 @@
+[]
diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/Payments - Retrieve/.event.meta.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/Payments - Retrieve/.event.meta.json
new file mode 100644
index 0000000000..0731450e6b
--- /dev/null
+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/Payments - Retrieve/.event.meta.json
@@ -0,0 +1,3 @@
+{
+ "eventOrder": ["event.test.js"]
+}
diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/Payments - Retrieve/event.test.js b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/Payments - Retrieve/event.test.js
new file mode 100644
index 0000000000..aced67dbfb
--- /dev/null
+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/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 "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");
+ },
+ );
+}
diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/Payments - Retrieve/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/Payments - Retrieve/request.json
new file mode 100644
index 0000000000..6cd4b7d96c
--- /dev/null
+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/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/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/Payments - Retrieve/response.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/Payments - Retrieve/response.json
new file mode 100644
index 0000000000..fe51488c70
--- /dev/null
+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/Payments - Retrieve/response.json
@@ -0,0 +1 @@
+[]
diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/upsert Surcharge rules/.event.meta.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/upsert Surcharge rules/.event.meta.json
new file mode 100644
index 0000000000..688c85746e
--- /dev/null
+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/upsert Surcharge rules/.event.meta.json
@@ -0,0 +1,5 @@
+{
+ "eventOrder": [
+ "event.test.js"
+ ]
+}
diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/upsert Surcharge rules/event.test.js b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/upsert Surcharge rules/event.test.js
new file mode 100644
index 0000000000..0a03f61b1d
--- /dev/null
+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/upsert Surcharge rules/event.test.js
@@ -0,0 +1,8 @@
+pm.test("[POST]::/accounts/:id - Status code is 2xx", function () {
+ pm.response.to.be.success;
+});
+
+// Validate if response header has matching content-type
+pm.test("[POST]::/accounts/:id - Content-Type is application/json", function () {
+ pm.expect(pm.response.headers.get("Content-Type")).to.include("application/json");
+});
diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/upsert Surcharge rules/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/upsert Surcharge rules/request.json
new file mode 100644
index 0000000000..a19d9d9051
--- /dev/null
+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/upsert Surcharge rules/request.json
@@ -0,0 +1,131 @@
+{
+ "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": "PUT",
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw_json_formatted": {
+ "name": "Surcharge Conditional config",
+ "algorithm": {
+ "defaultSelection": {
+ "surcharge_details": null
+ },
+ "rules": [
+ {
+ "name": "rule_1",
+ "routingOutput": {
+ "surcharge_details": {
+ "surcharge": {
+ "type": "rate",
+ "value": {
+ "percentage": 10
+ }
+ },
+ "tax_on_surcharge": {
+ "percentage": 10
+ }
+ }
+ },
+ "statements": [
+ {
+ "condition": [
+ {
+ "lhs": "amount",
+ "comparison": "greater_than",
+ "value": {
+ "type": "number",
+ "value": 500
+ },
+ "metadata": {}
+ },
+ {
+ "lhs": "amount",
+ "comparison": "less_than",
+ "value": {
+ "type": "number",
+ "value": 1000
+ },
+ "metadata": {}
+ }
+ ],
+ "nested": null
+ }
+ ]
+ },
+ {
+ "name": "rule_2",
+ "routingOutput": {
+ "surcharge_details": {
+ "surcharge": {
+ "type": "rate",
+ "value": {
+ "percentage": 5
+ }
+ },
+ "tax_on_surcharge": {
+ "percentage": 5
+ }
+ }
+ },
+ "statements": [
+ {
+ "condition": [
+ {
+ "lhs": "amount",
+ "comparison": "greater_than",
+ "value": {
+ "type": "number",
+ "value": 5000
+ },
+ "metadata": {}
+ }
+ ],
+ "nested": null
+ }
+ ]
+ }
+ ],
+ "metadata": {}
+ },
+ "merchant_surcharge_configs": {
+ "show_surcharge_breakup_screen": true
+ }
+ }
+ },
+ "url": {
+ "raw": "{{baseUrl}}/routing/decision/surcharge",
+ "host": [
+ "{{baseUrl}}"
+ ],
+ "path": [
+ "routing",
+ "decision",
+ "surcharge"
+ ]
+ },
+ "description": "This API is used to configure surcharge rules for the merchant"
+}
diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/upsert Surcharge rules/response.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/upsert Surcharge rules/response.json
new file mode 100644
index 0000000000..fe51488c70
--- /dev/null
+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment by configuring surcharge rules/upsert Surcharge rules/response.json
@@ -0,0 +1 @@
+[]