{"collection":{"info":{"_postman_id":"33443d91-0620-4f6f-83c8-050cf984b1d0","name":"API4 for Partners","description":"Includes all public endpoints for the PaySimple API version 4.\n","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json","createdAt":"2025-03-14T23:18:01.000Z","updatedAt":"2025-03-17T00:08:52.000Z","lastUpdatedBy":"5244107","uid":"5244107-33443d91-0620-4f6f-83c8-050cf984b1d0"},"item":[{"name":"Make payment with new customer","item":[{"name":"Create Customer","event":[{"listen":"test","script":{"id":"c5793898-b0c6-48b2-99d7-0923be4ca16b","exec":["pm.test(\"Status code is 201\", function () {","    pm.response.to.have.status(201);","});","","var jsonData = pm.response.json();","var customer_id = jsonData.Response.Id;","var first_name = jsonData.Response.FirstName;","var last_name = jsonData.Response.LastName;","var email = jsonData.Response.Email;","var company = jsonData.Response.Company;","var notes = jsonData.Response.Notes;","var billing_street = jsonData.Response.BillingAddress.StreetAddress1;","var billing_city = jsonData.Response.BillingAddress.City;","var shipping_street = jsonData.Response.ShippingAddress.StreetAddress1;","var shipping_city = jsonData.Response.ShippingAddress.City;","","","pm.test(\"Customer created.  Customer Id = \"  + customer_id, function () {","   pm.expect(pm.response.text()).to.include(customer_id);","});","pm.test(\"Customer Name = \" + first_name + \" \" + last_name);","pm.test(\"Email = \" + email);","pm.test(\"Company = \" + company);","pm.test(\"Notes = \" + notes);","","pm.collectionVariables.set(\"customer_id\", customer_id);","","",""],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"5176d523-2a1a-4a37-a16f-1d1719bd118e","exec":[""],"type":"text/javascript","packages":{}}}],"id":"89e41490-3836-4895-ba4e-96aa54f74057","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"{{auth_header}}","type":"text"},{"key":"PaySimple-Merchant-Id","value":"{{merchant_id}}","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"FirstName\": \"{{$randomFirstName}}\",\n    \"LastName\": \"{{$randomLastName}}\",\n    \"Email\": \"{{$randomEmail}}\",\n    \"Phone\": \"3033331111\",\n    \"Company\": \"{{$randomCompanyName}}\",\n    \"Notes\": \"{{$randomCatchPhrase}}\",\n    \"CustomerAccount\": \"\",\n    \"ShippingSameAsBilling\": false,\n    \"BillingAddress\": {\n        \"StreetAddress1\": \"{{$randomStreetAddress}}\",\n        \"City\": \"{{$randomCity}}\",\n        \"StateCode\": \"BC\",\n        \"ZipCode\": \"A3A2A1\",\n        \"Country\": \"Canada\"\n    },\n    \"ShippingAddress\": {\n        \"StreetAddress1\": \"{{$randomStreetAddress}}\",\n        \"StreetAddress2\": \"Suite 200\",\n        \"City\": \"{{$randomCity}}\",\n        \"StateCode\": \"CO\",\n        \"ZipCode\": \"80202\",\n        \"Country\": \"US\"\n    }\n}"},"url":{"raw":"{{api4}}/customer","host":["{{api4}}"],"path":["customer"]}},"response":[],"createdAt":"2025-03-14T23:18:02.000Z","updatedAt":"2025-03-15T14:45:40.000Z","uid":"5244107-89e41490-3836-4895-ba4e-96aa54f74057"},{"name":"Create Credit Card Account","event":[{"listen":"test","script":{"id":"48b6eac0-4c8d-48ee-ab2e-76b6988855cc","exec":["pm.test(\"Status code is 201\", function () {","    pm.response.to.have.status(201);","});","","var jsonData = pm.response.json();","var account_id = jsonData.Response.Id;","var customer_id = jsonData.Response.CustomerId;","var cc_last_four = jsonData.Response.CreditCardNumber;","","pm.test(\"Payment Method: Credit Card Account created.  Account Id = \"  + account_id, function () {","   pm.expect(pm.response.text()).to.include(account_id);","});","pm.test(\"Customer Id = \" + customer_id);","pm.test(\"Credit Card Number last four = \" + cc_last_four);","","pm.collectionVariables.set(\"account_id\", account_id);","","",""],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"6c40c185-0191-4c09-9619-70ccafc9d8c2","exec":[""],"type":"text/javascript","packages":{}}}],"id":"64c3eabc-5399-41ba-be6c-e18a33df298e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"{{auth_header}}","type":"text"},{"key":"PaySimple-Merchant-Id","value":"{{merchant_id}}","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"CreditCardNumber\": \"4716406361430933\",\r\n    \"ExpirationDate\": \"12/2030\",\r\n    \"Issuer\": \"12\",\r\n    \"BillingZipCode\": \"80202\",\r\n    \"CustomerId\": {{customer_id}}\r\n}"},"url":{"raw":"{{api4}}/account/creditcard","host":["{{api4}}"],"path":["account","creditcard"]}},"response":[],"createdAt":"2025-03-14T23:18:02.000Z","updatedAt":"2025-03-15T14:47:06.000Z","uid":"5244107-64c3eabc-5399-41ba-be6c-e18a33df298e"},{"name":"Charge CustomerCard = DECLINE","event":[{"listen":"test","script":{"id":"549bd8a4-f04f-4813-a1a0-69f11781a5d4","exec":[""],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"06cf465a-3ca5-4554-a77b-01d080642a2a","exec":["    var userId = pm.environment.get(\"userId\");\r","    var apiKey = pm.environment.get(\"apiKey\");\r","\r","    var isoDate = new Date().toISOString();\r","    var encodedKey = CryptoJS.enc.Utf8.parse(apiKey);\r","    var encodedTimestamp = CryptoJS.enc.Utf8.parse(isoDate);\r","    var signature = CryptoJS.HmacSHA256(encodedTimestamp, encodedKey);\r","    var encodedSignature = CryptoJS.enc.Base64.stringify(signature);\r","    \r","    var hmac =  'PSSERVER AccessId = ' + userId + '; Timestamp = ' +  isoDate + '; Signature = ' + encodedSignature;\r","    \r","    console.log('HMAC header: ' + hmac);\r","    pm.environment.set('hmac', hmac);"],"type":"text/javascript","packages":{}}}],"id":"88b86471-a02f-4771-9d23-df845c2f392a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"{{auth_header}}","type":"text"},{"key":"PaySimple-Merchant-Id","value":"{{merchant_id}}","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"Amount\" : 0.20,\r\n    \"AccountId\" : {{account_id}}\r\n}"},"url":{"raw":"{{api4}}/payment","host":["{{api4}}"],"path":["payment"]},"description":"In the PaySimple SANDBOX environment, amounts in the 9999.01 - 9999.29 range generate failure responses.  This is an example of a DECLINE response."},"response":[],"createdAt":"2025-03-14T23:18:02.000Z","updatedAt":"2025-03-15T18:47:50.000Z","uid":"5244107-88b86471-a02f-4771-9d23-df845c2f392a"},{"name":"Charge Customer Card = AUTHORIZED","event":[{"listen":"test","script":{"id":"b51cbb59-2b66-4a4f-867a-63e13a1ba9f7","exec":["pm.test(\"Status code is 201\", function () {","    pm.response.to.have.status(201);","});","","var jsonData = pm.response.json();","var payment_id = jsonData.Response.Id;","var status = jsonData.Response.Status;","var auth_code = jsonData.Response.ProviderAuthCode;","var amount = jsonData.Response.Amount;","","pm.test(\"Payment \" + payment_id + \" = \" + auth_code, function () {","   pm.expect(auth_code).to.eql(\"Approved\");","});","pm.test(\"Status: \" + status, function () {","   pm.expect(status).to.eql(\"Authorized\");","});","pm.test(\"Amount = \" + amount, function () {","    pm.expect(amount).to.not.eql(0);","});","","pm.collectionVariables.set(\"payment_id\", payment_id);"],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"720414f1-be75-430e-b181-da7a9c7fe455","exec":[""],"type":"text/javascript","packages":{}}}],"id":"d4047412-8f35-48c8-b325-0859a901527b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"{{auth_header}}","type":"text"},{"key":"PaySimple-Merchant-Id","value":"{{merchant_id}}","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"Amount\" : {{$randomInt}},\r\n    \"AccountId\" : {{account_id}}\r\n}"},"url":{"raw":"{{api4}}/payment","host":["{{api4}}"],"path":["payment"]}},"response":[],"createdAt":"2025-03-14T23:18:02.000Z","updatedAt":"2025-03-16T14:06:35.000Z","uid":"5244107-d4047412-8f35-48c8-b325-0859a901527b"},{"name":"Retrieve Payment","event":[{"listen":"test","script":{"id":"5e614dc5-76d7-4ff8-81cd-07e23c784fd4","exec":[""],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"823587a1-badb-480e-85aa-e2a3084aa231","exec":["    var userId = pm.environment.get(\"userId\");\r","    var apiKey = pm.environment.get(\"apiKey\");\r","\r","    var isoDate = new Date().toISOString();\r","    var encodedKey = CryptoJS.enc.Utf8.parse(apiKey);\r","    var encodedTimestamp = CryptoJS.enc.Utf8.parse(isoDate);\r","    var signature = CryptoJS.HmacSHA256(encodedTimestamp, encodedKey);\r","    var encodedSignature = CryptoJS.enc.Base64.stringify(signature);\r","    \r","    var hmac =  'PSSERVER AccessId = ' + userId + '; Timestamp = ' +  isoDate + '; Signature = ' + encodedSignature;\r","    \r","    console.log('HMAC header: ' + hmac);\r","    pm.environment.set('hmac', hmac);"],"type":"text/javascript","packages":{}}}],"id":"dc0eba82-357d-4e9d-a8d2-d42a1ee6c335","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"{{auth_header}}","type":"text"},{"key":"PaySimple-Merchant-Id","value":"{{merchant_id}}","type":"text"}],"url":{"raw":"{{api4}}/payment/{{payment_id}}?","host":["{{api4}}"],"path":["payment","{{payment_id}}"],"query":[{"key":"","value":null,"type":"text"}]}},"response":[],"createdAt":"2025-03-14T23:18:02.000Z","updatedAt":"2025-03-15T18:59:54.000Z","uid":"5244107-dc0eba82-357d-4e9d-a8d2-d42a1ee6c335"},{"name":"Void Payment","event":[{"listen":"test","script":{"id":"05b18423-9b70-4eb3-86fd-a3fcbc0ef296","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","","var jsonData = pm.response.json();","var payment_id = jsonData.Response.Id;","var status = jsonData.Response.Status;","","pm.test(\"Payment \" + payment_id + \" is \" + status, function () {","   pm.expect(status).to.eql(\"Voided\");","});",""],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"eec04fa3-18dc-4706-92f5-d43ab129ec92","exec":[""],"type":"text/javascript","packages":{}}}],"id":"fd912c0c-9a6c-4d59-a83e-7076cc3c710e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"PS_204_NoContent","value":"","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"{{auth_header}}","type":"text"},{"key":"PaySimple-Merchant-Id","value":"{{merchant_id}}","type":"text"}],"body":{"mode":"raw","raw":""},"url":{"raw":"{{api4}}/payment/{{payment_id}}/void","host":["{{api4}}"],"path":["payment","{{payment_id}}","void"]},"description":"Voids a payment, preventing the payment from being batched out before the cutoff time."},"response":[],"createdAt":"2025-03-14T23:18:02.000Z","updatedAt":"2025-03-15T19:00:55.000Z","uid":"5244107-fd912c0c-9a6c-4d59-a83e-7076cc3c710e"}],"id":"0f754ec7-44a5-4ff6-82cf-2a2563756fcb","event":[{"listen":"prerequest","script":{"id":"f6ed54a7-b1e6-478f-b1dc-13bf98e33bda","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"4802a312-dd70-4fb3-a4ff-4c97ca6816d2","type":"text/javascript","exec":[""]}}],"createdAt":"2025-03-14T23:18:02.000Z","updatedAt":"2025-03-16T23:58:24.000Z","uid":"5244107-0f754ec7-44a5-4ff6-82cf-2a2563756fcb"},{"name":"Make payment and refund","item":[{"name":"Charge Customer Card = AUTHORIZED 2","event":[{"listen":"test","script":{"id":"971be257-dcca-473a-881c-ca25e6e9bb98","exec":["pm.test(\"Status code is 201\", function () {","    pm.response.to.have.status(201);","});","","var jsonData = pm.response.json();","var payment_id = jsonData.Response.Id;","var status = jsonData.Response.Status;","var auth_code = jsonData.Response.ProviderAuthCode;","var amount = jsonData.Response.Amount;","","pm.test(\"Payment \" + payment_id + \" = \" + auth_code, function () {","   pm.expect(auth_code).to.eql(\"Approved\");","});","pm.test(\"Status: \" + status, function () {","   pm.expect(status).to.eql(\"Authorized\");","});","pm.test(\"Amount = \" + amount, function () {","    pm.expect(amount).to.not.eql(0);","});","","pm.collectionVariables.set(\"payment_id\", payment_id);"],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"8524d24b-2f76-4b5b-8ccc-56d8250b610a","exec":[""],"type":"text/javascript","packages":{}}}],"id":"7d025717-f59a-4eda-abac-7fa461b95012","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"{{auth_header}}","type":"text"},{"key":"PaySimple-Merchant-Id","value":"{{merchant_id}}","type":"text"},{"key":"PS_204_NoContent","value":"","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"Amount\" : 1.00,\r\n    \"AccountId\" : {{account_id}}\r\n}"},"url":{"raw":"{{api4}}/payment","host":["{{api4}}"],"path":["payment"]}},"response":[],"createdAt":"2025-03-14T23:18:02.000Z","updatedAt":"2025-03-15T19:07:20.000Z","uid":"5244107-7d025717-f59a-4eda-abac-7fa461b95012"},{"name":"Mark Payment Settled  - FOR TEST ONLY!","event":[{"listen":"test","script":{"id":"614566a8-9cc7-408c-b65e-a23e25219e05","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","","var jsonData = pm.response.json();","var payment_id = jsonData.Response.PaymentId;","var status = jsonData.Response.MarkStatus;","","pm.test(\"Payment \" + payment_id + \" status is \" + status, function () {","   pm.expect(status).to.eql(\"Updated\");","});",""],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"c24d673e-0d90-4808-abaa-b3cda48ea603","exec":[""],"type":"text/javascript","packages":{}}}],"id":"69a28b47-73f9-47d6-aee7-60d5985d1ce0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"PS_204_NoContent","value":"","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"{{auth_header}}","type":"text"},{"key":"PaySimple-Merchant-Id","value":"{{merchant_id}}","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"PaymentId\" : {{payment_id}}\n}"},"url":{"raw":"{{api4}}/MarkPaymentStatus","host":["{{api4}}"],"path":["MarkPaymentStatus"]},"description":"Voids a payment, preventing the payment from being batched out before the cutoff time."},"response":[],"createdAt":"2025-03-14T23:18:02.000Z","updatedAt":"2025-03-15T19:04:34.000Z","uid":"5244107-69a28b47-73f9-47d6-aee7-60d5985d1ce0"},{"name":"Refund settled payment","event":[{"listen":"test","script":{"id":"3ecd5fbe-26f9-43c2-b9d0-548ac84dcd17","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","","var jsonData = pm.response.json();","var payment_id = jsonData.Response.Id;","var status = jsonData.Response.Status;","","pm.test(\"Payment \" + payment_id + \" status is \" + status, function () {","   pm.expect(status).to.eql(\"ReversePosted\");","});",""],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"9cc3d88f-c7df-4a0d-a8fe-362570df8c51","exec":[""],"type":"text/javascript","packages":{}}}],"id":"1b7451cd-362b-4bda-88c7-2ee95b3758d6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"PS_204_NoContent","value":"","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"{{auth_header}}","type":"text"},{"key":"PaySimple-Merchant-Id","value":"{{merchant_id}}","type":"text"}],"body":{"mode":"raw","raw":""},"url":{"raw":"{{api4}}/payment/{{payment_id}}/reverse","host":["{{api4}}"],"path":["payment","{{payment_id}}","reverse"]}},"response":[],"createdAt":"2025-03-14T23:18:02.000Z","updatedAt":"2025-03-15T19:07:17.000Z","uid":"5244107-1b7451cd-362b-4bda-88c7-2ee95b3758d6"}],"id":"bd590cb7-b39f-4447-aaea-23e09747ef2b","event":[{"listen":"prerequest","script":{"id":"4129d5f3-5564-4e1d-8e2d-a1ff01f82699","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"5ec263c5-3ba9-4da1-9b25-bb4f9b897c91","type":"text/javascript","exec":[""]}}],"createdAt":"2025-03-14T23:18:02.000Z","updatedAt":"2025-03-14T23:18:02.000Z","uid":"5244107-bd590cb7-b39f-4447-aaea-23e09747ef2b"},{"name":"Schedules","item":[{"name":"List Schedules","event":[{"listen":"test","script":{"id":"b84e3a4e-d01e-4867-83ac-6af58c87b0b0","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","","var jsonData = pm.response.json();","var total_items = jsonData.Meta.PagingDetails.TotalItems;","","pm.test(\"List of Schedules = \"  + total_items + \" Schedules\");","","",""],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"5b8d0467-b912-4438-8580-38219984c5a2","exec":[""],"type":"text/javascript","packages":{}}}],"id":"46d53c28-3fd7-4c05-aeb4-ed4777e02930","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"{{auth_header}}","type":"text"},{"key":"PaySimple-Merchant-Id","value":"{{merchant_id}}","type":"text"}],"url":{"raw":"{{api4}}/paymentschedule","host":["{{api4}}"],"path":["paymentschedule"]}},"response":[],"createdAt":"2025-03-14T23:18:02.000Z","updatedAt":"2025-03-17T00:03:18.000Z","uid":"5244107-46d53c28-3fd7-4c05-aeb4-ed4777e02930"},{"name":"List Payment Plans","event":[{"listen":"prerequest","script":{"id":"4a9acd84-79bd-4cee-87e2-2fc89750dfaf","exec":[""],"type":"text/javascript","packages":{}}},{"listen":"test","script":{"id":"491a3869-e4b3-4271-8265-f1a6b273765b","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","","var jsonData = pm.response.json();","var total_items = jsonData.Meta.PagingDetails.TotalItems;","var payment_plan_id = jsonData.Response[0].Id;","","console.log(jsonData.Response[0].Id);","pm.test(\"List of Payment Plan Payments = \"  + total_items + \" Payments\");","","pm.collectionVariables.set(\"payment_plan_id\", payment_plan_id);"],"type":"text/javascript","packages":{}}}],"id":"7d8e8d84-cd2d-4480-b860-25f3abd1653b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"{{auth_header}}","type":"text"},{"key":"PaySimple-Merchant-Id","value":"{{merchant_id}}","type":"text"}],"url":{"raw":"{{api4}}/paymentplan","host":["{{api4}}"],"path":["paymentplan"],"query":[{"key":"","value":"","type":"text","disabled":true}]}},"response":[],"createdAt":"2025-03-16T23:16:21.000Z","updatedAt":"2025-03-16T23:24:22.000Z","uid":"5244107-7d8e8d84-cd2d-4480-b860-25f3abd1653b"},{"name":"List PP Payments","event":[{"listen":"prerequest","script":{"id":"80a69c20-d641-4a06-b87d-09c19db784e8","exec":[""],"type":"text/javascript","packages":{}}},{"listen":"test","script":{"id":"6665ccf9-cd29-459b-95cf-7f7e5562dfb9","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","","var jsonData = pm.response.json();","var schedule_id = jsonData.Response[0].RecurringScheduleId;","var total_items = jsonData.Meta.PagingDetails.TotalItems;","var payment_plan_id = pm.collectionVariables.get(\"payment_plan_id\");","","pm.test(\"Payment Plan =\" + schedule_id, function () {","   pm.expect(schedule_id).to.eql(payment_plan_id);","});","pm.test(\"List of Payments = \"  + total_items);",""],"type":"text/javascript","packages":{}}}],"id":"0fa60291-2abd-4e56-95e8-e66be9d3a6f1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"{{auth_header}}","type":"text"},{"key":"PaySimple-Merchant-Id","value":"{{merchant_id}}","type":"text"}],"url":{"raw":"{{api4}}/paymentplan/{{payment_plan_id}}/payments","host":["{{api4}}"],"path":["paymentplan","{{payment_plan_id}}","payments"]}},"response":[],"createdAt":"2025-03-16T23:16:21.000Z","updatedAt":"2025-03-16T23:25:21.000Z","uid":"5244107-0fa60291-2abd-4e56-95e8-e66be9d3a6f1"},{"name":"List Recurring Payments","event":[{"listen":"prerequest","script":{"id":"960abaf9-1a6b-4ebd-819d-02cd2442e111","exec":[""],"type":"text/javascript","packages":{}}},{"listen":"test","script":{"id":"f98e1d1d-5e9e-4a9c-a065-24a355c3dbc4","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","","var jsonData = pm.response.json();","var total_items = jsonData.Meta.PagingDetails.TotalItems;","var recurring_payment_id = jsonData.Response[1].Id;","","console.log(jsonData.Response[0].Id);","pm.test(\"List of Recurring Payments = \"  + total_items + \" Recurring Payments\");","","pm.collectionVariables.set(\"recurring_payment_id\",  recurring_payment_id);"],"type":"text/javascript","packages":{}}}],"id":"7b9db43a-6874-4c25-b579-807c16b594ec","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"{{auth_header}}","type":"text"},{"key":"PaySimple-Merchant-Id","value":"{{merchant_id}}","type":"text"}],"url":{"raw":"{{api4}}/recurringpayment","host":["{{api4}}"],"path":["recurringpayment"]}},"response":[],"createdAt":"2025-03-16T23:16:21.000Z","updatedAt":"2025-03-16T23:26:06.000Z","uid":"5244107-7b9db43a-6874-4c25-b579-807c16b594ec"},{"name":"List RP Payments","event":[{"listen":"prerequest","script":{"id":"ffe6a541-5cbd-4b4d-9d32-3c10efe7f677","exec":[""],"type":"text/javascript","packages":{}}},{"listen":"test","script":{"id":"c7d937e8-eee6-4af3-8bff-c68e5c04f570","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","","var jsonData = pm.response.json();","var schedule_id = jsonData.Response[0].RecurringScheduleId;","var total_items = jsonData.Meta.PagingDetails.TotalItems;","var recurring_payment_id = pm.collectionVariables.get(\"recurring_payment_id\");","var account_id = jsonData.Response[0].AccountId;","","pm.test(\"Recurring Payment Schedule =\" + schedule_id, function () {","   pm.expect(schedule_id).to.eql(recurring_payment_id);","});","pm.test(\"List of Payments = \"  + total_items);","","pm.collectionVariables.set(\"recurring_payment_id\", recurring_payment_id);","pm.collectionVariables.set(\"account_id\", account_id);",""],"type":"text/javascript","packages":{}}}],"id":"7d817059-dad6-4681-b391-932f58152f05","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"{{auth_header}}","type":"text"},{"key":"PaySimple-Merchant-Id","value":"{{merchant_id}}","type":"text"}],"url":{"raw":"{{api4}}/recurringpayment/{{recurring_payment_id}}/payments","host":["{{api4}}"],"path":["recurringpayment","{{recurring_payment_id}}","payments"]}},"response":[],"createdAt":"2025-03-16T23:16:21.000Z","updatedAt":"2025-03-16T23:27:15.000Z","uid":"5244107-7d817059-dad6-4681-b391-932f58152f05"},{"name":"Update Recurring Payment","event":[{"listen":"prerequest","script":{"id":"af14db7c-7f34-4ab6-962b-d85515276b8e","exec":[""],"type":"text/javascript","packages":{}}},{"listen":"test","script":{"id":"bbd0c221-ec09-49ea-b5d1-308b06889bd6","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","","var jsonData = pm.response.json();","var payment_amount = jsonData.Response.PaymentAmount;","var recurring_payment_id = jsonData.Response.Id;","var account_id = jsonData.Response.AccountId;","","pm.test(\"Recurring Payment \" + recurring_payment_id + \" amount has been updated to \" + payment_amount, function () {","   pm.expect(payment_amount).to.eql(15);","});","","pm.collectionVariables.set(\"recurring_payment_id\", recurring_payment_id);","pm.collectionVariables.set(\"account_id\", account_id);",""],"type":"text/javascript","packages":{}}}],"id":"a205b396-b6b9-46f7-acb3-f4572bfe6800","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json"},{"key":"PS_204_NoContent","value":"","type":"text"},{"key":"Authorization","value":"{{auth_header}}","type":"text"},{"key":"PaySimple-Merchant-Id","value":"{{merchant_id}}","type":"text"}],"body":{"mode":"raw","raw":"{\r\n\t\"Id\" : {{recurring_payment_id}},\r\n    \"PaymentAmount\": 15,\r\n    \"AccountId\":  {{account_id}},\r\n    \"StartDate\": \"{{one_week}}\",\r\n    \"ExecutionFrequencyType\": 4\r\n}"},"url":{"raw":"{{api4}}/recurringpayment","host":["{{api4}}"],"path":["recurringpayment"]}},"response":[],"createdAt":"2025-03-16T23:16:21.000Z","updatedAt":"2025-03-16T23:29:44.000Z","uid":"5244107-a205b396-b6b9-46f7-acb3-f4572bfe6800"},{"name":"Pause","event":[{"listen":"prerequest","script":{"id":"ecfc4b82-44e4-4d2d-9ee3-a459c0197977","exec":["var result = new Date();\r","result.setDate(result.getDate() + 30);\r","\r","var one_month = result.toISOString().split(\"T\")[0];\r","console.log(one_month);\r","pm.environment.set(\"one_month\", one_month);"],"type":"text/javascript","packages":{}}},{"listen":"test","script":{"id":"f0daf5b5-946f-422a-ab71-03f89352a900","exec":["pm.test(\"Status code is 204 - Paused Successfully\", function () {","    pm.response.to.have.status(204);","});"],"type":"text/javascript","packages":{}}}],"id":"4ffc9ef9-cf10-49eb-9457-b46b48ae7376","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json"},{"key":"PS_204_NoContent","value":"","type":"text"},{"key":"Authorization","value":"{{auth_header}}","type":"text"},{"key":"PaySimple-Merchant-Id","value":"{{merchant_id}}","type":"text"}],"body":{"mode":"raw","raw":""},"url":{"raw":"{{api4}}/recurringpayment/{{recurring_payment_id}}/pause?enddate={{one_month}}","host":["{{api4}}"],"path":["recurringpayment","{{recurring_payment_id}}","pause"],"query":[{"key":"enddate","value":"{{one_month}}"}]}},"response":[],"createdAt":"2025-03-16T23:16:21.000Z","updatedAt":"2025-03-16T23:30:45.000Z","uid":"5244107-4ffc9ef9-cf10-49eb-9457-b46b48ae7376"},{"name":"Suspend","event":[{"listen":"prerequest","script":{"id":"0993c209-6d12-48c4-83e4-dfb37250bb88","exec":[""],"type":"text/javascript","packages":{}}},{"listen":"test","script":{"id":"44f27b67-659c-4c24-a980-38c47368c673","exec":["pm.test(\"Status code is 204 - Suspended Successfully\", function () {","    pm.response.to.have.status(204);","});"],"type":"text/javascript","packages":{}}}],"id":"789e4483-67c2-4608-9ec6-a5a88b62a96e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json"},{"key":"PS_204_NoContent","value":"","type":"text"},{"key":"Authorization","value":"{{auth_header}}","type":"text"},{"key":"PaySimple-Merchant-Id","value":"{{merchant_id}}","type":"text"}],"body":{"mode":"raw","raw":""},"url":{"raw":"{{api4}}/recurringpayment/{{recurring_payment_id}}/suspend","host":["{{api4}}"],"path":["recurringpayment","{{recurring_payment_id}}","suspend"]}},"response":[],"createdAt":"2025-03-16T23:16:21.000Z","updatedAt":"2025-03-16T23:31:35.000Z","uid":"5244107-789e4483-67c2-4608-9ec6-a5a88b62a96e"},{"name":"Resume","event":[{"listen":"prerequest","script":{"id":"aaa6ca6a-9fed-4a2c-a62b-3130c1c64a0a","exec":[""],"type":"text/javascript","packages":{}}},{"listen":"test","script":{"id":"d3a7b237-0295-4d12-957c-99d157bcab02","exec":["pm.test(\"Status code is 204 - Resumed Successfully\", function () {","    pm.response.to.have.status(204);","});"],"type":"text/javascript","packages":{}}}],"id":"334794db-6ce1-411c-9b7f-2d42cf9144d2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json"},{"key":"PS_204_NoContent","value":"","type":"text"},{"key":"Authorization","value":"{{auth_header}}","type":"text"},{"key":"PaySimple-Merchant-Id","value":"{{merchant_id}}","type":"text"}],"body":{"mode":"raw","raw":""},"url":{"raw":"{{api4}}/recurringpayment/{{recurring_payment_id}}/resume","host":["{{api4}}"],"path":["recurringpayment","{{recurring_payment_id}}","resume"]}},"response":[],"createdAt":"2025-03-16T23:16:21.000Z","updatedAt":"2025-03-16T23:32:31.000Z","uid":"5244107-334794db-6ce1-411c-9b7f-2d42cf9144d2"},{"name":"New Recurring Payment","event":[{"listen":"prerequest","script":{"id":"a5e4e7bd-1e57-4be4-9cd3-58dfeb7897a3","exec":[""],"type":"text/javascript","packages":{}}},{"listen":"test","script":{"id":"e3045ffe-132a-4a0b-aaa5-7dc2f9b9dc30","exec":["pm.test(\"Status code is 201\", function () {","    pm.response.to.have.status(201);","});","","var jsonData = pm.response.json();","var recurring_payment_id = jsonData.Response.Id;","","pm.test(\"Recurring Payment \" + recurring_payment_id + \" created \", function () {","   pm.expect(recurring_payment_id).to.not.eql(null);","});","","pm.collectionVariables.set(\"recurring_payment_id\", recurring_payment_id);",""],"type":"text/javascript","packages":{}}}],"id":"1c7dd9c6-ef24-432e-9692-497b2c9a80f8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"{{auth_header}}","type":"text"},{"key":"PaySimple-Merchant-Id","value":"{{merchant_id}}","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"PaymentAmount\": 12,\r\n    \"AccountId\":  {{account_id}},\r\n    \"StartDate\": \"2030-08-01\",\r\n    \"ExecutionFrequencyType\": \"FirstofMonth\"\r\n}"},"url":{"raw":"{{api4}}/recurringpayment","host":["{{api4}}"],"path":["recurringpayment"]}},"response":[],"createdAt":"2025-03-16T23:16:21.000Z","updatedAt":"2025-03-16T23:35:52.000Z","uid":"5244107-1c7dd9c6-ef24-432e-9692-497b2c9a80f8"},{"name":"Recurring Payment","event":[{"listen":"prerequest","script":{"id":"c613eeec-7e60-456b-80e3-6d9a59522f27","exec":[""],"type":"text/javascript","packages":{}}},{"listen":"test","script":{"id":"d094b655-51db-4a04-92b4-83d06208c7ce","exec":["pm.test(\"Status code is 204 - Deleted Successfully\", function () {","    pm.response.to.have.status(204);","});"],"type":"text/javascript","packages":{}}}],"id":"01992e26-533c-4a6a-8731-51914468c2a7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Content-Type","value":"application/json"},{"key":"PS_204_NoContent","value":"","type":"text"},{"key":"Authorization","value":"{{auth_header}}","type":"text"},{"key":"PaySimple-Merchant-Id","value":"{{merchant_id}}","type":"text"}],"body":{"mode":"raw","raw":"{\r\n\t\"Id\" : {{recurringPaymentId}},\r\n    \"PaymentAmount\": 15,\r\n    \"AccountId\":  {{accountId}},\r\n    \"StartDate\": \"{{oneWeek}}\",\r\n    \"ExecutionFrequencyType\": 4\r\n}\r\n                "},"url":{"raw":"{{api4}}/recurringpayment/{{recurring_payment_id}}","host":["{{api4}}"],"path":["recurringpayment","{{recurring_payment_id}}"]}},"response":[],"createdAt":"2025-03-16T23:16:21.000Z","updatedAt":"2025-03-16T23:35:58.000Z","uid":"5244107-01992e26-533c-4a6a-8731-51914468c2a7"}],"id":"36705758-733b-4469-b427-df0ba92c1b12","createdAt":"2025-03-16T23:16:21.000Z","updatedAt":"2025-03-17T00:03:29.000Z","uid":"5244107-36705758-733b-4469-b427-df0ba92c1b12"},{"name":"Customers","item":[{"name":"List Customers","event":[{"listen":"prerequest","script":{"id":"1e86c507-d2cd-42a7-a62d-969a621d1264","exec":[""],"type":"text/javascript","packages":{}}},{"listen":"test","script":{"id":"1c2faf2d-410e-480e-b48b-4243b2fd8d3f","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","","var jsonData = pm.response.json();","var total_items = jsonData.Meta.PagingDetails.TotalItems;","","pm.test(\"List of Customers = \"  + total_items + \" Customers\");","","",""],"type":"text/javascript","packages":{}}}],"id":"dbbcde64-646d-474e-9ea5-9bc62f37bf6a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"{{auth_header}}","type":"text"},{"key":"PaySimple-Merchant-Id","value":"{{merchant_id}}","type":"text"}],"url":{"raw":"{{api4}}/customer","host":["{{api4}}"],"path":["customer"]}},"response":[],"createdAt":"2025-03-16T23:16:21.000Z","updatedAt":"2025-03-16T23:37:21.000Z","uid":"5244107-dbbcde64-646d-474e-9ea5-9bc62f37bf6a"},{"name":"List Customers With Paging","event":[{"listen":"test","script":{"id":"c19334f1-3e33-4053-b349-8d4c0caf4ba5","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","","var jsonData = pm.response.json();","var total_items = jsonData.Meta.PagingDetails.TotalItems;","var items_per_page = jsonData.Meta.PagingDetails.ItemsPerPage;","","pm.test(\"List of Customers = \"  + total_items + \" Customers\");","pm.test(\"Items Per Page = \"  + items_per_page + \" Customers\", function () {","   pm.expect(items_per_page).to.eql(5);","});","",""],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"912eb230-ee71-4088-959e-505d5f53fcdd","exec":[""],"type":"text/javascript","packages":{}}}],"id":"6ea4427b-3da5-4006-b641-a697a5a92eb5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"{{auth_header}}","type":"text"},{"key":"PaySimple-Merchant-Id","value":"{{merchant_id}}","type":"text"}],"url":{"raw":"{{api4}}/customer?page=1&pagesize=5","host":["{{api4}}"],"path":["customer"],"query":[{"key":"page","value":"1"},{"key":"pagesize","value":"5"}]}},"response":[],"createdAt":"2025-03-14T23:18:02.000Z","updatedAt":"2025-03-17T00:04:47.000Z","uid":"5244107-6ea4427b-3da5-4006-b641-a697a5a92eb5"},{"name":"Create Customer","event":[{"listen":"prerequest","script":{"id":"04d3db4d-17f6-4a84-8a49-f83af5a9b7b2","exec":[""],"type":"text/javascript","packages":{}}},{"listen":"test","script":{"id":"7c87630e-7359-4bb7-afa1-029acbc21b01","exec":["pm.test(\"Status code is 201\", function () {","    pm.response.to.have.status(201);","});","","var jsonData = pm.response.json();","var customer_id = jsonData.Response.Id;","var first_name = jsonData.Response.FirstName;","var last_name = jsonData.Response.LastName;","var email = jsonData.Response.Email;","var company = jsonData.Response.Company;","var notes = jsonData.Response.Notes;","var billing_street = jsonData.Response.BillingAddress.StreetAddress1;","var billing_city = jsonData.Response.BillingAddress.City;","var shipping_street = jsonData.Response.ShippingAddress.StreetAddress1;","var shipping_city = jsonData.Response.ShippingAddress.City;","","","pm.test(\"Customer created.  Customer Id = \"  + customer_id, function () {","   pm.expect(pm.response.text()).to.include(customer_id);","});","pm.test(\"Customer Name = \" + first_name + \" \" + last_name);","pm.test(\"Email = \" + email);","pm.test(\"Company = \" + company);","pm.test(\"Notes = \" + notes);","","pm.collectionVariables.set(\"customer_id\", customer_id);","","",""],"type":"text/javascript","packages":{}}}],"id":"f4bab85e-6d3c-4c11-94e6-b2fcba7fd586","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"{{auth_header}}","type":"text"},{"key":"PaySimple-Merchant-Id","value":"{{merchant_id}}","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"FirstName\": \"{{$randomFirstName}}\",\n    \"LastName\": \"{{$randomLastName}}\",\n    \"Email\": \"{{$randomEmail}}\",\n    \"Phone\": \"3033331111\",\n    \"Company\": \"{{$randomCompanyName}}\",\n    \"Notes\": \"{{$randomCatchPhrase}}\",\n    \"CustomerAccount\": \"\",\n    \"ShippingSameAsBilling\": false,\n    \"BillingAddress\": {\n        \"StreetAddress1\": \"{{$randomStreetAddress}}\",\n        \"City\": \"{{$randomCity}}\",\n        \"StateCode\": \"BC\",\n        \"ZipCode\": \"A3A2A1\",\n        \"Country\": \"Canada\"\n    },\n    \"ShippingAddress\": {\n        \"StreetAddress1\": \"{{$randomStreetAddress}}\",\n        \"StreetAddress2\": \"Suite 200\",\n        \"City\": \"{{$randomCity}}\",\n        \"StateCode\": \"CO\",\n        \"ZipCode\": \"80202\",\n        \"Country\": \"US\"\n    }\n}"},"url":{"raw":"{{api4}}/customer","host":["{{api4}}"],"path":["customer"]}},"response":[],"createdAt":"2025-03-16T23:16:21.000Z","updatedAt":"2025-03-16T23:38:35.000Z","uid":"5244107-f4bab85e-6d3c-4c11-94e6-b2fcba7fd586"},{"name":"Update Customer","event":[{"listen":"test","script":{"id":"c5793898-b0c6-48b2-99d7-0923be4ca16b","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","","var jsonData = pm.response.json();","var customer_id = jsonData.Response.Id;","var first_name = jsonData.Response.FirstName;","var last_name = jsonData.Response.LastName;","var email = jsonData.Response.Email;","var company = jsonData.Response.Company;","var notes = jsonData.Response.Notes;","var billing_street = jsonData.Response.BillingAddress.StreetAddress1;","var billing_city = jsonData.Response.BillingAddress.City;","var shipping_street = jsonData.Response.ShippingAddress.StreetAddress1;","var shipping_city = jsonData.Response.ShippingAddress.City;","","","pm.test(\"Customer created.  Customer Id = \"  + customer_id, function () {","   pm.expect(pm.response.text()).to.include(customer_id);","});","pm.test(\"Customer Name = \" + first_name + \" \" + last_name);","pm.test(\"Email = \" + email);","pm.test(\"Company = \" + company);","pm.test(\"Notes = \" + notes);","","pm.collectionVariables.set(\"customer_id\", customer_id);","","",""],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"5176d523-2a1a-4a37-a16f-1d1719bd118e","exec":[""],"type":"text/javascript","packages":{}}}],"id":"060d6991-882a-475e-9e82-6ced0220c987","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth"},"method":"PUT","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"{{auth_header}}","type":"text"},{"key":"PaySimple-Merchant-Id","value":"{{merchant_id}}","type":"text"}],"body":{"mode":"raw","raw":"{ \"Id\" : 2307880,\n\t\"FirstName\": \"{{$randomFirstName}}\",\n    \"LastName\": \"{{$randomLastName}}\",\n    \"Email\": \"{{$randomEmail}}\",\n    \"Phone\": \"3033331111\",\n    \"Company\": \"{{$randomCompanyName}}\",\n    \"Notes\": \"{{$randomCatchPhrase}}\",\n    \"CustomerAccount\": \"\",\n    \"ShippingSameAsBilling\": false,\n    \"BillingAddress\": {\n        \"StreetAddress1\": \"{{$randomStreetAddress}}\",\n        \"City\": \"{{$randomCity}}\",\n        \"StateCode\": \"BC\",\n        \"ZipCode\": \"A3A2A1\",\n        \"Country\": \"Canada\"\n    },\n    \"ShippingAddress\": {\n        \"StreetAddress1\": \"{{$randomStreetAddress}}\",\n        \"StreetAddress2\": \"Suite 200\",\n        \"City\": \"{{$randomCity}}\",\n        \"StateCode\": \"CO\",\n        \"ZipCode\": \"80202\",\n        \"Country\": \"US\"\n    }\n}"},"url":{"raw":"{{api4}}/customer","host":["{{api4}}"],"path":["customer"]}},"response":[],"createdAt":"2025-03-16T14:49:59.000Z","updatedAt":"2025-03-16T23:44:14.000Z","uid":"5244107-060d6991-882a-475e-9e82-6ced0220c987"},{"name":"Retrieve Customer","event":[{"listen":"prerequest","script":{"id":"e72286a6-4db6-4b11-9748-68646ef504bf","exec":[""],"type":"text/javascript","packages":{}}},{"listen":"test","script":{"id":"30b7b8ed-a3b0-4465-b3f0-ff3a03163a50","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","","var jsonData = pm.response.json();","var customer_id = jsonData.Response.Id;","var first_name = jsonData.Response.FirstName;","var last_name = jsonData.Response.LastName;","var email = jsonData.Response.Email;","var company = jsonData.Response.Company;","var notes = jsonData.Response.Notes;","var billing_street = jsonData.Response.BillingAddress.StreetAddress1;","var billing_city = jsonData.Response.BillingAddress.City;","var shipping_street = jsonData.Response.ShippingAddress.StreetAddress1;","var shipping_city = jsonData.Response.ShippingAddress.City;","","","pm.test(\"Customer created.  Customer Id = \"  + customer_id, function () {","   pm.expect(pm.response.text()).to.include(customer_id);","});","pm.test(\"Customer Name = \" + first_name + \" \" + last_name);","pm.test(\"Email = \" + email);","pm.test(\"Company = \" + company);","pm.test(\"Notes = \" + notes);","","pm.collectionVariables.set(\"customer_id\", customer_id);","","",""],"type":"text/javascript","packages":{}}}],"id":"23428412-feaf-4450-a053-8eee858ebd50","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"{{auth_header}}","type":"text"},{"key":"PaySimple-Merchant-Id","value":"{{merchant_id}}","type":"text"}],"url":{"raw":"{{api4}}/customer/{{customer_id}}","host":["{{api4}}"],"path":["customer","{{customer_id}}"]}},"response":[],"createdAt":"2025-03-16T23:16:21.000Z","updatedAt":"2025-03-16T23:45:33.000Z","uid":"5244107-23428412-feaf-4450-a053-8eee858ebd50"},{"name":"Create Credit Card Account","event":[{"listen":"prerequest","script":{"id":"8946a92c-3972-4a78-9bf3-128777d93882","exec":[""],"type":"text/javascript","packages":{}}},{"listen":"test","script":{"id":"34751c37-88be-4679-a964-c08fdf86193f","exec":["pm.test(\"Status code is 201\", function () {","    pm.response.to.have.status(201);","});","","var jsonData = pm.response.json();","var account_id = jsonData.Response.Id;","var customer_id = jsonData.Response.CustomerId;","var cc_last_four = jsonData.Response.CreditCardNumber;","","pm.test(\"Payment Method: Credit Card Account created.  Account Id = \"  + account_id, function () {","   pm.expect(pm.response.text()).to.include(account_id);","});","pm.test(\"Customer Id = \" + customer_id);","pm.test(\"Credit Card Number last four = \" + cc_last_four);","","pm.collectionVariables.set(\"account_id\", account_id);","","",""],"type":"text/javascript","packages":{}}}],"id":"e01e8caa-d194-44f9-9a01-22611311c750","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"{{auth_header}}","type":"text"},{"key":"PaySimple-Merchant-Id","value":"{{merchant_id}}","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"CreditCardNumber\": \"4716406361430933\",\r\n    \"ExpirationDate\": \"12/2030\",\r\n    \"Issuer\": \"12\",\r\n    \"BillingZipCode\": \"80202\",\r\n    \"CustomerId\": {{customer_id}}\r\n}"},"url":{"raw":"{{api4}}/account/creditcard","host":["{{api4}}"],"path":["account","creditcard"]}},"response":[],"createdAt":"2025-03-16T23:16:21.000Z","updatedAt":"2025-03-16T23:50:54.000Z","uid":"5244107-e01e8caa-d194-44f9-9a01-22611311c750"},{"name":"Update CC Account","event":[{"listen":"prerequest","script":{"id":"09dd34b5-feb0-428d-8d13-e51e145ae9f0","exec":[""],"type":"text/javascript","packages":{}}},{"listen":"test","script":{"id":"764c40c0-94f9-4ad4-90cd-dc3d77db8cd0","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","","var jsonData = pm.response.json();","var account_id = jsonData.Response.Id;","var customer_id = jsonData.Response.CustomerId;","var account_number = jsonData.Response.CreditCardNumber;","var expiration_date = jsonData.Response.ExpirationDate;","","pm.test(\"Payment Method: CC Account updated.  Account Id = \"  + account_id, function () {","   pm.expect(expiration_date).to.eql(\"12/2040\");","});","pm.test(\"Customer Id = \" + customer_id);","pm.test(\"Credit Card Number last four = \" + account_number);","","pm.collectionVariables.set(\"account_id\", account_id);"],"type":"text/javascript","packages":{}}}],"id":"3b531e1e-8d95-432e-a29d-f190b4fd49fc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"{{auth_header}}","type":"text"},{"key":"PaySimple-Merchant-Id","value":"{{merchant_id}}","type":"text"}],"body":{"mode":"raw","raw":"{\r\n\t\"Id\" : {{account_id}},\r\n    \"ExpirationDate\": \"12/2040\",\r\n    \"BillingZipCode\": \"80203\",\r\n    \"CreditCardNumber\": \"4111111111111111\",\r\n    \"Issuer\": \"12\",\r\n    \"CustomerId\" : {{customer_id}}\r\n}"},"url":{"raw":"{{api4}}/account/creditcard","host":["{{api4}}"],"path":["account","creditcard"]}},"response":[],"createdAt":"2025-03-16T23:16:21.000Z","updatedAt":"2025-03-16T23:51:39.000Z","uid":"5244107-3b531e1e-8d95-432e-a29d-f190b4fd49fc"},{"name":"Set Default CC Account","event":[{"listen":"prerequest","script":{"id":"80ad4321-d98e-454d-bf12-dabf6dfcea2e","exec":[""],"type":"text/javascript","packages":{}}},{"listen":"test","script":{"id":"7fe59ee6-3cfb-41ce-8f6e-005a23c2a51d","exec":["pm.test(\"Status code is 204 - Set as Default Successfully\", function () {","    pm.response.to.have.status(204);","});"],"type":"text/javascript","packages":{}}}],"id":"411811b7-a3e8-4908-a36b-fe0b529a3649","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json"},{"key":"PS_204_NoContent","value":"","type":"text"},{"key":"Authorization","value":"{{auth_header}}","type":"text"},{"key":"Paysimple-Merchant-Id","value":"{{merchant_id}}","type":"text"}],"body":{"mode":"raw","raw":""},"url":{"raw":"{{api4}}/customer/{{customer_id}}/{{account_id}}","host":["{{api4}}"],"path":["customer","{{customer_id}}","{{account_id}}"]}},"response":[],"createdAt":"2025-03-16T23:16:21.000Z","updatedAt":"2025-03-16T23:52:20.000Z","uid":"5244107-411811b7-a3e8-4908-a36b-fe0b529a3649"},{"name":"Default CC Is Set","event":[{"listen":"prerequest","script":{"id":"d8945b2c-9fc3-428d-b843-e98fbd38b246","exec":[""],"type":"text/javascript","packages":{}}},{"listen":"test","script":{"id":"58188318-42df-45f1-8e46-21da7e452949","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","var jsonData = pm.response.json();\r","var account_id = jsonData.Response.Id;\r","var customer_id = jsonData.Response.CustomerId;\r","var account_number = jsonData.Response.AccountNumber;\r","var is_default = jsonData.Response.IsDefault;\r","\r","pm.test(\"Payment Method: CC Account set as defualt.  Account Id = \"  + account_id, function () {\r","   pm.expect(is_default).to.eql(true);\r","});\r","pm.test(\"Customer Id = \" + customer_id);\r","pm.test(\"Bank Account Number last four = \" + account_number);\r","\r","pm.collectionVariables.set(\"account_id\", account_id);"],"type":"text/javascript","packages":{}}}],"id":"db1c5661-e4f1-49b1-b9ac-7d6f0b4d5ca7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"{{auth_header}}","type":"text"},{"key":"PaySimple-Merchant-Id","value":"{{merchant_id}}","type":"text"}],"url":{"raw":"{{api4}}/account/creditcard/{{account_id}}","host":["{{api4}}"],"path":["account","creditcard","{{account_id}}"]}},"response":[],"createdAt":"2025-03-16T23:16:21.000Z","updatedAt":"2025-03-16T23:53:21.000Z","uid":"5244107-db1c5661-e4f1-49b1-b9ac-7d6f0b4d5ca7"},{"name":"Charge Customer Card = AUTHORIZED","event":[{"listen":"prerequest","script":{"id":"97caf71a-b437-473a-b345-980b68d1c05a","exec":[""],"type":"text/javascript","packages":{}}},{"listen":"test","script":{"id":"e738cb6c-4600-4537-a03e-f41bfd48e9d7","exec":["pm.test(\"Status code is 201\", function () {","    pm.response.to.have.status(201);","});","","var jsonData = pm.response.json();","var payment_id = jsonData.Response.Id;","var status = jsonData.Response.Status;","var auth_code = jsonData.Response.ProviderAuthCode;","var amount = jsonData.Response.Amount;","","pm.test(\"Payment \" + payment_id + \" = \" + auth_code, function () {","   pm.expect(auth_code).to.eql(\"Approved\");","});","pm.test(\"Status: \" + status, function () {","   pm.expect(status).to.eql(\"Authorized\");","});","pm.test(\"Amount = \" + amount, function () {","    pm.expect(amount).to.not.eql(0);","});","","pm.collectionVariables.set(\"payment_id\", payment_id);"],"type":"text/javascript","packages":{}}}],"id":"d4430edd-47b6-41d2-ba5a-7a8670b17c23","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"{{auth_header}}","type":"text"},{"key":"PaySimple-Merchant-Id","value":"{{merchant_id}}","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"Amount\" : 1.00,\r\n    \"AccountId\" : {{account_id}}\r\n}"},"url":{"raw":"{{api4}}/payment","host":["{{api4}}"],"path":["payment"]}},"response":[],"createdAt":"2025-03-16T23:16:21.000Z","updatedAt":"2025-03-16T23:54:05.000Z","uid":"5244107-d4430edd-47b6-41d2-ba5a-7a8670b17c23"},{"name":"List Credit Card Accounts","event":[{"listen":"prerequest","script":{"id":"43e71d36-0d67-4c5a-94bf-00dc8018d117","exec":[""],"type":"text/javascript","packages":{}}},{"listen":"test","script":{"id":"7ea6992a-f580-4396-884d-dfec8c58c17a","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r",""],"type":"text/javascript","packages":{}}}],"id":"9b26dbe1-66db-450c-960d-d25a46fd5576","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"{{auth_header}}","type":"text"},{"key":"PaySimple-Merchant-Id","value":"{{merchant_id}}","type":"text"}],"url":{"raw":"{{api4}}/customer/{{customer_id}}/creditcardaccounts","host":["{{api4}}"],"path":["customer","{{customer_id}}","creditcardaccounts"]}},"response":[],"createdAt":"2025-03-16T23:16:21.000Z","updatedAt":"2025-03-16T23:55:03.000Z","uid":"5244107-9b26dbe1-66db-450c-960d-d25a46fd5576"},{"name":"List Payments","event":[{"listen":"prerequest","script":{"id":"446dca9d-2c36-4b68-8c84-f364f2cd8efb","exec":[""],"type":"text/javascript","packages":{}}},{"listen":"test","script":{"id":"d1fd8208-944d-454c-a252-f29dbeceed5d","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","var jsonData = pm.response.json();\r","var total_items = jsonData.Meta.PagingDetails.TotalItems;\r","\r","pm.test(\"List of Payments = \"  + total_items + \" Payments\");\r",""],"type":"text/javascript","packages":{}}}],"id":"f5053bc3-e320-4e78-9d60-e3e632debd56","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"{{auth_header}}","type":"text"},{"key":"PaySimple-Merchant-Id","value":"{{merchant_id}}","type":"text"}],"url":{"raw":"{{api4}}/customer/{{customer_id}}/payments","host":["{{api4}}"],"path":["customer","{{customer_id}}","payments"]}},"response":[],"createdAt":"2025-03-16T23:16:21.000Z","updatedAt":"2025-03-16T23:55:55.000Z","uid":"5244107-f5053bc3-e320-4e78-9d60-e3e632debd56"},{"name":"List All Accounts","event":[{"listen":"prerequest","script":{"id":"21288a3a-2ba7-4055-a836-503b44c6aada","exec":[""],"type":"text/javascript","packages":{}}},{"listen":"test","script":{"id":"9b48585a-ce2d-4cbe-994c-dfa81235ad8b","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","\r",""],"type":"text/javascript","packages":{}}}],"id":"41333237-cf8e-4982-bf96-14e7955e1e4d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"{{auth_header}}","type":"text"},{"key":"PaySimple-Merchant-Id","value":"{{merchant_id}}","type":"text"}],"url":{"raw":"{{api4}}/customer/{{customer_id}}/accounts","host":["{{api4}}"],"path":["customer","{{customer_id}}","accounts"]}},"response":[],"createdAt":"2025-03-16T23:16:21.000Z","updatedAt":"2025-03-16T23:56:41.000Z","uid":"5244107-41333237-cf8e-4982-bf96-14e7955e1e4d"},{"name":"Create Another Customer","event":[{"listen":"prerequest","script":{"id":"04d3db4d-17f6-4a84-8a49-f83af5a9b7b2","exec":[""],"type":"text/javascript","packages":{}}},{"listen":"test","script":{"id":"7c87630e-7359-4bb7-afa1-029acbc21b01","exec":["pm.test(\"Status code is 201\", function () {","    pm.response.to.have.status(201);","});","","var jsonData = pm.response.json();","var customer_id = jsonData.Response.Id;","var first_name = jsonData.Response.FirstName;","var last_name = jsonData.Response.LastName;","var email = jsonData.Response.Email;","var company = jsonData.Response.Company;","var notes = jsonData.Response.Notes;","var billing_street = jsonData.Response.BillingAddress.StreetAddress1;","var billing_city = jsonData.Response.BillingAddress.City;","var shipping_street = jsonData.Response.ShippingAddress.StreetAddress1;","var shipping_city = jsonData.Response.ShippingAddress.City;","","","pm.test(\"Customer created.  Customer Id = \"  + customer_id, function () {","   pm.expect(pm.response.text()).to.include(customer_id);","});","pm.test(\"Customer Name = \" + first_name + \" \" + last_name);","pm.test(\"Email = \" + email);","pm.test(\"Company = \" + company);","pm.test(\"Notes = \" + notes);","","pm.collectionVariables.set(\"customer_id\", customer_id);","","",""],"type":"text/javascript","packages":{}}}],"id":"341cecd3-5e01-4128-bc3b-e1dff1844a01","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"{{auth_header}}","type":"text"},{"key":"PaySimple-Merchant-Id","value":"{{merchant_id}}","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"FirstName\": \"{{$randomFirstName}}\",\n    \"LastName\": \"{{$randomLastName}}\",\n    \"Email\": \"{{$randomEmail}}\",\n    \"Phone\": \"3033331111\",\n    \"Company\": \"{{$randomCompanyName}}\",\n    \"Notes\": \"{{$randomCatchPhrase}}\",\n    \"CustomerAccount\": \"\",\n    \"ShippingSameAsBilling\": false,\n    \"BillingAddress\": {\n        \"StreetAddress1\": \"{{$randomStreetAddress}}\",\n        \"City\": \"{{$randomCity}}\",\n        \"StateCode\": \"BC\",\n        \"ZipCode\": \"A3A2A1\",\n        \"Country\": \"Canada\"\n    },\n    \"ShippingAddress\": {\n        \"StreetAddress1\": \"{{$randomStreetAddress}}\",\n        \"StreetAddress2\": \"Suite 200\",\n        \"City\": \"{{$randomCity}}\",\n        \"StateCode\": \"CO\",\n        \"ZipCode\": \"80202\",\n        \"Country\": \"US\"\n    }\n}"},"url":{"raw":"{{api4}}/customer","host":["{{api4}}"],"path":["customer"]}},"response":[],"createdAt":"2025-03-16T23:57:20.000Z","updatedAt":"2025-03-16T23:57:50.000Z","uid":"5244107-341cecd3-5e01-4128-bc3b-e1dff1844a01"},{"name":"Create Credit Card Account","event":[{"listen":"test","script":{"id":"48b6eac0-4c8d-48ee-ab2e-76b6988855cc","exec":["pm.test(\"Status code is 201\", function () {","    pm.response.to.have.status(201);","});","","var jsonData = pm.response.json();","var account_id = jsonData.Response.Id;","var customer_id = jsonData.Response.CustomerId;","var cc_last_four = jsonData.Response.CreditCardNumber;","","pm.test(\"Payment Method: Credit Card Account created.  Account Id = \"  + account_id, function () {","   pm.expect(pm.response.text()).to.include(account_id);","});","pm.test(\"Customer Id = \" + customer_id);","pm.test(\"Credit Card Number last four = \" + cc_last_four);","","pm.collectionVariables.set(\"account_id\", account_id);","","",""],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"6c40c185-0191-4c09-9619-70ccafc9d8c2","exec":[""],"type":"text/javascript","packages":{}}}],"id":"38e6e8b0-7ef8-4e84-ab59-7340469eef59","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"{{auth_header}}","type":"text"},{"key":"PaySimple-Merchant-Id","value":"{{merchant_id}}","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"CreditCardNumber\": \"4716406361430933\",\r\n    \"ExpirationDate\": \"12/2030\",\r\n    \"Issuer\": \"12\",\r\n    \"BillingZipCode\": \"80202\",\r\n    \"CustomerId\": {{customer_id}}\r\n}"},"url":{"raw":"{{api4}}/account/creditcard","host":["{{api4}}"],"path":["account","creditcard"]}},"response":[],"createdAt":"2025-03-16T23:58:00.000Z","updatedAt":"2025-03-16T23:58:39.000Z","uid":"5244107-38e6e8b0-7ef8-4e84-ab59-7340469eef59"},{"name":"Delete Credit Card Account","event":[{"listen":"prerequest","script":{"id":"c3e5d691-aa0e-4a0f-80e2-4d262417bbd1","exec":[""],"type":"text/javascript","packages":{}}},{"listen":"test","script":{"id":"1c655f39-a6a4-4e9b-8583-0a6dced7c362","exec":["pm.test(\"Status code is 204 - Deleted Successfully\", function () {","    pm.response.to.have.status(204);","});"],"type":"text/javascript","packages":{}}}],"id":"62ccfe89-1bde-4942-8ebc-c68d4fb567ba","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Content-Type","value":"application/json"},{"key":"PS_204_NoContent","value":"","type":"text"},{"key":"Authorization","value":"{{auth_header}}","type":"text"},{"key":"PaySimple-Merchant-Id","value":"{{merchant_id}}","type":"text"}],"body":{"mode":"raw","raw":""},"url":{"raw":"{{api4}}/account/creditcard/{{account_id}}","host":["{{api4}}"],"path":["account","creditcard","{{account_id}}"]}},"response":[],"createdAt":"2025-03-16T23:16:21.000Z","updatedAt":"2025-03-16T23:59:36.000Z","uid":"5244107-62ccfe89-1bde-4942-8ebc-c68d4fb567ba"},{"name":"Delete Customer","event":[{"listen":"prerequest","script":{"id":"099c7f1a-1e4c-4d54-9f63-89f205dc2570","exec":[""],"type":"text/javascript","packages":{}}},{"listen":"test","script":{"id":"1a11a504-d3fd-4ed6-9c5b-7d7f927835e2","exec":["pm.test(\"Status code is 204 - Deleted Successfully\", function () {","    pm.response.to.have.status(204);","});"],"type":"text/javascript","packages":{}}}],"id":"f307141f-ddd3-46ac-84a9-90ccbde2a753","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Content-Type","value":"application/json"},{"key":"PS_204_NoContent","value":"","type":"text"},{"key":"Authorization","value":"{{auth_header}}","type":"text"},{"key":"PaySimple-Merchant-Id","value":"{{merchant_id}}","type":"text"}],"body":{"mode":"raw","raw":""},"url":{"raw":"{{api4}}/customer/{{customer_id}}","host":["{{api4}}"],"path":["customer","{{customer_id}}"]}},"response":[],"createdAt":"2025-03-16T23:16:21.000Z","updatedAt":"2025-03-17T00:00:11.000Z","uid":"5244107-f307141f-ddd3-46ac-84a9-90ccbde2a753"}],"id":"6862c235-b19e-480a-a238-3c0a495f3a28","createdAt":"2025-03-16T23:16:21.000Z","updatedAt":"2025-03-17T00:04:47.000Z","uid":"5244107-6862c235-b19e-480a-a238-3c0a495f3a28"}],"event":[{"listen":"prerequest","script":{"id":"c414bb5c-3d11-498b-b54f-6fd56d072424","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"cc52591b-0dea-4b2b-8de1-3ba47f8496fd","type":"text/javascript","exec":[""]}}],"variable":[{"key":"api4","value":"https://sandbox-api.paysimple.com/v4","type":"string"},{"key":"auth_header","value":"ENTER+>","type":"string"},{"key":"merchant_id","value":"ENTER=>","type":"string"}]}}