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/Happy Cases/Scenario6-Create 3DS payment with confirm false/Payments - Retrieve/request.json | .json | {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "{{baseUrl}}/payments/:id?force_sync=true",
"host": ["{{baseUrl}}"],
"path": ["payments", ":id"],
"query": [
{
"key": "force_sync",
"value": "true"
}
],
"variable": [
{
"key": "id",
"value": "{{payment_id}}",
"description": "(Required) unique payment id"
}
]
},
"description": "To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment"
}
| 175 | 8,406 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario6-Create 3DS payment with confirm false/Payments - Retrieve/event.test.js | .js | // Validate status 2xx
pm.test("[GET]::/payments/:id - Status code is 2xx", function () {
pm.response.to.be.success;
});
// Validate if response header has matching content-type
pm.test("[GET]::/payments/:id - Content-Type is application/json", function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include(
"application/json",
);
});
// Validate if response has JSON Body
pm.test("[GET]::/payments/:id - Response has JSON Body", function () {
pm.response.to.have.jsonBody();
});
// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
if (jsonData?.payment_id) {
pm.collectionVariables.set("payment_id", jsonData.payment_id);
console.log(
"- use {{payment_id}} as collection variable for value",
jsonData.payment_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
);
}
// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
if (jsonData?.mandate_id) {
pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
console.log(
"- use {{mandate_id}} as collection variable for value",
jsonData.mandate_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
);
}
// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
if (jsonData?.client_secret) {
pm.collectionVariables.set("client_secret", jsonData.client_secret);
console.log(
"- use {{client_secret}} as collection variable for value",
jsonData.client_secret,
);
} else {
console.log(
"INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
);
}
// Response body should have value "requires_customer_action" for "status"
if (jsonData?.status) {
pm.test(
"[POST]::/payments:id - Content check if value for 'status' matches 'requires_customer_action'",
function () {
pm.expect(jsonData.status).to.eql("requires_customer_action");
},
);
}
| 502 | 8,407 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario6-Create 3DS payment with confirm false/Payments - Retrieve/response.json | .json | []
| 1 | 8,408 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario6-Create 3DS payment with confirm false/Payments - Create/request.json | .json | {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"options": {
"raw": {
"language": "json"
}
},
"raw_json_formatted": {
"amount": 6540,
"currency": "USD",
"confirm": false,
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"amount_to_capture": 6540,
"customer_id": "StripeCustomer",
"email": "guest@example.com",
"name": "John Doe",
"phone": "999999999",
"phone_country_code": "+65",
"description": "Its my first payment request",
"authentication_type": "three_ds",
"return_url": "https://duck.com",
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_data": {
"card": {
"card_number": "4012000000020071",
"card_exp_month": "10",
"card_exp_year": "25",
"card_holder_name": "joseph Doe",
"card_cvc": "123"
}
},
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "PiX"
}
},
"shipping": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"zip": "94122",
"country": "US",
"first_name": "PiX"
}
},
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
}
}
},
"url": {
"raw": "{{baseUrl}}/payments",
"host": ["{{baseUrl}}"],
"path": ["payments"]
},
"description": "To process a payment you will have to create a payment, attach a payment method and confirm. Depending on the user journey you wish to achieve, you may opt to all the steps in a single request or in a sequence of API request using following APIs: (i) Payments - Update, (ii) Payments - Confirm, and (iii) Payments - Capture"
}
| 704 | 8,409 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario6-Create 3DS payment with confirm false/Payments - Create/event.test.js | .js | // Validate status 2xx
pm.test("[POST]::/payments - Status code is 2xx", function () {
pm.response.to.be.success;
});
// Validate if response header has matching content-type
pm.test("[POST]::/payments - Content-Type is application/json", function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include(
"application/json",
);
});
// Validate if response has JSON Body
pm.test("[POST]::/payments - Response has JSON Body", function () {
pm.response.to.have.jsonBody();
});
// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
if (jsonData?.payment_id) {
pm.collectionVariables.set("payment_id", jsonData.payment_id);
console.log(
"- use {{payment_id}} as collection variable for value",
jsonData.payment_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
);
}
// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
if (jsonData?.mandate_id) {
pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
console.log(
"- use {{mandate_id}} as collection variable for value",
jsonData.mandate_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
);
}
// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
if (jsonData?.client_secret) {
pm.collectionVariables.set("client_secret", jsonData.client_secret);
console.log(
"- use {{client_secret}} as collection variable for value",
jsonData.client_secret,
);
} else {
console.log(
"INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
);
}
// Response body should have value "requires_confirmation" for "status"
if (jsonData?.status) {
pm.test(
"[POST]::/payments - Content check if value for 'status' matches 'requires_confirmation'",
function () {
pm.expect(jsonData.status).to.eql("requires_confirmation");
},
);
}
| 492 | 8,410 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario6-Create 3DS payment with confirm false/Payments - Create/response.json | .json | []
| 1 | 8,411 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario6-Create 3DS payment with confirm false/Payments - Confirm/request.json | .json | {
"auth": {
"type": "apikey",
"apikey": [
{
"key": "value",
"value": "{{publishable_key}}",
"type": "string"
},
{
"key": "key",
"value": "api-key",
"type": "string"
},
{
"key": "in",
"value": "header",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"options": {
"raw": {
"language": "json"
}
},
"raw_json_formatted": {
"client_secret": "{{client_secret}}",
"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/: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"
}
| 517 | 8,412 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario6-Create 3DS payment with confirm false/Payments - Confirm/event.test.js | .js | // Validate status 2xx
pm.test("[POST]::/payments/:id/confirm - Status code is 2xx", function () {
pm.response.to.be.success;
});
// Validate if response header has matching content-type
pm.test(
"[POST]::/payments/:id/confirm - Content-Type is application/json",
function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include(
"application/json",
);
},
);
// Validate if response has JSON Body
pm.test("[POST]::/payments/:id/confirm - Response has JSON Body", function () {
pm.response.to.have.jsonBody();
});
// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
if (jsonData?.payment_id) {
pm.collectionVariables.set("payment_id", jsonData.payment_id);
console.log(
"- use {{payment_id}} as collection variable for value",
jsonData.payment_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
);
}
// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
if (jsonData?.mandate_id) {
pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
console.log(
"- use {{mandate_id}} as collection variable for value",
jsonData.mandate_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
);
}
// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
if (jsonData?.client_secret) {
pm.collectionVariables.set("client_secret", jsonData.client_secret);
console.log(
"- use {{client_secret}} as collection variable for value",
jsonData.client_secret,
);
} else {
console.log(
"INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
);
}
// Response body should have value "requires_customer_action" for "status"
if (jsonData?.status) {
pm.test(
"[POST]::/payments/:id/confirm - Content check if value for 'status' matches 'requires_customer_action'",
function () {
pm.expect(jsonData.status).to.eql("requires_customer_action");
},
);
}
// Response body should have "next_action.redirect_to_url"
pm.test(
"[POST]::/payments/:id/confirm - Content check if 'next_action.redirect_to_url' exists",
function () {
pm.expect(typeof jsonData.next_action.redirect_to_url !== "undefined").to.be
.true;
},
);
| 583 | 8,413 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario6-Create 3DS payment with confirm false/Payments - Confirm/response.json | .json | []
| 1 | 8,414 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Retrieve/request.json | .json | {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "{{baseUrl}}/payments/:id?force_sync=true",
"host": ["{{baseUrl}}"],
"path": ["payments", ":id"],
"query": [
{
"key": "force_sync",
"value": "true"
}
],
"variable": [
{
"key": "id",
"value": "{{payment_id}}",
"description": "(Required) unique payment id"
}
]
},
"description": "To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment"
}
| 175 | 8,415 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Retrieve/event.test.js | .js | // Validate status 2xx
pm.test("[GET]::/payments/:id - Status code is 2xx", function () {
pm.response.to.be.success;
});
// Validate if response header has matching content-type
pm.test("[GET]::/payments/:id - Content-Type is application/json", function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include(
"application/json",
);
});
// Validate if response has JSON Body
pm.test("[GET]::/payments/:id - Response has JSON Body", function () {
pm.response.to.have.jsonBody();
});
// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
if (jsonData?.payment_id) {
pm.collectionVariables.set("payment_id", jsonData.payment_id);
console.log(
"- use {{payment_id}} as collection variable for value",
jsonData.payment_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
);
}
// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
if (jsonData?.mandate_id) {
pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
console.log(
"- use {{mandate_id}} as collection variable for value",
jsonData.mandate_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
);
}
// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
if (jsonData?.client_secret) {
pm.collectionVariables.set("client_secret", jsonData.client_secret);
console.log(
"- use {{client_secret}} as collection variable for value",
jsonData.client_secret,
);
} else {
console.log(
"INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
);
}
// Response body should have value "succeeded" for "status"
if (jsonData?.status) {
pm.test(
"[POST]::/payments:id - Content check if value for 'status' matches 'succeeded'",
function () {
pm.expect(jsonData.status).to.eql("succeeded");
},
);
}
| 499 | 8,416 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Retrieve/response.json | .json | []
| 1 | 8,417 |
hyperswitch | postman/collection-dir/powertranz/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",
"raw": "{\n \"amount\": {{random_number}},\n \"currency\": \"USD\",\n \"confirm\": false,\n \"capture_method\": \"automatic\",\n \"capture_on\": \"2022-09-10T10:11:12Z\",\n \"amount_to_capture\": {{random_number}},\n \"customer_id\": \"StripeCustomer\",\n \"email\": \"guest@example.com\",\n \"name\": \"John Doe\",\n \"phone\": \"999999999\",\n \"phone_country_code\": \"+65\",\n \"description\": \"Its my first payment request\",\n \"authentication_type\": \"no_three_ds\",\n \"return_url\": \"https://duck.com\",\n \"billing\": {\n \"address\": {\n \"line1\": \"1467\",\n \"line2\": \"Harrison Street\",\n \"line3\": \"Harrison Street\",\n \"city\": \"San Fransico\",\n \"state\": \"California\",\n \"zip\": \"94122\",\n \"country\": \"US\",\n \"first_name\": \"PiX\"\n }\n },\n \"shipping\": {\n \"address\": {\n \"line1\": \"1467\",\n \"line2\": \"Harrison Street\",\n \"line3\": \"Harrison Street\",\n \"city\": \"San Fransico\",\n \"zip\": \"94122\",\n \"country\": \"US\",\n \"first_name\": \"PiX\"\n }\n },\n \"statement_descriptor_name\": \"joseph\",\n \"statement_descriptor_suffix\": \"JS\",\n \"metadata\": {\n \"udf1\": \"value1\",\n \"new_customer\": \"true\",\n \"login_date\": \"2019-09-10T10:11:12Z\"\n }\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"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"
}
| 650 | 8,418 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Create/event.test.js | .js | pm.environment.set("random_number", _.random(100, 100000));
// 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");
},
);
}
| 517 | 8,419 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Create/response.json | .json | []
| 1 | 8,420 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Confirm/request.json | .json | {
"auth": {
"type": "apikey",
"apikey": [
{
"key": "value",
"value": "{{publishable_key}}",
"type": "string"
},
{
"key": "key",
"value": "api-key",
"type": "string"
},
{
"key": "in",
"value": "header",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"options": {
"raw": {
"language": "json"
}
},
"raw_json_formatted": {
"client_secret": "{{client_secret}}",
"payment_method": "card",
"payment_method_data": {
"card": {
"card_number": "4111111111111111",
"card_exp_month": "10",
"card_exp_year": "25",
"card_holder_name": "joseph Doe",
"card_cvc": "123"
}
}
}
},
"url": {
"raw": "{{baseUrl}}/payments/:id/confirm",
"host": ["{{baseUrl}}"],
"path": ["payments", ":id", "confirm"],
"variable": [
{
"key": "id",
"value": "{{payment_id}}",
"description": "(Required) unique payment id"
}
]
},
"description": "This API is to confirm the payment request and forward payment to the payment processor. This API provides more granular control upon when the API is forwarded to the payment processor. Alternatively you can confirm the payment within the Payments-Create API"
}
| 432 | 8,421 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Confirm/event.test.js | .js | // Validate status 2xx
pm.test("[POST]::/payments/:id/confirm - Status code is 2xx", function () {
pm.response.to.be.success;
});
// Validate if response header has matching content-type
pm.test(
"[POST]::/payments/:id/confirm - Content-Type is application/json",
function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include(
"application/json",
);
},
);
// Validate if response has JSON Body
pm.test("[POST]::/payments/:id/confirm - Response has JSON Body", function () {
pm.response.to.have.jsonBody();
});
// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
if (jsonData?.payment_id) {
pm.collectionVariables.set("payment_id", jsonData.payment_id);
console.log(
"- use {{payment_id}} as collection variable for value",
jsonData.payment_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
);
}
// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
if (jsonData?.mandate_id) {
pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
console.log(
"- use {{mandate_id}} as collection variable for value",
jsonData.mandate_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
);
}
// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
if (jsonData?.client_secret) {
pm.collectionVariables.set("client_secret", jsonData.client_secret);
console.log(
"- use {{client_secret}} as collection variable for value",
jsonData.client_secret,
);
} else {
console.log(
"INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
);
}
// Response body should have value "succeeded" for "status"
if (jsonData?.status) {
pm.test(
"[POST]::/payments:id/confirm - Content check if value for 'status' matches 'succeeded'",
function () {
pm.expect(jsonData.status).to.eql("succeeded");
},
);
}
| 512 | 8,422 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Confirm/response.json | .json | []
| 1 | 8,423 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario2-Create fail 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"
}
| 175 | 8,424 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario2-Create fail 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 "Succeeded" for "status"
if (jsonData?.status) {
pm.test(
"[POST]::/payments/:id - Content check if value for 'status' matches 'succeeded'",
function () {
pm.expect(jsonData.status).to.eql("succeeded");
},
);
}
| 500 | 8,425 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario2-Create fail payment with confirm true/Payments - Retrieve/response.json | .json | []
| 1 | 8,426 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario2-Create fail 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": 1000,
"currency": "USD",
"confirm": true,
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"amount_to_capture": 1000,
"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": "4012000000020071",
"card_exp_month": "10",
"card_exp_year": "25",
"card_holder_name": "joseph Doe",
"card_cvc": "123"
}
},
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "PiX",
"last_name": "PiX"
}
},
"shipping": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "PiX",
"last_name": "PiX"
}
},
"order_details": [
{
"product_name": "Apple iphone 15",
"quantity": 1,
"amount": 1000,
"account_name": "transaction_processing"
}
],
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"metadata": {
"order_details": {
"product_name": "iphone 13",
"quantity": 1
}
},
"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"
}
| 935 | 8,427 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario2-Create fail payment with confirm true/Payments - Create/event.test.js | .js | pm.environment.set("random_number", _.random(100, 100000));
// Validate status 2xx
pm.test("[POST]::/payments - Status code is 2xx", function () {
pm.response.to.be.success;
});
// Validate if response header has matching content-type
pm.test("[POST]::/payments - Content-Type is application/json", function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include(
"application/json",
);
});
// Validate if response has JSON Body
pm.test("[POST]::/payments - Response has JSON Body", function () {
pm.response.to.have.jsonBody();
});
// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
if (jsonData?.payment_id) {
pm.collectionVariables.set("payment_id", jsonData.payment_id);
console.log(
"- use {{payment_id}} as collection variable for value",
jsonData.payment_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
);
}
// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
if (jsonData?.mandate_id) {
pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
console.log(
"- use {{mandate_id}} as collection variable for value",
jsonData.mandate_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
);
}
// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
if (jsonData?.client_secret) {
pm.collectionVariables.set("client_secret", jsonData.client_secret);
console.log(
"- use {{client_secret}} as collection variable for value",
jsonData.client_secret,
);
} else {
console.log(
"INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
);
}
// Response body should have value "succeeded" for "status"
if (jsonData?.status) {
pm.test(
"[POST]::/payments - Content check if value for 'status' matches 'succeeded'",
function () {
pm.expect(jsonData.status).to.eql("succeeded");
},
);
}
| 514 | 8,428 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario2-Create fail payment with confirm true/Payments - Create/response.json | .json | []
| 1 | 8,429 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Retrieve/request.json | .json | {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "{{baseUrl}}/payments/:id?force_sync=true",
"host": ["{{baseUrl}}"],
"path": ["payments", ":id"],
"query": [
{
"key": "force_sync",
"value": "true"
}
],
"variable": [
{
"key": "id",
"value": "{{payment_id}}",
"description": "(Required) unique payment id"
}
]
},
"description": "To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment"
}
| 175 | 8,430 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Retrieve/event.test.js | .js | // Validate status 2xx
pm.test("[GET]::/payments/:id - Status code is 2xx", function () {
pm.response.to.be.success;
});
// Validate if response header has matching content-type
pm.test("[GET]::/payments/:id - Content-Type is application/json", function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include(
"application/json",
);
});
// Validate if response has JSON Body
pm.test("[GET]::/payments/:id - Response has JSON Body", function () {
pm.response.to.have.jsonBody();
});
// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
if (jsonData?.payment_id) {
pm.collectionVariables.set("payment_id", jsonData.payment_id);
console.log(
"- use {{payment_id}} as collection variable for value",
jsonData.payment_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
);
}
// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
if (jsonData?.mandate_id) {
pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
console.log(
"- use {{mandate_id}} as collection variable for value",
jsonData.mandate_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
);
}
// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
if (jsonData?.client_secret) {
pm.collectionVariables.set("client_secret", jsonData.client_secret);
console.log(
"- use {{client_secret}} as collection variable for value",
jsonData.client_secret,
);
} else {
console.log(
"INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
);
}
// Response body should have value "succeeded" for "status"
if (jsonData?.status) {
pm.test(
"[POST]::/payments:id - Content check if value for 'status' matches 'succeeded'",
function () {
pm.expect(jsonData.status).to.eql("succeeded");
},
);
}
| 499 | 8,431 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Retrieve/response.json | .json | []
| 1 | 8,432 |
hyperswitch | postman/collection-dir/powertranz/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",
"raw": "{\n \"amount\": {{random_number}},\n \"currency\": \"USD\",\n \"confirm\": false,\n \"capture_method\": \"automatic\",\n \"capture_on\": \"2022-09-10T10:11:12Z\",\n \"amount_to_capture\": {{random_number}},\n \"customer_id\": \"StripeCustomer\",\n \"email\": \"guest@example.com\",\n \"name\": \"John Doe\",\n \"phone\": \"999999999\",\n \"phone_country_code\": \"+65\",\n \"description\": \"Its my last payment request\",\n \"authentication_type\": \"no_three_ds\",\n \"return_url\": \"https://duck.com\",\n \"payment_method\": \"card\",\n \"payment_method_data\": {\n \"card\": {\n \"card_number\": \"5100270000000023\",\n \"card_exp_month\": \"10\",\n \"card_exp_year\": \"25\",\n \"card_holder_name\": \"joseph Doe\",\n \"card_cvc\": \"123\"\n }\n },\n \"billing\": {\n \"address\": {\n \"line1\": \"1467\",\n \"line2\": \"Harrison Street\",\n \"line3\": \"Harrison Street\",\n \"city\": \"San Fransico\",\n \"state\": \"California\",\n \"zip\": \"94122\",\n \"country\": \"US\",\n \"first_name\": \"PiX\"\n }\n },\n \"shipping\": {\n \"address\": {\n \"line1\": \"1467\",\n \"line2\": \"Harrison Street\",\n \"line3\": \"Harrison Street\",\n \"city\": \"San Fransico\",\n \"zip\": \"94122\",\n \"country\": \"US\",\n \"first_name\": \"PiX\"\n }\n },\n \"statement_descriptor_name\": \"joseph\",\n \"statement_descriptor_suffix\": \"JS\",\n \"metadata\": {\n \"udf1\": \"value1\",\n \"new_customer\": \"true\",\n \"login_date\": \"2019-09-10T10:11:12Z\"\n }\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"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"
}
| 751 | 8,433 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Create/event.test.js | .js | pm.environment.set("random_number", _.random(100, 100000));
// 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");
},
);
}
| 514 | 8,434 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Create/response.json | .json | []
| 1 | 8,435 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Confirm/request.json | .json | {
"auth": {
"type": "apikey",
"apikey": [
{
"key": "value",
"value": "{{publishable_key}}",
"type": "string"
},
{
"key": "key",
"value": "api-key",
"type": "string"
},
{
"key": "in",
"value": "header",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"options": {
"raw": {
"language": "json"
}
},
"raw_json_formatted": {
"client_secret": "{{client_secret}}"
}
},
"url": {
"raw": "{{baseUrl}}/payments/:id/confirm",
"host": ["{{baseUrl}}"],
"path": ["payments", ":id", "confirm"],
"variable": [
{
"key": "id",
"value": "{{payment_id}}",
"description": "(Required) unique payment id"
}
]
},
"description": "This API is to confirm the payment request and forward payment to the payment processor. This API provides more granular control upon when the API is forwarded to the payment processor. Alternatively you can confirm the payment within the Payments-Create API"
}
| 341 | 8,436 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Confirm/event.test.js | .js | // Validate status 2xx
pm.test("[POST]::/payments/:id/confirm - Status code is 2xx", function () {
pm.response.to.be.success;
});
// Validate if response header has matching content-type
pm.test(
"[POST]::/payments/:id/confirm - Content-Type is application/json",
function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include(
"application/json",
);
},
);
// Validate if response has JSON Body
pm.test("[POST]::/payments/:id/confirm - Response has JSON Body", function () {
pm.response.to.have.jsonBody();
});
// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
if (jsonData?.payment_id) {
pm.collectionVariables.set("payment_id", jsonData.payment_id);
console.log(
"- use {{payment_id}} as collection variable for value",
jsonData.payment_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
);
}
// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
if (jsonData?.mandate_id) {
pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
console.log(
"- use {{mandate_id}} as collection variable for value",
jsonData.mandate_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
);
}
// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
if (jsonData?.client_secret) {
pm.collectionVariables.set("client_secret", jsonData.client_secret);
console.log(
"- use {{client_secret}} as collection variable for value",
jsonData.client_secret,
);
} else {
console.log(
"INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
);
}
// Response body should have value "succeeded" for "status"
if (jsonData?.status) {
pm.test(
"[POST]::/payments/:id/confirm - Content check if value for 'status' matches 'succeeded'",
function () {
pm.expect(jsonData.status).to.eql("succeeded");
},
);
}
| 513 | 8,437 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Confirm/response.json | .json | []
| 1 | 8,438 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario10-Partial refund/Refunds - Create-copy/request.json | .json | {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"options": {
"raw": {
"language": "json"
}
},
"raw_json_formatted": {
"payment_id": "{{payment_id}}",
"amount": 500,
"reason": "Customer returned product",
"refund_type": "instant",
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
}
}
},
"url": {
"raw": "{{baseUrl}}/refunds",
"host": ["{{baseUrl}}"],
"path": ["refunds"]
},
"description": "To create a refund against an already processed payment"
}
| 237 | 8,439 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario10-Partial refund/Refunds - Create-copy/event.test.js | .js | // Validate status 2xx
pm.test("[POST]::/refunds - Status code is 2xx", function () {
pm.response.to.be.success;
});
// Validate if response header has matching content-type
pm.test("[POST]::/refunds - Content-Type is application/json", function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include(
"application/json",
);
});
// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
// pm.collectionVariables - Set refund_id as variable for jsonData.payment_id
if (jsonData?.refund_id) {
pm.collectionVariables.set("refund_id", jsonData.refund_id);
console.log(
"- use {{refund_id}} as collection variable for value",
jsonData.refund_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{refund_id}}, as jsonData.refund_id is undefined.",
);
}
// Response body should have value "succeeded" for "status"
if (jsonData?.status) {
pm.test(
"[POST]::/refunds - Content check if value for 'status' matches 'failed'",
function () {
pm.expect(jsonData.status).to.eql("failed");
},
);
}
// Response body should have value "1000" for "amount"
if (jsonData?.status) {
pm.test(
"[POST]::/refunds - Content check if value for 'amount' matches '500'",
function () {
pm.expect(jsonData.amount).to.eql(500);
},
);
}
| 345 | 8,440 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario10-Partial refund/Refunds - Create-copy/response.json | .json | []
| 1 | 8,441 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario10-Partial refund/Refunds - Create/request.json | .json | {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"options": {
"raw": {
"language": "json"
}
},
"raw_json_formatted": {
"payment_id": "{{payment_id}}",
"amount": 100,
"reason": "Customer returned product",
"refund_type": "instant",
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
}
}
},
"url": {
"raw": "{{baseUrl}}/refunds",
"host": ["{{baseUrl}}"],
"path": ["refunds"]
},
"description": "To create a refund against an already processed payment"
}
| 237 | 8,442 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario10-Partial refund/Refunds - Create/event.test.js | .js | // Validate status 2xx
pm.test("[POST]::/refunds - Status code is 2xx", function () {
pm.response.to.be.success;
});
// Validate if response header has matching content-type
pm.test("[POST]::/refunds - Content-Type is application/json", function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include(
"application/json",
);
});
// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
// pm.collectionVariables - Set refund_id as variable for jsonData.payment_id
if (jsonData?.refund_id) {
pm.collectionVariables.set("refund_id", jsonData.refund_id);
console.log(
"- use {{refund_id}} as collection variable for value",
jsonData.refund_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{refund_id}}, as jsonData.refund_id is undefined.",
);
}
// Response body should have value "succeeded" for "status"
if (jsonData?.status) {
pm.test(
"[POST]::/refunds - Content check if value for 'status' matches 'succeeded'",
function () {
pm.expect(jsonData.status).to.eql("succeeded");
},
);
}
// Response body should have value "540" for "amount"
if (jsonData?.status) {
pm.test(
"[POST]::/refunds - Content check if value for 'amount' matches '100'",
function () {
pm.expect(jsonData.amount).to.eql(100);
},
);
}
| 346 | 8,443 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario10-Partial refund/Refunds - Create/response.json | .json | []
| 1 | 8,444 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario10-Partial refund/Refunds - Retrieve/request.json | .json | {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "{{baseUrl}}/refunds/:id",
"host": ["{{baseUrl}}"],
"path": ["refunds", ":id"],
"variable": [
{
"key": "id",
"value": "{{refund_id}}",
"description": "(Required) unique refund id"
}
]
},
"description": "To retrieve the properties of a Refund. This may be used to get the status of a previously initiated payment or next action for an ongoing payment"
}
| 148 | 8,445 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario10-Partial refund/Refunds - Retrieve/event.test.js | .js | // Validate status 2xx
pm.test("[GET]::/refunds/:id - Status code is 2xx", function () {
pm.response.to.be.success;
});
// Validate if response header has matching content-type
pm.test("[GET]::/refunds/:id - Content-Type is application/json", function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include(
"application/json",
);
});
// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
// pm.collectionVariables - Set refund_id as variable for jsonData.payment_id
if (jsonData?.refund_id) {
pm.collectionVariables.set("refund_id", jsonData.refund_id);
console.log(
"- use {{refund_id}} as collection variable for value",
jsonData.refund_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{refund_id}}, as jsonData.refund_id is undefined.",
);
}
// Response body should have value "succeeded" for "status"
if (jsonData?.status) {
pm.test(
"[POST]::/refunds - Content check if value for 'status' matches 'succeeded'",
function () {
pm.expect(jsonData.status).to.eql("succeeded");
},
);
}
// Response body should have value "6540" for "amount"
if (jsonData?.status) {
pm.test(
"[POST]::/refunds - Content check if value for 'amount' matches '100'",
function () {
pm.expect(jsonData.amount).to.eql(100);
},
);
}
| 351 | 8,446 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario10-Partial refund/Refunds - Retrieve/response.json | .json | []
| 1 | 8,447 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario10-Partial refund/Payments - Retrieve/request.json | .json | {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "{{baseUrl}}/payments/:id?force_sync=true",
"host": ["{{baseUrl}}"],
"path": ["payments", ":id"],
"query": [
{
"key": "force_sync",
"value": "true"
}
],
"variable": [
{
"key": "id",
"value": "{{payment_id}}",
"description": "(Required) unique payment id"
}
]
},
"description": "To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment"
}
| 175 | 8,448 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario10-Partial refund/Payments - Retrieve/event.test.js | .js | // Validate status 2xx
pm.test("[GET]::/payments/:id - Status code is 2xx", function () {
pm.response.to.be.success;
});
// Validate if response header has matching content-type
pm.test("[GET]::/payments/:id - Content-Type is application/json", function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include(
"application/json",
);
});
// Validate if response has JSON Body
pm.test("[GET]::/payments/:id - Response has JSON Body", function () {
pm.response.to.have.jsonBody();
});
// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
if (jsonData?.payment_id) {
pm.collectionVariables.set("payment_id", jsonData.payment_id);
console.log(
"- use {{payment_id}} as collection variable for value",
jsonData.payment_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
);
}
// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
if (jsonData?.mandate_id) {
pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
console.log(
"- use {{mandate_id}} as collection variable for value",
jsonData.mandate_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
);
}
// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
if (jsonData?.client_secret) {
pm.collectionVariables.set("client_secret", jsonData.client_secret);
console.log(
"- use {{client_secret}} as collection variable for value",
jsonData.client_secret,
);
} else {
console.log(
"INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
);
}
// Response body should have value "Succeeded" for "status"
if (jsonData?.status) {
pm.test(
"[POST]::/payments/:id - Content check if value for 'status' matches 'succeeded'",
function () {
pm.expect(jsonData.status).to.eql("succeeded");
},
);
}
| 500 | 8,449 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario10-Partial refund/Payments - Retrieve/response.json | .json | []
| 1 | 8,450 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario10-Partial refund/Payments - Retrieve-copy/request.json | .json | {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "{{baseUrl}}/payments/:id?force_sync=true",
"host": ["{{baseUrl}}"],
"path": ["payments", ":id"],
"query": [
{
"key": "force_sync",
"value": "true"
}
],
"variable": [
{
"key": "id",
"value": "{{payment_id}}",
"description": "(Required) unique payment id"
}
]
},
"description": "To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment"
}
| 175 | 8,451 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario10-Partial refund/Payments - Retrieve-copy/event.test.js | .js | // Validate status 2xx
pm.test("[GET]::/payments/:id - Status code is 2xx", function () {
pm.response.to.be.success;
});
// Validate if response header has matching content-type
pm.test("[GET]::/payments/:id - Content-Type is application/json", function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include(
"application/json",
);
});
// Validate if response has JSON Body
pm.test("[GET]::/payments/:id - Response has JSON Body", function () {
pm.response.to.have.jsonBody();
});
// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
if (jsonData?.payment_id) {
pm.collectionVariables.set("payment_id", jsonData.payment_id);
console.log(
"- use {{payment_id}} as collection variable for value",
jsonData.payment_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
);
}
// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
if (jsonData?.mandate_id) {
pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
console.log(
"- use {{mandate_id}} as collection variable for value",
jsonData.mandate_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
);
}
// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
if (jsonData?.client_secret) {
pm.collectionVariables.set("client_secret", jsonData.client_secret);
console.log(
"- use {{client_secret}} as collection variable for value",
jsonData.client_secret,
);
} else {
console.log(
"INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
);
}
// Response body should have value "Succeeded" for "status"
if (jsonData?.status) {
pm.test(
"[POST]::/payments/:id - Content check if value for 'status' matches 'succeeded'",
function () {
pm.expect(jsonData.status).to.eql("succeeded");
},
);
}
// Response body should have "refunds"
pm.test("[POST]::/payments - Content check if 'refunds' exists", function () {
pm.expect(typeof jsonData.refunds !== "undefined").to.be.true;
});
| 546 | 8,452 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario10-Partial refund/Payments - Retrieve-copy/response.json | .json | []
| 1 | 8,453 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario10-Partial refund/Payments - Create/request.json | .json | {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"amount\": {{random_number}},\n \"currency\": \"USD\",\n \"confirm\": true,\n \"capture_method\": \"automatic\",\n \"capture_on\": \"2022-09-10T10:11:12Z\",\n \"amount_to_capture\": {{random_number}},\n \"customer_id\": \"StripeCustomer\",\n \"email\": \"guest@example.com\",\n \"name\": \"John Doe\",\n \"phone\": \"999999999\",\n \"phone_country_code\": \"+65\",\n \"description\": \"Its my first payment request\",\n \"authentication_type\": \"no_three_ds\",\n \"return_url\": \"https://duck.com\",\n \"payment_method\": \"card\",\n \"payment_method_data\": {\n \"card\": {\n \"card_number\": \"4111111111111111\",\n \"card_exp_month\": \"10\",\n \"card_exp_year\": \"25\",\n \"card_holder_name\": \"joseph Doe\",\n \"card_cvc\": \"123\"\n }\n },\n \"billing\": {\n \"address\": {\n \"line1\": \"1467\",\n \"line2\": \"Harrison Street\",\n \"line3\": \"Harrison Street\",\n \"city\": \"San Fransico\",\n \"state\": \"California\",\n \"zip\": \"94122\",\n \"country\": \"US\",\n \"first_name\": \"PiX\"\n }\n },\n \"shipping\": {\n \"address\": {\n \"line1\": \"1467\",\n \"line2\": \"Harrison Street\",\n \"line3\": \"Harrison Street\",\n \"city\": \"San Fransico\",\n \"zip\": \"94122\",\n \"country\": \"US\",\n \"first_name\": \"PiX\"\n }\n },\n \"statement_descriptor_name\": \"joseph\",\n \"statement_descriptor_suffix\": \"JS\",\n \"metadata\": {\n \"udf1\": \"value1\",\n \"new_customer\": \"true\",\n \"login_date\": \"2019-09-10T10:11:12Z\"\n }\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"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"
}
| 751 | 8,454 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario10-Partial refund/Payments - Create/event.test.js | .js | pm.environment.set("random_number", _.random(100, 100000));
// Validate status 2xx
pm.test("[POST]::/payments - Status code is 2xx", function () {
pm.response.to.be.success;
});
// Validate if response header has matching content-type
pm.test("[POST]::/payments - Content-Type is application/json", function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include(
"application/json",
);
});
// Validate if response has JSON Body
pm.test("[POST]::/payments - Response has JSON Body", function () {
pm.response.to.have.jsonBody();
});
// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
if (jsonData?.payment_id) {
pm.collectionVariables.set("payment_id", jsonData.payment_id);
console.log(
"- use {{payment_id}} as collection variable for value",
jsonData.payment_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
);
}
// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
if (jsonData?.mandate_id) {
pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
console.log(
"- use {{mandate_id}} as collection variable for value",
jsonData.mandate_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
);
}
// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
if (jsonData?.client_secret) {
pm.collectionVariables.set("client_secret", jsonData.client_secret);
console.log(
"- use {{client_secret}} as collection variable for value",
jsonData.client_secret,
);
} else {
console.log(
"INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
);
}
// Response body should have value "succeeded" for "status"
if (jsonData?.status) {
pm.test(
"[POST]::/payments - Content check if value for 'status' matches 'succeeded'",
function () {
pm.expect(jsonData.status).to.eql("succeeded");
},
);
}
| 514 | 8,455 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario10-Partial refund/Payments - Create/response.json | .json | []
| 1 | 8,456 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario10-Partial refund/Refunds - Retrieve-copy/request.json | .json | {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "{{baseUrl}}/refunds/:id",
"host": ["{{baseUrl}}"],
"path": ["refunds", ":id"],
"variable": [
{
"key": "id",
"value": "{{refund_id}}",
"description": "(Required) unique refund id"
}
]
},
"description": "To retrieve the properties of a Refund. This may be used to get the status of a previously initiated payment or next action for an ongoing payment"
}
| 148 | 8,457 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario10-Partial refund/Refunds - Retrieve-copy/event.test.js | .js | // Validate status 2xx
pm.test("[GET]::/refunds/:id - Status code is 2xx", function () {
pm.response.to.be.success;
});
// Validate if response header has matching content-type
pm.test("[GET]::/refunds/:id - Content-Type is application/json", function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include(
"application/json",
);
});
// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
// pm.collectionVariables - Set refund_id as variable for jsonData.payment_id
if (jsonData?.refund_id) {
pm.collectionVariables.set("refund_id", jsonData.refund_id);
console.log(
"- use {{refund_id}} as collection variable for value",
jsonData.refund_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{refund_id}}, as jsonData.refund_id is undefined.",
);
}
// Response body should have value "succeeded" for "status"
if (jsonData?.status) {
pm.test(
"[POST]::/refunds - Content check if value for 'status' matches 'failed'",
function () {
pm.expect(jsonData.status).to.eql("failed");
},
);
}
// Response body should have value "6540" for "amount"
if (jsonData?.status) {
pm.test(
"[POST]::/refunds - Content check if value for 'amount' matches '500'",
function () {
pm.expect(jsonData.amount).to.eql(500);
},
);
}
| 349 | 8,458 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario10-Partial refund/Refunds - Retrieve-copy/response.json | .json | []
| 1 | 8,459 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Retrieve/request.json | .json | {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "{{baseUrl}}/payments/:id?force_sync=true",
"host": ["{{baseUrl}}"],
"path": ["payments", ":id"],
"query": [
{
"key": "force_sync",
"value": "true"
}
],
"variable": [
{
"key": "id",
"value": "{{payment_id}}",
"description": "(Required) unique payment id"
}
]
},
"description": "To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment"
}
| 175 | 8,460 |
hyperswitch | postman/collection-dir/powertranz/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 'requires_capture'",
function () {
pm.expect(jsonData.status).to.eql("requires_capture");
},
);
}
| 499 | 8,461 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Retrieve/response.json | .json | []
| 1 | 8,462 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Retrieve-copy/request.json | .json | {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "{{baseUrl}}/payments/:id?force_sync=true",
"host": ["{{baseUrl}}"],
"path": ["payments", ":id"],
"query": [
{
"key": "force_sync",
"value": "true"
}
],
"variable": [
{
"key": "id",
"value": "{{payment_id}}",
"description": "(Required) unique payment id"
}
]
},
"description": "To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment"
}
| 175 | 8,463 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Retrieve-copy/event.test.js | .js | // Validate status 2xx
pm.test("[GET]::/payments/:id - Status code is 2xx", function () {
pm.response.to.be.success;
});
// Validate if response header has matching content-type
pm.test("[GET]::/payments/:id - Content-Type is application/json", function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include(
"application/json",
);
});
// Validate if response has JSON Body
pm.test("[GET]::/payments/:id - Response has JSON Body", function () {
pm.response.to.have.jsonBody();
});
// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
if (jsonData?.payment_id) {
pm.collectionVariables.set("payment_id", jsonData.payment_id);
console.log(
"- use {{payment_id}} as collection variable for value",
jsonData.payment_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
);
}
// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
if (jsonData?.mandate_id) {
pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
console.log(
"- use {{mandate_id}} as collection variable for value",
jsonData.mandate_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
);
}
// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
if (jsonData?.client_secret) {
pm.collectionVariables.set("client_secret", jsonData.client_secret);
console.log(
"- use {{client_secret}} as collection variable for value",
jsonData.client_secret,
);
} else {
console.log(
"INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
);
}
// Response body should have value "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,464 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Retrieve-copy/response.json | .json | []
| 1 | 8,465 |
hyperswitch | postman/collection-dir/powertranz/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",
"raw": "{\n \"amount\": {{random_number}},\n \"currency\": \"USD\",\n \"confirm\": true,\n \"capture_method\": \"manual\",\n \"capture_on\": \"2022-09-10T10:11:12Z\",\n \"amount_to_capture\": {{random_number}},\n \"customer_id\": \"StripeCustomer\",\n \"email\": \"guest@example.com\",\n \"name\": \"John Doe\",\n \"phone\": \"999999999\",\n \"phone_country_code\": \"+65\",\n \"description\": \"Its my first payment request\",\n \"authentication_type\": \"no_three_ds\",\n \"return_url\": \"https://duck.com\",\n \"payment_method\": \"card\",\n \"payment_method_data\": {\n \"card\": {\n \"card_number\": \"4012000000020089\",\n \"card_exp_month\": \"10\",\n \"card_exp_year\": \"25\",\n \"card_holder_name\": \"joseph Doe\",\n \"card_cvc\": \"123\"\n }\n },\n \"billing\": {\n \"address\": {\n \"line1\": \"1467\",\n \"line2\": \"Harrison Street\",\n \"line3\": \"Harrison Street\",\n \"city\": \"San Fransico\",\n \"state\": \"California\",\n \"zip\": \"94122\",\n \"country\": \"US\",\n \"first_name\": \"PiX\"\n }\n },\n \"shipping\": {\n \"address\": {\n \"line1\": \"1467\",\n \"line2\": \"Harrison Street\",\n \"line3\": \"Harrison Street\",\n \"city\": \"San Fransico\",\n \"zip\": \"94122\",\n \"country\": \"US\",\n \"first_name\": \"PiX\"\n }\n },\n \"statement_descriptor_name\": \"joseph\",\n \"statement_descriptor_suffix\": \"JS\",\n \"metadata\": {\n \"udf1\": \"value1\",\n \"new_customer\": \"true\",\n \"login_date\": \"2019-09-10T10:11:12Z\"\n }\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"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"
}
| 751 | 8,466 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Create/event.test.js | .js | pm.environment.set("random_number", _.random(100, 100000));
// 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");
},
);
}
| 514 | 8,467 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Create/response.json | .json | []
| 1 | 8,468 |
hyperswitch | postman/collection-dir/powertranz/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": "user_cancel"
}
},
"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"
}
| 224 | 8,469 |
hyperswitch | postman/collection-dir/powertranz/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,470 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Cancel/response.json | .json | []
| 1 | 8,471 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario9-Refund full payment/Refunds - Create/request.json | .json | {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"payment_id\": \"{{payment_id}}\",\n \"amount\": {{amount}},\n \"reason\": \"Customer returned product\",\n \"refund_type\": \"instant\",\n \"metadata\": {\n \"udf1\": \"value1\",\n \"new_customer\": \"true\",\n \"login_date\": \"2019-09-10T10:11:12Z\"\n }\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/refunds",
"host": ["{{baseUrl}}"],
"path": ["refunds"]
},
"description": "To create a refund against an already processed payment"
}
| 245 | 8,472 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario9-Refund full payment/Refunds - Create/event.test.js | .js | // Get the value of 'amount' from the environment
const amount = pm.environment.get("amount");
// Validate status 2xx
pm.test("[POST]::/refunds - Status code is 2xx", function () {
pm.response.to.be.success;
});
// Validate if response header has matching content-type
pm.test("[POST]::/refunds - Content-Type is application/json", function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include(
"application/json",
);
});
// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
// pm.collectionVariables - Set refund_id as variable for jsonData.payment_id
if (jsonData?.refund_id) {
pm.collectionVariables.set("refund_id", jsonData.refund_id);
console.log(
"- use {{refund_id}} as collection variable for value",
jsonData.refund_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{refund_id}}, as jsonData.refund_id is undefined.",
);
}
// Response body should have value "succeeded" for "status"
if (jsonData?.status) {
pm.test(
"[POST]::/refunds - Content check if value for 'status' matches 'succeeded'",
function () {
pm.expect(jsonData.status).to.eql("succeeded");
},
);
}
// Response body should have value "6540" for "amount"
if (jsonData?.status) {
pm.test(
"[POST]::/refunds - Content check if value for 'amount' matches '{{amount}}'",
function () {
pm.expect(jsonData.amount).to.eql(amount);
},
);
}
| 364 | 8,473 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario9-Refund full payment/Refunds - Create/response.json | .json | []
| 1 | 8,474 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario9-Refund full payment/Refunds - Retrieve/request.json | .json | {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "{{baseUrl}}/refunds/:id",
"host": ["{{baseUrl}}"],
"path": ["refunds", ":id"],
"variable": [
{
"key": "id",
"value": "{{refund_id}}",
"description": "(Required) unique refund id"
}
]
},
"description": "To retrieve the properties of a Refund. This may be used to get the status of a previously initiated payment or next action for an ongoing payment"
}
| 148 | 8,475 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario9-Refund full payment/Refunds - Retrieve/event.test.js | .js | // Get the value of 'amount' from the environment
const refund_amount = pm.environment.get("amount");
// Validate status 2xx
pm.test("[GET]::/refunds/:id - Status code is 2xx", function () {
pm.response.to.be.success;
});
// Validate if response header has matching content-type
pm.test("[GET]::/refunds/:id - Content-Type is application/json", function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include(
"application/json",
);
});
// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
// pm.collectionVariables - Set refund_id as variable for jsonData.payment_id
if (jsonData?.refund_id) {
pm.collectionVariables.set("refund_id", jsonData.refund_id);
console.log(
"- use {{refund_id}} as collection variable for value",
jsonData.refund_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{refund_id}}, as jsonData.refund_id is undefined.",
);
}
// Response body should have value "succeeded" for "status"
if (jsonData?.status) {
pm.test(
"[POST]::/refunds - Content check if value for 'status' matches 'succeeded'",
function () {
pm.expect(jsonData.status).to.eql("succeeded");
},
);
}
// Response body should have value "{{refund_amount}}" for "amount"
if (jsonData?.status) {
pm.test(
"[POST]::/refunds - Content check if value for 'amount' matches '{{refund_amount}}'",
function () {
pm.expect(jsonData.amount).to.eql(refund_amount);
},
);
}
| 370 | 8,476 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario9-Refund full payment/Refunds - Retrieve/response.json | .json | []
| 1 | 8,477 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario9-Refund full payment/Payments - Retrieve/request.json | .json | {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "{{baseUrl}}/payments/:id?force_sync=true",
"host": ["{{baseUrl}}"],
"path": ["payments", ":id"],
"query": [
{
"key": "force_sync",
"value": "true"
}
],
"variable": [
{
"key": "id",
"value": "{{payment_id}}",
"description": "(Required) unique payment id"
}
]
},
"description": "To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment"
}
| 175 | 8,478 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario9-Refund full payment/Payments - Retrieve/event.test.js | .js | // Validate status 2xx
pm.test("[GET]::/payments/:id - Status code is 2xx", function () {
pm.response.to.be.success;
});
// Validate if response header has matching content-type
pm.test("[GET]::/payments/:id - Content-Type is application/json", function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include(
"application/json",
);
});
// Validate if response has JSON Body
pm.test("[GET]::/payments/:id - Response has JSON Body", function () {
pm.response.to.have.jsonBody();
});
// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
if (jsonData?.payment_id) {
pm.collectionVariables.set("payment_id", jsonData.payment_id);
console.log(
"- use {{payment_id}} as collection variable for value",
jsonData.payment_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
);
}
// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
if (jsonData?.mandate_id) {
pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
console.log(
"- use {{mandate_id}} as collection variable for value",
jsonData.mandate_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
);
}
// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
if (jsonData?.client_secret) {
pm.collectionVariables.set("client_secret", jsonData.client_secret);
console.log(
"- use {{client_secret}} as collection variable for value",
jsonData.client_secret,
);
} else {
console.log(
"INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
);
}
// Response body should have value "Succeeded" for "status"
if (jsonData?.status) {
pm.test(
"[POST]::/payments/:id - Content check if value for 'status' matches 'succeeded'",
function () {
pm.expect(jsonData.status).to.eql("succeeded");
},
);
}
| 500 | 8,479 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario9-Refund full payment/Payments - Retrieve/response.json | .json | []
| 1 | 8,480 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario9-Refund full payment/Payments - Create/request.json | .json | {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"amount\": {{random_number}},\n \"currency\": \"USD\",\n \"confirm\": true,\n \"capture_method\": \"automatic\",\n \"capture_on\": \"2022-09-10T10:11:12Z\",\n \"amount_to_capture\": {{random_number}},\n \"customer_id\": \"StripeCustomer\",\n \"email\": \"guest@example.com\",\n \"name\": \"John Doe\",\n \"phone\": \"999999999\",\n \"phone_country_code\": \"+65\",\n \"description\": \"Its my first payment request\",\n \"authentication_type\": \"no_three_ds\",\n \"return_url\": \"https://duck.com\",\n \"payment_method\": \"card\",\n \"payment_method_data\": {\n \"card\": {\n \"card_number\": \"5100270000000072\",\n \"card_exp_month\": \"10\",\n \"card_exp_year\": \"25\",\n \"card_holder_name\": \"joseph Doe\",\n \"card_cvc\": \"123\"\n }\n },\n \"billing\": {\n \"address\": {\n \"line1\": \"1467\",\n \"line2\": \"Harrison Street\",\n \"line3\": \"Harrison Street\",\n \"city\": \"San Fransico\",\n \"state\": \"California\",\n \"zip\": \"94122\",\n \"country\": \"US\",\n \"first_name\": \"PiX\"\n }\n },\n \"shipping\": {\n \"address\": {\n \"line1\": \"1467\",\n \"line2\": \"Harrison Street\",\n \"line3\": \"Harrison Street\",\n \"city\": \"San Fransico\",\n \"zip\": \"94122\",\n \"country\": \"US\",\n \"first_name\": \"PiX\"\n }\n },\n \"statement_descriptor_name\": \"joseph\",\n \"statement_descriptor_suffix\": \"JS\",\n \"metadata\": {\n \"udf1\": \"value1\",\n \"new_customer\": \"true\",\n \"login_date\": \"2019-09-10T10:11:12Z\"\n }\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"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"
}
| 751 | 8,481 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario9-Refund full payment/Payments - Create/event.test.js | .js | pm.environment.set("random_number", _.random(100, 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.",
);
}
// Response body should have value "succeeded" for "status"
if (jsonData?.status) {
pm.test(
"[POST]::/payments - Content check if value for 'status' matches 'succeeded'",
function () {
pm.expect(jsonData.status).to.eql("succeeded");
},
);
}
| 541 | 8,482 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario9-Refund full payment/Payments - Create/response.json | .json | []
| 1 | 8,483 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Retrieve/request.json | .json | {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "{{baseUrl}}/payments/:id?force_sync=true",
"host": ["{{baseUrl}}"],
"path": ["payments", ":id"],
"query": [
{
"key": "force_sync",
"value": "true"
}
],
"variable": [
{
"key": "id",
"value": "{{payment_id}}",
"description": "(Required) unique payment id"
}
]
},
"description": "To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment"
}
| 175 | 8,484 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Retrieve/event.test.js | .js | // Validate status 2xx
pm.test("[GET]::/payments/:id - Status code is 2xx", function () {
pm.response.to.be.success;
});
// Validate if response header has matching content-type
pm.test("[GET]::/payments/:id - Content-Type is application/json", function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include(
"application/json",
);
});
// Validate if response has JSON Body
pm.test("[GET]::/payments/:id - Response has JSON Body", function () {
pm.response.to.have.jsonBody();
});
// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
if (jsonData?.payment_id) {
pm.collectionVariables.set("payment_id", jsonData.payment_id);
console.log(
"- use {{payment_id}} as collection variable for value",
jsonData.payment_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
);
}
// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
if (jsonData?.mandate_id) {
pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
console.log(
"- use {{mandate_id}} as collection variable for value",
jsonData.mandate_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
);
}
// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
if (jsonData?.client_secret) {
pm.collectionVariables.set("client_secret", jsonData.client_secret);
console.log(
"- use {{client_secret}} as collection variable for value",
jsonData.client_secret,
);
} else {
console.log(
"INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
);
}
// Response body should have value "succeeded" for "status"
if (jsonData?.status) {
pm.test(
"[POST]::/payments - Content check if value for 'status' matches 'requires_capture'",
function () {
pm.expect(jsonData.status).to.eql("requires_capture");
},
);
}
| 498 | 8,485 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Retrieve/response.json | .json | []
| 1 | 8,486 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Retrieve-copy/request.json | .json | {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "{{baseUrl}}/payments/:id?force_sync=true",
"host": ["{{baseUrl}}"],
"path": ["payments", ":id"],
"query": [
{
"key": "force_sync",
"value": "true"
}
],
"variable": [
{
"key": "id",
"value": "{{payment_id}}",
"description": "(Required) unique payment id"
}
]
},
"description": "To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment"
}
| 175 | 8,487 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Retrieve-copy/event.test.js | .js | // Validate status 2xx
pm.test("[GET]::/payments/:id - Status code is 2xx", function () {
pm.response.to.be.success;
});
// Validate if response header has matching content-type
pm.test("[GET]::/payments/:id - Content-Type is application/json", function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include(
"application/json",
);
});
// Validate if response has JSON Body
pm.test("[GET]::/payments/:id - Response has JSON Body", function () {
pm.response.to.have.jsonBody();
});
// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
if (jsonData?.payment_id) {
pm.collectionVariables.set("payment_id", jsonData.payment_id);
console.log(
"- use {{payment_id}} as collection variable for value",
jsonData.payment_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
);
}
// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
if (jsonData?.mandate_id) {
pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
console.log(
"- use {{mandate_id}} as collection variable for value",
jsonData.mandate_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
);
}
// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
if (jsonData?.client_secret) {
pm.collectionVariables.set("client_secret", jsonData.client_secret);
console.log(
"- use {{client_secret}} as collection variable for value",
jsonData.client_secret,
);
} else {
console.log(
"INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
);
}
// Response body should have value "succeeded" for "status"
if (jsonData?.status) {
pm.test(
"[POST]::/payments - Content check if value for 'status' matches 'succeeded'",
function () {
pm.expect(jsonData.status).to.eql("succeeded");
},
);
}
| 498 | 8,488 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Retrieve-copy/response.json | .json | []
| 1 | 8,489 |
hyperswitch | postman/collection-dir/powertranz/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",
"raw": "{\n \"amount\": {{random_number}},\n \"currency\": \"USD\",\n \"confirm\": true,\n \"capture_method\": \"manual\",\n \"capture_on\": \"2022-09-10T10:11:12Z\",\n \"amount_to_capture\": {{random_number}},\n \"customer_id\": \"StripeCustomer\",\n \"email\": \"guest@example.com\",\n \"name\": \"John Doe\",\n \"phone\": \"999999999\",\n \"phone_country_code\": \"+65\",\n \"description\": \"Its my first payment request\",\n \"authentication_type\": \"no_three_ds\",\n \"return_url\": \"https://duck.com\",\n \"payment_method\": \"card\",\n \"payment_method_data\": {\n \"card\": {\n \"card_number\": \"4012000000020089\",\n \"card_exp_month\": \"10\",\n \"card_exp_year\": \"25\",\n \"card_holder_name\": \"joseph Doe\",\n \"card_cvc\": \"123\"\n }\n },\n \"billing\": {\n \"address\": {\n \"line1\": \"1467\",\n \"line2\": \"Harrison Street\",\n \"line3\": \"Harrison Street\",\n \"city\": \"San Fransico\",\n \"state\": \"California\",\n \"zip\": \"94122\",\n \"country\": \"US\",\n \"first_name\": \"PiX\"\n }\n },\n \"shipping\": {\n \"address\": {\n \"line1\": \"1467\",\n \"line2\": \"Harrison Street\",\n \"line3\": \"Harrison Street\",\n \"city\": \"San Fransico\",\n \"zip\": \"94122\",\n \"country\": \"US\",\n \"first_name\": \"PiX\"\n }\n },\n \"statement_descriptor_name\": \"joseph\",\n \"statement_descriptor_suffix\": \"JS\",\n \"metadata\": {\n \"udf1\": \"value1\",\n \"new_customer\": \"true\",\n \"login_date\": \"2019-09-10T10:11:12Z\"\n }\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"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"
}
| 751 | 8,490 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Create/event.test.js | .js | pm.environment.set("random_number", _.random(100, 100000));
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.",
);
}
// 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");
},
);
}
| 526 | 8,491 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Create/response.json | .json | []
| 1 | 8,492 |
hyperswitch | postman/collection-dir/powertranz/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",
"raw": "{\n \"amount_to_capture\": {{amount}},\n \"statement_descriptor_name\": \"Joseph\",\n \"statement_descriptor_suffix\": \"JS\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/payments/:id/capture",
"host": ["{{baseUrl}}"],
"path": ["payments", ":id", "capture"],
"variable": [
{
"key": "id",
"value": "{{payment_id}}",
"description": "(Required) unique payment id"
}
]
},
"description": "To capture the funds for an uncaptured payment"
}
| 225 | 8,493 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Capture/event.test.js | .js | // Get the value of 'amount' from the environment
const amount = pm.environment.get("amount");
// Validate status 2xx
pm.test("[POST]::/payments/:id/capture - Status code is 2xx", function () {
pm.response.to.be.success;
});
// Validate if response header has matching content-type
pm.test(
"[POST]::/payments/:id/capture - Content-Type is application/json",
function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include(
"application/json",
);
},
);
// Validate if response has JSON Body
pm.test("[POST]::/payments/:id/capture - Response has JSON Body", function () {
pm.response.to.have.jsonBody();
});
// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
if (jsonData?.payment_id) {
pm.collectionVariables.set("payment_id", jsonData.payment_id);
console.log(
"- use {{payment_id}} as collection variable for value",
jsonData.payment_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
);
}
// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
if (jsonData?.mandate_id) {
pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
console.log(
"- use {{mandate_id}} as collection variable for value",
jsonData.mandate_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
);
}
// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
if (jsonData?.client_secret) {
pm.collectionVariables.set("client_secret", jsonData.client_secret);
console.log(
"- use {{client_secret}} as collection variable for value",
jsonData.client_secret,
);
} else {
console.log(
"INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
);
}
// Response body should have value "succeeded" for "status"
if (jsonData?.status) {
pm.test(
"[POST]:://payments/:id/capture - Content check if value for 'status' matches 'succeeded'",
function () {
pm.expect(jsonData.status).to.eql("succeeded");
},
);
}
// Response body should have value "{{amount}}" for "amount"
if (jsonData?.amount) {
pm.test(
"[post]:://payments/:id/capture - Content check if value for 'amount' matches '{{amount}}'",
function () {
pm.expect(jsonData.amount).to.eql(amount);
},
);
}
// Response body should have value "{{amount}}" for "amount_received"
if (jsonData?.amount_received) {
pm.test(
"[POST]::/payments:id/capture - Content check if value for 'amount_received' matches '{{amount}}'",
function () {
pm.expect(jsonData.amount_received).to.eql(amount);
},
);
}
| 675 | 8,494 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Capture/response.json | .json | []
| 1 | 8,495 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/QuickStart/Refunds - Create/request.json | .json | {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"payment_id\": \"{{payment_id}}\",\n \"amount\": {{amount}},\n \"reason\": \"Customer returned product\",\n \"refund_type\": \"instant\",\n \"metadata\": {\n \"udf1\": \"value1\",\n \"new_customer\": \"true\",\n \"login_date\": \"2019-09-10T10:11:12Z\"\n }\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/refunds",
"host": ["{{baseUrl}}"],
"path": ["refunds"]
},
"description": "To create a refund against an already processed payment"
}
| 245 | 8,496 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/QuickStart/Refunds - Create/event.test.js | .js | // Get the value of 'amount' from the environment
const amount = pm.environment.get("amount");
// Validate status 2xx
pm.test("[POST]::/refunds - Status code is 2xx", function () {
pm.response.to.be.success;
});
// Validate if response header has matching content-type
pm.test("[POST]::/refunds - Content-Type is application/json", function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include(
"application/json",
);
});
// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
// pm.collectionVariables - Set refund_id as variable for jsonData.payment_id
if (jsonData?.refund_id) {
pm.collectionVariables.set("refund_id", jsonData.refund_id);
console.log(
"- use {{refund_id}} as collection variable for value",
jsonData.refund_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{refund_id}}, as jsonData.refund_id is undefined.",
);
}
| 226 | 8,497 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/QuickStart/Refunds - Create/response.json | .json | []
| 1 | 8,498 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/QuickStart/Refunds - Retrieve/request.json | .json | {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "{{baseUrl}}/refunds/:id?force_sync=true",
"host": ["{{baseUrl}}"],
"path": ["refunds", ":id"],
"query": [
{
"key": "force_sync",
"value": "true"
}
],
"variable": [
{
"key": "id",
"value": "{{refund_id}}",
"description": "(Required) unique refund id"
}
]
},
"description": "To retrieve the properties of a Refund. This may be used to get the status of a previously initiated payment or next action for an ongoing payment"
}
| 178 | 8,499 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/QuickStart/Refunds - Retrieve/event.test.js | .js | // Validate status 2xx
pm.test("[GET]::/refunds/:id - Status code is 2xx", function () {
pm.response.to.be.success;
});
// Validate if response header has matching content-type
pm.test("[GET]::/refunds/:id - Content-Type is application/json", function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include(
"application/json",
);
});
// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
// pm.collectionVariables - Set refund_id as variable for jsonData.payment_id
if (jsonData?.refund_id) {
pm.collectionVariables.set("refund_id", jsonData.refund_id);
console.log(
"- use {{refund_id}} as collection variable for value",
jsonData.refund_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{refund_id}}, as jsonData.refund_id is undefined.",
);
}
| 209 | 8,500 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/QuickStart/Refunds - Retrieve/response.json | .json | []
| 1 | 8,501 |
hyperswitch | postman/collection-dir/powertranz/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}}"
}
]
}
}
| 268 | 8,502 |
hyperswitch | postman/collection-dir/powertranz/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,503 |
hyperswitch | postman/collection-dir/powertranz/Flow Testcases/QuickStart/API Key - Create/response.json | .json | []
| 1 | 8,504 |
hyperswitch | postman/collection-dir/powertranz/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": "powertranz",
"business_country": "US",
"business_label": "default",
"connector_account_details": {
"auth_type": "BodyKey",
"key1": "{{connector_key1}}",
"api_key": "{{connector_api_key}}"
},
"test_mode": true,
"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": {}
}
},
"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."
}
| 580 | 8,505 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.