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/bluesnap/Flow Testcases/Happy Cases/Scenario9-Partial refund/Payments - Create/response.json
.json
[]
1
2,806
hyperswitch
postman/collection-dir/bluesnap/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" }
148
2,807
hyperswitch
postman/collection-dir/bluesnap/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
2,808
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario9-Partial refund/Refunds - Retrieve-copy/response.json
.json
[]
1
2,809
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario10-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
2,810
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario10-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
2,811
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario10-Save card flow/Refunds - Retrieve Copy/response.json
.json
[]
1
2,812
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario10-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
2,813
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario10-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
2,814
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario10-Save card flow/Save card payments - Create/response.json
.json
[]
1
2,815
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario10-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
2,816
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario10-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 "succeeded" for "status" if (jsonData?.status) { pm.test( "[POST]::/payments/:id/confirm - Content check if value for 'status' matches 'succeeded'", function () { pm.expect(jsonData.status).to.eql("succeeded"); }, ); } // Response body should have value "bluesnap" for "connector" if (jsonData?.connector) { pm.test( "[POST]::/payments/:id/confirm - Content check if value for 'connector' matches 'bluesnap'", function () { pm.expect(jsonData.connector).to.eql("bluesnap"); }, ); }
588
2,817
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario10-Save card flow/Save card payments - Confirm/response.json
.json
[]
1
2,818
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario10-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
2,819
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario10-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("bluesnap"); }); // 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); }, ); }
779
2,820
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario10-Save card flow/Payments - Retrieve/response.json
.json
[]
1
2,821
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario10-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
2,822
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario10-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("bluesnap"); }); // 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); }, ); }
779
2,823
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario10-Save card flow/Payments - Retrieve-copy/response.json
.json
[]
1
2,824
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario10-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": "bluesnapsavecard_{{random_number}}", "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" }
978
2,825
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario10-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 "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"); }, ); }
524
2,826
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario10-Save card flow/Payments - Create/response.json
.json
[]
1
2,827
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario10-Save card flow/Payments - Create/event.prerequest.js
.js
pm.environment.set("random_number", _.random(1000, 100000));
23
2,828
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario10-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
2,829
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario10-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("bluesnap"); });
380
2,830
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario10-Save card flow/Refunds - Create Copy/response.json
.json
[]
1
2,831
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario10-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
2,832
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario10-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
2,833
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario10-Save card flow/List payment methods for a Customer/response.json
.json
[]
1
2,834
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario11-Pass Invalid CVV for save card flow and verify failed payment Copy/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
2,835
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario11-Pass Invalid CVV for save card flow and verify failed payment Copy/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
2,836
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario11-Pass Invalid CVV for save card flow and verify failed payment Copy/Save card payments - Create/response.json
.json
[]
1
2,837
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario11-Pass Invalid CVV for save card flow and verify failed payment Copy/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
2,838
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario11-Pass Invalid CVV for save card flow and verify failed payment Copy/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 'bluesnap'", function () { pm.expect(jsonData.connector).to.eql("bluesnap"); }, ); } // 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 '10001'", function () { pm.expect(jsonData.error_code).to.eql("10001"); }, ); } // 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 'Order creation failure due to problematic input. & There is a mismatch between the Credit Card American Express and Security Code. '", function () { pm.expect(jsonData.error_message).to.eql("Order creation failure due to problematic input. & There is a mismatch between the Credit Card American Express and Security Code. "); }, ); }
785
2,839
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario11-Pass Invalid CVV for save card flow and verify failed payment Copy/Save card payments - Confirm/response.json
.json
[]
1
2,840
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario11-Pass Invalid CVV for save card flow and verify failed payment Copy/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
2,841
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario11-Pass Invalid CVV for save card flow and verify failed payment Copy/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("bluesnap"); }); // 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
2,842
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario11-Pass Invalid CVV for save card flow and verify failed payment Copy/Payments - Retrieve/response.json
.json
[]
1
2,843
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario11-Pass Invalid CVV for save card flow and verify failed payment Copy/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
2,844
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario11-Pass Invalid CVV for save card flow and verify failed payment Copy/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
2,845
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario11-Pass Invalid CVV for save card flow and verify failed payment Copy/Payments - Create/response.json
.json
[]
1
2,846
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario11-Pass Invalid CVV for save card flow and verify failed payment Copy/Payments - Create/event.prerequest.js
.js
pm.environment.set("random_number", _.random(1000, 100000));
23
2,847
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario11-Pass Invalid CVV for save card flow and verify failed payment Copy/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
2,848
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario11-Pass Invalid CVV for save card flow and verify failed payment Copy/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
2,849
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario11-Pass Invalid CVV for save card flow and verify failed payment Copy/List payment methods for a Customer/response.json
.json
[]
1
2,850
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario13-Don't Pass CVV for save card flow and verify success payment Copy/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
2,851
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario13-Don't Pass CVV for save card flow and verify success payment Copy/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
2,852
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario13-Don't Pass CVV for save card flow and verify success payment Copy/Save card payments - Create/response.json
.json
[]
1
2,853
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario13-Don't Pass CVV for save card flow and verify success payment Copy/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}}" } }, "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" }
367
2,854
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario13-Don't Pass CVV for save card flow and verify success payment Copy/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 "succeeded" for "status" if (jsonData?.status) { pm.test( "[POST]::/payments/:id/confirm - Content check if value for 'status' matches 'succeeded'", function () { pm.expect(jsonData.status).to.eql("succeeded"); }, ); } // Response body should have value "adyen" for "connector" if (jsonData?.connector) { pm.test( "[POST]::/payments/:id/confirm - Content check if value for 'connector' matches 'bluesnap'", function () { pm.expect(jsonData.connector).to.eql("bluesnap"); }, ); }
587
2,855
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario13-Don't Pass CVV for save card flow and verify success payment Copy/Save card payments - Confirm/response.json
.json
[]
1
2,856
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario13-Don't Pass CVV for save card flow and verify success payment Copy/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
2,857
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario13-Don't Pass CVV for save card flow and verify success payment Copy/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("bluesnap"); }); // 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); }, ); }
779
2,858
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario13-Don't Pass CVV for save card flow and verify success payment Copy/Payments - Retrieve/response.json
.json
[]
1
2,859
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario13-Don't Pass CVV for save card flow and verify success payment Copy/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
2,860
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario13-Don't Pass CVV for save card flow and verify success payment Copy/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
2,861
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario13-Don't Pass CVV for save card flow and verify success payment Copy/Payments - Create/response.json
.json
[]
1
2,862
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario13-Don't Pass CVV for save card flow and verify success payment Copy/Payments - Create/event.prerequest.js
.js
pm.environment.set("random_number", _.random(1000, 100000));
23
2,863
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario13-Don't Pass CVV for save card flow and verify success payment Copy/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
2,864
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario13-Don't Pass CVV for save card flow and verify success payment Copy/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
2,865
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario13-Don't Pass CVV for save card flow and verify success payment Copy/List payment methods for a Customer/response.json
.json
[]
1
2,866
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Retrieve/request.json
.json
{ "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": { "raw": "{{baseUrl}}/payments/:id?force_sync=true", "host": ["{{baseUrl}}"], "path": ["payments", ":id"], "query": [ { "key": "force_sync", "value": "true" } ], "variable": [ { "key": "id", "value": "{{payment_id}}", "description": "(Required) unique payment id" } ] }, "description": "To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment" }
175
2,867
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Retrieve/event.test.js
.js
// Validate status 2xx pm.test("[GET]::/payments/:id - Status code is 2xx", function () { pm.response.to.be.success; }); // Validate if response header has matching content-type pm.test("[GET]::/payments/:id - Content-Type is application/json", function () { pm.expect(pm.response.headers.get("Content-Type")).to.include( "application/json", ); }); // Validate if response has JSON Body pm.test("[GET]::/payments/:id - Response has JSON Body", function () { pm.response.to.have.jsonBody(); }); // Set response object as internal variable let jsonData = {}; try { jsonData = pm.response.json(); } catch (e) {} // pm.collectionVariables - Set payment_id as variable for jsonData.payment_id if (jsonData?.payment_id) { pm.collectionVariables.set("payment_id", jsonData.payment_id); console.log( "- use {{payment_id}} as collection variable for value", jsonData.payment_id, ); } else { console.log( "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.", ); } // pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id if (jsonData?.mandate_id) { pm.collectionVariables.set("mandate_id", jsonData.mandate_id); console.log( "- use {{mandate_id}} as collection variable for value", jsonData.mandate_id, ); } else { console.log( "INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.", ); } // pm.collectionVariables - Set client_secret as variable for jsonData.client_secret if (jsonData?.client_secret) { pm.collectionVariables.set("client_secret", jsonData.client_secret); console.log( "- use {{client_secret}} as collection variable for value", jsonData.client_secret, ); } else { console.log( "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.", ); } // Response body should have value "succeeded" for "status" if (jsonData?.status) { pm.test( "[POST]::/payments:id - Content check if value for 'status' matches 'succeeded'", function () { pm.expect(jsonData.status).to.eql("succeeded"); }, ); }
499
2,868
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Retrieve/response.json
.json
[]
1
2,869
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Create/request.json
.json
{ "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "body": { "mode": "raw", "options": { "raw": { "language": "json" } }, "raw_json_formatted": { "amount": 6540, "currency": "USD", "confirm": false, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6540, "customer_id": "StripeCustomer", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://duck.com", "payment_method": "card", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "joseph Doe", "card_cvc": "123" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX", "last_name": "abc" } }, "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" }
711
2,870
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Create/event.test.js
.js
// Validate status 2xx pm.test("[POST]::/payments - Status code is 2xx", function () { pm.response.to.be.success; }); // Validate if response header has matching content-type pm.test("[POST]::/payments - Content-Type is application/json", function () { pm.expect(pm.response.headers.get("Content-Type")).to.include( "application/json", ); }); // Validate if response has JSON Body pm.test("[POST]::/payments - Response has JSON Body", function () { pm.response.to.have.jsonBody(); }); // Set response object as internal variable let jsonData = {}; try { jsonData = pm.response.json(); } catch (e) {} // pm.collectionVariables - Set payment_id as variable for jsonData.payment_id if (jsonData?.payment_id) { pm.collectionVariables.set("payment_id", jsonData.payment_id); console.log( "- use {{payment_id}} as collection variable for value", jsonData.payment_id, ); } else { console.log( "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.", ); } // pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id if (jsonData?.mandate_id) { pm.collectionVariables.set("mandate_id", jsonData.mandate_id); console.log( "- use {{mandate_id}} as collection variable for value", jsonData.mandate_id, ); } else { console.log( "INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.", ); } // pm.collectionVariables - Set client_secret as variable for jsonData.client_secret if (jsonData?.client_secret) { pm.collectionVariables.set("client_secret", jsonData.client_secret); console.log( "- use {{client_secret}} as collection variable for value", jsonData.client_secret, ); } else { console.log( "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.", ); } // Response body should have value "requires_confirmation" for "status" if (jsonData?.status) { pm.test( "[POST]::/payments - Content check if value for 'status' matches 'requires_confirmation'", function () { pm.expect(jsonData.status).to.eql("requires_confirmation"); }, ); }
492
2,871
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Create/response.json
.json
[]
1
2,872
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Confirm/request.json
.json
{ "auth": { "type": "apikey", "apikey": [ { "key": "value", "value": "{{publishable_key}}", "type": "string" }, { "key": "key", "value": "api-key", "type": "string" }, { "key": "in", "value": "header", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "body": { "mode": "raw", "options": { "raw": { "language": "json" } }, "raw_json_formatted": { "client_secret": "{{client_secret}}" } }, "url": { "raw": "{{baseUrl}}/payments/:id/confirm", "host": ["{{baseUrl}}"], "path": ["payments", ":id", "confirm"], "variable": [ { "key": "id", "value": "{{payment_id}}", "description": "(Required) unique payment id" } ] }, "description": "This API is to confirm the payment request and forward payment to the payment processor. This API provides more granular control upon when the API is forwarded to the payment processor. Alternatively you can confirm the payment within the Payments-Create API" }
341
2,873
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Confirm/event.test.js
.js
// Validate status 2xx pm.test("[POST]::/payments/:id/confirm - Status code is 2xx", function () { pm.response.to.be.success; }); // Validate if response header has matching content-type pm.test( "[POST]::/payments/:id/confirm - Content-Type is application/json", function () { pm.expect(pm.response.headers.get("Content-Type")).to.include( "application/json", ); }, ); // Validate if response has JSON Body pm.test("[POST]::/payments/:id/confirm - Response has JSON Body", function () { pm.response.to.have.jsonBody(); }); // Set response object as internal variable let jsonData = {}; try { jsonData = pm.response.json(); } catch (e) {} // pm.collectionVariables - Set payment_id as variable for jsonData.payment_id if (jsonData?.payment_id) { pm.collectionVariables.set("payment_id", jsonData.payment_id); console.log( "- use {{payment_id}} as collection variable for value", jsonData.payment_id, ); } else { console.log( "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.", ); } // pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id if (jsonData?.mandate_id) { pm.collectionVariables.set("mandate_id", jsonData.mandate_id); console.log( "- use {{mandate_id}} as collection variable for value", jsonData.mandate_id, ); } else { console.log( "INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.", ); } // pm.collectionVariables - Set client_secret as variable for jsonData.client_secret if (jsonData?.client_secret) { pm.collectionVariables.set("client_secret", jsonData.client_secret); console.log( "- use {{client_secret}} as collection variable for value", jsonData.client_secret, ); } else { console.log( "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.", ); } // Response body should have value "succeeded" for "status" if (jsonData?.status) { pm.test( "[POST]::/payments/:id/confirm - Content check if value for 'status' matches 'succeeded'", function () { pm.expect(jsonData.status).to.eql("succeeded"); }, ); }
513
2,874
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Confirm/response.json
.json
[]
1
2,875
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario7-Create 3DS payment with confirm false/Payments - Retrieve/request.json
.json
{ "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": { "raw": "{{baseUrl}}/payments/:id?force_sync=true", "host": ["{{baseUrl}}"], "path": ["payments", ":id"], "query": [ { "key": "force_sync", "value": "true" } ], "variable": [ { "key": "id", "value": "{{payment_id}}", "description": "(Required) unique payment id" } ] }, "description": "To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment" }
175
2,876
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario7-Create 3DS 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 "requires_customer_action" for "status" if (jsonData?.status) { pm.test( "[POST]::/payments:id - Content check if value for 'status' matches 'requires_customer_action'", function () { pm.expect(jsonData.status).to.eql("requires_customer_action"); }, ); }
502
2,877
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario7-Create 3DS payment with confirm false/Payments - Retrieve/response.json
.json
[]
1
2,878
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario7-Create 3DS payment with confirm false/Payments - Create/request.json
.json
{ "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "body": { "mode": "raw", "options": { "raw": { "language": "json" } }, "raw_json_formatted": { "amount": 6540, "currency": "USD", "confirm": false, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6540, "customer_id": "StripeCustomer", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "authentication_type": "three_ds", "return_url": "https://duck.com", "payment_method": "card", "payment_method_data": { "card": { "card_number": "4000000000003063", "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", "last_name": "abc" } }, "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" }
710
2,879
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario7-Create 3DS payment with confirm false/Payments - Create/event.test.js
.js
// Validate status 2xx pm.test("[POST]::/payments - Status code is 2xx", function () { pm.response.to.be.success; }); // Validate if response header has matching content-type pm.test("[POST]::/payments - Content-Type is application/json", function () { pm.expect(pm.response.headers.get("Content-Type")).to.include( "application/json", ); }); // Validate if response has JSON Body pm.test("[POST]::/payments - Response has JSON Body", function () { pm.response.to.have.jsonBody(); }); // Set response object as internal variable let jsonData = {}; try { jsonData = pm.response.json(); } catch (e) {} // pm.collectionVariables - Set payment_id as variable for jsonData.payment_id if (jsonData?.payment_id) { pm.collectionVariables.set("payment_id", jsonData.payment_id); console.log( "- use {{payment_id}} as collection variable for value", jsonData.payment_id, ); } else { console.log( "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.", ); } // pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id if (jsonData?.mandate_id) { pm.collectionVariables.set("mandate_id", jsonData.mandate_id); console.log( "- use {{mandate_id}} as collection variable for value", jsonData.mandate_id, ); } else { console.log( "INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.", ); } // pm.collectionVariables - Set client_secret as variable for jsonData.client_secret if (jsonData?.client_secret) { pm.collectionVariables.set("client_secret", jsonData.client_secret); console.log( "- use {{client_secret}} as collection variable for value", jsonData.client_secret, ); } else { console.log( "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.", ); } // Response body should have value "requires_confirmation" for "status" if (jsonData?.status) { pm.test( "[POST]::/payments - Content check if value for 'status' matches 'requires_confirmation'", function () { pm.expect(jsonData.status).to.eql("requires_confirmation"); }, ); }
492
2,880
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario7-Create 3DS payment with confirm false/Payments - Create/response.json
.json
[]
1
2,881
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario7-Create 3DS payment with confirm false/Payments - Confirm/request.json
.json
{ "auth": { "type": "apikey", "apikey": [ { "key": "value", "value": "{{publishable_key}}", "type": "string" }, { "key": "key", "value": "api-key", "type": "string" }, { "key": "in", "value": "header", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "body": { "mode": "raw", "options": { "raw": { "language": "json" } }, "raw_json_formatted": { "client_secret": "{{client_secret}}" } }, "url": { "raw": "{{baseUrl}}/payments/:id/confirm", "host": ["{{baseUrl}}"], "path": ["payments", ":id", "confirm"], "variable": [ { "key": "id", "value": "{{payment_id}}", "description": "(Required) unique payment id" } ] }, "description": "This API is to confirm the payment request and forward payment to the payment processor. This API provides more granular control upon when the API is forwarded to the payment processor. Alternatively you can confirm the payment within the Payments-Create API" }
341
2,882
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario7-Create 3DS 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 "requires_customer_action" for "status" if (jsonData?.status) { pm.test( "[POST]::/payments/:id/confirm - Content check if value for 'status' matches 'requires_customer_action'", function () { pm.expect(jsonData.status).to.eql("requires_customer_action"); }, ); } // Response body should have "next_action.redirect_to_url" pm.test( "[POST]::/payments/:id/confirm - Content check if 'next_action.redirect_to_url' exists", function () { pm.expect(typeof jsonData.next_action.redirect_to_url !== "undefined").to.be .true; }, );
583
2,883
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario7-Create 3DS payment with confirm false/Payments - Confirm/response.json
.json
[]
1
2,884
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Retrieve/request.json
.json
{ "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": { "raw": "{{baseUrl}}/payments/:id?force_sync=true", "host": ["{{baseUrl}}"], "path": ["payments", ":id"], "query": [ { "key": "force_sync", "value": "true" } ], "variable": [ { "key": "id", "value": "{{payment_id}}", "description": "(Required) unique payment id" } ] }, "description": "To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment" }
175
2,885
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Retrieve/event.test.js
.js
// Validate status 2xx pm.test("[GET]::/payments/:id - Status code is 2xx", function () { pm.response.to.be.success; }); // Validate if response header has matching content-type pm.test("[GET]::/payments/:id - Content-Type is application/json", function () { pm.expect(pm.response.headers.get("Content-Type")).to.include( "application/json", ); }); // Validate if response has JSON Body pm.test("[GET]::/payments/:id - Response has JSON Body", function () { pm.response.to.have.jsonBody(); }); // Set response object as internal variable let jsonData = {}; try { jsonData = pm.response.json(); } catch (e) {} // pm.collectionVariables - Set payment_id as variable for jsonData.payment_id if (jsonData?.payment_id) { pm.collectionVariables.set("payment_id", jsonData.payment_id); console.log( "- use {{payment_id}} as collection variable for value", jsonData.payment_id, ); } else { console.log( "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.", ); } // pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id if (jsonData?.mandate_id) { pm.collectionVariables.set("mandate_id", jsonData.mandate_id); console.log( "- use {{mandate_id}} as collection variable for value", jsonData.mandate_id, ); } else { console.log( "INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.", ); } // pm.collectionVariables - Set client_secret as variable for jsonData.client_secret if (jsonData?.client_secret) { pm.collectionVariables.set("client_secret", jsonData.client_secret); console.log( "- use {{client_secret}} as collection variable for value", jsonData.client_secret, ); } else { console.log( "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.", ); } // Response body should have value "cancelled" for "status" if (jsonData?.status) { pm.test( "[POST]::/payments/:id - Content check if value for 'status' matches 'cancelled'", function () { pm.expect(jsonData.status).to.eql("cancelled"); }, ); }
497
2,886
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Retrieve/response.json
.json
[]
1
2,887
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Create/request.json
.json
{ "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "body": { "mode": "raw", "options": { "raw": { "language": "json" } }, "raw_json_formatted": { "amount": 6540, "currency": "USD", "confirm": true, "capture_method": "manual", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6540, "customer_id": "StripeCustomer", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://duck.com", "payment_method": "card", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "joseph Doe", "card_cvc": "123" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX", "last_name": "abc" } }, "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" }
711
2,888
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Create/event.test.js
.js
// Validate status 2xx pm.test("[POST]::/payments - Status code is 2xx", function () { pm.response.to.be.success; }); // Validate if response header has matching content-type pm.test("[POST]::/payments - Content-Type is application/json", function () { pm.expect(pm.response.headers.get("Content-Type")).to.include( "application/json", ); }); // Validate if response has JSON Body pm.test("[POST]::/payments - Response has JSON Body", function () { pm.response.to.have.jsonBody(); }); // Set response object as internal variable let jsonData = {}; try { jsonData = pm.response.json(); } catch (e) {} // pm.collectionVariables - Set payment_id as variable for jsonData.payment_id if (jsonData?.payment_id) { pm.collectionVariables.set("payment_id", jsonData.payment_id); console.log( "- use {{payment_id}} as collection variable for value", jsonData.payment_id, ); } else { console.log( "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.", ); } // pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id if (jsonData?.mandate_id) { pm.collectionVariables.set("mandate_id", jsonData.mandate_id); console.log( "- use {{mandate_id}} as collection variable for value", jsonData.mandate_id, ); } else { console.log( "INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.", ); } // pm.collectionVariables - Set client_secret as variable for jsonData.client_secret if (jsonData?.client_secret) { pm.collectionVariables.set("client_secret", jsonData.client_secret); console.log( "- use {{client_secret}} as collection variable for value", jsonData.client_secret, ); } else { console.log( "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.", ); } // Response body should have value "requires_capture" for "status" if (jsonData?.status) { pm.test( "[POST]::/payments - Content check if value for 'status' matches 'requires_capture'", function () { pm.expect(jsonData.status).to.eql("requires_capture"); }, ); }
492
2,889
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Create/response.json
.json
[]
1
2,890
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Cancel/request.json
.json
{ "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "body": { "mode": "raw", "options": { "raw": { "language": "json" } }, "raw_json_formatted": { "cancellation_reason": "requested_by_customer" } }, "url": { "raw": "{{baseUrl}}/payments/:id/cancel", "host": ["{{baseUrl}}"], "path": ["payments", ":id", "cancel"], "variable": [ { "key": "id", "value": "{{payment_id}}", "description": "(Required) unique payment id" } ] }, "description": "A Payment could can be cancelled when it is in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_customer_action" }
225
2,891
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Cancel/event.test.js
.js
// Validate status 2xx pm.test("[POST]::/payments/:id/cancel - Status code is 2xx", function () { pm.response.to.be.success; }); // Validate if response header has matching content-type pm.test( "[POST]::/payments/:id/cancel - Content-Type is application/json", function () { pm.expect(pm.response.headers.get("Content-Type")).to.include( "application/json", ); }, ); // Validate if response has JSON Body pm.test("[POST]::/payments/:id/cancel - Response has JSON Body", function () { pm.response.to.have.jsonBody(); }); // Set response object as internal variable let jsonData = {}; try { jsonData = pm.response.json(); } catch (e) {} // pm.collectionVariables - Set payment_id as variable for jsonData.payment_id if (jsonData?.payment_id) { pm.collectionVariables.set("payment_id", jsonData.payment_id); console.log( "- use {{payment_id}} as collection variable for value", jsonData.payment_id, ); } else { console.log( "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.", ); } // pm.collectionVariables - Set client_secret as variable for jsonData.client_secret if (jsonData?.client_secret) { pm.collectionVariables.set("client_secret", jsonData.client_secret); console.log( "- use {{client_secret}} as collection variable for value", jsonData.client_secret, ); } else { console.log( "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.", ); } // Response body should have value "cancelled" for "status" if (jsonData?.status) { pm.test( "[POST]::/payments/:id/cancel - Content check if value for 'status' matches 'cancelled'", function () { pm.expect(jsonData.status).to.eql("cancelled"); }, ); }
409
2,892
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Cancel/response.json
.json
[]
1
2,893
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Retrieve/request.json
.json
{ "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": { "raw": "{{baseUrl}}/payments/:id?force_sync=true", "host": ["{{baseUrl}}"], "path": ["payments", ":id"], "query": [ { "key": "force_sync", "value": "true" } ], "variable": [ { "key": "id", "value": "{{payment_id}}", "description": "(Required) unique payment id" } ] }, "description": "To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment" }
175
2,894
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Retrieve/event.test.js
.js
// Validate status 2xx pm.test("[GET]::/payments/:id - Status code is 2xx", function () { pm.response.to.be.success; }); // Validate if response header has matching content-type pm.test("[GET]::/payments/:id - Content-Type is application/json", function () { pm.expect(pm.response.headers.get("Content-Type")).to.include( "application/json", ); }); // Validate if response has JSON Body pm.test("[GET]::/payments/:id - Response has JSON Body", function () { pm.response.to.have.jsonBody(); }); // Set response object as internal variable let jsonData = {}; try { jsonData = pm.response.json(); } catch (e) {} // pm.collectionVariables - Set payment_id as variable for jsonData.payment_id if (jsonData?.payment_id) { pm.collectionVariables.set("payment_id", jsonData.payment_id); console.log( "- use {{payment_id}} as collection variable for value", jsonData.payment_id, ); } else { console.log( "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.", ); } // pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id if (jsonData?.mandate_id) { pm.collectionVariables.set("mandate_id", jsonData.mandate_id); console.log( "- use {{mandate_id}} as collection variable for value", jsonData.mandate_id, ); } else { console.log( "INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.", ); } // pm.collectionVariables - Set client_secret as variable for jsonData.client_secret if (jsonData?.client_secret) { pm.collectionVariables.set("client_secret", jsonData.client_secret); console.log( "- use {{client_secret}} as collection variable for value", jsonData.client_secret, ); } else { console.log( "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.", ); } // Response body should have value "succeeded" for "status" if (jsonData?.status) { pm.test( "[POST]::/payments - Content check if value for 'status' matches 'partially_captured'", function () { pm.expect(jsonData.status).to.eql("partially_captured"); }, ); }
502
2,895
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Retrieve/response.json
.json
[]
1
2,896
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Create/request.json
.json
{ "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "body": { "mode": "raw", "options": { "raw": { "language": "json" } }, "raw_json_formatted": { "amount": 6540, "currency": "USD", "confirm": true, "capture_method": "manual", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6540, "customer_id": "StripeCustomer", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://duck.com", "payment_method": "card", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "joseph Doe", "card_cvc": "123" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX", "last_name": "abc" } }, "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" }
711
2,897
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Create/event.test.js
.js
// Validate status 2xx pm.test("[POST]::/payments - Status code is 2xx", function () { pm.response.to.be.success; }); // Validate if response header has matching content-type pm.test("[POST]::/payments - Content-Type is application/json", function () { pm.expect(pm.response.headers.get("Content-Type")).to.include( "application/json", ); }); // Validate if response has JSON Body pm.test("[POST]::/payments - Response has JSON Body", function () { pm.response.to.have.jsonBody(); }); // Set response object as internal variable let jsonData = {}; try { jsonData = pm.response.json(); } catch (e) {} // pm.collectionVariables - Set payment_id as variable for jsonData.payment_id if (jsonData?.payment_id) { pm.collectionVariables.set("payment_id", jsonData.payment_id); console.log( "- use {{payment_id}} as collection variable for value", jsonData.payment_id, ); } else { console.log( "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.", ); } // pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id if (jsonData?.mandate_id) { pm.collectionVariables.set("mandate_id", jsonData.mandate_id); console.log( "- use {{mandate_id}} as collection variable for value", jsonData.mandate_id, ); } else { console.log( "INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.", ); } // pm.collectionVariables - Set client_secret as variable for jsonData.client_secret if (jsonData?.client_secret) { pm.collectionVariables.set("client_secret", jsonData.client_secret); console.log( "- use {{client_secret}} as collection variable for value", jsonData.client_secret, ); } else { console.log( "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.", ); } // Response body should have value "requires_capture" for "status" if (jsonData?.status) { pm.test( "[POST]::/payments - Content check if value for 'status' matches 'requires_capture'", function () { pm.expect(jsonData.status).to.eql("requires_capture"); }, ); }
492
2,898
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Create/response.json
.json
[]
1
2,899
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/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" }
225
2,900
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/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"); }, ); } // 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); }, ); }
676
2,901
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Capture/response.json
.json
[]
1
2,902
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/QuickStart/Refunds - Create/request.json
.json
{ "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "body": { "mode": "raw", "options": { "raw": { "language": "json" } }, "raw_json_formatted": { "payment_id": "{{payment_id}}", "amount": 600, "reason": "Customer returned product", "refund_type": "instant", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } } }, "url": { "raw": "{{baseUrl}}/refunds", "host": ["{{baseUrl}}"], "path": ["refunds"] }, "description": "To create a refund against an already processed payment" }
237
2,903
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/QuickStart/Refunds - Create/event.test.js
.js
// Validate status 2xx pm.test("[POST]::/refunds - Status code is 2xx", function () { pm.response.to.be.success; }); // Validate if response header has matching content-type pm.test("[POST]::/refunds - Content-Type is application/json", function () { pm.expect(pm.response.headers.get("Content-Type")).to.include( "application/json", ); }); // Set response object as internal variable let jsonData = {}; try { jsonData = pm.response.json(); } catch (e) {} // pm.collectionVariables - Set refund_id as variable for jsonData.payment_id if (jsonData?.refund_id) { pm.collectionVariables.set("refund_id", jsonData.refund_id); console.log( "- use {{refund_id}} as collection variable for value", jsonData.refund_id, ); } else { console.log( "INFO - Unable to assign variable {{refund_id}}, as jsonData.refund_id is undefined.", ); }
205
2,904
hyperswitch
postman/collection-dir/bluesnap/Flow Testcases/QuickStart/Refunds - Create/response.json
.json
[]
1
2,905