repo stringclasses 4 values | file_path stringlengths 6 193 | extension stringclasses 23 values | content stringlengths 0 1.73M | token_count int64 0 724k | __index_level_0__ int64 0 10.8k |
|---|---|---|---|---|---|
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Cancel After Partial Capture/Payments - Retrieve/response.json | .json | []
| 1 | 6,806 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Cancel After Partial Capture/Payments - Retrieve/event.prerequest.js | .js | setTimeout(function(){
console.log("Sleeping for 3 seconds before next request.");
}, 3000); | 24 | 6,807 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Cancel After Partial Capture/Payments - Create/request.json | .json | {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"options": {
"raw": {
"language": "json"
}
},
"raw_json_formatted": {
"amount": 6000,
"currency": "USD",
"confirm": true,
"capture_method": "manual_multiple",
"capture_on": "2022-09-10T10:11:12Z",
"customer_id": "StripeCustomer",
"email": "guest@example.com",
"name": "John Doe",
"phone": "999999999",
"phone_country_code": "+1",
"description": "Its my first payment request",
"authentication_type": "no_three_ds",
"return_url": "https://duck.com",
"payment_method": "card",
"payment_method_data": {
"card": {
"card_number": "4242424242424242",
"card_exp_month": "10",
"card_exp_year": "25",
"card_holder_name": "joseph Doe",
"card_cvc": "123"
}
},
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "PiX"
}
},
"shipping": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "PiX"
}
},
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
}
}
},
"url": {
"raw": "{{baseUrl}}/payments",
"host": [
"{{baseUrl}}"
],
"path": [
"payments"
]
},
"description": "To process a payment you will have to create a payment, attach a payment method and confirm. Depending on the user journey you wish to achieve, you may opt to all the steps in a single request or in a sequence of API request using following APIs: (i) Payments - Update, (ii) Payments - Confirm, and (iii) Payments - Capture"
}
| 697 | 6,808 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Cancel After Partial Capture/Payments - Create/event.test.js | .js | // Validate status 2xx
pm.test("[POST]::/payments - Status code is 2xx", function () {
pm.response.to.be.success;
});
// Validate if response header has matching content-type
pm.test("[POST]::/payments - Content-Type is application/json", function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include(
"application/json",
);
});
// Validate if response has JSON Body
pm.test("[POST]::/payments - Response has JSON Body", function () {
pm.response.to.have.jsonBody();
});
// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
if (jsonData?.payment_id) {
pm.collectionVariables.set("payment_id", jsonData.payment_id);
console.log(
"- use {{payment_id}} as collection variable for value",
jsonData.payment_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
);
}
// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
if (jsonData?.mandate_id) {
pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
console.log(
"- use {{mandate_id}} as collection variable for value",
jsonData.mandate_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
);
}
// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
if (jsonData?.client_secret) {
pm.collectionVariables.set("client_secret", jsonData.client_secret);
console.log(
"- use {{client_secret}} as collection variable for value",
jsonData.client_secret,
);
} else {
console.log(
"INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
);
}
| 424 | 6,809 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Cancel After Partial Capture/Payments - Create/response.json | .json | []
| 1 | 6,810 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Cancel After Partial Capture/Payments - Create/event.prerequest.js | .js | 0 | 6,811 | |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Cancel After Partial Capture/Payments - Cancel/request.json | .json | {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"options": {
"raw": {
"language": "json"
}
},
"raw_json_formatted": {
"cancellation_reason": "requested_by_customer"
}
},
"url": {
"raw": "{{baseUrl}}/payments/:id/cancel",
"host": [
"{{baseUrl}}"
],
"path": [
"payments",
":id",
"cancel"
],
"variable": [
{
"key": "id",
"value": "{{payment_id}}",
"description": "(Required) unique payment id"
}
]
},
"description": "A Payment could can be cancelled when it is in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_customer_action"
}
| 233 | 6,812 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Cancel After Partial Capture/Payments - Cancel/event.test.js | .js | // Validate status 4xx
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 "cancellation succeeded" for "payment status"
if (jsonData?.status) {
pm.test(
"[POST]::/payments/:id/cancel - Content check if value for 'jsonData.status' matches 'partially_captured'",
function () {
pm.expect(jsonData.status).to.eql("partially_captured");
},
);
}
// Response body should have value "0" for "amount_capturable"
if (jsonData?.amount){
pm.test("[post]:://payments/:id/capture - Content check if value for 'amount_capturable' matches 'amount - 0'", function() {
pm.expect(jsonData.amount_capturable).to.eql(0);
} )
}
| 496 | 6,813 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Cancel After Partial Capture/Payments - Cancel/response.json | .json | []
| 1 | 6,814 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Cancel After Partial Capture/Payments - Cancel/event.prerequest.js | .js | 0 | 6,815 | |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Cancel After Partial Capture/Payments - Capture/request.json | .json | {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"options": {
"raw": {
"language": "json"
}
},
"raw_json_formatted": {
"amount_to_capture": 2000,
"statement_descriptor_name": "Joseph",
"statement_descriptor_suffix": "JS"
}
},
"url": {
"raw": "{{baseUrl}}/payments/:id/capture",
"host": [
"{{baseUrl}}"
],
"path": [
"payments",
":id",
"capture"
],
"variable": [
{
"key": "id",
"value": "{{payment_id}}",
"description": "(Required) unique payment id"
}
]
},
"description": "To capture the funds for an uncaptured payment"
}
| 233 | 6,816 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Cancel After Partial Capture/Payments - Capture/event.test.js | .js | // 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 "cancellation succeeded" for "payment status"
if (jsonData?.status) {
pm.test(
"[POST]::/payments/:id/cancel - Content check if value for 'jsonData.status' matches 'partially_captured_and_capturable'",
function () {
pm.expect(jsonData.status).to.eql("partially_captured_and_capturable");
},
);
}
// Response body should have value "connector error" for "error type"
if (jsonData?.error?.type) {
pm.test(
"[POST]::/payments/:id/confirm - Content check if value for 'error.type' matches 'invalid_request'",
function () {
pm.expect(jsonData.error.type).to.eql("invalid_request");
},
);
}
| 567 | 6,817 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Cancel After Partial Capture/Payments - Capture/response.json | .json | []
| 1 | 6,818 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Cancel After Partial Capture/Payments - Capture/event.prerequest.js | .js | 0 | 6,819 | |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Retrieve After Partial Capture/Payments - Retrieve/request.json | .json | {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "{{baseUrl}}/payments/:id?force_sync=true",
"host": [
"{{baseUrl}}"
],
"path": [
"payments",
":id"
],
"query": [
{
"key": "force_sync",
"value": "true"
}
],
"variable": [
{
"key": "id",
"value": "{{payment_id}}",
"description": "(Required) unique payment id"
}
]
},
"description": "To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment"
}
| 182 | 6,820 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Retrieve After Partial 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",
);
});
// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
// Validate if response has JSON Body
pm.test("[GET]::/payments/:id - Response has JSON Body", function () {
pm.response.to.have.jsonBody();
});
// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
if (jsonData?.payment_id) {
pm.collectionVariables.set("payment_id", jsonData.payment_id);
console.log(
"- use {{payment_id}} as collection variable for value",
jsonData.payment_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
);
}
// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
if (jsonData?.mandate_id) {
pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
console.log(
"- use {{mandate_id}} as collection variable for value",
jsonData.mandate_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
);
}
// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
if (jsonData?.client_secret) {
pm.collectionVariables.set("client_secret", jsonData.client_secret);
console.log(
"- use {{client_secret}} as collection variable for value",
jsonData.client_secret,
);
} else {
console.log(
"INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
);
}
// Response body should have value "cancellation succeeded" for "payment status"
if (jsonData?.status) {
pm.test(
"[POST]::/payments/:id/cancel - Content check if value for 'jsonData.status' matches 'requires_capture'",
function () {
pm.expect(jsonData.status).to.eql("requires_capture");
},
);
}
| 505 | 6,821 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Retrieve After Partial Capture/Payments - Retrieve/response.json | .json | []
| 1 | 6,822 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Retrieve After Partial Capture/Payments - Retrieve/event.prerequest.js | .js | setTimeout(function(){
console.log("Sleeping for 3 seconds before next request.");
}, 3000); | 24 | 6,823 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Retrieve After Partial Capture/Payments - Retrieve-copy/request.json | .json | {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "{{baseUrl}}/payments/:id?force_sync=true&expand_captures=true",
"host": [
"{{baseUrl}}"
],
"path": [
"payments",
":id"
],
"query": [
{
"key": "force_sync",
"value": "true"
},
{
"key": "expand_captures",
"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"
}
| 209 | 6,824 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Retrieve After Partial 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",
);
});
// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
// Validate if response has JSON Body
pm.test("[GET]::/payments/:id - Response has JSON Body", function () {
pm.response.to.have.jsonBody();
});
// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
if (jsonData?.payment_id) {
pm.collectionVariables.set("payment_id", jsonData.payment_id);
console.log(
"- use {{payment_id}} as collection variable for value",
jsonData.payment_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
);
}
// Response body should have value "cancellation succeeded" for "payment status"
if (jsonData?.status) {
pm.test(
"[POST]::/payments/:id/cancel - Content check if value for 'jsonData.status' matches 'partially_captured_and_capturable'",
function () {
pm.expect(jsonData.status).to.eql("partially_captured_and_capturable");
},
);
}
| 327 | 6,825 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Retrieve After Partial Capture/Payments - Retrieve-copy/response.json | .json | []
| 1 | 6,826 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Retrieve After Partial Capture/Payments - Retrieve-copy/event.prerequest.js | .js | setTimeout(function(){
console.log("Sleeping for 3 seconds before next request.");
}, 3000); | 24 | 6,827 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Retrieve After Partial Capture/Payments - Create/request.json | .json | {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"options": {
"raw": {
"language": "json"
}
},
"raw_json_formatted": {
"amount": 6000,
"currency": "USD",
"confirm": true,
"capture_method": "manual_multiple",
"capture_on": "2022-09-10T10:11:12Z",
"customer_id": "StripeCustomer",
"email": "guest@example.com",
"name": "John Doe",
"phone": "999999999",
"phone_country_code": "+1",
"description": "Its my first payment request",
"authentication_type": "no_three_ds",
"return_url": "https://duck.com",
"payment_method": "card",
"payment_method_data": {
"card": {
"card_number": "4242424242424242",
"card_exp_month": "10",
"card_exp_year": "25",
"card_holder_name": "joseph Doe",
"card_cvc": "123"
}
},
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "PiX"
}
},
"shipping": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "PiX"
}
},
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
}
}
},
"url": {
"raw": "{{baseUrl}}/payments",
"host": [
"{{baseUrl}}"
],
"path": [
"payments"
]
},
"description": "To process a payment you will have to create a payment, attach a payment method and confirm. Depending on the user journey you wish to achieve, you may opt to all the steps in a single request or in a sequence of API request using following APIs: (i) Payments - Update, (ii) Payments - Confirm, and (iii) Payments - Capture"
}
| 697 | 6,828 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Retrieve After Partial Capture/Payments - Create/event.test.js | .js | // Validate status 2xx
pm.test("[POST]::/payments - Status code is 2xx", function () {
pm.response.to.be.success;
});
// Validate if response header has matching content-type
pm.test("[POST]::/payments - Content-Type is application/json", function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include(
"application/json",
);
});
// Validate if response has JSON Body
pm.test("[POST]::/payments - Response has JSON Body", function () {
pm.response.to.have.jsonBody();
});
// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
if (jsonData?.payment_id) {
pm.collectionVariables.set("payment_id", jsonData.payment_id);
console.log(
"- use {{payment_id}} as collection variable for value",
jsonData.payment_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
);
}
// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
if (jsonData?.mandate_id) {
pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
console.log(
"- use {{mandate_id}} as collection variable for value",
jsonData.mandate_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
);
}
// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
if (jsonData?.client_secret) {
pm.collectionVariables.set("client_secret", jsonData.client_secret);
console.log(
"- use {{client_secret}} as collection variable for value",
jsonData.client_secret,
);
} else {
console.log(
"INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
);
}
| 424 | 6,829 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Retrieve After Partial Capture/Payments - Create/response.json | .json | []
| 1 | 6,830 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Retrieve After Partial Capture/Payments - Create/event.prerequest.js | .js | 0 | 6,831 | |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Retrieve After Partial Capture/Payments - Capture/request.json | .json | {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"options": {
"raw": {
"language": "json"
}
},
"raw_json_formatted": {
"amount_to_capture": 2000,
"statement_descriptor_name": "Joseph",
"statement_descriptor_suffix": "JS"
}
},
"url": {
"raw": "{{baseUrl}}/payments/:id/capture",
"host": [
"{{baseUrl}}"
],
"path": [
"payments",
":id",
"capture"
],
"variable": [
{
"key": "id",
"value": "{{payment_id}}",
"description": "(Required) unique payment id"
}
]
},
"description": "To capture the funds for an uncaptured payment"
}
| 233 | 6,832 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Retrieve After Partial Capture/Payments - Capture/event.test.js | .js | // 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 "connector error" for "error type"
if (jsonData?.error?.type) {
pm.test(
"[POST]::/payments/:id/confirm - Content check if value for 'error.type' matches 'invalid_request'",
function () {
pm.expect(jsonData.error.type).to.eql("invalid_request");
},
);
}
// Response body should have value "cancellation succeeded" for "payment status"
if (jsonData?.status) {
pm.test(
"[POST]::/payments/:id/cancel - Content check if value for 'jsonData.status' matches 'partially_captured_and_capturable'",
function () {
pm.expect(jsonData.status).to.eql("partially_captured_and_capturable");
},
);
} | 567 | 6,833 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Retrieve After Partial Capture/Payments - Capture/response.json | .json | []
| 1 | 6,834 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Retrieve After Partial Capture/Payments - Capture/event.prerequest.js | .js | 0 | 6,835 | |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Successful Partial Capture and 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": 6000,
"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"
}
| 244 | 6,836 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Successful Partial Capture and 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");
},
);
}
// Validate the connector
pm.test("[POST]::/payments - connector", function () {
pm.expect(jsonData.connector).to.eql("checkout");
});
// Response body should have value "6000" for "amount"
if (jsonData?.status) {
pm.test(
"[POST]::/refunds - Content check if value for 'amount' matches '6000'",
function () {
pm.expect(jsonData.amount).to.eql(6000);
},
);
}
| 381 | 6,837 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Successful Partial Capture and Refund/Refunds - Create/response.json | .json | []
| 1 | 6,838 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Successful Partial Capture and Refund/Refunds - Create/event.prerequest.js | .js | setTimeout(function(){
console.log("Sleeping for 3 seconds before next request.");
}, 3000); | 24 | 6,839 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Successful Partial Capture and 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"
}
| 155 | 6,840 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Successful Partial Capture and 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");
},
);
}
// Validate the connector
pm.test("[POST]::/payments - connector", function () {
pm.expect(jsonData.connector).to.eql("checkout");
});
// Response body should have value "6000" for "amount"
if (jsonData?.status) {
pm.test(
"[POST]::/refunds - Content check if value for 'amount' matches '6000'",
function () {
pm.expect(jsonData.amount).to.eql(6000);
},
);
}
| 385 | 6,841 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Successful Partial Capture and Refund/Refunds - Retrieve/response.json | .json | []
| 1 | 6,842 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Successful Partial Capture and Refund/Refunds - Retrieve/event.prerequest.js | .js | 0 | 6,843 | |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Successful Partial Capture and Refund/Payments - Capture - 2/request.json | .json | {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"options": {
"raw": {
"language": "json"
}
},
"raw_json_formatted": {
"amount_to_capture": 2000,
"statement_descriptor_name": "Joseph",
"statement_descriptor_suffix": "JS"
}
},
"url": {
"raw": "{{baseUrl}}/payments/:id/capture",
"host": [
"{{baseUrl}}"
],
"path": [
"payments",
":id",
"capture"
],
"variable": [
{
"key": "id",
"value": "{{payment_id}}",
"description": "(Required) unique payment id"
}
]
},
"description": "To capture the funds for an uncaptured payment"
}
| 233 | 6,844 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Successful Partial Capture and Refund/Payments - Capture - 2/event.test.js | .js | // 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 "connector error" for "error type"
if (jsonData?.error?.type) {
pm.test(
"[POST]::/payments/:id/confirm - Content check if value for 'error.type' matches 'invalid_request'",
function () {
pm.expect(jsonData.error.type).to.eql("invalid_request");
},
);
}
// Response body should have value "cancellation succeeded" for "payment status"
if (jsonData?.status) {
pm.test(
"[POST]::/payments/:id/cancel - Content check if value for 'jsonData.status' matches 'partially_captured_and_capturable'",
function () {
pm.expect(jsonData.status).to.eql("partially_captured_and_capturable");
},
);
}
| 567 | 6,845 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Successful Partial Capture and Refund/Payments - Capture - 2/response.json | .json | []
| 1 | 6,846 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Successful Partial Capture and Refund/Payments - Capture - 2/event.prerequest.js | .js | 0 | 6,847 | |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Successful Partial Capture and Refund/Payments - Retrieve/request.json | .json | {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "{{baseUrl}}/payments/:id?force_sync=true&expand_captures=true",
"host": [
"{{baseUrl}}"
],
"path": [
"payments",
":id"
],
"query": [
{
"key": "force_sync",
"value": "true"
},
{
"key": "expand_captures",
"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"
}
| 209 | 6,848 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Successful Partial Capture and 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",
);
});
// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
// Validate if response has JSON Body
pm.test("[GET]::/payments/:id - Response has JSON Body", function () {
pm.response.to.have.jsonBody();
});
// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
if (jsonData?.payment_id) {
pm.collectionVariables.set("payment_id", jsonData.payment_id);
console.log(
"- use {{payment_id}} as collection variable for value",
jsonData.payment_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
);
}
// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
if (jsonData?.mandate_id) {
pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
console.log(
"- use {{mandate_id}} as collection variable for value",
jsonData.mandate_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
);
}
// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
if (jsonData?.client_secret) {
pm.collectionVariables.set("client_secret", jsonData.client_secret);
console.log(
"- use {{client_secret}} as collection variable for value",
jsonData.client_secret,
);
} else {
console.log(
"INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
);
}
| 430 | 6,849 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Successful Partial Capture and Refund/Payments - Retrieve/response.json | .json | []
| 1 | 6,850 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Successful Partial Capture and Refund/Payments - Retrieve/event.prerequest.js | .js | setTimeout(function(){
console.log("Sleeping for 3 seconds before next request.");
}, 3000); | 24 | 6,851 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Successful Partial Capture and Refund/Payments - Capture - 3/request.json | .json | {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"options": {
"raw": {
"language": "json"
}
},
"raw_json_formatted": {
"amount_to_capture": 2000,
"statement_descriptor_name": "Joseph",
"statement_descriptor_suffix": "JS"
}
},
"url": {
"raw": "{{baseUrl}}/payments/:id/capture",
"host": [
"{{baseUrl}}"
],
"path": [
"payments",
":id",
"capture"
],
"variable": [
{
"key": "id",
"value": "{{payment_id}}",
"description": "(Required) unique payment id"
}
]
},
"description": "To capture the funds for an uncaptured payment"
}
| 233 | 6,852 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Successful Partial Capture and Refund/Payments - Capture - 3/event.test.js | .js | // 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 "connector error" for "error type"
if (jsonData?.error?.type) {
pm.test(
"[POST]::/payments/:id/confirm - Content check if value for 'error.type' matches 'invalid_request'",
function () {
pm.expect(jsonData.error.type).to.eql("invalid_request");
},
);
}
// Response body should have value "cancellation succeeded" for "payment status"
if (jsonData?.status) {
pm.test(
"[POST]::/payments/:id/cancel - Content check if value for 'jsonData.status' matches 'succeeded'",
function () {
pm.expect(jsonData.status).to.eql("succeeded");
},
);
}
| 555 | 6,853 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Successful Partial Capture and Refund/Payments - Capture - 3/response.json | .json | []
| 1 | 6,854 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Successful Partial Capture and Refund/Payments - Capture - 3/event.prerequest.js | .js | 0 | 6,855 | |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Successful Partial Capture and Refund/Payments - Create/request.json | .json | {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"options": {
"raw": {
"language": "json"
}
},
"raw_json_formatted": {
"amount": 6000,
"currency": "USD",
"confirm": true,
"capture_method": "manual_multiple",
"capture_on": "2022-09-10T10:11:12Z",
"customer_id": "StripeCustomer",
"email": "guest@example.com",
"name": "John Doe",
"phone": "999999999",
"phone_country_code": "+1",
"description": "Its my first payment request",
"authentication_type": "no_three_ds",
"return_url": "https://duck.com",
"payment_method": "card",
"payment_method_data": {
"card": {
"card_number": "4242424242424242",
"card_exp_month": "10",
"card_exp_year": "25",
"card_holder_name": "joseph Doe",
"card_cvc": "123"
}
},
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "PiX"
}
},
"shipping": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "PiX"
}
},
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
}
}
},
"url": {
"raw": "{{baseUrl}}/payments",
"host": [
"{{baseUrl}}"
],
"path": [
"payments"
]
},
"description": "To process a payment you will have to create a payment, attach a payment method and confirm. Depending on the user journey you wish to achieve, you may opt to all the steps in a single request or in a sequence of API request using following APIs: (i) Payments - Update, (ii) Payments - Confirm, and (iii) Payments - Capture"
}
| 697 | 6,856 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Successful Partial Capture and Refund/Payments - Create/event.test.js | .js | // Validate status 2xx
pm.test("[POST]::/payments - Status code is 2xx", function () {
pm.response.to.be.success;
});
// Validate if response header has matching content-type
pm.test("[POST]::/payments - Content-Type is application/json", function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include(
"application/json",
);
});
// Validate if response has JSON Body
pm.test("[POST]::/payments - Response has JSON Body", function () {
pm.response.to.have.jsonBody();
});
// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
if (jsonData?.payment_id) {
pm.collectionVariables.set("payment_id", jsonData.payment_id);
console.log(
"- use {{payment_id}} as collection variable for value",
jsonData.payment_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
);
}
// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
if (jsonData?.mandate_id) {
pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
console.log(
"- use {{mandate_id}} as collection variable for value",
jsonData.mandate_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
);
}
// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
if (jsonData?.client_secret) {
pm.collectionVariables.set("client_secret", jsonData.client_secret);
console.log(
"- use {{client_secret}} as collection variable for value",
jsonData.client_secret,
);
} else {
console.log(
"INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
);
}
| 424 | 6,857 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Successful Partial Capture and Refund/Payments - Create/response.json | .json | []
| 1 | 6,858 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Successful Partial Capture and Refund/Payments - Create/event.prerequest.js | .js | 0 | 6,859 | |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Successful Partial Capture and Refund/Payments - Capture - 1/request.json | .json | {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"options": {
"raw": {
"language": "json"
}
},
"raw_json_formatted": {
"amount_to_capture": 2000,
"statement_descriptor_name": "Joseph",
"statement_descriptor_suffix": "JS"
}
},
"url": {
"raw": "{{baseUrl}}/payments/:id/capture",
"host": [
"{{baseUrl}}"
],
"path": [
"payments",
":id",
"capture"
],
"variable": [
{
"key": "id",
"value": "{{payment_id}}",
"description": "(Required) unique payment id"
}
]
},
"description": "To capture the funds for an uncaptured payment"
}
| 233 | 6,860 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Successful Partial Capture and Refund/Payments - Capture - 1/event.test.js | .js | // 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 "connector error" for "error type"
if (jsonData?.error?.type) {
pm.test(
"[POST]::/payments/:id/confirm - Content check if value for 'error.type' matches 'invalid_request'",
function () {
pm.expect(jsonData.error.type).to.eql("invalid_request");
},
);
}
// Response body should have value "cancellation succeeded" for "payment status"
if (jsonData?.status) {
pm.test(
"[POST]::/payments/:id/cancel - Content check if value for 'jsonData.status' matches 'partially_captured_and_capturable'",
function () {
pm.expect(jsonData.status).to.eql("partially_captured_and_capturable");
},
);
}
| 567 | 6,861 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Successful Partial Capture and Refund/Payments - Capture - 1/response.json | .json | []
| 1 | 6,862 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Successful Partial Capture and Refund/Payments - Capture - 1/event.prerequest.js | .js | 0 | 6,863 | |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/3DS Payment/Payments - Retrieve/request.json | .json | {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "{{baseUrl}}/payments/:id?force_sync=true",
"host": [
"{{baseUrl}}"
],
"path": [
"payments",
":id"
],
"query": [
{
"key": "force_sync",
"value": "true"
}
],
"variable": [
{
"key": "id",
"value": "{{payment_id}}",
"description": "(Required) unique payment id"
}
]
},
"description": "To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment"
}
| 182 | 6,864 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/3DS 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",
);
});
// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
// Validate if response has JSON Body
pm.test("[GET]::/payments/:id - Response has JSON Body", function () {
pm.response.to.have.jsonBody();
});
// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
if (jsonData?.payment_id) {
pm.collectionVariables.set("payment_id", jsonData.payment_id);
console.log(
"- use {{payment_id}} as collection variable for value",
jsonData.payment_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
);
}
// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
if (jsonData?.mandate_id) {
pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
console.log(
"- use {{mandate_id}} as collection variable for value",
jsonData.mandate_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
);
}
// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
if (jsonData?.client_secret) {
pm.collectionVariables.set("client_secret", jsonData.client_secret);
console.log(
"- use {{client_secret}} as collection variable for value",
jsonData.client_secret,
);
} else {
console.log(
"INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
);
}
| 430 | 6,865 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/3DS Payment/Payments - Retrieve/response.json | .json | []
| 1 | 6,866 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/3DS Payment/Payments - Retrieve/event.prerequest.js | .js | setTimeout(function(){
console.log("Sleeping for 3 seconds before next request.");
}, 3000); | 24 | 6,867 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/3DS Payment/Payments - Create/request.json | .json | {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"options": {
"raw": {
"language": "json"
}
},
"raw_json_formatted": {
"amount": 6000,
"currency": "USD",
"confirm": true,
"capture_method": "manual_multiple",
"capture_on": "2022-09-10T10:11:12Z",
"customer_id": "StripeCustomer",
"email": "guest@example.com",
"name": "John Doe",
"phone": "999999999",
"phone_country_code": "+1",
"description": "Its my first payment request",
"authentication_type": "three_ds",
"return_url": "https://duck.com",
"payment_method": "card",
"payment_method_data": {
"card": {
"card_number": "4242424242424242",
"card_exp_month": "10",
"card_exp_year": "25",
"card_holder_name": "joseph Doe",
"card_cvc": "123"
}
},
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "PiX"
}
},
"shipping": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "PiX"
}
},
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
}
}
},
"url": {
"raw": "{{baseUrl}}/payments",
"host": [
"{{baseUrl}}"
],
"path": [
"payments"
]
},
"description": "To process a payment you will have to create a payment, attach a payment method and confirm. Depending on the user journey you wish to achieve, you may opt to all the steps in a single request or in a sequence of API request using following APIs: (i) Payments - Update, (ii) Payments - Confirm, and (iii) Payments - Capture"
}
| 696 | 6,868 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/3DS Payment/Payments - Create/event.test.js | .js | // Validate status 2xx
pm.test("[POST]::/payments - Status code is 2xx", function () {
pm.response.to.be.success;
});
// Validate if response header has matching content-type
pm.test("[POST]::/payments - Content-Type is application/json", function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include(
"application/json",
);
});
// Validate if response has JSON Body
pm.test("[POST]::/payments - Response has JSON Body", function () {
pm.response.to.have.jsonBody();
});
// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
if (jsonData?.payment_id) {
pm.collectionVariables.set("payment_id", jsonData.payment_id);
console.log(
"- use {{payment_id}} as collection variable for value",
jsonData.payment_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
);
}
// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
if (jsonData?.mandate_id) {
pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
console.log(
"- use {{mandate_id}} as collection variable for value",
jsonData.mandate_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
);
}
// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
if (jsonData?.client_secret) {
pm.collectionVariables.set("client_secret", jsonData.client_secret);
console.log(
"- use {{client_secret}} as collection variable for value",
jsonData.client_secret,
);
} else {
console.log(
"INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
);
}
// Response body should have value "connector error" for "error type"
if (jsonData?.status) {
pm.test(
"[POST]::/payments/:id/cancel - Content check if value for 'jsonData.status' matches 'requires_customer_action'",
function () {
pm.expect(jsonData.status).to.eql("requires_customer_action");
},
);
}
| 500 | 6,869 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/3DS Payment/Payments - Create/response.json | .json | []
| 1 | 6,870 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/3DS Payment/Payments - Create/event.prerequest.js | .js | 0 | 6,871 | |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario12-Don't Pass CVV for save card flow and verify success payment/Save card payments - Create/request.json | .json | {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"options": {
"raw": {
"language": "json"
}
},
"raw_json_formatted": {
"amount": 6540,
"currency": "USD",
"confirm": false,
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"amount_to_capture": 6540,
"customer_id": "{{customer_id}}",
"email": "guest@example.com",
"name": "John Doe",
"phone": "999999999",
"phone_country_code": "+65",
"description": "Its my first payment request",
"authentication_type": "no_three_ds",
"return_url": "https://google.com",
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "9123456789",
"country_code": "+91"
}
},
"shipping": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "9123456789",
"country_code": "+91"
}
},
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
}
}
},
"url": {
"raw": "{{baseUrl}}/payments",
"host": [
"{{baseUrl}}"
],
"path": [
"payments"
]
},
"description": "To process a payment you will have to create a payment, attach a payment method and confirm. Depending on the user journey you wish to achieve, you may opt to all the steps in a single request or in a sequence of API request using following APIs: (i) Payments - Update, (ii) Payments - Confirm, and (iii) Payments - Capture"
}
| 704 | 6,872 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario12-Don't Pass CVV for save card flow and verify success payment/Save card payments - Create/event.test.js | .js | // Validate status 2xx
pm.test("[POST]::/payments - Status code is 2xx", function () {
pm.response.to.be.success;
});
// Validate if response header has matching content-type
pm.test("[POST]::/payments - Content-Type is application/json", function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include("application/json");
});
// Validate if response has JSON Body
pm.test("[POST]::/payments - Response has JSON Body", function () {
pm.response.to.have.jsonBody();
});
// Set response object as internal variable
let jsonData = {};
try {jsonData = pm.response.json();}catch(e){}
// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
if (jsonData?.payment_id) {
pm.collectionVariables.set("payment_id", jsonData.payment_id);
console.log("- use {{payment_id}} as collection variable for value",jsonData.payment_id);
} else {
console.log('INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.');
};
// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
if (jsonData?.mandate_id) {
pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
console.log("- use {{mandate_id}} as collection variable for value",jsonData.mandate_id);
} else {
console.log('INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.');
};
// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
if (jsonData?.client_secret) {
pm.collectionVariables.set("client_secret", jsonData.client_secret);
console.log("- use {{client_secret}} as collection variable for value",jsonData.client_secret);
} else {
console.log('INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.');
};
if (jsonData?.customer_id) {
pm.collectionVariables.set("customer_id", jsonData.customer_id);
console.log("- use {{customer_id}} as collection variable for value",jsonData.customer_id);
} else {
console.log('INFO - Unable to assign variable {{customer_id}}, as jsonData.customer_id is undefined.');
}; | 456 | 6,873 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario12-Don't Pass CVV for save card flow and verify success payment/Save card payments - Create/response.json | .json | []
| 1 | 6,874 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario12-Don't Pass CVV for save card flow and verify success payment/Save card payments - Confirm/request.json | .json | {
"auth": {
"type": "apikey",
"apikey": [
{
"key": "value",
"value": "{{publishable_key}}",
"type": "string"
},
{
"key": "key",
"value": "api-key",
"type": "string"
},
{
"key": "in",
"value": "header",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"options": {
"raw": {
"language": "json"
}
},
"raw_json_formatted": {
"client_secret": "{{client_secret}}",
"payment_method": "card",
"payment_token": "{{payment_token}}"
}
},
"url": {
"raw": "{{baseUrl}}/payments/:id/confirm",
"host": [
"{{baseUrl}}"
],
"path": [
"payments",
":id",
"confirm"
],
"variable": [
{
"key": "id",
"value": "{{payment_id}}",
"description": "(Required) unique payment id"
}
]
},
"description": "This API is to confirm the payment request and forward payment to the payment processor. This API provides more granular control upon when the API is forwarded to the payment processor. Alternatively you can confirm the payment within the Payments-Create API"
}
| 367 | 6,875 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario12-Don't Pass CVV for save card flow and verify success payment/Save card payments - Confirm/event.test.js | .js | // Validate status 2xx
pm.test("[POST]::/payments/:id/confirm - Status code is 2xx", function () {
pm.response.to.be.success;
});
// Validate if response header has matching content-type
pm.test(
"[POST]::/payments/:id/confirm - Content-Type is application/json",
function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include(
"application/json",
);
},
);
// Validate if response has JSON Body
pm.test("[POST]::/payments/:id/confirm - Response has JSON Body", function () {
pm.response.to.have.jsonBody();
});
// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
if (jsonData?.payment_id) {
pm.collectionVariables.set("payment_id", jsonData.payment_id);
console.log(
"- use {{payment_id}} as collection variable for value",
jsonData.payment_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",
);
}
// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
if (jsonData?.mandate_id) {
pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
console.log(
"- use {{mandate_id}} as collection variable for value",
jsonData.mandate_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",
);
}
// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
if (jsonData?.client_secret) {
pm.collectionVariables.set("client_secret", jsonData.client_secret);
console.log(
"- use {{client_secret}} as collection variable for value",
jsonData.client_secret,
);
} else {
console.log(
"INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",
);
}
// Response body should have value "processing" for "status"
if (jsonData?.status) {
pm.test(
"[POST]::/payments/:id/confirm - Content check if value for 'status' matches 'processing'",
function () {
pm.expect(jsonData.status).to.eql("processing");
},
);
}
// Response body should have value "checkout" for "connector"
if (jsonData?.connector) {
pm.test(
"[POST]::/payments/:id/confirm - Content check if value for 'connector' matches 'checkout'",
function () {
pm.expect(jsonData.connector).to.eql("checkout");
},
);
}
| 579 | 6,876 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario12-Don't Pass CVV for save card flow and verify success payment/Save card payments - Confirm/response.json | .json | []
| 1 | 6,877 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario12-Don't Pass CVV for save card flow and verify success payment/Payments - Retrieve/request.json | .json | {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "{{baseUrl}}/payments/:id?force_sync=true",
"host": [
"{{baseUrl}}"
],
"path": [
"payments",
":id"
],
"query": [
{
"key": "force_sync",
"value": "true"
}
],
"variable": [
{
"key": "id",
"value": "{{payment_id}}",
"description": "(Required) unique payment id"
}
]
},
"description": "To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment"
}
| 182 | 6,878 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario12-Don't Pass CVV for save card flow and verify success 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");
},
);
}
// Validate the connector
pm.test("[POST]::/payments - connector", function () {
pm.expect(jsonData.connector).to.eql("checkout");
});
// Response body should have value "6540" for "amount"
if (jsonData?.amount) {
pm.test(
"[post]:://payments/:id/capture - Content check if value for 'amount' matches '6540'",
function () {
pm.expect(jsonData.amount).to.eql(6540);
},
);
}
// Response body should have value "6000" for "amount_received"
if (jsonData?.amount_received) {
pm.test(
"[POST]::/payments:id/capture - Content check if value for 'amount_received' matches '6000'",
function () {
pm.expect(jsonData.amount_received).to.eql(6540);
},
);
}
// Response body should have value "6540" for "amount_capturable"
if (jsonData?.amount) {
pm.test(
"[post]:://payments/:id/capture - Content check if value for 'amount_capturable' matches 'amount - 540'",
function () {
pm.expect(jsonData.amount_capturable).to.eql(0);
},
);
}
| 777 | 6,879 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario12-Don't Pass CVV for save card flow and verify success payment/Payments - Retrieve/response.json | .json | []
| 1 | 6,880 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario12-Don't Pass CVV for save card flow and verify success payment/Payments - Retrieve/event.prerequest.js | .js | setTimeout(function(){
console.log("Sleeping for 3 seconds before next request.");
}, 3000); | 24 | 6,881 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario12-Don't Pass CVV for save card flow and verify success payment/Payments - Create/request.json | .json | {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"options": {
"raw": {
"language": "json"
}
},
"raw_json_formatted": {
"amount": 6540,
"currency": "USD",
"confirm": true,
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"amount_to_capture": 6540,
"customer_id": "adyensavecard",
"email": "guest@example.com",
"name": "John Doe",
"phone": "999999999",
"phone_country_code": "+65",
"description": "Its my first payment request",
"authentication_type": "no_three_ds",
"return_url": "https://google.com",
"setup_future_usage": "on_session",
"customer_acceptance": {
"acceptance_type": "online",
"accepted_at": "2022-09-10T10:11:12Z",
"online": {
"ip_address": "123.32.25.123",
"user_agent": "Mozilla/5.0 (Linux; Android 12; SM-S906N Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/80.0.3987.119 Mobile Safari/537.36"
}
},
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_data": {
"card": {
"card_number": "371449635398431",
"card_exp_month": "03",
"card_exp_year": "2030",
"card_holder_name": "joseph Doe",
"card_cvc": "7373"
}
},
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "9123456789",
"country_code": "+91"
}
},
"shipping": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "9123456789",
"country_code": "+91"
}
},
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
}
}
},
"url": {
"raw": "{{baseUrl}}/payments",
"host": ["{{baseUrl}}"],
"path": ["payments"]
},
"description": "To process a payment you will have to create a payment, attach a payment method and confirm. Depending on the user journey you wish to achieve, you may opt to all the steps in a single request or in a sequence of API request using following APIs: (i) Payments - Update, (ii) Payments - Confirm, and (iii) Payments - Capture"
}
| 971 | 6,882 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario12-Don't Pass CVV for save card flow and verify success payment/Payments - Create/event.test.js | .js | // Validate status 2xx
pm.test("[POST]::/payments - Status code is 2xx", function () {
pm.response.to.be.success;
});
// Validate if response header has matching content-type
pm.test("[POST]::/payments - Content-Type is application/json", function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include("application/json");
});
// Validate if response has JSON Body
pm.test("[POST]::/payments - Response has JSON Body", function () {
pm.response.to.have.jsonBody();
});
// Set response object as internal variable
let jsonData = {};
try {jsonData = pm.response.json();}catch(e){}
// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
if (jsonData?.payment_id) {
pm.collectionVariables.set("payment_id", jsonData.payment_id);
console.log("- use {{payment_id}} as collection variable for value",jsonData.payment_id);
} else {
console.log('INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.');
};
// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id
if (jsonData?.mandate_id) {
pm.collectionVariables.set("mandate_id", jsonData.mandate_id);
console.log("- use {{mandate_id}} as collection variable for value",jsonData.mandate_id);
} else {
console.log('INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.');
};
// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret
if (jsonData?.client_secret) {
pm.collectionVariables.set("client_secret", jsonData.client_secret);
console.log("- use {{client_secret}} as collection variable for value",jsonData.client_secret);
} else {
console.log('INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.');
};
if (jsonData?.customer_id) {
pm.collectionVariables.set("customer_id", jsonData.customer_id);
console.log("- use {{customer_id}} as collection variable for value",jsonData.customer_id);
} else {
console.log('INFO - Unable to assign variable {{customer_id}}, as jsonData.customer_id is undefined.');
}; | 456 | 6,883 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario12-Don't Pass CVV for save card flow and verify success payment/Payments - Create/response.json | .json | []
| 1 | 6,884 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario12-Don't Pass CVV for save card flow and verify success payment/Payments - Create/event.prerequest.js | .js | pm.environment.set("random_number", _.random(1000, 100000));
| 23 | 6,885 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario12-Don't Pass CVV for save card flow and verify success payment/List payment methods for a Customer/request.json | .json | {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "{{baseUrl}}/customers/:customer_id/payment_methods",
"host": [
"{{baseUrl}}"
],
"path": [
"customers",
":customer_id",
"payment_methods"
],
"query": [
{
"key": "accepted_country",
"value": "co",
"disabled": true
},
{
"key": "accepted_country",
"value": "pa",
"disabled": true
},
{
"key": "accepted_currency",
"value": "voluptate ea",
"disabled": true
},
{
"key": "accepted_currency",
"value": "exercitation",
"disabled": true
},
{
"key": "minimum_amount",
"value": "100",
"disabled": true
},
{
"key": "maximum_amount",
"value": "10000000",
"disabled": true
},
{
"key": "recurring_payment_enabled",
"value": "true",
"disabled": true
},
{
"key": "installment_payment_enabled",
"value": "true",
"disabled": true
}
],
"variable": [
{
"key": "customer_id",
"value": "{{customer_id}}",
"description": "//Pass the customer id"
}
]
},
"description": "To filter and list the applicable payment methods for a particular Customer ID"
}
| 371 | 6,886 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario12-Don't Pass CVV for save card flow and verify success payment/List payment methods for a Customer/event.test.js | .js | // Validate status 2xx
pm.test("[GET]::/payment_methods/:customer_id - Status code is 2xx", function () {
pm.response.to.be.success;
});
// Validate if response header has matching content-type
pm.test("[GET]::/payment_methods/:customer_id - Content-Type is application/json", function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include("application/json");
});
// Set response object as internal variable
let jsonData = {};
try {jsonData = pm.response.json();}catch(e){}
if (jsonData?.customer_payment_methods[0]?.payment_token) {
pm.collectionVariables.set("payment_token", jsonData.customer_payment_methods[0].payment_token);
console.log("- use {{payment_token}} as collection variable for value", jsonData.customer_payment_methods[0].payment_token);
} else {
console.log('INFO - Unable to assign variable {{payment_token}}, as jsonData.customer_payment_methods[0].payment_token is undefined.');
} | 202 | 6,887 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario12-Don't Pass CVV for save card flow and verify success payment/List payment methods for a Customer/response.json | .json | []
| 1 | 6,888 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario9-Partial refund/Refunds - Create-copy/request.json | .json | {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"options": {
"raw": {
"language": "json"
}
},
"raw_json_formatted": {
"payment_id": "{{payment_id}}",
"amount": 1000,
"reason": "Customer returned product",
"refund_type": "instant",
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
}
}
},
"url": {
"raw": "{{baseUrl}}/refunds",
"host": [
"{{baseUrl}}"
],
"path": [
"refunds"
]
},
"description": "To create a refund against an already processed payment"
}
| 244 | 6,889 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario9-Partial refund/Refunds - Create-copy/event.test.js | .js | // Validate status 2xx
pm.test("[POST]::/refunds - Status code is 2xx", function () {
pm.response.to.be.success;
});
// Validate if response header has matching content-type
pm.test("[POST]::/refunds - Content-Type is application/json", function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include(
"application/json",
);
});
// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
// pm.collectionVariables - Set refund_id as variable for jsonData.payment_id
if (jsonData?.refund_id) {
pm.collectionVariables.set("refund_id", jsonData.refund_id);
console.log(
"- use {{refund_id}} as collection variable for value",
jsonData.refund_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{refund_id}}, as jsonData.refund_id is undefined.",
);
}
// Response body should have value "succeeded" for "status"
if (jsonData?.status) {
pm.test(
"[POST]::/refunds - Content check if value for 'status' matches 'succeeded'",
function () {
pm.expect(jsonData.status).to.eql("succeeded");
},
);
}
// Response body should have value "1000" for "amount"
if (jsonData?.status) {
pm.test(
"[POST]::/refunds - Content check if value for 'amount' matches '1000'",
function () {
pm.expect(jsonData.amount).to.eql(1000);
},
);
}
| 349 | 6,890 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario9-Partial refund/Refunds - Create-copy/response.json | .json | []
| 1 | 6,891 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario9-Partial refund/Refunds - Create-copy/event.prerequest.js | .js | setTimeout(function(){
console.log("Sleeping for 3 seconds before next request.");
}, 3000); | 24 | 6,892 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario9-Partial refund/Refunds - Create/request.json | .json | {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"options": {
"raw": {
"language": "json"
}
},
"raw_json_formatted": {
"payment_id": "{{payment_id}}",
"amount": 540,
"reason": "Customer returned product",
"refund_type": "instant",
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
}
}
},
"url": {
"raw": "{{baseUrl}}/refunds",
"host": [
"{{baseUrl}}"
],
"path": [
"refunds"
]
},
"description": "To create a refund against an already processed payment"
}
| 243 | 6,893 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario9-Partial refund/Refunds - Create/event.test.js | .js | // Validate status 2xx
pm.test("[POST]::/refunds - Status code is 2xx", function () {
pm.response.to.be.success;
});
// Validate if response header has matching content-type
pm.test("[POST]::/refunds - Content-Type is application/json", function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include(
"application/json",
);
});
// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
// pm.collectionVariables - Set refund_id as variable for jsonData.payment_id
if (jsonData?.refund_id) {
pm.collectionVariables.set("refund_id", jsonData.refund_id);
console.log(
"- use {{refund_id}} as collection variable for value",
jsonData.refund_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{refund_id}}, as jsonData.refund_id is undefined.",
);
}
// Response body should have value "succeeded" for "status"
if (jsonData?.status) {
pm.test(
"[POST]::/refunds - Content check if value for 'status' matches 'succeeded'",
function () {
pm.expect(jsonData.status).to.eql("succeeded");
},
);
}
// Response body should have value "540" for "amount"
if (jsonData?.status) {
pm.test(
"[POST]::/refunds - Content check if value for 'amount' matches '540'",
function () {
pm.expect(jsonData.amount).to.eql(540);
},
);
}
// Validate the connector
pm.test("[POST]::/payments - connector", function () {
pm.expect(jsonData.connector).to.eql("checkout");
});
| 378 | 6,894 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario9-Partial refund/Refunds - Create/response.json | .json | []
| 1 | 6,895 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario9-Partial refund/Refunds - Create/event.prerequest.js | .js | setTimeout(function(){
console.log("Sleeping for 3 seconds before next request.");
}, 3000); | 24 | 6,896 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario9-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"
}
| 155 | 6,897 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario9-Partial refund/Refunds - Retrieve/event.test.js | .js | // Validate status 2xx
pm.test("[GET]::/refunds/:id - Status code is 2xx", function () {
pm.response.to.be.success;
});
// Validate if response header has matching content-type
pm.test("[GET]::/refunds/:id - Content-Type is application/json", function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include(
"application/json",
);
});
// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
// pm.collectionVariables - Set refund_id as variable for jsonData.payment_id
if (jsonData?.refund_id) {
pm.collectionVariables.set("refund_id", jsonData.refund_id);
console.log(
"- use {{refund_id}} as collection variable for value",
jsonData.refund_id,
);
} else {
console.log(
"INFO - Unable to assign variable {{refund_id}}, as jsonData.refund_id is undefined.",
);
}
// Response body should have value "succeeded" for "status"
if (jsonData?.status) {
pm.test(
"[POST]::/refunds - Content check if value for 'status' matches 'succeeded'",
function () {
pm.expect(jsonData.status).to.eql("succeeded");
},
);
}
// Response body should have value "6540" for "amount"
if (jsonData?.status) {
pm.test(
"[POST]::/refunds - Content check if value for 'amount' matches '540'",
function () {
pm.expect(jsonData.amount).to.eql(540);
},
);
}
| 351 | 6,898 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario9-Partial refund/Refunds - Retrieve/response.json | .json | []
| 1 | 6,899 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario9-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"
}
| 182 | 6,900 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario9-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");
},
);
}
// Validate the connector
pm.test("[POST]::/payments - connector", function () {
pm.expect(jsonData.connector).to.eql("checkout");
});
// Response body should have value "6540" for "amount"
if (jsonData?.amount) {
pm.test(
"[post]:://payments/:id/capture - Content check if value for 'amount' matches '6540'",
function () {
pm.expect(jsonData.amount).to.eql(6540);
},
);
}
// Response body should have value "6000" for "amount_received"
if (jsonData?.amount_received) {
pm.test(
"[POST]::/payments:id/capture - Content check if value for 'amount_received' matches '6000'",
function () {
pm.expect(jsonData.amount_received).to.eql(6540);
},
);
}
// Response body should have value "6540" for "amount_capturable"
if (jsonData?.amount) {
pm.test(
"[post]:://payments/:id/capture - Content check if value for 'amount_capturable' matches 'amount - 540'",
function () {
pm.expect(jsonData.amount_capturable).to.eql(0);
},
);
}
| 777 | 6,901 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario9-Partial refund/Payments - Retrieve/response.json | .json | []
| 1 | 6,902 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario9-Partial refund/Payments - Retrieve/event.prerequest.js | .js | setTimeout(function(){
console.log("Sleeping for 3 seconds before next request.");
}, 3000); | 24 | 6,903 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario9-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"
}
| 182 | 6,904 |
hyperswitch | postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario9-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 | 6,905 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.