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/powertranz/Flow Testcases/QuickStart/Payment Connector - Create/event.test.js
.js
// Validate status 2xx pm.test( "[POST]::/account/:account_id/connectors - Status code is 2xx", function () { pm.response.to.be.success; }, ); // Validate if response header has matching content-type pm.test( "[POST]::/account/:account_id/connectors - Content-Type is application/json", function () { pm.expect(pm.response.headers.get("Content-Type")).to.include( "application/json", ); }, ); // Set response object as internal variable let jsonData = {}; try { jsonData = pm.response.json(); } catch (e) {} // pm.collectionVariables - Set merchant_connector_id as variable for jsonData.merchant_connector_id if (jsonData?.merchant_connector_id) { pm.collectionVariables.set( "merchant_connector_id", jsonData.merchant_connector_id, ); console.log( "- use {{merchant_connector_id}} as collection variable for value", jsonData.merchant_connector_id, ); } else { console.log( "INFO - Unable to assign variable {{merchant_connector_id}}, as jsonData.merchant_connector_id is undefined.", ); }
238
8,506
hyperswitch
postman/collection-dir/powertranz/Flow Testcases/QuickStart/Payment Connector - Create/response.json
.json
[]
1
8,507
hyperswitch
postman/collection-dir/powertranz/Flow Testcases/QuickStart/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 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" }
176
8,508
hyperswitch
postman/collection-dir/powertranz/Flow Testcases/QuickStart/Payments - Retrieve/event.test.js
.js
// Validate status 2xx pm.test("[GET]::/refunds/:id - Status code is 2xx", function () { pm.response.to.be.success; }); // Validate if response header has matching content-type pm.test("[GET]::/refunds/:id - Content-Type is application/json", function () { pm.expect(pm.response.headers.get("Content-Type")).to.include( "application/json", ); }); // Set response object as internal variable let jsonData = {}; try { jsonData = pm.response.json(); } catch (e) {} // pm.collectionVariables - Set refund_id as variable for jsonData.payment_id if (jsonData?.refund_id) { pm.collectionVariables.set("refund_id", jsonData.refund_id); console.log( "- use {{refund_id}} as collection variable for value", jsonData.refund_id, ); } else { console.log( "INFO - Unable to assign variable {{refund_id}}, as jsonData.refund_id is undefined.", ); }
209
8,509
hyperswitch
postman/collection-dir/powertranz/Flow Testcases/QuickStart/Payments - Retrieve/response.json
.json
[]
1
8,510
hyperswitch
postman/collection-dir/powertranz/Flow Testcases/QuickStart/Payments - Create/request.json
.json
{ "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "body": { "mode": "raw", "options": { "raw": { "language": "json" } }, "raw_json_formatted": { "amount": 1000, "currency": "USD", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 100, "customer_id": "StripeCustomer", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+1", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://duck.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4012000000020006", "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "joseph Doe", "card_cvc": "123" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "order_details": { "product_name": "iphone 13", "quantity": 1 } }, "order_details": [ { "product_name": "Apple iphone 15", "quantity": 1, "amount": 1000, "account_name": "transaction_processing" } ], "browser_info": { "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36", "accept_header": "text\\/html,application\\/xhtml+xml,application\\/xml;q=0.9,image\\/webp,image\\/apng,*\\/*;q=0.8", "language": "en-GB", "color_depth": 24, "screen_height": 1440, "screen_width": 2560, "time_zone": -330, "java_enabled": true, "java_script_enabled": true } } }, "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" }
738
8,511
hyperswitch
postman/collection-dir/powertranz/Flow Testcases/QuickStart/Payments - Create/event.test.js
.js
pm.environment.set("random_number", _.random(1000, 100000)); // Set the environment variable 'amount' with the value from the response pm.environment.set("amount", pm.response.json().amount); // 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.", ); }
474
8,512
hyperswitch
postman/collection-dir/powertranz/Flow Testcases/QuickStart/Payments - Create/response.json
.json
[]
1
8,513
hyperswitch
postman/collection-dir/powertranz/Flow Testcases/QuickStart/Payments - Create/event.prerequest.js
.js
pm.environment.set("random_number", _.random(1000, 100000));
23
8,514
hyperswitch
postman/collection-dir/powertranz/Flow Testcases/QuickStart/Merchant Account - Create/request.json
.json
{ "auth": { "type": "apikey", "apikey": [ { "key": "value", "value": "{{admin_api_key}}", "type": "string" }, { "key": "key", "value": "api-key", "type": "string" }, { "key": "in", "value": "header", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "body": { "mode": "raw", "options": { "raw": { "language": "json" } }, "raw_json_formatted": { "merchant_id": "merchant_{{$timestamp}}", "locker_id": "m0010", "merchant_name": "NewAge Retailer", "merchant_details": { "primary_contact_person": "John Test", "primary_email": "JohnTest@test.com", "primary_phone": "sunt laborum", "secondary_contact_person": "John Test2", "secondary_email": "JohnTest2@test.com", "secondary_phone": "cillum do dolor id", "website": "www.example.com", "about_business": "Online Retail with a wide selection of organic products for North America", "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US" } }, "return_url": "https://duck.com", "webhook_details": { "webhook_version": "1.0.1", "webhook_username": "ekart_retail", "webhook_password": "password_ekart@123", "payment_created_enabled": true, "payment_succeeded_enabled": true, "payment_failed_enabled": true }, "primary_business_details": [ { "country": "US", "business": "default" } ], "sub_merchants_enabled": false, "metadata": { "city": "NY", "unit": "245" } } }, "url": { "raw": "{{baseUrl}}/accounts", "host": ["{{baseUrl}}"], "path": ["accounts"] }, "description": "Create a new account for a merchant. The merchant could be a seller or retailer or client who likes to receive and send payments." }
620
8,515
hyperswitch
postman/collection-dir/powertranz/Flow Testcases/QuickStart/Merchant Account - Create/event.test.js
.js
// Validate status 2xx pm.test("[POST]::/accounts - Status code is 2xx", function () { pm.response.to.be.success; }); // Validate if response header has matching content-type pm.test("[POST]::/accounts - 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 merchant_id as variable for jsonData.merchant_id if (jsonData?.merchant_id) { pm.collectionVariables.set("merchant_id", jsonData.merchant_id); console.log( "- use {{merchant_id}} as collection variable for value", jsonData.merchant_id, ); } else { console.log( "INFO - Unable to assign variable {{merchant_id}}, as jsonData.merchant_id is undefined.", ); } // pm.collectionVariables - Set api_key as variable for jsonData.api_key if (jsonData?.api_key) { pm.collectionVariables.set("api_key", jsonData.api_key); console.log( "- use {{api_key}} as collection variable for value", jsonData.api_key, ); } else { console.log( "INFO - Unable to assign variable {{api_key}}, as jsonData.api_key is undefined.", ); } // pm.collectionVariables - Set publishable_key as variable for jsonData.publishable_key if (jsonData?.publishable_key) { pm.collectionVariables.set("publishable_key", jsonData.publishable_key); console.log( "- use {{publishable_key}} as collection variable for value", jsonData.publishable_key, ); } else { console.log( "INFO - Unable to assign variable {{publishable_key}}, as jsonData.publishable_key is undefined.", ); }
391
8,516
hyperswitch
postman/collection-dir/powertranz/Flow Testcases/QuickStart/Merchant Account - Create/response.json
.json
[]
1
8,517
hyperswitch
postman/collection-dir/powertranz/Health check/New Request/request.json
.json
{ "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/health", "host": ["{{baseUrl}}"], "path": ["health"] } }
47
8,518
hyperswitch
postman/collection-dir/powertranz/Health check/New Request/event.test.js
.js
// Validate status 2xx pm.test("[POST]::/accounts - Status code is 2xx", function () { pm.response.to.be.success; });
34
8,519
hyperswitch
postman/collection-dir/powertranz/Health check/New Request/response.json
.json
[]
1
8,520
hyperswitch
postman/collection-dir/bankofamerica/event.test.js
.js
// 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("[LOG]::payment_id - " + jsonData.payment_id); } console.log("[LOG]::x-request-id - " + pm.response.headers.get("x-request-id"));
101
8,521
hyperswitch
postman/collection-dir/bankofamerica/event.prerequest.js
.js
0
8,522
hyperswitch
postman/collection-dir/bankofamerica/PaymentConnectors/Payment Connector - Delete/request.json
.json
{ "auth": { "type": "apikey", "apikey": [ { "key": "value", "value": "{{admin_api_key}}", "type": "string" }, { "key": "key", "value": "api-key", "type": "string" }, { "key": "in", "value": "header", "type": "string" } ] }, "method": "DELETE", "header": [ { "key": "Accept", "value": "application/json" } ], "url": { "raw": "{{baseUrl}}/account/:account_id/connectors/:connector_id", "host": [ "{{baseUrl}}" ], "path": [ "account", ":account_id", "connectors", ":connector_id" ], "variable": [ { "key": "account_id", "value": "{{merchant_id}}" }, { "key": "connector_id", "value": "{{merchant_connector_id}}" } ] }, "description": "Delete or Detach a Payment Connector from Merchant Account" }
261
8,523
hyperswitch
postman/collection-dir/bankofamerica/PaymentConnectors/Payment Connector - Delete/event.test.js
.js
// Validate status 2xx pm.test( "[DELETE]::/account/:account_id/connectors/:connector_id - Status code is 2xx", function () { pm.response.to.be.success; }, ); // Validate if response header has matching content-type pm.test( "[DELETE]::/account/:account_id/connectors/:connector_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 merchant_connector_id as variable for jsonData.merchant_connector_id if (jsonData?.merchant_connector_id) { pm.collectionVariables.set( "merchant_connector_id", jsonData.merchant_connector_id, ); console.log( "- use {{merchant_connector_id}} as collection variable for value", jsonData.merchant_connector_id, ); } else { console.log( "INFO - Unable to assign variable {{merchant_connector_id}}, as jsonData.merchant_connector_id is undefined.", ); }
244
8,524
hyperswitch
postman/collection-dir/bankofamerica/PaymentConnectors/Payment Connector - Delete/response.json
.json
[]
1
8,525
hyperswitch
postman/collection-dir/bankofamerica/PaymentConnectors/Delete API Key/request.json
.json
{ "auth": { "type": "apikey", "apikey": [ { "key": "value", "value": "{{admin_api_key}}", "type": "string" }, { "key": "key", "value": "api-key", "type": "string" } ] }, "method": "DELETE", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "url": { "raw": "{{baseUrl}}/api_keys/:merchant_id/:api-key", "host": [ "{{baseUrl}}" ], "path": [ "api_keys", ":merchant_id", ":api-key" ], "variable": [ { "key": "merchant_id", "value": "{{merchant_id}}" }, { "key": "api-key", "value": "{{api_key_id}}" } ] } }
235
8,526
hyperswitch
postman/collection-dir/bankofamerica/PaymentConnectors/Delete API Key/event.test.js
.js
// Validate status 2xx pm.test( "[DELETE]::/api_keys/:merchant_id/:api-key - Status code is 2xx", function () { pm.response.to.be.success; }, ); // Validate if response header has matching content-type pm.test( "[DELETE]::/api_keys/:merchant_id/:api-key - Content-Type is application/json", function () { pm.expect(pm.response.headers.get("Content-Type")).to.include( "application/json", ); }, );
108
8,527
hyperswitch
postman/collection-dir/bankofamerica/PaymentConnectors/Delete API Key/response.json
.json
[]
1
8,528
hyperswitch
postman/collection-dir/bankofamerica/PaymentConnectors/Payment Connector - Create/request.json
.json
{ "auth": { "type": "apikey", "apikey": [ { "key": "value", "value": "{{api_key}}", "type": "string" }, { "key": "key", "value": "api-key", "type": "string" }, { "key": "in", "value": "header", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "body": { "mode": "raw", "options": { "raw": { "language": "json" } }, "raw_json_formatted": { "connector_type": "payment_processor", "connector_name": "bankofamerica", "business_country": "US", "business_label": "default", "connector_label": "first_boa_connector", "connector_account_details": { "auth_type": "SignatureKey", "api_key": "{{connector_api_key}}", "api_secret": "{{connector_api_secret}}", "key1": "{{connector_key1}}" }, "test_mode": false, "disabled": false, "payment_methods_enabled": [ { "payment_method": "card", "payment_method_types": [ { "payment_method_type": "credit", "card_networks": ["Visa", "Mastercard"], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "debit", "card_networks": ["Visa", "Mastercard"], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] } ], "metadata": { "city": "NY", "unit": "245" } } }, "url": { "raw": "{{baseUrl}}/account/:account_id/connectors", "host": ["{{baseUrl}}"], "path": ["account", ":account_id", "connectors"], "variable": [ { "key": "account_id", "value": "{{merchant_id}}", "description": "(Required) The unique identifier for the merchant account" } ] }, "description": "Create a new Payment Connector for the merchant account. The connector could be a payment processor / facilitator / acquirer or specialised services like Fraud / Accounting etc." }
621
8,529
hyperswitch
postman/collection-dir/bankofamerica/PaymentConnectors/Payment Connector - Create/event.test.js
.js
// Validate status 2xx pm.test( "[POST]::/accounts/:account_id/connectors - Status code is 2xx", function () { pm.response.to.be.success; }, ); // Validate if response header has matching content-type pm.test( "[POST]::/accounts/:account_id/connectors - Content-Type is application/json", function () { pm.expect(pm.response.headers.get("Content-Type")).to.include( "application/json", ); }, ); // Set response object as internal variable let jsonData = {}; try { jsonData = pm.response.json(); } catch (e) { } // pm.collectionVariables - Set merchant_connector_id as variable for jsonData.merchant_connector_id if (jsonData?.merchant_connector_id) { pm.collectionVariables.set( "merchant_connector_id", jsonData.merchant_connector_id, ); console.log( "- use {{merchant_connector_id}} as collection variable for value", jsonData.merchant_connector_id, ); } else { console.log( "INFO - Unable to assign variable {{merchant_connector_id}}, as jsonData.merchant_connector_id is undefined.", ); } // Validate if the connector label is the one that is passed in the request pm.test( "[POST]::/accounts/:account_id/connectors - connector_label is not autogenerated", function () { pm.expect(jsonData.connector_label).to.eql("first_boa_connector") }, );
300
8,530
hyperswitch
postman/collection-dir/bankofamerica/PaymentConnectors/Payment Connector - Create/response.json
.json
[]
1
8,531
hyperswitch
postman/collection-dir/bankofamerica/PaymentConnectors/Payment Connector - Retrieve/request.json
.json
{ "auth": { "type": "apikey", "apikey": [ { "key": "value", "value": "{{api_key}}", "type": "string" }, { "key": "key", "value": "api-key", "type": "string" }, { "key": "in", "value": "header", "type": "string" } ] }, "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": { "raw": "{{baseUrl}}/account/:account_id/connectors/:connector_id", "host": [ "{{baseUrl}}" ], "path": [ "account", ":account_id", "connectors", ":connector_id" ], "variable": [ { "key": "account_id", "value": "{{merchant_id}}", "description": "(Required) The unique identifier for the merchant account" }, { "key": "connector_id", "value": "{{merchant_connector_id}}", "description": "(Required) The unique identifier for the payment connector" } ] }, "description": "Retrieve Payment Connector details." }
286
8,532
hyperswitch
postman/collection-dir/bankofamerica/PaymentConnectors/Payment Connector - Retrieve/event.test.js
.js
// Validate status 2xx pm.test( "[GET]::/accounts/:account_id/connectors/:connector_id - Status code is 2xx", function () { pm.response.to.be.success; }, ); // Validate if response header has matching content-type pm.test( "[GET]::/accounts/:account_id/connectors/:connector_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 merchant_connector_id as variable for jsonData.merchant_connector_id if (jsonData?.merchant_connector_id) { pm.collectionVariables.set( "merchant_connector_id", jsonData.merchant_connector_id, ); console.log( "- use {{merchant_connector_id}} as collection variable for value", jsonData.merchant_connector_id, ); } else { console.log( "INFO - Unable to assign variable {{merchant_connector_id}}, as jsonData.merchant_connector_id is undefined.", ); }
244
8,533
hyperswitch
postman/collection-dir/bankofamerica/PaymentConnectors/Payment Connector - Retrieve/response.json
.json
[]
1
8,534
hyperswitch
postman/collection-dir/bankofamerica/PaymentConnectors/Payment Connector - Update/request.json
.json
{ "auth": { "type": "apikey", "apikey": [ { "key": "value", "value": "{{api_key}}", "type": "string" }, { "key": "key", "value": "api-key", "type": "string" }, { "key": "in", "value": "header", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "body": { "mode": "raw", "options": { "raw": { "language": "json" } }, "raw_json_formatted": { "connector_type": "payment_processor", "connector_account_details": { "auth_type": "SignatureKey", "api_key": "{{connector_api_key}}", "api_secret": "{{connector_api_secret}}", "key1": "{{connector_key1}}" }, "connector_label": "updated_stripe_connector", "test_mode": false, "disabled": false, "payment_methods_enabled": [ { "payment_method": "card", "payment_method_types": [ { "payment_method_type": "credit", "card_networks": ["Visa", "Mastercard"], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "debit", "card_networks": ["Visa", "Mastercard"], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] } ], "metadata": { "city": "NY", "unit": "245" } } }, "url": { "raw": "{{baseUrl}}/account/:account_id/connectors/:connector_id", "host": ["{{baseUrl}}"], "path": ["account", ":account_id", "connectors", ":connector_id"], "variable": [ { "key": "account_id", "value": "{{merchant_id}}" }, { "key": "connector_id", "value": "{{merchant_connector_id}}" } ] }, "description": "To update an existing Payment Connector. Helpful in enabling / disabling different payment methods and other settings for the connector etc" }
597
8,535
hyperswitch
postman/collection-dir/bankofamerica/PaymentConnectors/Payment Connector - Update/event.test.js
.js
// Validate status 2xx pm.test( "[POST]::/account/:account_id/connectors/:connector_id - Status code is 2xx", function () { pm.response.to.be.success; }, ); // Validate if response header has matching content-type pm.test( "[POST]::/account/:account_id/connectors/:connector_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 merchant_connector_id as variable for jsonData.merchant_connector_id if (jsonData?.merchant_connector_id) { pm.collectionVariables.set( "merchant_connector_id", jsonData.merchant_connector_id, ); console.log( "- use {{merchant_connector_id}} as collection variable for value", jsonData.merchant_connector_id, ); } else { console.log( "INFO - Unable to assign variable {{merchant_connector_id}}, as jsonData.merchant_connector_id is undefined.", ); } // Validate if the connector label is the one that is passed in the request pm.test( "[POST]::/accounts/:account_id/connectors - connector_label is not autogenerated", function () { pm.expect(jsonData.connector_label).to.eql("updated_stripe_connector") }, );
306
8,536
hyperswitch
postman/collection-dir/bankofamerica/PaymentConnectors/Payment Connector - Update/response.json
.json
[]
1
8,537
hyperswitch
postman/collection-dir/bankofamerica/PaymentConnectors/Merchant Account - Delete/request.json
.json
{ "auth": { "type": "apikey", "apikey": [ { "key": "value", "value": "{{admin_api_key}}", "type": "string" }, { "key": "key", "value": "api-key", "type": "string" }, { "key": "in", "value": "header", "type": "string" } ] }, "method": "DELETE", "header": [ { "key": "Accept", "value": "application/json" } ], "url": { "raw": "{{baseUrl}}/accounts/:id", "host": [ "{{baseUrl}}" ], "path": [ "accounts", ":id" ], "variable": [ { "key": "id", "value": "{{merchant_id}}", "description": "(Required) The unique identifier for the merchant account" } ] }, "description": "Delete a Merchant Account" }
232
8,538
hyperswitch
postman/collection-dir/bankofamerica/PaymentConnectors/Merchant Account - Delete/event.test.js
.js
// Validate status 2xx pm.test("[DELETE]::/accounts/:id - Status code is 2xx", function () { pm.response.to.be.success; }); // Validate if response header has matching content-type pm.test( "[DELETE]::/accounts/:id - Content-Type is application/json", function () { pm.expect(pm.response.headers.get("Content-Type")).to.include( "application/json", ); }, ); // Response Validation const schema = { type: "object", description: "Merchant Account", required: ["merchant_id", "deleted"], properties: { merchant_id: { type: "string", description: "The identifier for the MerchantAccount object.", maxLength: 255, example: "y3oqhf46pyzuxjbcn2giaqnb44", }, deleted: { type: "boolean", description: "Indicates the deletion status of the Merchant Account object.", example: true, }, }, }; // Validate if response matches JSON schema pm.test("[DELETE]::/accounts/:id - Schema is valid", function () { pm.response.to.have.jsonSchema(schema, { unknownFormats: ["int32", "int64", "float", "double"], }); });
280
8,539
hyperswitch
postman/collection-dir/bankofamerica/PaymentConnectors/Merchant Account - Delete/response.json
.json
[]
1
8,540
hyperswitch
postman/collection-dir/bankofamerica/PaymentConnectors/List Connectors by MID/request.json
.json
{ "auth": { "type": "apikey", "apikey": [ { "key": "value", "value": "{{api_key}}", "type": "string" }, { "key": "key", "value": "api-key", "type": "string" } ] }, "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" } ], "url": { "raw": "{{baseUrl}}/account/:account_id/connectors", "host": [ "{{baseUrl}}" ], "path": [ "account", ":account_id", "connectors" ], "variable": [ { "key": "account_id", "value": "{{merchant_id}}" } ] } }
191
8,541
hyperswitch
postman/collection-dir/bankofamerica/PaymentConnectors/List Connectors by MID/event.test.js
.js
// Validate status 2xx pm.test( "[GET]::/account/:account_id/connectors - Status code is 2xx", function () { pm.response.to.be.success; }, ); // Validate if response header has matching content-type pm.test( "[GET]::/account/:account_id/connectors - Content-Type is application/json", function () { pm.expect(pm.response.headers.get("Content-Type")).to.include( "application/json", ); }, );
104
8,542
hyperswitch
postman/collection-dir/bankofamerica/PaymentConnectors/List Connectors by MID/response.json
.json
[]
1
8,543
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario1-Create payment with confirm true/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
8,544
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario1-Create payment with confirm true/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 "processing" for "status" if (jsonData?.status) { pm.test( "[POST]::/payments/:id - Content check if value for 'status' matches 'succeeded'", function () { pm.expect(jsonData.status).to.eql("succeeded"); }, ); } // Response body should have "connector_transaction_id" // pm.test( // "[POST]::/payments - Content check if 'connector_transaction_id' exists", // function () { // pm.expect(typeof jsonData.connector_transaction_id !== "undefined").to.be // .true; // }, // );
566
8,545
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario1-Create payment with confirm true/Payments - Retrieve/response.json
.json
[]
1
8,546
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario1-Create payment with confirm true/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, "business_country": "US", "business_label": "default", "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6540, "customer_id": "bernard123", "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", "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": "debit", "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": "sundari", "last_name": "sundari" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "sundari", "last_name": "sundari" } }, "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" }
924
8,547
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario1-Create payment with confirm true/Payments - Create/event.test.js
.js
// Validate status 2xx pm.test("[POST]::/payments - Status code is 2xx", function () { pm.response.to.be.success; }); // Validate if response header has matching content-type pm.test("[POST]::/payments - Content-Type is application/json", function () { pm.expect(pm.response.headers.get("Content-Type")).to.include( "application/json", ); }); // Validate if response has JSON Body pm.test("[POST]::/payments - Response has JSON Body", function () { pm.response.to.have.jsonBody(); }); // Set response object as internal variable let jsonData = {}; try { jsonData = pm.response.json(); } catch (e) {} // pm.collectionVariables - Set payment_id as variable for jsonData.payment_id if (jsonData?.payment_id) { pm.collectionVariables.set("payment_id", jsonData.payment_id); console.log( "- use {{payment_id}} as collection variable for value", jsonData.payment_id, ); } else { console.log( "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.", ); } // pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id if (jsonData?.mandate_id) { pm.collectionVariables.set("mandate_id", jsonData.mandate_id); console.log( "- use {{mandate_id}} as collection variable for value", jsonData.mandate_id, ); } else { console.log( "INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.", ); } // pm.collectionVariables - Set client_secret as variable for jsonData.client_secret if (jsonData?.client_secret) { pm.collectionVariables.set("client_secret", jsonData.client_secret); console.log( "- use {{client_secret}} as collection variable for value", jsonData.client_secret, ); } else { console.log( "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.", ); } // Response body should have value "processing" for "status" because payment gets succeeded after one day. if (jsonData?.status) { pm.test( "[POST]::/payments - Content check if value for 'status' matches 'succeeded'", function () { pm.expect(jsonData.status).to.eql("succeeded"); }, ); } // Response body should have "connector_transaction_id" pm.test( "[POST]::/payments - Content check if 'connector_transaction_id' exists", function () { pm.expect(typeof jsonData.connector_transaction_id !== "undefined").to.be .true; }, );
556
8,548
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario1-Create payment with confirm true/Payments - Create/response.json
.json
[]
1
8,549
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Retrieve/request.json
.json
{ "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": { "raw": "{{baseUrl}}/payments/:id?force_sync=true", "host": [ "{{baseUrl}}" ], "path": [ "payments", ":id" ], "query": [ { "key": "force_sync", "value": "true" } ], "variable": [ { "key": "id", "value": "{{payment_id}}", "description": "(Required) unique payment id" } ] }, "description": "To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment" }
182
8,550
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Retrieve/event.test.js
.js
// Validate status 2xx // pm.test("[GET]::/payments/:id - Status code is 2xx", function () { // pm.response.to.be.success; // }); // Validate if response header has matching content-type pm.test("[GET]::/payments/:id - Content-Type is application/json", function () { pm.expect(pm.response.headers.get("Content-Type")).to.include( "application/json", ); }); // Validate if response has JSON Body pm.test("[GET]::/payments/:id - Response has JSON Body", function () { pm.response.to.have.jsonBody(); }); // Set response object as internal variable let jsonData = {}; try { jsonData = pm.response.json(); } catch (e) {} // pm.collectionVariables - Set payment_id as variable for jsonData.payment_id if (jsonData?.payment_id) { pm.collectionVariables.set("payment_id", jsonData.payment_id); console.log( "- use {{payment_id}} as collection variable for value", jsonData.payment_id, ); } else { console.log( "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.", ); } // pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id if (jsonData?.mandate_id) { pm.collectionVariables.set("mandate_id", jsonData.mandate_id); console.log( "- use {{mandate_id}} as collection variable for value", jsonData.mandate_id, ); } else { console.log( "INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.", ); } // pm.collectionVariables - Set client_secret as variable for jsonData.client_secret if (jsonData?.client_secret) { pm.collectionVariables.set("client_secret", jsonData.client_secret); console.log( "- use {{client_secret}} as collection variable for value", jsonData.client_secret, ); } else { console.log( "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.", ); } // Response body should have value "processing" 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"); }, ); }
501
8,551
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Retrieve/response.json
.json
[]
1
8,552
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Create/request.json
.json
{ "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "body": { "mode": "raw", "options": { "raw": { "language": "json" } }, "raw_json_formatted": { "amount": 6540, "currency": "USD", "confirm": false, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6540, "customer_id": "StripeCustomer", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://duck.com", "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "sundari", "last_name": "abcd" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "sundari", "last_name": "abcd" } }, "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" }
637
8,553
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Create/event.test.js
.js
// Validate status 2xx pm.test("[POST]::/payments - Status code is 2xx", function () { pm.response.to.be.success; }); // Validate if response header has matching content-type pm.test("[POST]::/payments - Content-Type is application/json", function () { pm.expect(pm.response.headers.get("Content-Type")).to.include( "application/json", ); }); // Validate if response has JSON Body pm.test("[POST]::/payments - Response has JSON Body", function () { pm.response.to.have.jsonBody(); }); // Set response object as internal variable let jsonData = {}; try { jsonData = pm.response.json(); } catch (e) {} // pm.collectionVariables - Set payment_id as variable for jsonData.payment_id if (jsonData?.payment_id) { pm.collectionVariables.set("payment_id", jsonData.payment_id); console.log( "- use {{payment_id}} as collection variable for value", jsonData.payment_id, ); } else { console.log( "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.", ); } // pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id if (jsonData?.mandate_id) { pm.collectionVariables.set("mandate_id", jsonData.mandate_id); console.log( "- use {{mandate_id}} as collection variable for value", jsonData.mandate_id, ); } else { console.log( "INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.", ); } // pm.collectionVariables - Set client_secret as variable for jsonData.client_secret if (jsonData?.client_secret) { pm.collectionVariables.set("client_secret", jsonData.client_secret); console.log( "- use {{client_secret}} as collection variable for value", jsonData.client_secret, ); } else { console.log( "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.", ); } // Response body should have value "requires_payment_method" for "status" if (jsonData?.status) { pm.test( "[POST]::/payments - Content check if value for 'status' matches 'requires_payment_method'", function () { pm.expect(jsonData.status).to.eql("requires_payment_method"); }, ); }
495
8,554
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Create/response.json
.json
[]
1
8,555
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Confirm/request.json
.json
{ "auth": { "type": "apikey", "apikey": [ { "key": "value", "value": "{{publishable_key}}", "type": "string" }, { "key": "key", "value": "api-key", "type": "string" }, { "key": "in", "value": "header", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "body": { "mode": "raw", "options": { "raw": { "language": "json" } }, "raw_json_formatted": { "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" } }, "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" }
439
8,556
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Confirm/event.test.js
.js
// Validate status 2xx pm.test("[POST]::/payments/:id/confirm - Status code is 2xx", function () { pm.response.to.be.success; }); // Validate if response header has matching content-type pm.test( "[POST]::/payments/:id/confirm - Content-Type is application/json", function () { pm.expect(pm.response.headers.get("Content-Type")).to.include( "application/json", ); }, ); // Validate if response has JSON Body pm.test("[POST]::/payments/:id/confirm - Response has JSON Body", function () { pm.response.to.have.jsonBody(); }); // Set response object as internal variable let jsonData = {}; try { jsonData = pm.response.json(); } catch (e) {} // pm.collectionVariables - Set payment_id as variable for jsonData.payment_id if (jsonData?.payment_id) { pm.collectionVariables.set("payment_id", jsonData.payment_id); console.log( "- use {{payment_id}} as collection variable for value", jsonData.payment_id, ); } else { console.log( "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.", ); } // pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id if (jsonData?.mandate_id) { pm.collectionVariables.set("mandate_id", jsonData.mandate_id); console.log( "- use {{mandate_id}} as collection variable for value", jsonData.mandate_id, ); } else { console.log( "INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.", ); } // pm.collectionVariables - Set client_secret as variable for jsonData.client_secret if (jsonData?.client_secret) { pm.collectionVariables.set("client_secret", jsonData.client_secret); console.log( "- use {{client_secret}} as collection variable for value", jsonData.client_secret, ); } else { console.log( "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.", ); } // Response body should have value "processing" 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"); }, ); }
511
8,557
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Confirm/response.json
.json
[]
1
8,558
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Confirm/event.prerequest.js
.js
0
8,559
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Retrieve/request.json
.json
{ "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": { "raw": "{{baseUrl}}/payments/:id?force_sync=true", "host": [ "{{baseUrl}}" ], "path": [ "payments", ":id" ], "query": [ { "key": "force_sync", "value": "true" } ], "variable": [ { "key": "id", "value": "{{payment_id}}", "description": "(Required) unique payment id" } ] }, "description": "To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment" }
182
8,560
hyperswitch
postman/collection-dir/bankofamerica/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 "processing" for "status" if (jsonData?.status) { pm.test( "[POST]::/payments:id - Content check if value for 'status' matches 'succeeded'", function () { pm.expect(jsonData.status).to.eql("succeeded"); }, ); } // Response body should have 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 "6540" for "amount_capturable" if (jsonData?.amount) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount_capturable' matches 'amount - 0'", function () { pm.expect(jsonData.amount_capturable).to.eql(0); }, ); }
663
8,561
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Retrieve/response.json
.json
[]
1
8,562
hyperswitch
postman/collection-dir/bankofamerica/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, "business_country": "US", "business_label": "default", "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6540, "customer_id": "bernard123", "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", "setup_future_usage": "on_session", "payment_method": "card", "payment_method_type": "debit", "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": "sundari", "last_name": "sundari" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "sundari", "last_name": "sundari" } }, "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" }
769
8,563
hyperswitch
postman/collection-dir/bankofamerica/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
8,564
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Create/response.json
.json
[]
1
8,565
hyperswitch
postman/collection-dir/bankofamerica/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}}", "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" } } } }, "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" }
503
8,566
hyperswitch
postman/collection-dir/bankofamerica/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 "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 "6540" for "amount_capturable" if (jsonData?.amount) { pm.test( "[post]:://payments/:id/capture - Content check if value for 'amount_capturable' matches 'amount - 0'", function () { pm.expect(jsonData.amount_capturable).to.eql(0); }, ); } // Response body should have value "processing" 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 "connector_transaction_id" pm.test( "[POST]::/payments - Content check if 'connector_transaction_id' exists", function () { pm.expect(typeof jsonData.connector_transaction_id !== "undefined").to.be .true; }, );
731
8,567
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Confirm/response.json
.json
[]
1
8,568
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Confirm/event.prerequest.js
.js
0
8,569
hyperswitch
postman/collection-dir/bankofamerica/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" }
182
8,570
hyperswitch
postman/collection-dir/bankofamerica/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
8,571
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Retrieve/response.json
.json
[]
1
8,572
hyperswitch
postman/collection-dir/bankofamerica/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, "business_country": "US", "business_label": "default", "capture_method": "manual", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 1, "customer_id": "bernard123", "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", "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": "debit", "payment_method_data": { "card": { "card_number": "3566111111111113", "card_exp_month": "12", "card_exp_year": "30", "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": "sundari", "last_name": "sundari" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "sundari", "last_name": "sundari" } }, "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" }
921
8,573
hyperswitch
postman/collection-dir/bankofamerica/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
8,574
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Create/response.json
.json
[]
1
8,575
hyperswitch
postman/collection-dir/bankofamerica/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" }
233
8,576
hyperswitch
postman/collection-dir/bankofamerica/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
8,577
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Cancel/response.json
.json
[]
1
8,578
hyperswitch
postman/collection-dir/bankofamerica/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" }
182
8,579
hyperswitch
postman/collection-dir/bankofamerica/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 "partially_captured" 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"); }, ); }
507
8,580
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Retrieve/response.json
.json
[]
1
8,581
hyperswitch
postman/collection-dir/bankofamerica/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, "business_country": "US", "business_label": "default", "capture_method": "manual", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6540, "customer_id": "bernard123", "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", "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": "debit", "payment_method_data": { "card": { "card_number": "3566111111111113", "card_exp_month": "12", "card_exp_year": "30", "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": "sundari", "last_name": "sundari" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "sundari", "last_name": "sundari" } }, "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" }
924
8,582
hyperswitch
postman/collection-dir/bankofamerica/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
8,583
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Create/response.json
.json
[]
1
8,584
hyperswitch
postman/collection-dir/bankofamerica/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" }
233
8,585
hyperswitch
postman/collection-dir/bankofamerica/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 "partially_captured" 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); }, ); }
678
8,586
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Capture/response.json
.json
[]
1
8,587
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/QuickStart/API Key - Create/request.json
.json
{ "auth": { "type": "apikey", "apikey": [ { "key": "value", "value": "{{admin_api_key}}", "type": "string" }, { "key": "key", "value": "api-key", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "body": { "mode": "raw", "raw_json_formatted": { "name": "API Key 1", "description": null, "expiration": "2069-09-23T01:02:03.000Z" } }, "url": { "raw": "{{baseUrl}}/api_keys/:merchant_id", "host": [ "{{baseUrl}}" ], "path": [ "api_keys", ":merchant_id" ], "variable": [ { "key": "merchant_id", "value": "{{merchant_id}}" } ] } }
275
8,588
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/QuickStart/API Key - Create/event.test.js
.js
// Validate status 2xx pm.test("[POST]::/api_keys/:merchant_id - Status code is 2xx", function () { pm.response.to.be.success; }); // Validate if response header has matching content-type pm.test( "[POST]::/api_keys/:merchant_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 api_key_id as variable for jsonData.key_id if (jsonData?.key_id) { pm.collectionVariables.set("api_key_id", jsonData.key_id); console.log( "- use {{api_key_id}} as collection variable for value", jsonData.key_id, ); } else { console.log( "INFO - Unable to assign variable {{api_key_id}}, as jsonData.key_id is undefined.", ); } // pm.collectionVariables - Set api_key as variable for jsonData.api_key if (jsonData?.api_key) { pm.collectionVariables.set("api_key", jsonData.api_key); console.log( "- use {{api_key}} as collection variable for value", jsonData.api_key, ); } else { console.log( "INFO - Unable to assign variable {{api_key}}, as jsonData.api_key is undefined.", ); }
306
8,589
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/QuickStart/API Key - Create/response.json
.json
[]
1
8,590
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/QuickStart/Payment Connector - Create/request.json
.json
{ "auth": { "type": "apikey", "apikey": [ { "key": "value", "value": "{{api_key}}", "type": "string" }, { "key": "key", "value": "api-key", "type": "string" }, { "key": "in", "value": "header", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "body": { "mode": "raw", "options": { "raw": { "language": "json" } }, "raw_json_formatted": { "connector_type": "payment_processor", "connector_name": "bankofamerica", "business_country": "US", "business_label": "default", "connector_label": "first_boa_connector", "connector_account_details": { "auth_type": "SignatureKey", "api_key": "{{connector_api_key}}", "api_secret": "{{connector_api_secret}}", "key1": "{{connector_key1}}" }, "test_mode": false, "disabled": false, "payment_methods_enabled": [ { "payment_method": "card", "payment_method_types": [ { "payment_method_type": "credit", "card_networks": ["Visa", "Mastercard"], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "debit", "card_networks": ["Visa", "Mastercard"], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] } ], "metadata": { "city": "NY", "unit": "245" } } }, "url": { "raw": "{{baseUrl}}/account/:account_id/connectors", "host": ["{{baseUrl}}"], "path": ["account", ":account_id", "connectors"], "variable": [ { "key": "account_id", "value": "{{merchant_id}}", "description": "(Required) The unique identifier for the merchant account" } ] }, "description": "Create a new Payment Connector for the merchant account. The connector could be a payment processor / facilitator / acquirer or specialised services like Fraud / Accounting etc." }
621
8,591
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/QuickStart/Payment Connector - Create/event.test.js
.js
// Validate status 2xx pm.test( "[POST]::/account/:account_id/connectors - Status code is 2xx", function () { pm.response.to.be.success; }, ); // Validate if response header has matching content-type pm.test( "[POST]::/account/:account_id/connectors - Content-Type is application/json", function () { pm.expect(pm.response.headers.get("Content-Type")).to.include( "application/json", ); }, ); // Set response object as internal variable let jsonData = {}; try { jsonData = pm.response.json(); } catch (e) {} // pm.collectionVariables - Set merchant_connector_id as variable for jsonData.merchant_connector_id if (jsonData?.merchant_connector_id) { pm.collectionVariables.set( "merchant_connector_id", jsonData.merchant_connector_id, ); console.log( "- use {{merchant_connector_id}} as collection variable for value", jsonData.merchant_connector_id, ); } else { console.log( "INFO - Unable to assign variable {{merchant_connector_id}}, as jsonData.merchant_connector_id is undefined.", ); }
238
8,592
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/QuickStart/Payment Connector - Create/response.json
.json
[]
1
8,593
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/QuickStart/Payments - Retrieve/request.json
.json
{ "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": { "raw": "{{baseUrl}}/payments/:id", "host": [ "{{baseUrl}}" ], "path": [ "payments", ":id" ], "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" }
152
8,594
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/QuickStart/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", ); }); // Set response object as internal variable let jsonData = {}; try { jsonData = pm.response.json(); } catch (e) {} // Validate if response has JSON Body pm.test("[GET]::/payments/:id - Response has JSON Body", function () { pm.response.to.have.jsonBody(); }); // pm.collectionVariables - Set payment_id as variable for jsonData.payment_id if (jsonData?.payment_id) { pm.collectionVariables.set("payment_id", jsonData.payment_id); 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.", ); }
430
8,595
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/QuickStart/Payments - Retrieve/response.json
.json
[]
1
8,596
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/QuickStart/Payments - Create/request.json
.json
{ "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "body": { "mode": "raw", "options": { "raw": { "language": "json" } }, "raw_json_formatted": { "amount": 6540, "currency": "USD", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6540, "customer_id": "StripeCustomer", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+1", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://duck.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4111111111111111", "card_exp_month": "12", "card_exp_year": "30", "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": "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" }
801
8,597
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/QuickStart/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.", ); }
424
8,598
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/QuickStart/Payments - Create/response.json
.json
[]
1
8,599
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/QuickStart/Merchant Account - Create/request.json
.json
{ "auth": { "type": "apikey", "apikey": [ { "key": "value", "value": "{{admin_api_key}}", "type": "string" }, { "key": "key", "value": "api-key", "type": "string" }, { "key": "in", "value": "header", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "body": { "mode": "raw", "options": { "raw": { "language": "json" } }, "raw_json_formatted": { "merchant_id": "postman_merchant_GHAction_{{$guid}}", "locker_id": "m0010", "merchant_name": "NewAge Retailer", "merchant_details": { "primary_contact_person": "John Test", "primary_email": "JohnTest@test.com", "primary_phone": "sunt laborum", "secondary_contact_person": "John Test2", "secondary_email": "JohnTest2@test.com", "secondary_phone": "cillum do dolor id", "website": "www.example.com", "about_business": "Online Retail with a wide selection of organic products for North America", "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US" } }, "return_url": "https://duck.com/success", "webhook_details": { "webhook_version": "1.0.1", "webhook_username": "ekart_retail", "webhook_password": "password_ekart@123", "payment_created_enabled": true, "payment_succeeded_enabled": true, "payment_failed_enabled": true }, "sub_merchants_enabled": false, "metadata": { "city": "NY", "unit": "245" }, "primary_business_details": [ { "country": "US", "business": "default" } ] } }, "url": { "raw": "{{baseUrl}}/accounts", "host": [ "{{baseUrl}}" ], "path": [ "accounts" ] }, "description": "Create a new account for a merchant. The merchant could be a seller or retailer or client who likes to receive and send payments." }
634
8,600
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/QuickStart/Merchant Account - Create/event.test.js
.js
// Validate status 2xx pm.test("[POST]::/accounts - Status code is 2xx", function () { pm.response.to.be.success; }); // Validate if response header has matching content-type pm.test("[POST]::/accounts - 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 merchant_id as variable for jsonData.merchant_id if (jsonData?.merchant_id) { pm.collectionVariables.set("merchant_id", jsonData.merchant_id); console.log( "- use {{merchant_id}} as collection variable for value", jsonData.merchant_id, ); } else { console.log( "INFO - Unable to assign variable {{merchant_id}}, as jsonData.merchant_id is undefined.", ); } // pm.collectionVariables - Set api_key as variable for jsonData.api_key if (jsonData?.api_key) { pm.collectionVariables.set("api_key", jsonData.api_key); console.log( "- use {{api_key}} as collection variable for value", jsonData.api_key, ); } else { console.log( "INFO - Unable to assign variable {{api_key}}, as jsonData.api_key is undefined.", ); } // pm.collectionVariables - Set publishable_key as variable for jsonData.publishable_key if (jsonData?.publishable_key) { pm.collectionVariables.set("publishable_key", jsonData.publishable_key); console.log( "- use {{publishable_key}} as collection variable for value", jsonData.publishable_key, ); } else { console.log( "INFO - Unable to assign variable {{publishable_key}}, as jsonData.publishable_key is undefined.", ); }
391
8,601
hyperswitch
postman/collection-dir/bankofamerica/Flow Testcases/QuickStart/Merchant Account - Create/response.json
.json
[]
1
8,602
hyperswitch
postman/collection-dir/bankofamerica/MerchantAccounts/Merchant Account - Retrieve/request.json
.json
{ "auth": { "type": "apikey", "apikey": [ { "key": "value", "value": "{{admin_api_key}}", "type": "string" }, { "key": "key", "value": "api-key", "type": "string" }, { "key": "in", "value": "header", "type": "string" } ] }, "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": { "raw": "{{baseUrl}}/accounts/:id", "host": [ "{{baseUrl}}" ], "path": [ "accounts", ":id" ], "variable": [ { "key": "id", "value": "{{merchant_id}}", "description": "(Required) The unique identifier for the merchant account" } ] }, "description": "Retrieve a merchant account details." }
233
8,603
hyperswitch
postman/collection-dir/bankofamerica/MerchantAccounts/Merchant Account - Retrieve/event.test.js
.js
// Validate status 2xx pm.test("[GET]::/accounts/:id - Status code is 2xx", function () { pm.response.to.be.success; }); // Validate if response header has matching content-type pm.test("[GET]::/accounts/: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 api_key as variable for jsonData.api_key if (jsonData?.api_key) { pm.collectionVariables.set("api_key", jsonData.api_key); console.log( "- use {{api_key}} as collection variable for value", jsonData.api_key, ); } else { console.log( "INFO - Unable to assign variable {{api_key}}, as jsonData.api_key is undefined.", ); } // pm.collectionVariables - Set publishable_key as variable for jsonData.publishable_key if (jsonData?.publishable_key) { pm.collectionVariables.set("publishable_key", jsonData.publishable_key); console.log( "- use {{publishable_key}} as collection variable for value", jsonData.publishable_key, ); } else { console.log( "INFO - Unable to assign variable {{publishable_key}}, as jsonData.publishable_key is undefined.", ); }
302
8,604
hyperswitch
postman/collection-dir/bankofamerica/MerchantAccounts/Merchant Account - Retrieve/response.json
.json
[]
1
8,605