repo
stringclasses
4 values
file_path
stringlengths
6
193
extension
stringclasses
23 values
content
stringlengths
0
1.73M
token_count
int64
0
724k
__index_level_0__
int64
0
10.8k
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario15-Bank Redirect-Ideal/Payments - Create/response.json
.json
[]
1
7,806
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario15-Bank Redirect-Ideal/Payments - Confirm/request.json
.json
{ "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": { "client_secret": "{{client_secret}}", "payment_method": "bank_redirect", "payment_method_type": "ideal", "payment_method_data": { "bank_redirect": { "ideal": { "billing_details": { "billing_name": "John Doe" }, "bank_name": "ing", "preferred_language": "en", "country": "DE" } } } } }, "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" }
424
7,807
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario15-Bank Redirect-Ideal/Payments - Confirm/event.test.js
.js
// 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.", ); } // Response body should have value "requires_customer_action" for "status" if (jsonData?.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"); }, ); } // Response body should have "next_action.redirect_to_url" pm.test( "[POST]::/payments - Content check if 'next_action.redirect_to_url' exists", function () { pm.expect(typeof jsonData.next_action.redirect_to_url !== "undefined").to.be .true; }, ); // Response body should have value "ideal" for "payment_method_type" if (jsonData?.payment_method_type) { pm.test( "[POST]::/payments/:id/confirm - Content check if value for 'payment_method_type' matches 'ideal'", function () { pm.expect(jsonData.payment_method_type).to.eql("ideal"); }, ); } // Response body should have value "globalpay" for "connector" if (jsonData?.connector) { pm.test( "[POST]::/payments/:id/confirm - Content check if value for 'connector' matches 'globalpay'", function () { pm.expect(jsonData.connector).to.eql("globalpay"); }, ); }
728
7,808
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario15-Bank Redirect-Ideal/Payments - Confirm/response.json
.json
[]
1
7,809
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Retrieve/request.json
.json
{ "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" }
175
7,810
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Retrieve/event.test.js
.js
// 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"); }, ); }
499
7,811
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Retrieve/response.json
.json
[]
1
7,812
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Create/request.json
.json
{ "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": 6540, "currency": "USD", "confirm": false, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6540, "customer_id": "StripeCustomer", "email": "guest@example.com", "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": "PiX" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } } }, "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" }
613
7,813
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Create/event.test.js
.js
// 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"); }, ); }
495
7,814
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Create/response.json
.json
[]
1
7,815
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Confirm/request.json
.json
{ "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": { "client_secret": "{{client_secret}}", "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" } } } }, "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" }
432
7,816
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Confirm/event.test.js
.js
// 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.", ); } // 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"); }, ); }
512
7,817
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Confirm/response.json
.json
[]
1
7,818
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario18-Wallet-Paypal/Payments - Retrieve/request.json
.json
{ "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" }
175
7,819
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario18-Wallet-Paypal/Payments - Retrieve/event.test.js
.js
// 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"); }, ); }
502
7,820
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario18-Wallet-Paypal/Payments - Retrieve/response.json
.json
[]
1
7,821
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario18-Wallet-Paypal/Payments - Retrieve/event.prerequest.js
.js
setTimeout(function () {}, 300);
9
7,822
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario18-Wallet-Paypal/Payments - Create/request.json
.json
{ "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": 1000, "currency": "EUR", "confirm": false, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 1000, "customer_id": "StripeCustomer", "email": "abcdef123@gmail.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "authentication_type": "three_ds", "return_url": "https://duck.com", "billing": { "address": { "first_name": "John", "last_name": "Doe", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "DE" } }, "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": "127.0.0.1" }, "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" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } } }, "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" }
816
7,823
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario18-Wallet-Paypal/Payments - Create/event.test.js
.js
// 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"); }, ); }
495
7,824
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario18-Wallet-Paypal/Payments - Create/response.json
.json
[]
1
7,825
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario18-Wallet-Paypal/Payments - Confirm/request.json
.json
{ "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": { "client_secret": "{{client_secret}}", "payment_method": "bank_redirect", "payment_method_type": "giropay", "payment_method_data": { "bank_redirect": { "giropay": { "billing_details": { "billing_name": "John Doe" }, "bank_name": "", "preferred_language": "en", "country": "DE" } } } } }, "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" }
426
7,826
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario18-Wallet-Paypal/Payments - Confirm/event.test.js
.js
// 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.", ); } // Response body should have value "requires_customer_action" for "status" if (jsonData?.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"); }, ); } // Response body should have "next_action.redirect_to_url" pm.test( "[POST]::/payments - Content check if 'next_action.redirect_to_url' exists", function () { pm.expect(typeof jsonData.next_action.redirect_to_url !== "undefined").to.be .true; }, ); // Response body should have value "giropay" for "payment_method_type" if (jsonData?.payment_method_type) { pm.test( "[POST]::/payments/:id/confirm - Content check if value for 'payment_method_type' matches 'giropay'", function () { pm.expect(jsonData.payment_method_type).to.eql("giropay"); }, ); } // Response body should have value "globalpay" for "connector" if (jsonData?.connector) { pm.test( "[POST]::/payments/:id/confirm - Content check if value for 'connector' matches 'globalpay'", function () { pm.expect(jsonData.connector).to.eql("globalpay"); }, ); }
734
7,827
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario18-Wallet-Paypal/Payments - Confirm/response.json
.json
[]
1
7,828
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario18-Bank Redirect-giropay/Payments - Retrieve/request.json
.json
{ "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" }
175
7,829
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario18-Bank Redirect-giropay/Payments - Retrieve/event.test.js
.js
// 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"); }, ); }
502
7,830
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario18-Bank Redirect-giropay/Payments - Retrieve/response.json
.json
[]
1
7,831
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario18-Bank Redirect-giropay/Payments - Retrieve/event.prerequest.js
.js
setTimeout(function () {}, 300);
9
7,832
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario18-Bank Redirect-giropay/Payments - Create/request.json
.json
{ "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": 1000, "currency": "EUR", "confirm": false, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 1000, "customer_id": "StripeCustomer", "email": "abcdef123@gmail.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "authentication_type": "three_ds", "return_url": "https://duck.com", "billing": { "address": { "first_name": "John", "last_name": "Doe", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "DE" } }, "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": "127.0.0.1" }, "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" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } } }, "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" }
816
7,833
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario18-Bank Redirect-giropay/Payments - Create/event.test.js
.js
// 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"); }, ); }
495
7,834
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario18-Bank Redirect-giropay/Payments - Create/response.json
.json
[]
1
7,835
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario18-Bank Redirect-giropay/Payments - Confirm/request.json
.json
{ "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": { "client_secret": "{{client_secret}}", "payment_method": "bank_redirect", "payment_method_type": "giropay", "payment_method_data": { "bank_redirect": { "giropay": { "billing_details": { "billing_name": "John Doe" }, "bank_name": "", "preferred_language": "en", "country": "DE" } } } } }, "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" }
426
7,836
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario18-Bank Redirect-giropay/Payments - Confirm/event.test.js
.js
// 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.", ); } // Response body should have value "requires_customer_action" for "status" if (jsonData?.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"); }, ); } // Response body should have "next_action.redirect_to_url" pm.test( "[POST]::/payments - Content check if 'next_action.redirect_to_url' exists", function () { pm.expect(typeof jsonData.next_action.redirect_to_url !== "undefined").to.be .true; }, ); // Response body should have value "giropay" for "payment_method_type" if (jsonData?.payment_method_type) { pm.test( "[POST]::/payments/:id/confirm - Content check if value for 'payment_method_type' matches 'giropay'", function () { pm.expect(jsonData.payment_method_type).to.eql("giropay"); }, ); } // Response body should have value "globalpay" for "connector" if (jsonData?.connector) { pm.test( "[POST]::/payments/:id/confirm - Content check if value for 'connector' matches 'globalpay'", function () { pm.expect(jsonData.connector).to.eql("globalpay"); }, ); }
734
7,837
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario18-Bank Redirect-giropay/Payments - Confirm/response.json
.json
[]
1
7,838
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Retrieve/request.json
.json
{ "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" }
175
7,839
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Retrieve/event.test.js
.js
// 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"); }, ); }
499
7,840
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Retrieve/response.json
.json
[]
1
7,841
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Create/request.json
.json
{ "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": 6540, "currency": "USD", "confirm": false, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6540, "customer_id": "StripeCustomer", "email": "guest@example.com", "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", "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" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } } }, "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" }
703
7,842
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Create/event.test.js
.js
// 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"); }, ); }
492
7,843
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Create/response.json
.json
[]
1
7,844
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Confirm/request.json
.json
{ "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": { "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" }
341
7,845
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Confirm/event.test.js
.js
// 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.", ); } // 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"); }, ); }
513
7,846
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Confirm/response.json
.json
[]
1
7,847
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario10-Partial refund/Refunds - Create-copy/request.json
.json
{ "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_id": "{{payment_id}}", "amount": 1000, "reason": "Customer returned product", "refund_type": "instant", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } } }, "url": { "raw": "{{baseUrl}}/refunds", "host": ["{{baseUrl}}"], "path": ["refunds"] }, "description": "To create a refund against an already processed payment" }
238
7,848
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario10-Partial refund/Refunds - Create-copy/event.test.js
.js
// Validate status 2xx pm.test("[POST]::/refunds - Status code is 2xx", function () { pm.response.to.be.success; }); // Validate if response header has matching content-type pm.test("[POST]::/refunds - 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) {} // pm.collectionVariables - Set refund_id as variable for jsonData.payment_id if (jsonData?.refund_id) { pm.collectionVariables.set("refund_id", jsonData.refund_id); console.log( "- use {{refund_id}} as collection variable for value", jsonData.refund_id, ); } else { console.log( "INFO - Unable to assign variable {{refund_id}}, as jsonData.refund_id is undefined.", ); } // Response body should have value "succeeded" for "status" if (jsonData?.status) { pm.test( "[POST]::/refunds - Content check if value for 'status' matches 'succeeded'", function () { pm.expect(jsonData.status).to.eql("succeeded"); }, ); } // Response body should have value "1000" for "amount" if (jsonData?.status) { pm.test( "[POST]::/refunds - Content check if value for 'amount' matches '1000'", function () { pm.expect(jsonData.amount).to.eql(1000); }, ); }
349
7,849
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario10-Partial refund/Refunds - Create-copy/response.json
.json
[]
1
7,850
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario10-Partial refund/Refunds - Create/request.json
.json
{ "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_id": "{{payment_id}}", "amount": 540, "reason": "Customer returned product", "refund_type": "instant", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } } }, "url": { "raw": "{{baseUrl}}/refunds", "host": ["{{baseUrl}}"], "path": ["refunds"] }, "description": "To create a refund against an already processed payment" }
237
7,851
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario10-Partial refund/Refunds - Create/event.test.js
.js
// Validate status 2xx pm.test("[POST]::/refunds - Status code is 2xx", function () { pm.response.to.be.success; }); // Validate if response header has matching content-type pm.test("[POST]::/refunds - 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) {} // pm.collectionVariables - Set refund_id as variable for jsonData.payment_id if (jsonData?.refund_id) { pm.collectionVariables.set("refund_id", jsonData.refund_id); console.log( "- use {{refund_id}} as collection variable for value", jsonData.refund_id, ); } else { console.log( "INFO - Unable to assign variable {{refund_id}}, as jsonData.refund_id is undefined.", ); } // Response body should have value "succeeded" for "status" if (jsonData?.status) { pm.test( "[POST]::/refunds - Content check if value for 'status' matches 'succeeded'", function () { pm.expect(jsonData.status).to.eql("succeeded"); }, ); } // Response body should have value "540" for "amount" if (jsonData?.status) { pm.test( "[POST]::/refunds - Content check if value for 'amount' matches '540'", function () { pm.expect(jsonData.amount).to.eql(540); }, ); }
346
7,852
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario10-Partial refund/Refunds - Create/response.json
.json
[]
1
7,853
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario10-Partial refund/Refunds - Retrieve/request.json
.json
{ "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": { "raw": "{{baseUrl}}/refunds/:id", "host": ["{{baseUrl}}"], "path": ["refunds", ":id"], "variable": [ { "key": "id", "value": "{{refund_id}}", "description": "(Required) unique refund id" } ] }, "description": "To retrieve the properties of a Refund. This may be used to get the status of a previously initiated payment or next action for an ongoing payment" }
148
7,854
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario10-Partial refund/Refunds - Retrieve/event.test.js
.js
// Validate status 2xx pm.test("[GET]::/refunds/:id - Status code is 2xx", function () { pm.response.to.be.success; }); // Validate if response header has matching content-type pm.test("[GET]::/refunds/: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) {} // pm.collectionVariables - Set refund_id as variable for jsonData.payment_id if (jsonData?.refund_id) { pm.collectionVariables.set("refund_id", jsonData.refund_id); console.log( "- use {{refund_id}} as collection variable for value", jsonData.refund_id, ); } else { console.log( "INFO - Unable to assign variable {{refund_id}}, as jsonData.refund_id is undefined.", ); } // Response body should have value "succeeded" for "status" if (jsonData?.status) { pm.test( "[POST]::/refunds - Content check if value for 'status' matches 'succeeded'", function () { pm.expect(jsonData.status).to.eql("succeeded"); }, ); } // Response body should have value "6540" for "amount" if (jsonData?.status) { pm.test( "[POST]::/refunds - Content check if value for 'amount' matches '540'", function () { pm.expect(jsonData.amount).to.eql(540); }, ); }
351
7,855
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario10-Partial refund/Refunds - Retrieve/response.json
.json
[]
1
7,856
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario10-Partial refund/Payments - Retrieve/request.json
.json
{ "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" }
175
7,857
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario10-Partial refund/Payments - Retrieve/event.test.js
.js
// 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"); }, ); }
500
7,858
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario10-Partial refund/Payments - Retrieve/response.json
.json
[]
1
7,859
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario10-Partial refund/Payments - Retrieve-copy/request.json
.json
{ "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" }
175
7,860
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario10-Partial refund/Payments - Retrieve-copy/event.test.js
.js
// 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"); }, ); } // Response body should have "refunds" pm.test("[POST]::/payments - Content check if 'refunds' exists", function () { pm.expect(typeof jsonData.refunds !== "undefined").to.be.true; });
546
7,861
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario10-Partial refund/Payments - Retrieve-copy/response.json
.json
[]
1
7,862
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario10-Partial refund/Payments - Create/request.json
.json
{ "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": 6540, "currency": "USD", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6540, "customer_id": "StripeCustomer", "email": "guest@example.com", "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", "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" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } } }, "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" }
703
7,863
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario10-Partial refund/Payments - Create/event.test.js
.js
// 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"); }, ); }
492
7,864
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario10-Partial refund/Payments - Create/response.json
.json
[]
1
7,865
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario10-Partial refund/Refunds - Retrieve-copy/request.json
.json
{ "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": { "raw": "{{baseUrl}}/refunds/:id", "host": ["{{baseUrl}}"], "path": ["refunds", ":id"], "variable": [ { "key": "id", "value": "{{refund_id}}", "description": "(Required) unique refund id" } ] }, "description": "To retrieve the properties of a Refund. This may be used to get the status of a previously initiated payment or next action for an ongoing payment" }
148
7,866
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario10-Partial refund/Refunds - Retrieve-copy/event.test.js
.js
// Validate status 2xx pm.test("[GET]::/refunds/:id - Status code is 2xx", function () { pm.response.to.be.success; }); // Validate if response header has matching content-type pm.test("[GET]::/refunds/: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) {} // pm.collectionVariables - Set refund_id as variable for jsonData.payment_id if (jsonData?.refund_id) { pm.collectionVariables.set("refund_id", jsonData.refund_id); console.log( "- use {{refund_id}} as collection variable for value", jsonData.refund_id, ); } else { console.log( "INFO - Unable to assign variable {{refund_id}}, as jsonData.refund_id is undefined.", ); } // Response body should have value "succeeded" for "status" if (jsonData?.status) { pm.test( "[POST]::/refunds - Content check if value for 'status' matches 'succeeded'", function () { pm.expect(jsonData.status).to.eql("succeeded"); }, ); } // Response body should have value "6540" for "amount" if (jsonData?.status) { pm.test( "[POST]::/refunds - Content check if value for 'amount' matches '1000'", function () { pm.expect(jsonData.amount).to.eql(1000); }, ); }
353
7,867
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario10-Partial refund/Refunds - Retrieve-copy/response.json
.json
[]
1
7,868
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario17-Bank Redirect-eps/Payments - Retrieve/request.json
.json
{ "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" }
175
7,869
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario17-Bank Redirect-eps/Payments - Retrieve/event.test.js
.js
// 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"); }, ); }
502
7,870
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario17-Bank Redirect-eps/Payments - Retrieve/response.json
.json
[]
1
7,871
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario17-Bank Redirect-eps/Payments - Retrieve/event.prerequest.js
.js
setTimeout(function () {}, 300);
9
7,872
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario17-Bank Redirect-eps/Payments - Create/request.json
.json
{ "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": 1000, "currency": "EUR", "confirm": false, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 1000, "customer_id": "StripeCustomer", "email": "abcdef123@gmail.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "authentication_type": "three_ds", "return_url": "https://duck.com", "billing": { "address": { "first_name": "John", "last_name": "Doe", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "AT" } }, "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": "127.0.0.1" }, "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" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } } }, "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" }
816
7,873
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario17-Bank Redirect-eps/Payments - Create/event.test.js
.js
// 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"); }, ); }
495
7,874
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario17-Bank Redirect-eps/Payments - Create/response.json
.json
[]
1
7,875
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario17-Bank Redirect-eps/Payments - Confirm/request.json
.json
{ "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": { "client_secret": "{{client_secret}}", "payment_method": "bank_redirect", "payment_method_type": "eps", "payment_method_data": { "bank_redirect": { "eps": { "billing_details": { "billing_name": "John Doe" }, "bank_name": "bankhaus_schelhammer_und_schattera_ag", "preferred_language": "en", "country": "AT" } } } } }, "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" }
436
7,876
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario17-Bank Redirect-eps/Payments - Confirm/event.test.js
.js
// 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.", ); } // Response body should have value "requires_customer_action" for "status" if (jsonData?.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"); }, ); } // Response body should have "next_action.redirect_to_url" pm.test( "[POST]::/payments - Content check if 'next_action.redirect_to_url' exists", function () { pm.expect(typeof jsonData.next_action.redirect_to_url !== "undefined").to.be .true; }, ); // Response body should have value "eps" for "payment_method_type" if (jsonData?.payment_method_type) { pm.test( "[POST]::/payments/:id/confirm - Content check if value for 'payment_method_type' matches 'eps'", function () { pm.expect(jsonData.payment_method_type).to.eql("eps"); }, ); } // Response body should have value "stripe" for "connector" if (jsonData?.connector) { pm.test( "[POST]::/payments/:id/confirm - Content check if value for 'connector' matches 'globalpay'", function () { pm.expect(jsonData.connector).to.eql("globalpay"); }, ); }
727
7,877
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario17-Bank Redirect-eps/Payments - Confirm/response.json
.json
[]
1
7,878
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Retrieve/request.json
.json
{ "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" }
175
7,879
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Retrieve/event.test.js
.js
// 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"); }, ); }
497
7,880
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Retrieve/response.json
.json
[]
1
7,881
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Create/request.json
.json
{ "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": 6540, "currency": "USD", "confirm": true, "capture_method": "manual", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6540, "customer_id": "StripeCustomer", "email": "guest@example.com", "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", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "joseph 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": "PiX" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } } }, "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" }
712
7,882
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Create/event.test.js
.js
// 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"); }, ); }
492
7,883
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Create/response.json
.json
[]
1
7,884
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Cancel/request.json
.json
{ "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" }
225
7,885
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Cancel/event.test.js
.js
// Validate status 2xx 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/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(); }); // 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 "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"); }, ); }
409
7,886
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Cancel/response.json
.json
[]
1
7,887
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario9-Refund full payment/Refunds - Create/request.json
.json
{ "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_id": "{{payment_id}}", "amount": 6540, "reason": "Customer returned product", "refund_type": "instant", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } } }, "url": { "raw": "{{baseUrl}}/refunds", "host": ["{{baseUrl}}"], "path": ["refunds"] }, "description": "To create a refund against an already processed payment" }
238
7,888
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario9-Refund full payment/Refunds - Create/event.test.js
.js
// Validate status 2xx pm.test("[POST]::/refunds - Status code is 2xx", function () { pm.response.to.be.success; }); // Validate if response header has matching content-type pm.test("[POST]::/refunds - 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) {} // pm.collectionVariables - Set refund_id as variable for jsonData.payment_id if (jsonData?.refund_id) { pm.collectionVariables.set("refund_id", jsonData.refund_id); console.log( "- use {{refund_id}} as collection variable for value", jsonData.refund_id, ); } else { console.log( "INFO - Unable to assign variable {{refund_id}}, as jsonData.refund_id is undefined.", ); } // Response body should have value "succeeded" for "status" if (jsonData?.status) { pm.test( "[POST]::/refunds - Content check if value for 'status' matches 'succeeded'", function () { pm.expect(jsonData.status).to.eql("succeeded"); }, ); } // Response body should have value "6540" for "amount" if (jsonData?.status) { pm.test( "[POST]::/refunds - Content check if value for 'amount' matches '6540'", function () { pm.expect(jsonData.amount).to.eql(6540); }, ); }
349
7,889
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario9-Refund full payment/Refunds - Create/response.json
.json
[]
1
7,890
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario9-Refund full payment/Refunds - Retrieve/request.json
.json
{ "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": { "raw": "{{baseUrl}}/refunds/:id", "host": ["{{baseUrl}}"], "path": ["refunds", ":id"], "variable": [ { "key": "id", "value": "{{refund_id}}", "description": "(Required) unique refund id" } ] }, "description": "To retrieve the properties of a Refund. This may be used to get the status of a previously initiated payment or next action for an ongoing payment" }
148
7,891
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario9-Refund full payment/Refunds - Retrieve/event.test.js
.js
// Validate status 2xx pm.test("[GET]::/refunds/:id - Status code is 2xx", function () { pm.response.to.be.success; }); // Validate if response header has matching content-type pm.test("[GET]::/refunds/: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) {} // pm.collectionVariables - Set refund_id as variable for jsonData.payment_id if (jsonData?.refund_id) { pm.collectionVariables.set("refund_id", jsonData.refund_id); console.log( "- use {{refund_id}} as collection variable for value", jsonData.refund_id, ); } else { console.log( "INFO - Unable to assign variable {{refund_id}}, as jsonData.refund_id is undefined.", ); } // Response body should have value "succeeded" for "status" if (jsonData?.status) { pm.test( "[POST]::/refunds - Content check if value for 'status' matches 'succeeded'", function () { pm.expect(jsonData.status).to.eql("succeeded"); }, ); } // Response body should have value "6540" for "amount" if (jsonData?.status) { pm.test( "[POST]::/refunds - Content check if value for 'amount' matches '6540'", function () { pm.expect(jsonData.amount).to.eql(6540); }, ); }
353
7,892
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario9-Refund full payment/Refunds - Retrieve/response.json
.json
[]
1
7,893
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario9-Refund full payment/Payments - Retrieve/request.json
.json
{ "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" }
175
7,894
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario9-Refund full payment/Payments - Retrieve/event.test.js
.js
// 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"); }, ); }
500
7,895
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario9-Refund full payment/Payments - Retrieve/response.json
.json
[]
1
7,896
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario9-Refund full payment/Payments - Create/request.json
.json
{ "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": 6540, "currency": "USD", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6540, "customer_id": "StripeCustomer", "email": "guest@example.com", "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", "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" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } } }, "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" }
703
7,897
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario9-Refund full payment/Payments - Create/event.test.js
.js
// 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"); }, ); }
492
7,898
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario9-Refund full payment/Payments - Create/response.json
.json
[]
1
7,899
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Retrieve/request.json
.json
{ "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" }
175
7,900
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Retrieve/event.test.js
.js
// 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 - Content check if value for 'status' matches 'succeeded'", function () { pm.expect(jsonData.status).to.eql("succeeded"); }, ); }
498
7,901
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Retrieve/response.json
.json
[]
1
7,902
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Create/request.json
.json
{ "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": 6540, "currency": "USD", "confirm": true, "capture_method": "manual", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6540, "customer_id": "StripeCustomer", "email": "guest@example.com", "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", "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" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } } }, "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" }
703
7,903
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Create/event.test.js
.js
// 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"); }, ); }
492
7,904
hyperswitch
postman/collection-dir/globalpay/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Create/response.json
.json
[]
1
7,905