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/checkout/Flow Testcases/Happy Cases/Scenario9-Partial refund/Payments - Retrieve-copy/response.json
.json
[]
1
6,906
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario9-Partial refund/Payments - Retrieve-copy/event.prerequest.js
.js
setTimeout(function(){ console.log("Sleeping for 3 seconds before next request."); }, 3000);
24
6,907
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario9-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", "customer_id": "StripeCustomer", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+1", "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": "4005519200000004", "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" }
696
6,908
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario9-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 "processing" for "status" if (jsonData?.status) { pm.test( "[POST]::/payments - Content check if value for 'status' matches 'processing'", function () { pm.expect(jsonData.status).to.eql("processing"); }, ); } // Validate the connector pm.test("[POST]::/payments - connector", function () { pm.expect(jsonData.connector).to.eql("checkout"); }); // Response body should have value "6540" for "amount" if (jsonData?.amount) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount' matches '6540'", function () { pm.expect(jsonData.amount).to.eql(6540); }, ); } // Response body should have value "null" for "amount_received" if (jsonData?.amount_received) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount_received' matches 'null'", function () { pm.expect(jsonData.amount_received).to.eql(6540); }, ); } // Response body should have value "6540" for "amount_capturable" if (jsonData?.amount) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount_capturable' matches 'amount - 6540'", function () { pm.expect(jsonData.amount_capturable).to.eql(0); }, ); }
762
6,909
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario9-Partial refund/Payments - Create/response.json
.json
[]
1
6,910
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario9-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" }
155
6,911
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario9-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
6,912
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario9-Partial refund/Refunds - Retrieve-copy/response.json
.json
[]
1
6,913
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario13-Pass Invalid CVV for save card flow and verify failed payment/Save card 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": "{{customer_id}}", "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://google.com", "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "9123456789", "country_code": "+91" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "9123456789", "country_code": "+91" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "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" }
704
6,914
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario13-Pass Invalid CVV for save card flow and verify failed payment/Save card 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.'); }; if (jsonData?.customer_id) { pm.collectionVariables.set("customer_id", jsonData.customer_id); console.log("- use {{customer_id}} as collection variable for value",jsonData.customer_id); } else { console.log('INFO - Unable to assign variable {{customer_id}}, as jsonData.customer_id is undefined.'); };
456
6,915
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario13-Pass Invalid CVV for save card flow and verify failed payment/Save card payments - Create/response.json
.json
[]
1
6,916
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario13-Pass Invalid CVV for save card flow and verify failed payment/Save card 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_token": "{{payment_token}}", "card_cvc": "737" } }, "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" }
379
6,917
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario13-Pass Invalid CVV for save card flow and verify failed payment/Save card 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 "failed" for "status" if (jsonData?.status) { pm.test( "[POST]::/payments/:id/confirm - Content check if value for 'status' matches 'failed'", function () { pm.expect(jsonData.status).to.eql("failed"); }, ); } // Response body should have value "adyen" for "connector" if (jsonData?.connector) { pm.test( "[POST]::/payments/:id/confirm - Content check if value for 'connector' matches 'checkout'", function () { pm.expect(jsonData.connector).to.eql("checkout"); }, ); } // Response body should have value "24" for "error_code" if (jsonData?.error_code) { pm.test( "[POST]::/payments/:id/confirm - Content check if value for 'error_code' matches 'cvv_invalid'", function () { pm.expect(jsonData.error_code).to.eql("cvv_invalid"); }, ); } // Response body should have value "24" for "error_message" if (jsonData?.error_message) { pm.test( "[POST]::/payments/:id/confirm - Content check if value for 'error_message' matches 'cvv_invalid'", function () { pm.expect(jsonData.error_message).to.eql("cvv_invalid"); }, ); }
736
6,918
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario13-Pass Invalid CVV for save card flow and verify failed payment/Save card payments - Confirm/response.json
.json
[]
1
6,919
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario13-Pass Invalid CVV for save card flow and verify failed 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" }
182
6,920
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario13-Pass Invalid CVV for save card flow and verify failed 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 'failed'", function () { pm.expect(jsonData.status).to.eql("failed"); }, ); } // Validate the connector pm.test("[POST]::/payments - connector", function () { pm.expect(jsonData.connector).to.eql("checkout"); }); // Response body should have value "6540" for "amount" if (jsonData?.amount) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount' matches '6540'", function () { pm.expect(jsonData.amount).to.eql(6540); }, ); } // Response body should have value "6000" for "amount_received" if (jsonData?.amount_received) { pm.test( "[POST]::/payments:id/capture - Content check if value for 'amount_received' matches '6000'", function () { pm.expect(jsonData.amount_received).to.eql(6540); }, ); } // Response body should have value "6540" for "amount_capturable" if (jsonData?.amount) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount_capturable' matches 'amount - 540'", function () { pm.expect(jsonData.amount_capturable).to.eql(0); }, ); }
775
6,921
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario13-Pass Invalid CVV for save card flow and verify failed payment/Payments - Retrieve/response.json
.json
[]
1
6,922
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario13-Pass Invalid CVV for save card flow and verify failed payment/Payments - Retrieve/event.prerequest.js
.js
setTimeout(function(){ console.log("Sleeping for 3 seconds before next request."); }, 3000);
24
6,923
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario13-Pass Invalid CVV for save card flow and verify failed 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": "adyensavecard", "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://google.com", "setup_future_usage": "on_session", "customer_acceptance": { "acceptance_type": "online", "accepted_at": "2022-09-10T10:11:12Z", "online": { "ip_address": "123.32.25.123", "user_agent": "Mozilla/5.0 (Linux; Android 12; SM-S906N Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/80.0.3987.119 Mobile Safari/537.36" } }, "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "371449635398431", "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "card_cvc": "7373" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "9123456789", "country_code": "+91" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "9123456789", "country_code": "+91" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "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" }
971
6,924
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario13-Pass Invalid CVV for save card flow and verify failed 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.'); }; if (jsonData?.customer_id) { pm.collectionVariables.set("customer_id", jsonData.customer_id); console.log("- use {{customer_id}} as collection variable for value",jsonData.customer_id); } else { console.log('INFO - Unable to assign variable {{customer_id}}, as jsonData.customer_id is undefined.'); };
456
6,925
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario13-Pass Invalid CVV for save card flow and verify failed payment/Payments - Create/response.json
.json
[]
1
6,926
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario13-Pass Invalid CVV for save card flow and verify failed payment/Payments - Create/event.prerequest.js
.js
pm.environment.set("random_number", _.random(1000, 100000));
23
6,927
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario13-Pass Invalid CVV for save card flow and verify failed payment/List payment methods for a Customer/request.json
.json
{ "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": { "raw": "{{baseUrl}}/customers/:customer_id/payment_methods", "host": [ "{{baseUrl}}" ], "path": [ "customers", ":customer_id", "payment_methods" ], "query": [ { "key": "accepted_country", "value": "co", "disabled": true }, { "key": "accepted_country", "value": "pa", "disabled": true }, { "key": "accepted_currency", "value": "voluptate ea", "disabled": true }, { "key": "accepted_currency", "value": "exercitation", "disabled": true }, { "key": "minimum_amount", "value": "100", "disabled": true }, { "key": "maximum_amount", "value": "10000000", "disabled": true }, { "key": "recurring_payment_enabled", "value": "true", "disabled": true }, { "key": "installment_payment_enabled", "value": "true", "disabled": true } ], "variable": [ { "key": "customer_id", "value": "{{customer_id}}", "description": "//Pass the customer id" } ] }, "description": "To filter and list the applicable payment methods for a particular Customer ID" }
371
6,928
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario13-Pass Invalid CVV for save card flow and verify failed payment/List payment methods for a Customer/event.test.js
.js
// Validate status 2xx pm.test("[GET]::/payment_methods/:customer_id - Status code is 2xx", function () { pm.response.to.be.success; }); // Validate if response header has matching content-type pm.test("[GET]::/payment_methods/:customer_id - Content-Type is application/json", function () { pm.expect(pm.response.headers.get("Content-Type")).to.include("application/json"); }); // Set response object as internal variable let jsonData = {}; try {jsonData = pm.response.json();}catch(e){} if (jsonData?.customer_payment_methods[0]?.payment_token) { pm.collectionVariables.set("payment_token", jsonData.customer_payment_methods[0].payment_token); console.log("- use {{payment_token}} as collection variable for value", jsonData.customer_payment_methods[0].payment_token); } else { console.log('INFO - Unable to assign variable {{payment_token}}, as jsonData.customer_payment_methods[0].payment_token is undefined.'); }
202
6,929
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario13-Pass Invalid CVV for save card flow and verify failed payment/List payment methods for a Customer/response.json
.json
[]
1
6,930
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario11-Save card flow/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" }
155
6,931
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario11-Save card flow/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 '540'", function () { pm.expect(jsonData.amount).to.eql(540); }, ); }
351
6,932
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario11-Save card flow/Refunds - Retrieve Copy/response.json
.json
[]
1
6,933
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario11-Save card flow/Save card 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": "{{customer_id}}", "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://google.com", "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "9123456789", "country_code": "+91" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "9123456789", "country_code": "+91" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "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" }
704
6,934
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario11-Save card flow/Save card 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.'); }; if (jsonData?.customer_id) { pm.collectionVariables.set("customer_id", jsonData.customer_id); console.log("- use {{customer_id}} as collection variable for value",jsonData.customer_id); } else { console.log('INFO - Unable to assign variable {{customer_id}}, as jsonData.customer_id is undefined.'); };
456
6,935
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario11-Save card flow/Save card payments - Create/response.json
.json
[]
1
6,936
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario11-Save card flow/Save card 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_token": "{{payment_token}}", "card_cvc": "7373" } }, "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" }
380
6,937
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario11-Save card flow/Save card 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 "processing" for "status" if (jsonData?.status) { pm.test( "[POST]::/payments/:id/confirm - Content check if value for 'status' matches 'processing'", function () { pm.expect(jsonData.status).to.eql("processing"); }, ); } // Response body should have value "checkout" for "connector" if (jsonData?.connector) { pm.test( "[POST]::/payments/:id/confirm - Content check if value for 'connector' matches 'checkout'", function () { pm.expect(jsonData.connector).to.eql("checkout"); }, ); }
579
6,938
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario11-Save card flow/Save card payments - Confirm/response.json
.json
[]
1
6,939
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario11-Save card flow/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" }
182
6,940
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario11-Save card flow/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"); }, ); } // Validate the connector pm.test("[POST]::/payments - connector", function () { pm.expect(jsonData.connector).to.eql("checkout"); }); // Response body should have value "6540" for "amount" if (jsonData?.amount) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount' matches '6540'", function () { pm.expect(jsonData.amount).to.eql(6540); }, ); } // Response body should have value "6000" for "amount_received" if (jsonData?.amount_received) { pm.test( "[POST]::/payments:id/capture - Content check if value for 'amount_received' matches '6000'", function () { pm.expect(jsonData.amount_received).to.eql(6540); }, ); } // Response body should have value "6540" for "amount_capturable" if (jsonData?.amount) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount_capturable' matches 'amount - 540'", function () { pm.expect(jsonData.amount_capturable).to.eql(0); }, ); }
777
6,941
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario11-Save card flow/Payments - Retrieve/response.json
.json
[]
1
6,942
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario11-Save card flow/Payments - Retrieve/event.prerequest.js
.js
setTimeout(function(){ console.log("Sleeping for 3 seconds before next request."); }, 3000);
24
6,943
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario11-Save card flow/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" }
182
6,944
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario11-Save card flow/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"); }, ); } // Validate the connector pm.test("[POST]::/payments - connector", function () { pm.expect(jsonData.connector).to.eql("checkout"); }); // Response body should have value "6540" for "amount" if (jsonData?.amount) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount' matches '6540'", function () { pm.expect(jsonData.amount).to.eql(6540); }, ); } // Response body should have value "6000" for "amount_received" if (jsonData?.amount_received) { pm.test( "[POST]::/payments:id/capture - Content check if value for 'amount_received' matches '6000'", function () { pm.expect(jsonData.amount_received).to.eql(6540); }, ); } // Response body should have value "6540" for "amount_capturable" if (jsonData?.amount) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount_capturable' matches 'amount - 540'", function () { pm.expect(jsonData.amount_capturable).to.eql(0); }, ); }
777
6,945
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario11-Save card flow/Payments - Retrieve-copy/response.json
.json
[]
1
6,946
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario11-Save card flow/Payments - Retrieve-copy/event.prerequest.js
.js
setTimeout(function(){ console.log("Sleeping for 3 seconds before next request."); }, 3000);
24
6,947
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario11-Save card flow/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": "adyensavecard", "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://google.com", "setup_future_usage": "on_session", "customer_acceptance": { "acceptance_type": "online", "accepted_at": "2022-09-10T10:11:12Z", "online": { "ip_address": "123.32.25.123", "user_agent": "Mozilla/5.0 (Linux; Android 12; SM-S906N Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/80.0.3987.119 Mobile Safari/537.36" } }, "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "371449635398431", "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "card_cvc": "7373" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "9123456789", "country_code": "+91" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "9123456789", "country_code": "+91" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "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" }
971
6,948
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario11-Save card flow/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.'); }; if (jsonData?.customer_id) { pm.collectionVariables.set("customer_id", jsonData.customer_id); console.log("- use {{customer_id}} as collection variable for value",jsonData.customer_id); } else { console.log('INFO - Unable to assign variable {{customer_id}}, as jsonData.customer_id is undefined.'); }; // Response body should have value "processing" for "status" if (jsonData?.status) { pm.test( "[POST]::/payments - Content check if value for 'status' matches 'processing'", function () { pm.expect(jsonData.status).to.eql("processing"); }, ); }
521
6,949
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario11-Save card flow/Payments - Create/response.json
.json
[]
1
6,950
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario11-Save card flow/Payments - Create/event.prerequest.js
.js
pm.environment.set("random_number", _.random(1000, 100000));
23
6,951
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario11-Save card flow/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": 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" }
243
6,952
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario11-Save card flow/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 "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); }, ); } // Validate the connector pm.test("[POST]::/payments - connector", function () { pm.expect(jsonData.connector).to.eql("checkout"); });
378
6,953
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario11-Save card flow/Refunds - Create Copy/response.json
.json
[]
1
6,954
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario11-Save card flow/Refunds - Create Copy/event.prerequest.js
.js
setTimeout(function(){ console.log("Sleeping for 3 seconds before next request."); }, 3000);
24
6,955
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario11-Save card flow/List payment methods for a Customer/request.json
.json
{ "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": { "raw": "{{baseUrl}}/customers/:customer_id/payment_methods", "host": [ "{{baseUrl}}" ], "path": [ "customers", ":customer_id", "payment_methods" ], "query": [ { "key": "accepted_country", "value": "co", "disabled": true }, { "key": "accepted_country", "value": "pa", "disabled": true }, { "key": "accepted_currency", "value": "voluptate ea", "disabled": true }, { "key": "accepted_currency", "value": "exercitation", "disabled": true }, { "key": "minimum_amount", "value": "100", "disabled": true }, { "key": "maximum_amount", "value": "10000000", "disabled": true }, { "key": "recurring_payment_enabled", "value": "true", "disabled": true }, { "key": "installment_payment_enabled", "value": "true", "disabled": true } ], "variable": [ { "key": "customer_id", "value": "{{customer_id}}", "description": "//Pass the customer id" } ] }, "description": "To filter and list the applicable payment methods for a particular Customer ID" }
371
6,956
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario11-Save card flow/List payment methods for a Customer/event.test.js
.js
// Validate status 2xx pm.test("[GET]::/payment_methods/:customer_id - Status code is 2xx", function () { pm.response.to.be.success; }); // Validate if response header has matching content-type pm.test("[GET]::/payment_methods/:customer_id - Content-Type is application/json", function () { pm.expect(pm.response.headers.get("Content-Type")).to.include("application/json"); }); // Set response object as internal variable let jsonData = {}; try {jsonData = pm.response.json();}catch(e){} if (jsonData?.customer_payment_methods[0]?.payment_token) { pm.collectionVariables.set("payment_token", jsonData.customer_payment_methods[0].payment_token); console.log("- use {{payment_token}} as collection variable for value", jsonData.customer_payment_methods[0].payment_token); } else { console.log('INFO - Unable to assign variable {{payment_token}}, as jsonData.customer_payment_methods[0].payment_token is undefined.'); }
202
6,957
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario11-Save card flow/List payment methods for a Customer/response.json
.json
[]
1
6,958
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario6-Create Partial Capture 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" }
182
6,959
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario6-Create Partial Capture 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 - Content check if value for 'status' matches 'partially_captured'", function () { pm.expect(jsonData.status).to.eql("partially_captured"); }, ); } // Validate the connector pm.test("[POST]::/payments - connector", function () { pm.expect(jsonData.connector).to.eql("checkout"); }); // Response body should have value "6540" for "amount" if (jsonData?.amount) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount' matches '6540'", function () { pm.expect(jsonData.amount).to.eql(6540); }, ); } // Response body should have value "6000" for "amount_received" if (jsonData?.amount_received) { pm.test( "[POST]::/payments:id/capture - Content check if value for 'amount_received' matches '6000'", function () { pm.expect(jsonData.amount_received).to.eql(6000); }, ); } // Response body should have value "6540" for "amount_capturable" if (jsonData?.amount_capturable) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount_capturable' matches 'amount - 540'", function () { pm.expect(jsonData.amount_capturable).to.eql(540); }, ); }
784
6,960
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario6-Create Partial Capture payment/Payments - Retrieve/response.json
.json
[]
1
6,961
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario6-Create Partial Capture payment/Payments - Retrieve/event.prerequest.js
.js
setTimeout(function(){ console.log("Sleeping for 3 seconds before next request."); }, 3000);
24
6,962
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario6-Create Partial Capture 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", "customer_id": "StripeCustomer", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+1", "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": "4005519200000004", "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" }
696
6,963
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario6-Create Partial Capture 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.", ); } // Validate the connector pm.test("[POST]::/payments - connector", function () { pm.expect(jsonData.connector).to.eql("checkout"); }); // 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"); }, ); } // Response body should have value "6540" for "amount" if (jsonData?.amount) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount' matches '6540'", function () { pm.expect(jsonData.amount).to.eql(6540); }, ); } // Response body should have value "null" for "amount_received" if (jsonData?.amount) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount_received' matches 'null'", function () { pm.expect(jsonData.amount_received).to.eql(null); }, ); } // Response body should have value "6540" for "amount_capturable" if (jsonData?.amount_capturable) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount_capturable' matches 'amount - 6540'", function () { pm.expect(jsonData.amount_capturable).to.eql(6540); }, ); }
766
6,964
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario6-Create Partial Capture payment/Payments - Create/response.json
.json
[]
1
6,965
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario6-Create Partial Capture payment/Payments - Capture/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_to_capture": 6000, "statement_descriptor_name": "Joseph", "statement_descriptor_suffix": "JS" } }, "url": { "raw": "{{baseUrl}}/payments/:id/capture", "host": [ "{{baseUrl}}" ], "path": [ "payments", ":id", "capture" ], "variable": [ { "key": "id", "value": "{{payment_id}}", "description": "(Required) unique payment id" } ] }, "description": "To capture the funds for an uncaptured payment" }
233
6,966
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario6-Create Partial Capture payment/Payments - Capture/event.test.js
.js
// Validate status 2xx pm.test("[POST]::/payments/:id/capture - Status code is 2xx", function () { pm.response.to.be.success; }); // Validate if response header has matching content-type pm.test( "[POST]::/payments/:id/capture - Content-Type is application/json", function () { pm.expect(pm.response.headers.get("Content-Type")).to.include( "application/json", ); }, ); // Validate if response has JSON Body pm.test("[POST]::/payments/:id/capture - Response has JSON Body", function () { pm.response.to.have.jsonBody(); }); // Set response object as internal variable let jsonData = {}; try { jsonData = pm.response.json(); } catch (e) {} // pm.collectionVariables - Set payment_id as variable for jsonData.payment_id if (jsonData?.payment_id) { pm.collectionVariables.set("payment_id", jsonData.payment_id); console.log( "- use {{payment_id}} as collection variable for value", jsonData.payment_id, ); } else { console.log( "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.", ); } // pm.collectionVariables - Set 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/capture - Content check if value for 'status' matches 'partially_captured'", function () { pm.expect(jsonData.status).to.eql("partially_captured"); }, ); } // Validate the connector pm.test("[POST]::/payments - connector", function () { pm.expect(jsonData.connector).to.eql("checkout"); }); // Response body should have value "6540" for "amount" if (jsonData?.amount) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount' matches '6540'", function () { pm.expect(jsonData.amount).to.eql(6540); }, ); } // Response body should have value "6000" for "amount_received" if (jsonData?.amount_received) { pm.test( "[POST]::/payments:id/capture - Content check if value for 'amount_received' matches '6000'", function () { pm.expect(jsonData.amount_received).to.eql(6000); }, ); } // Response body should have value "6540" for "amount_capturable" if (jsonData?.amount_capturable) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount_capturable' matches 'amount - 540'", function () { pm.expect(jsonData.amount_capturable).to.eql(540); }, ); }
799
6,967
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario6-Create Partial Capture payment/Payments - Capture/response.json
.json
[]
1
6,968
hyperswitch
postman/collection-dir/checkout/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" }
182
6,969
hyperswitch
postman/collection-dir/checkout/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"); }, ); } // Validate the connector pm.test("[POST]::/payments - connector", function () { pm.expect(jsonData.connector).to.eql("checkout"); }); // Response body should have value "6540" for "amount" if (jsonData?.amount) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount' matches '6540'", function () { pm.expect(jsonData.amount).to.eql(6540); }, ); } // Response body should have value "null" for "amount_received" if (jsonData?.amount_received) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount_received' matches 'null'", function () { pm.expect(jsonData.amount_received).to.eql(6540); }, ); } // Response body should have value "6540" for "amount_capturable" if (jsonData?.amount) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount_capturable' matches 'amount - 0'", function () { pm.expect(jsonData.amount_capturable).to.eql(0); }, ); }
769
6,970
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Retrieve/response.json
.json
[]
1
6,971
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Retrieve/event.prerequest.js
.js
setTimeout(function(){ console.log("Sleeping for 3 seconds before next request."); }, 3000);
24
6,972
hyperswitch
postman/collection-dir/checkout/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", "customer_id": "StripeCustomer", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+1", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://google.com", "payment_method": "card", "payment_method_data": { "card": { "card_number": "4005519200000004", "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" }
696
6,973
hyperswitch
postman/collection-dir/checkout/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"); }, ); } // Response body should have value "6540" for "amount" if (jsonData?.amount) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount' matches '6540'", function () { pm.expect(jsonData.amount).to.eql(6540); }, ); } // Response body should have value "null" for "amount_received" if (jsonData?.amount) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount_received' matches 'null'", function () { pm.expect(jsonData.amount_received).to.eql(null); }, ); } // Response body should have value "6540" for "amount_capturable" if (jsonData?.amount_capturable) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount_capturable' matches 'amount - 6540'", function () { pm.expect(jsonData.amount_capturable).to.eql(6540); }, ); }
734
6,974
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Create/response.json
.json
[]
1
6,975
hyperswitch
postman/collection-dir/checkout/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 existing 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" }
349
6,976
hyperswitch
postman/collection-dir/checkout/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 "processing" for "status" if (jsonData?.status) { pm.test( "[POST]::/payments/:id/confirm - Content check if value for 'status' matches 'processing'", function () { pm.expect(jsonData.status).to.eql("processing"); }, ); } // Validate the connector pm.test("[POST]::/payments - connector", function () { pm.expect(jsonData.connector).to.eql("checkout"); }); // Response body should have value "6540" for "amount" if (jsonData?.amount) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount' matches '6540'", function () { pm.expect(jsonData.amount).to.eql(6540); }, ); } // Response body should have value "null" for "amount_received" if (jsonData?.amount_received) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount_received' matches 'null'", function () { pm.expect(jsonData.amount_received).to.eql(6540); }, ); } // Response body should have value "6540" for "amount_capturable" if (jsonData?.amount) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount_capturable' matches 'amount - 0'", function () { pm.expect(jsonData.amount_capturable).to.eql(0); }, ); }
780
6,977
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Confirm/response.json
.json
[]
1
6,978
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture 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" }
182
6,979
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture 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 - Content check if value for 'status' matches 'partially_captured'", function () { pm.expect(jsonData.status).to.eql("partially_captured"); }, ); } // Validate the connector pm.test("[POST]::/payments - connector", function () { pm.expect(jsonData.connector).to.eql("checkout"); }); // Response body should have value "6540" for "amount" if (jsonData?.amount) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount' matches '6540'", function () { pm.expect(jsonData.amount).to.eql(6540); }, ); } // Response body should have value "6000" for "amount_received" if (jsonData?.amount_received) { pm.test( "[POST]::/payments:id/capture - Content check if value for 'amount_received' matches '6000'", function () { pm.expect(jsonData.amount_received).to.eql(6000); }, ); } // Response body should have value "6540" for "amount_capturable" if (jsonData?.amount_capturable) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount_capturable' matches 'amount - 540'", function () { pm.expect(jsonData.amount_capturable).to.eql(540); }, ); }
784
6,980
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture with confirm false/Payments - Retrieve/response.json
.json
[]
1
6,981
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture with confirm false/Payments - Retrieve/event.prerequest.js
.js
setTimeout(function(){ console.log("Sleeping for 3 seconds before next request."); }, 3000);
24
6,982
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture 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": "manual", "capture_on": "2022-09-10T10:11:12Z", "customer_id": "StripeCustomer", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+1", "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": "4005519200000004", "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" }
696
6,983
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture 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_capture'", function () { pm.expect(jsonData.status).to.eql("requires_confirmation"); }, ); } // Response body should have value "6540" for "amount" if (jsonData?.amount) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount' matches '6540'", function () { pm.expect(jsonData.amount).to.eql(6540); }, ); } // Response body should have value "null" for "amount_received" if (jsonData?.amount) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount_received' matches 'null'", function () { pm.expect(jsonData.amount_received).to.eql(null); }, ); } // Response body should have value "6540" for "amount_capturable" if (jsonData?.amount_capturable) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount_capturable' matches 'amount - 6540'", function () { pm.expect(jsonData.amount_capturable).to.eql(6540); }, ); }
734
6,984
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture with confirm false/Payments - Create/response.json
.json
[]
1
6,985
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture with confirm false/Payments - Capture/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_to_capture": 6000, "statement_descriptor_name": "Joseph", "statement_descriptor_suffix": "JS" } }, "url": { "raw": "{{baseUrl}}/payments/:id/capture", "host": [ "{{baseUrl}}" ], "path": [ "payments", ":id", "capture" ], "variable": [ { "key": "id", "value": "{{payment_id}}", "description": "(Required) unique payment id" } ] }, "description": "To capture the funds for an uncaptured payment" }
233
6,986
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture with confirm false/Payments - Capture/event.test.js
.js
// Validate status 2xx pm.test("[POST]::/payments/:id/capture - Status code is 2xx", function () { pm.response.to.be.success; }); // Validate if response header has matching content-type pm.test( "[POST]::/payments/:id/capture - Content-Type is application/json", function () { pm.expect(pm.response.headers.get("Content-Type")).to.include( "application/json", ); }, ); // Validate if response has JSON Body pm.test("[POST]::/payments/:id/capture - Response has JSON Body", function () { pm.response.to.have.jsonBody(); }); // Set response object as internal variable let jsonData = {}; try { jsonData = pm.response.json(); } catch (e) {} // pm.collectionVariables - Set payment_id as variable for jsonData.payment_id if (jsonData?.payment_id) { pm.collectionVariables.set("payment_id", jsonData.payment_id); console.log( "- use {{payment_id}} as collection variable for value", jsonData.payment_id, ); } else { console.log( "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.", ); } // pm.collectionVariables - Set 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/capture - Content check if value for 'status' matches 'partially_captured'", function () { pm.expect(jsonData.status).to.eql("partially_captured"); }, ); } // Validate the connector pm.test("[POST]::/payments - connector", function () { pm.expect(jsonData.connector).to.eql("checkout"); }); // Response body should have value "6540" for "amount" if (jsonData?.amount) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount' matches '6540'", function () { pm.expect(jsonData.amount).to.eql(6540); }, ); } // Response body should have value "6000" for "amount_received" if (jsonData?.amount_received) { pm.test( "[POST]::/payments:id/capture - Content check if value for 'amount_received' matches '6000'", function () { pm.expect(jsonData.amount_received).to.eql(6000); }, ); } // Response body should have value "6540" for "amount_capturable" if (jsonData?.amount_capturable) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount_capturable' matches 'amount - 540'", function () { pm.expect(jsonData.amount_capturable).to.eql(540); }, ); }
799
6,987
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture with confirm false/Payments - Capture/response.json
.json
[]
1
6,988
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture 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": "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" }
363
6,989
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture 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.", ); } // Validate the connector pm.test("[POST]::/payments - connector", function () { pm.expect(jsonData.connector).to.eql("checkout"); }); // 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"); }, ); } // Response body should have value "6540" for "amount" if (jsonData?.amount) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount' matches '6540'", function () { pm.expect(jsonData.amount).to.eql(6540); }, ); } // Response body should have value "null" for "amount_received" if (jsonData?.amount_received) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount_received' matches 'null'", function () { pm.expect(jsonData.amount_received).to.eql(null); }, ); } // Response body should have value "6540" for "amount_capturable" if (jsonData?.amount) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount_capturable' matches 'amount - 0'", function () { pm.expect(jsonData.amount_capturable).to.eql(6540); }, ); }
778
6,990
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture with confirm false/Payments - Confirm/response.json
.json
[]
1
6,991
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario7-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" }
182
6,992
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario7-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
6,993
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario7-Void the payment/Payments - Retrieve/response.json
.json
[]
1
6,994
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario7-Void the payment/Payments - Retrieve/event.prerequest.js
.js
setTimeout(function(){ console.log("Sleeping for 3 seconds before next request."); }, 3000);
24
6,995
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario7-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", "customer_id": "StripeCustomer", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+1", "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": "4005519200000004", "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" }
696
6,996
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario7-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.", ); } // Validate the connector pm.test("[POST]::/payments - connector", function () { pm.expect(jsonData.connector).to.eql("checkout"); }); // 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"); }, ); } // Response body should have value "6540" for "amount" if (jsonData?.amount) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount' matches '6540'", function () { pm.expect(jsonData.amount).to.eql(6540); }, ); } // Response body should have value "null" for "amount_received" if (jsonData?.amount) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount_received' matches 'null'", function () { pm.expect(jsonData.amount_received).to.eql(null); }, ); } // Response body should have value "6540" for "amount_capturable" if (jsonData?.amount_capturable) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount_capturable' matches 'amount - 6540'", function () { pm.expect(jsonData.amount_capturable).to.eql(6540); }, ); }
766
6,997
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario7-Void the payment/Payments - Create/response.json
.json
[]
1
6,998
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario7-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" }
233
6,999
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario7-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,000
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario7-Void the payment/Payments - Cancel/response.json
.json
[]
1
7,001
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario5-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" }
182
7,002
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario5-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"); }, ); } // Validate the connector pm.test("[POST]::/payments - connector", function () { pm.expect(jsonData.connector).to.eql("checkout"); }); // Response body should have value "6540" for "amount" if (jsonData?.amount) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount' matches '6540'", function () { pm.expect(jsonData.amount).to.eql(6540); }, ); } // Response body should have value "6000" for "amount_received" if (jsonData?.amount_received) { pm.test( "[POST]::/payments:id/capture - Content check if value for 'amount_received' matches '6000'", function () { pm.expect(jsonData.amount_received).to.eql(6540); }, ); } // Response body should have value "6540" for "amount_capturable" if (jsonData?.amount_capturable) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount_capturable' matches 'amount - 540'", function () { pm.expect(jsonData.amount_capturable).to.eql(0); }, ); }
778
7,003
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario5-Create payment with Manual capture/Payments - Retrieve/response.json
.json
[]
1
7,004
hyperswitch
postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario5-Create payment with Manual capture/Payments - Retrieve/event.prerequest.js
.js
setTimeout(function(){ console.log("Sleeping for 3 seconds before next request."); }, 3000);
24
7,005