{ "info": { "_postman_id": "8a05fb55-e535-4efb-81e9-a84c4e0ce3aa", "name": "Pinch API v2020.1", "description": "This is a Postman Collection for the Pinch API v2020.1 endpoints. \n\nRefer to the main [Pinch API documentation](hhttps://docs.getpinch.com.au/docs) for more details.\n\n## Installation\n\nYou can download this Collection from a GitHub repo here: [https://github.com/pinchpayments/postman-pinch-api](https://github.com/pinchpayments/postman-pinch-api)\n\nImport to the Postman by opening the app, selecting `File -> Import` and importing the `Pinch API v2020.1.postman_collection.json` and the `Pinch API v2020.1.postman_environment.json` files.\n\n## Environment\n\nVisit [https://web.getpinch.com.au/api-keys](https://web.getpinch.com.au/api-keys) to get your test & production API keys\n\nThis Collection includes a pre-configured Environment. You will need to set up the following environment variables in order to run each request:\n\n|Name|Description|\n|---|---|\n|`merchantId`|Your Merchant Id. Starts with `mch_test_` for test.|\n|`secretKey`|Secret Key. Starts with `sk_test_` for test.|\n|`publishableKey`|Publishable Key. Starts with `pk_test_` for test.|\n|`currentAccessToken`|Leave empty - populated automatically by postman.|\n|`accessTokenExpiry`|Leave empty - populated automatically by postman.|\n|`baseUrl`|https://api.getpinch.com.au|\n|`authUrl`|https://auth.getpinch.com.au|\n\n## Running the API Endpoints\n\nThe Postman pre-request script will take care of gathering a valid access token for all requests - so once you fill in the keys above with your test keys, you can call all requests without worrying about authentication.\n\n## (Optional) Collection Variables\n\n\n|Name|Description|\n|---|---|\n|`pinchVersion`|Set to `2020.1` by default. Can be changed to `2019.1`, `2017.2` or `2017.1`.|\n|`environment`|Set to `test` by default. Can be changed to `live`.|\n\n**For testing, these should be left as default values: `2020.1` and `test`.**\n\nIf you would like to run this collection against an earlier Pinch API version, you can change the `pinchVersion` property (which is sent as a header to the API with each request) to a previous version of the API. Previous versions are `2019.1`, `2017.2` and `2017.1`.\n\nIf you would like to run this collection against your production tenant you will need to change your `merchantId` and `secretKey` values set in the environment variables to the production keys and set this `environment` collection variable to `live`.", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "item": [ { "name": "Authentication", "item": [ { "name": "Authenticate", "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "{{secretKey}}", "type": "string" }, { "key": "username", "value": "{{merchantId}}", "type": "string" } ] }, "method": "POST", "header": [], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "grant_type", "value": "client_credentials", "type": "text" }, { "key": "scope", "value": "api1", "type": "text" } ] }, "url": { "raw": "{{authUrl}}/connect/token", "host": [ "{{authUrl}}" ], "path": [ "connect", "token" ] }, "description": "Since our API uses Bearer Authentication you have to request a token before you can do anything else. To do this, call our authentication endpoint using basic Authentication. Your Merchant ID is the username and your Secret Key is your password.\r\n" }, "response": [ { "name": "200 OK", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "grant_type", "value": "client_credentials", "type": "text" }, { "key": "scope", "value": "api1", "type": "text" } ] }, "url": { "raw": "https://auth.getpinch.com.au/connect/token", "protocol": "https", "host": [ "auth", "getpinch", "com", "au" ], "path": [ "connect", "token" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Cache-Control", "value": "no-store, no-cache, max-age=0" }, { "key": "Pragma", "value": "no-cache" }, { "key": "Content-Length", "value": "1413" }, { "key": "Content-Type", "value": "application/json; charset=UTF-8" }, { "key": "Content-Encoding", "value": "gzip" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Mon, 19 Apr 2021 06:50:54 GMT" } ], "cookie": [], "body": "{\n \"access_token\": \"XXXXXXX\",\n \"expires_in\": 3600,\n \"token_type\": \"Bearer\"\n}" }, { "name": "400 Bad Request", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "grant_type", "value": "client_credentials", "type": "text" }, { "key": "scope", "value": "api1", "type": "text" } ] }, "url": { "raw": "{{authUrl}}/connect/token", "host": [ "{{authUrl}}" ], "path": [ "connect", "token" ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Cache-Control", "value": "no-store, no-cache, max-age=0" }, { "key": "Pragma", "value": "no-cache" }, { "key": "Content-Length", "value": "26" }, { "key": "Content-Type", "value": "application/json; charset=UTF-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Fri, 30 Apr 2021 04:27:14 GMT" } ], "cookie": [], "body": "{\n \"error\": \"invalid_client\"\n}" } ] }, { "name": "Health (Authenticated)", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/health/auth", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "health", "auth" ] } }, "response": [ { "name": "200 OK", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/health/auth", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "health", "auth" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "plain", "header": [ { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Fri, 30 Apr 2021 04:22:05 GMT" }, { "key": "Content-Length", "value": "0" } ], "cookie": [], "body": "" }, { "name": "404 Not Found - Unauthenticated", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/health/auth", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "health", "auth" ] } }, "status": "Not Found", "code": 404, "_postman_previewlanguage": "plain", "header": [ { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Thu, 29 Apr 2021 04:12:22 GMT" }, { "key": "Content-Length", "value": "0" } ], "cookie": [], "body": "" } ] } ] }, { "name": "Payers", "item": [ { "name": "Source", "item": [ { "name": "Create Source", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"sourceType\": \"credit-card\",\r\n \"bankAccountNumber\": \"\",\r\n \"bankAccountBsb\": \"\",\r\n \"bankAccountName\": \"\",\r\n \"creditCardToken\": \"tkn_XXXXXXXXXX\",\r\n \"IpAddress\": \"{{$randomIP}}\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/payers/:id/sources", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payers", ":id", "sources" ], "variable": [ { "key": "id", "value": "pyr_K5bbYqYpmKYaVf", "description": "Id in pyr_XXXXXXXXXXXXXX format" } ] } }, "response": [ { "name": "200 OK - Bank Account", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"sourceType\": \"bank-account\",\r\n \"bankAccountNumber\": \"000000000\",\r\n \"bankAccountBsb\": \"000000\",\r\n \"bankAccountName\": \"Example Name\",\r\n \"creditCardToken\": null,\r\n \"IpAddress\": null\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/payers/:id/sources", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payers", ":id", "sources" ], "variable": [ { "key": "id", "value": "pyr_XXXXXXXXXXXXXX", "description": "Id in pyr_XXXXXXXXXXXXXX format" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "288" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Encoding", "value": "gzip" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Thu, 29 Apr 2021 09:34:38 GMT" } ], "cookie": [], "body": "{\n \"id\": \"src_XXXXXXXXXXXXXX \",\n \"sourceType\": \"bank-account\",\n \"bankAccountNumber\": \"000000000\",\n \"bankAccountBsb\": \"000000\",\n \"bankAccountName\": \"Example Name\",\n \"creditCardToken\": null,\n \"cardHolderName\": null,\n \"expiryDate\": null,\n \"displayCardNumber\": null,\n \"cardScheme\": null,\n \"origin\": \"AU\",\n \"funding\": null\n}" }, { "name": "200 OK - Credit Card", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"sourceType\": \"credit-card\",\r\n \"bankAccountNumber\": \"\",\r\n \"bankAccountBsb\": \"\",\r\n \"bankAccountName\": \"\",\r\n \"creditCardToken\": \"tkn_LIK2WVNPLyVclLd27ULUDYWS7ki0SFYm\",\r\n \"IpAddress\": null\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/payers/:id/sources", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payers", ":id", "sources" ], "variable": [ { "key": "id", "value": "pyr_XXXXXXXXXXXXXX", "description": "Id in pyr_XXXXXXXXXXXXXX format" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "357" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Encoding", "value": "gzip" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Thu, 29 Apr 2021 09:38:32 GMT" } ], "cookie": [], "body": "{\n \"id\": \"src_XXXXXXXXXXXXXX\",\n \"sourceType\": \"credit-card\",\n \"bankAccountNumber\": null,\n \"bankAccountBsb\": null,\n \"bankAccountName\": null,\n \"creditCardToken\": \"tkn_XXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n \"cardHolderName\": \"Ben Hotdog\",\n \"expiryDate\": \"2022-12-01T00:00:00\",\n \"displayCardNumber\": \"4242\",\n \"cardScheme\": \"visa\",\n \"origin\": \"AU\",\n \"funding\": \"credit\"\n}" }, { "name": "400 Bad Request", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"sourceType\": \"bank-account\",\r\n \"bankAccountNumber\": \"000000000\",\r\n \"bankAccountBsb\": \"000000\",\r\n \"bankAccountName\": \"Example Name\",\r\n \"creditCardToken\": null,\r\n \"IpAddress\": null\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/payers/:id/sources", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payers", ":id", "sources" ], "variable": [ { "key": "id", "value": "pyr_XXXXXXXXXXXXXX", "description": "Id in pyr_XXXXXXXXXXXXXX format" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "247" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Thu, 29 Apr 2021 05:38:58 GMT" } ], "cookie": [], "body": "[\n {\n \"propertyName\": \"\",\n \"errorMessage\": \"Payer with id: pyr_XXXXXXXXXXXXXX not found\",\n \"attemptedValue\": null,\n \"customState\": null,\n \"severity\": 0,\n \"errorCode\": null,\n \"formattedMessageArguments\": null,\n \"formattedMessagePlaceholderValues\": null,\n \"resourceName\": null\n }\n]" } ] }, { "name": "Delete Source", "request": { "method": "DELETE", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/payers/:payerId/sources/:sourceId", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payers", ":payerId", "sources", ":sourceId" ], "variable": [ { "key": "payerId", "value": "", "description": "Payer Id in pyr_XXXXXXXXXXXXXX format" }, { "key": "sourceId", "value": "", "description": "Source Id in src_XXXXXXXXXXXXXX format" } ] } }, "response": [ { "name": "200 OK", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/payers/:payerId/sources/:sourceId", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payers", ":payerId", "sources", ":sourceId" ], "variable": [ { "key": "payerId", "value": "pyr_XXXXXXXXXXXXXX", "description": "Payer Id in pyr_XXXXXXXXXXXXXX format" }, { "key": "sourceId", "value": "src_XXXXXXXXXXXXXX", "description": "Source Id in src_XXXXXXXXXXXXXX format" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "plain", "header": [ { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Thu, 29 Apr 2021 10:17:34 GMT" }, { "key": "Content-Length", "value": "0" } ], "cookie": [], "body": "" }, { "name": "400 Bad Request", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/payers/:payerId/sources/:sourceId", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payers", ":payerId", "sources", ":sourceId" ], "variable": [ { "key": "payerId", "value": "pyr_XXXXXXXXXXXXXX", "description": "Payer Id in pyr_XXXXXXXXXXXXXX format" }, { "key": "sourceId", "value": "src_XXXXXXXXXXXXXX", "description": "Source Id in src_XXXXXXXXXXXXXX format" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "256" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Thu, 29 Apr 2021 10:18:47 GMT" } ], "cookie": [], "body": "[\n {\n \"propertyName\": \"sourceId\",\n \"errorMessage\": \"Source with id: src_XXXXXXXXXXXXXX not found\",\n \"attemptedValue\": null,\n \"customState\": null,\n \"severity\": 0,\n \"errorCode\": null,\n \"formattedMessageArguments\": null,\n \"formattedMessagePlaceholderValues\": null,\n \"resourceName\": null\n }\n]" } ] } ] }, { "name": "Create or Update Payer", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"id\": \"\",\n \"fullName\": null,\n \"firstName\": \"{{$randomFirstName}}\",\n \"lastName\": \"{{$randomLastName}}\",\n \"emailAddress\": \"{{$randomExampleEmail}}\",\n \"mobileNumber\": \"0400000000\",\n \"source\": {\n \"sourceType\": \"bank-account\",\n \"bankAccountName\": \"Example Name\",\n \"bankAccountBsb\": \"000000\",\n \"bankAccountNumber\": \"000000000\",\n \"creditCardToken\": null,\n \"ipAddress\": \"\"\n },\n \"companyName\": \"{{$randomCompanyName}}\",\n \"companyRegistrationNumber\": \"123456\",\n \"streetAddress\": \"{{$randomStreetAddress}}\",\n \"suburb\": \"{{$randomCity}}\",\n \"state\": \"QLD\",\n \"postcode\": \"4005\",\n \"country\": \"Australia\",\n \"metadata\": null\n}" }, "url": { "raw": "{{baseUrl}}/{{environment}}/payers", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payers" ] }, "description": "Save a payer" }, "response": [ { "name": "200 OK - Updated with Source", "originalRequest": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"id\": \"pyr_XXXXXXXXXXXXXX\",\n \"fullName\": null,\n \"firstName\": \"Test\",\n \"lastName\": \"WebSample3\",\n \"emailAddress\": \"testwebsample@mailinator.com\",\n \"mobileNumber\": \"0400000000\",\n \"source\": {\n \"sourceType\": \"bank-account\",\n \"bankAccountName\": \"Example Name\",\n \"bankAccountBsb\": \"000000\",\n \"bankAccountNumber\": \"000000000\",\n \"creditCardToken\": null,\n \"ipAddress\": \"127.0.0.1\"\n },\n \"companyName\": \"Test Company\",\n \"companyRegistrationNumber\": \"111111\",\n \"streetAddress\": \"123 Fake st\",\n \"suburb\": \"Teneriffe\",\n \"state\": \"QLD\",\n \"postcode\": \"4005\",\n \"country\": \"Australia\",\n \"metadata\": null\n}" }, "url": { "raw": "{{baseUrl}}/{{environment}}/payers", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payers" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "840" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Encoding", "value": "gzip" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Thu, 29 Apr 2021 05:30:44 GMT" } ], "cookie": [], "body": "{\n \"id\": \"pyr_XXXXXXXXXXXXXX\",\n \"firstName\": \"Test\",\n \"lastName\": \"WebSample3\",\n \"emailAddress\": \"testwebsample@mailinator.com\",\n \"mobileNumber\": \"0400000000\",\n \"streetAddress\": \"123 Fake st\",\n \"suburb\": \"Teneriffe\",\n \"postcode\": \"4005\",\n \"state\": \"QLD\",\n \"country\": \"Australia\",\n \"companyName\": \"Test Company\",\n \"companyRegistrationNumber\": \"111111\",\n \"metadata\": null,\n \"sources\": [\n {\n \"id\": \"src_XXXXXXXXXXXXXX\",\n \"sourceType\": \"credit-card\",\n \"bankAccountNumber\": null,\n \"bankAccountBsb\": null,\n \"bankAccountName\": null,\n \"creditCardToken\": \"tkn_XXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n \"cardHolderName\": \"Ben Hotdog\",\n \"expiryDate\": \"2022-12-01T00:00:00\",\n \"displayCardNumber\": \"4242\",\n \"cardScheme\": \"visa\",\n \"origin\": \"AU\",\n \"funding\": \"credit\"\n },\n {\n \"id\": \"src_XXXXXXXXXXXXXX\",\n \"sourceType\": \"bank-account\",\n \"bankAccountNumber\": \"000000000\",\n \"bankAccountBsb\": \"000000\",\n \"bankAccountName\": \"Example Name\",\n \"creditCardToken\": null,\n \"cardHolderName\": null,\n \"expiryDate\": null,\n \"displayCardNumber\": null,\n \"cardScheme\": null,\n \"origin\": \"AU\",\n \"funding\": null\n }\n ],\n \"agreements\": [\n {\n \"id\": \"agr_XXXXXXXXXXXXXX\",\n \"anonymousViewToken\": \"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n \"agreementDateUtc\": \"2021-04-29T05:30:44.0094217Z\",\n \"confirmedDateUtc\": \"2021-04-29T05:30:44.076392Z\",\n \"status\": \"active\"\n }\n ]\n}" }, { "name": "201 Created - Created With Source", "originalRequest": { "method": "POST", "header": [ { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"id\": null,\n \"fullName\": null,\n \"firstName\": \"Test\",\n \"lastName\": \"WebSample3\",\n \"emailAddress\": \"testwebsample@mailinator.com\",\n \"mobileNumber\": \"0400000000\",\n \"source\": {\n \"sourceType\": \"bank-account\",\n \"bankAccountName\": \"Example Name\",\n \"bankAccountBsb\": \"000000\",\n \"bankAccountNumber\": \"000000000\",\n \"creditCardToken\": null,\n \"ipAddress\": \"127.0.0.1\"\n },\n \"companyName\": \"Test Company\",\n \"companyRegistrationNumber\": \"111111\", // Country thats calling it. Thisis verified. ABN/ACN. \n \"streetAddress\": \"123 Fake st\",\n \"suburb\": \"Teneriffe\",\n \"state\": \"QLD\",\n \"postcode\": \"4005\",\n \"country\": \"Australia\",\n \"metadata\": null\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/payers", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payers" ] } }, "status": "Created", "code": 201, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "859" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Location", "value": "https://api.getpinch.com.au/test/Payers?id=pyr_uiU7cjIbZJ76Gh" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Fri, 16 Apr 2021 04:28:04 GMT" } ], "cookie": [], "body": "{\n \"id\": \"pyr_XXXXXXXXXXXXXX\",\n \"firstName\": \"Test\",\n \"lastName\": \"WebSample3\",\n \"emailAddress\": \"testwebsample@mailinator.com\",\n \"mobileNumber\": \"0400000000\",\n \"streetAddress\": \"123 Fake st\",\n \"suburb\": \"Teneriffe\",\n \"postcode\": \"4005\",\n \"state\": \"QLD\",\n \"country\": \"Australia\",\n \"companyName\": \"Test Company\",\n \"companyRegistrationNumber\": \"112233\",\n \"metadata\": null,\n \"sources\": [\n {\n \"id\": \"src_XXXXXXXXXXXXXX\",\n \"sourceType\": \"bank-account\",\n \"bankAccountNumber\": \"000000000\",\n \"bankAccountBsb\": \"000000\",\n \"bankAccountName\": \"Example Name\",\n \"creditCardToken\": null,\n \"cardHolderName\": null,\n \"expiryDate\": null,\n \"displayCardNumber\": null,\n \"cardScheme\": null,\n \"origin\": \"AU\"\n }\n ],\n \"agreements\": [\n {\n \"id\": \"agr_XXXXXXXXXXXXXX\",\n \"anonymousViewToken\": \"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n \"agreementDateUtc\": \"2021-04-16T04:28:04.2957723Z\",\n \"confirmedDateUtc\": \"2021-04-16T04:28:04.3152653Z\",\n \"status\": \"active\"\n }\n ]\n}" }, { "name": "400 Bad Request", "originalRequest": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"id\": \"pyr_XXXXXXXXXXXXXX\",\n \"fullName\": null,\n \"firstName\": \"Test\",\n \"lastName\": \"User\",\n \"emailAddress\": \"test.user@mailinator.com\",\n \"mobileNumber\": \"0000000000\",\n \"source\": {\n \"sourceType\": \"bank-account\",\n \"bankAccountName\": \"Example Name\",\n \"bankAccountBsb\": \"000000\",\n \"bankAccountNumber\": \"000000000\",\n \"creditCardToken\": null,\n \"ipAddress\": \"\"\n },\n \"companyName\": \"Test Company\",\n \"companyRegistrationNumber\": \"111111\",\n \"streetAddress\": \"123 Fake st\",\n \"suburb\": \"Teneriffe\",\n \"state\": \"QLD\",\n \"postcode\": \"4005\",\n \"country\": \"Australia\",\n \"metadata\": null\n}" }, "url": { "raw": "{{baseUrl}}/{{environment}}/payers", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payers" ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "374" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Thu, 29 Apr 2021 05:36:40 GMT" } ], "cookie": [], "body": "[\n {\n \"propertyName\": \"MobileNumber\",\n \"errorMessage\": \"Mobile number must be a valid Australian number without international codes.\",\n \"attemptedValue\": \"0000000000\",\n \"customState\": null,\n \"severity\": 0,\n \"errorCode\": \"MobileNumberValidator\",\n \"formattedMessageArguments\": [],\n \"formattedMessagePlaceholderValues\": {\n \"PropertyName\": \"Mobile Number\",\n \"PropertyValue\": \"0000000000\"\n },\n \"resourceName\": null\n }\n]" } ] }, { "name": "Get Payer", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/payers/:id", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payers", ":id" ], "variable": [ { "key": "id", "value": "", "description": "Payer Id in pyr_XXXXXXXXXXXXX format" } ] } }, "response": [ { "name": "200 OK", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/payers/pyr_XXXXXXXXXXXXXX", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payers", "pyr_XXXXXXXXXXXXXX" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [], "cookie": [], "body": "{\r\n \"id\": \"pyr_XXXXXXXXXXXXXX\",\r\n \"firstName\": \"Fred\",\r\n \"lastName\": \"Hamburger\",\r\n \"emailAddress\": \"fred@mailinator.com\",\r\n \"mobileNumber\": null,\r\n \"bsb\": \"123456\",\r\n \"accountNumber\": \"654654\",\r\n \"accountName\": \"Fred Hamburger\",\r\n \"agreements\": [\r\n {\r\n \"id\": \"agr_XXXXXXXXXXXXXX\",\r\n \"anonymousViewToken\": \"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\r\n \"agreementDateUtc\": \"2017-04-18T10:01:53.0440599\",\r\n \"confirmedDateUtc\": null\r\n }\r\n ]\r\n}" }, { "name": "404 Not Found - Invalid Payer", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/payers/:id", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payers", ":id" ], "variable": [ { "key": "id", "value": "pyr_XXXXXXXXXXXXXX", "description": "Payer Id in pyr_XXXXXXXXXXXXX format" } ] } }, "status": "Not Found", "code": 404, "_postman_previewlanguage": "plain", "header": [ { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Thu, 29 Apr 2021 05:37:19 GMT" }, { "key": "Content-Length", "value": "0" } ], "cookie": [], "body": "" } ] }, { "name": "List Payers", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/payers?page=&pageSize=", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payers" ], "query": [ { "key": "page", "value": "", "description": "Default: 1" }, { "key": "pageSize", "value": "", "description": "Default: 50" } ] } }, "response": [ { "name": "200 OK", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/payers?page=&pageSize=", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payers" ], "query": [ { "key": "page", "value": "", "description": "Default: 1" }, { "key": "pageSize", "value": "", "description": "Default: 50" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "384" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Encoding", "value": "gzip" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Thu, 29 Apr 2021 04:11:20 GMT" } ], "cookie": [], "body": "{\n \"page\": 1,\n \"pageSize\": 2,\n \"totalPages\": 5,\n \"totalItems\": 10,\n \"data\": [\n {\n \"id\": \"pyr_XXXXXXXXXXXXXX\",\n \"firstName\": \"Test\",\n \"lastName\": \"Person\",\n \"emailAddress\": \"test.person@mailinator.com\",\n \"mobileNumber\": \"\",\n \"streetAddress\": null,\n \"suburb\": null,\n \"postcode\": null,\n \"state\": null,\n \"country\": null,\n \"companyName\": null,\n \"companyRegistrationNumber\": null,\n \"metadata\": null\n },\n {\n \"id\": \"pyr_XXXXXXXXXXXXXX\",\n \"firstName\": \"Test\",\n \"lastName\": \"usr\",\n \"emailAddress\": \"test.usr@mailinator.com\",\n \"mobileNumber\": null,\n \"streetAddress\": null,\n \"suburb\": null,\n \"postcode\": null,\n \"state\": null,\n \"country\": null,\n \"companyName\": null,\n \"companyRegistrationNumber\": null,\n \"metadata\": null\n }\n ]\n}" } ] }, { "name": "Delete Payer", "request": { "method": "DELETE", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/payers/:id", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payers", ":id" ], "variable": [ { "key": "id", "value": "", "description": "Payer Id in pyr_XXXXXXXXXXXXXX format" } ] } }, "response": [ { "name": "200 OK", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/payers/pyr_XXXXXXXXXXXXXX", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payers", "pyr_XXXXXXXXXXXXXX" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "Text", "header": [], "cookie": [], "body": "\"\"" }, { "name": "400 Bad Request", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/payers/:id", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payers", ":id" ], "variable": [ { "key": "id", "value": "pyr_XXXXXXXXXXXXXX", "description": "Id in pyr_XXXXXXXXXXXXXX format" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "254" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Thu, 29 Apr 2021 04:14:17 GMT" } ], "cookie": [], "body": "[\n {\n \"propertyName\": \"payerId\",\n \"errorMessage\": \"Payer with id: pyr_XXXXXXXXXXXXXX not found\",\n \"attemptedValue\": null,\n \"customState\": null,\n \"severity\": 0,\n \"errorCode\": null,\n \"formattedMessageArguments\": null,\n \"formattedMessagePlaceholderValues\": null,\n \"resourceName\": null\n }\n]" } ] } ] }, { "name": "Payments", "item": [ { "name": "Create or Update Payment", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"id\": null,\r\n \"payerId\":\"pyr_XXXXXXXXXXXXXX\",\r\n \"amount\": 1245,\r\n \"transactionDate\": \"{{today}}\",\r\n \"description\": \"{{$randomLoremSentence}}\",\r\n \"nonce\": \"{{$guid}}\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/payments", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payments" ] } }, "response": [ { "name": "200 OK - Updated", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"id\": \"pmt_XXXXXXXXXXXXXX\",\r\n \"payerId\":\"pyr_XXXXXXXXXXXXXX\",\r\n \"amount\": 1245,\r\n \"transactionDate\": \"2021-05-20\",\r\n \"description\": \"A lovely bunch of coconuts.\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/payments", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payments" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "877" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Encoding", "value": "gzip" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Thu, 29 Apr 2021 10:39:42 GMT" } ], "cookie": [], "body": "{\n \"id\": \"pmt_XXXXXXXXXXXXXX\",\n \"attemptId\": \"att_XXXXXXXX\",\n \"amount\": 1245,\n \"currency\": \"AUD\",\n \"description\": \"A lovely bunch of coconuts.\",\n \"applicationFee\": 0,\n \"totalFee\": 42,\n \"isSurcharged\": false,\n \"sourceType\": \"bank-account\",\n \"transactionDate\": \"2021-05-19T14:00:00.0000000Z\",\n \"status\": \"scheduled\",\n \"estimatedTransferDate\": \"2021-05-26\",\n \"actualTransferDate\": null,\n \"payer\": {\n \"id\": \"pyr_XXXXXXXXXXXXXX\",\n \"firstName\": \"Test\",\n \"lastName\": \"WebSample3\",\n \"emailAddress\": \"testwebsample@mailinator.com\",\n \"mobileNumber\": \"0400000000\",\n \"streetAddress\": \"123 Fake st\",\n \"suburb\": \"Teneriffe\",\n \"postcode\": \"4005\",\n \"state\": \"QLD\",\n \"country\": \"Australia\",\n \"companyName\": \"Test Company\",\n \"companyRegistrationNumber\": \"111111\",\n \"metadata\": null\n },\n \"subscription\": null,\n \"attempts\": [\n {\n \"id\": \"att_XXXXXXXX\",\n \"amount\": 1245,\n \"currency\": \"AUD\",\n \"convertedAmount\": null,\n \"conversionRate\": null,\n \"convertedCurrency\": null,\n \"estimatedSettlementDate\": \"2021-05-26T00:00:00\",\n \"isSurcharged\": false,\n \"transactionDate\": \"2021-05-19T14:00:00.0000000Z\",\n \"estimatedTransferDate\": \"2021-05-26\",\n \"actualTransferDate\": null,\n \"source\": {\n \"id\": \"src_XXXXXXXXXXXXXX\",\n \"sourceType\": \"bank-account\",\n \"bankAccountNumber\": \"000000000\",\n \"bankAccountBsb\": \"000000\",\n \"bankAccountName\": \"Example Name\",\n \"creditCardToken\": null,\n \"cardHolderName\": null,\n \"expiryDate\": null,\n \"displayCardNumber\": null,\n \"cardScheme\": null,\n \"origin\": \"AU\",\n \"funding\": null\n },\n \"dishonour\": null,\n \"settlement\": null,\n \"fees\": {\n \"transactionFee\": 42,\n \"applicationFee\": 0,\n \"totalFee\": 42,\n \"currency\": \"AUD\",\n \"taxRate\": 0.1,\n \"convertedTransactionFee\": null,\n \"convertedApplicationFee\": null,\n \"convertedTotalFee\": null,\n \"convertedCurrency\": null,\n \"conversionRate\": null\n },\n \"status\": \"scheduled\"\n }\n ],\n \"metadata\": null\n}" }, { "name": "201 Created", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"id\": null,\r\n \"payerId\":\"pyr_XXXXXXXXXXXXXX\",\r\n \"amount\": 1245,\r\n \"transactionDate\": \"2021-05-05\",\r\n \"description\": \"A lovely bunch of coconuts.\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/payments", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payments" ] } }, "status": "Created", "code": 201, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "1614" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Location", "value": "https://api.getpinch.com.au/test/Payments?id=pmt_Nl5oU6RTVzHME3" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Thu, 29 Apr 2021 10:29:37 GMT" } ], "cookie": [], "body": "{\n \"id\": \"pmt_XXXXXXXXXXXXXX\",\n \"attemptId\": \"att_XXXXXXXX\",\n \"amount\": 1245,\n \"currency\": \"AUD\",\n \"description\": \"A lovely bunch of coconuts.\",\n \"applicationFee\": 0,\n \"totalFee\": 42,\n \"isSurcharged\": false,\n \"sourceType\": \"bank-account\",\n \"transactionDate\": \"2021-05-04T14:00:00.0000000Z\",\n \"status\": \"scheduled\",\n \"estimatedTransferDate\": \"2021-05-11\",\n \"actualTransferDate\": null,\n \"payer\": {\n \"id\": \"pyr_XXXXXXXXXXXXXX\",\n \"firstName\": \"Test\",\n \"lastName\": \"WebSample3\",\n \"emailAddress\": \"testwebsample@mailinator.com\",\n \"mobileNumber\": \"0400000000\",\n \"streetAddress\": \"123 Fake st\",\n \"suburb\": \"Teneriffe\",\n \"postcode\": \"4005\",\n \"state\": \"QLD\",\n \"country\": \"Australia\",\n \"companyName\": \"Test Company\",\n \"companyRegistrationNumber\": \"111111\",\n \"metadata\": null\n },\n \"subscription\": null,\n \"attempts\": [\n {\n \"id\": \"att_XXXXXXXX\",\n \"amount\": 1245,\n \"currency\": \"AUD\",\n \"convertedAmount\": null,\n \"conversionRate\": null,\n \"convertedCurrency\": null,\n \"estimatedSettlementDate\": \"2021-05-11T00:00:00\",\n \"isSurcharged\": false,\n \"transactionDate\": \"2021-05-04T14:00:00.0000000Z\",\n \"estimatedTransferDate\": \"2021-05-11\",\n \"actualTransferDate\": null,\n \"source\": {\n \"id\": \"src_XXXXXXXXXXXXXX\",\n \"sourceType\": \"bank-account\",\n \"bankAccountNumber\": \"000000000\",\n \"bankAccountBsb\": \"000000\",\n \"bankAccountName\": \"Example Name\",\n \"creditCardToken\": null,\n \"cardHolderName\": null,\n \"expiryDate\": null,\n \"displayCardNumber\": null,\n \"cardScheme\": null,\n \"origin\": \"AU\",\n \"funding\": null\n },\n \"dishonour\": null,\n \"settlement\": null,\n \"fees\": {\n \"transactionFee\": 42,\n \"applicationFee\": 0,\n \"totalFee\": 42,\n \"currency\": \"AUD\",\n \"taxRate\": 0.1,\n \"convertedTransactionFee\": null,\n \"convertedApplicationFee\": null,\n \"convertedTotalFee\": null,\n \"convertedCurrency\": null,\n \"conversionRate\": null\n },\n \"status\": \"scheduled\"\n }\n ],\n \"metadata\": null\n}" }, { "name": "400 Bad Request", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"id\": null,\r\n \"payerId\":\"pyr_XXXXXXX\",\r\n \"amount\": 1245,\r\n \"transactionDate\": \"2021-05-05\",\r\n \"description\": \"A lovely bunch of coconuts.\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/payments", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payments" ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "248" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Mon, 19 Apr 2021 07:15:16 GMT" } ], "cookie": [], "body": "[\n {\n \"propertyName\": \"PayerId\",\n \"errorMessage\": \"Can't find payer with Id: pyr_XXXXXXX\",\n \"attemptedValue\": null,\n \"customState\": null,\n \"severity\": 0,\n \"errorCode\": null,\n \"formattedMessageArguments\": null,\n \"formattedMessagePlaceholderValues\": null,\n \"resourceName\": null\n }\n]" }, { "name": "403 Forbidden - Nonce Replay", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"id\": null,\r\n \"payerId\":\"pyr_GhJwoSz4fRggDb\",\r\n \"amount\": 1245,\r\n \"transactionDate\": \"{{today}}\",\r\n \"description\": \"{{$randomLoremSentence}}\",\r\n \"nonce\": \"test123\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/payments", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payments" ] } }, "status": "Forbidden", "code": 403, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "1365" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:7a9feec7-06e6-4091-a7d8-f6f4ef30d688" }, { "key": "X-SourceFiles", "value": "=?UTF-8?B?QzpcRGV2XEFwcHNcUGluY2hcUGluY2hcc3JjXFBpbmNoLkFwaVx0ZXN0XHBheW1lbnRz?=" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Tue, 11 May 2021 01:05:23 GMT" } ], "cookie": [], "body": "{\n \"isNonceReplay\": true,\n \"nonce\": \"test123\",\n \"data\": {\n \"id\": \"pmt_XXXXXXXXXXXXXX\",\n \"attemptId\": \"att_XXXXXXXX\",\n \"amount\": 1000,\n \"currency\": \"AUD\",\n \"description\": \"Occaecati est nobis in quidem soluta molestiae quis explicabo.\",\n \"applicationFee\": 0,\n \"totalFee\": 55,\n \"isSurcharged\": false,\n \"sourceType\": \"credit-card\",\n \"transactionDate\": \"2021-05-11T01:01:54.4887199Z\",\n \"status\": \"approved\",\n \"estimatedTransferDate\": \"2021-05-13\",\n \"actualTransferDate\": null,\n \"payer\": {\n \"id\": \"pyr_XXXXXXXXXXXXXX\",\n \"firstName\": \"ben\",\n \"lastName\": \"hotdog\",\n \"emailAddress\": \"ben.hotdog@mailinator.com\",\n \"mobileNumber\": null,\n \"streetAddress\": null,\n \"suburb\": null,\n \"postcode\": null,\n \"state\": null,\n \"country\": null,\n \"companyName\": null,\n \"companyRegistrationNumber\": null,\n \"metadata\": null\n },\n \"subscription\": null,\n \"attempts\": [\n {\n \"id\": \"att_XXXXXXXX\",\n \"amount\": 1000,\n \"currency\": \"AUD\",\n \"convertedAmount\": null,\n \"conversionRate\": null,\n \"convertedCurrency\": null,\n \"estimatedSettlementDate\": \"2021-05-13T00:00:00\",\n \"isSurcharged\": false,\n \"transactionDate\": \"2021-05-11T01:01:54.4887199Z\",\n \"estimatedTransferDate\": \"2021-05-13\",\n \"actualTransferDate\": null,\n \"source\": null,\n \"dishonour\": null,\n \"settlement\": null,\n \"fees\": {\n \"transactionFee\": 55,\n \"applicationFee\": 0,\n \"totalFee\": 55,\n \"currency\": \"AUD\",\n \"taxRate\": 0.1,\n \"convertedTransactionFee\": null,\n \"convertedApplicationFee\": null,\n \"convertedTotalFee\": null,\n \"convertedCurrency\": null,\n \"conversionRate\": null\n },\n \"status\": \"approved\"\n }\n ],\n \"refunds\": [],\n \"metadata\": null,\n \"nonce\": \"test123\"\n }\n}" } ] }, { "name": "Create Payment - Realtime", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"payerId\": \"\", // PayerId to charge (if already setup)\r\n \"email\": \"{{$randomExampleEmail}}\", // Payer's Email\r\n \"fullName\": \"{{$randomFullName}}\", // Only required if no PayerId specified\r\n \"amount\": 1000, // Amount in Cents\r\n \"description\": \"{{$randomLoremSentence}}\", // Payment Description\r\n \"creditCardToken\": \"tkn_XXXXXXX\", // Token generated in the `/Tokens/Create Card Token` request. \r\n \"nonce\" : \"{{$guid}}\" // Unique Per Request\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/payments/realtime", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payments", "realtime" ] } }, "response": [ { "name": "201 Created - New Payer", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"fullName\": \"Ben Hotdog\",\r\n \"email\": \"ben.hotdog@mailinator.com\",\r\n \"amount\": \"1245\",\r\n \"description\": \"A sweet new hat\",\r\n \"creditCardToken\": \"tkn_XXXXXXXXXXXXXXXXXXXXXXXXXXXX\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/payments/realtime", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payments", "realtime" ] } }, "status": "Created", "code": 201, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "1569" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Location", "value": "https://api.getpinch.com.au/test/Payments/realtime?id=pmt_axwP9O11EU691E" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Mon, 19 Apr 2021 05:20:54 GMT" } ], "cookie": [], "body": "{\n \"id\": \"pmt_XXXXXXXXXXXXXX\",\n \"attemptId\": \"att_XXXXXXXX\",\n \"amount\": 1245,\n \"currency\": \"AUD\",\n \"description\": \"A sweet new hat\",\n \"applicationFee\": 0,\n \"totalFee\": 61,\n \"isSurcharged\": false,\n \"sourceType\": \"credit-card\",\n \"transactionDate\": \"2021-04-19T05:20:54.4601157Z\",\n \"status\": \"approved\",\n \"estimatedTransferDate\": \"2021-04-21\",\n \"actualTransferDate\": null,\n \"payer\": {\n \"id\": \"pyr_XXXXXXXXXXXXXX\",\n \"firstName\": \"Ben\",\n \"lastName\": \"Hotdog\",\n \"emailAddress\": \"ben.hotdog@mailinator.com\",\n \"mobileNumber\": null,\n \"streetAddress\": null,\n \"suburb\": null,\n \"postcode\": null,\n \"state\": null,\n \"country\": null,\n \"companyName\": null,\n \"companyRegistrationNumber\": null,\n \"metadata\": null\n },\n \"subscription\": null,\n \"attempts\": [\n {\n \"id\": \"att_XXXXXXXX\",\n \"amount\": 1245,\n \"currency\": \"AUD\",\n \"convertedAmount\": null,\n \"conversionRate\": null,\n \"convertedCurrency\": null,\n \"estimatedSettlementDate\": \"2021-04-21T00:00:00\",\n \"isSurcharged\": false,\n \"transactionDate\": \"2021-04-19T05:20:54.4601157Z\",\n \"estimatedTransferDate\": \"2021-04-21\",\n \"actualTransferDate\": null,\n \"source\": {\n \"id\": \"src_XXXXXXXXXXXXXX\",\n \"sourceType\": \"credit-card\",\n \"bankAccountNumber\": null,\n \"bankAccountBsb\": null,\n \"bankAccountName\": null,\n \"creditCardToken\": \"tkn_XXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n \"cardHolderName\": \"Ben Hotdog\",\n \"expiryDate\": \"2022-12-01T00:00:00\",\n \"displayCardNumber\": \"4242\",\n \"cardScheme\": \"visa\",\n \"origin\": \"AU\"\n },\n \"dishonour\": null,\n \"settlement\": null,\n \"fees\": {\n \"transactionFee\": 61,\n \"applicationFee\": 0,\n \"totalFee\": 61,\n \"currency\": \"AUD\",\n \"taxRate\": 0.1,\n \"convertedTransactionFee\": null,\n \"convertedApplicationFee\": null,\n \"convertedTotalFee\": null,\n \"convertedCurrency\": null,\n \"conversionRate\": null\n },\n \"status\": \"approved\"\n }\n ],\n \"metadata\": null\n}" }, { "name": "201 Created - Existing Payer", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"payerId\": \"pyr_XXXXXXXXXXXXXX\",\r\n \"email\": \"ben.hotdog@mailinator.com\",\r\n \"amount\": \"1245\",\r\n \"description\": \"A sweet new hat\",\r\n \"creditCardToken\": \"tkn_XXXXXXXXXXXXXXXXXXXXXXXXXXXX\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/payments/realtime", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payments", "realtime" ] } }, "status": "Created", "code": 201, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "1571" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Location", "value": "https://api.getpinch.com.au/test/Payments/realtime?id=pmt_C7pESFLf1GQ0DK" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Mon, 19 Apr 2021 05:43:00 GMT" } ], "cookie": [], "body": "{\n \"id\": \"pmt_XXXXXXXXXXXXXX\",\n \"attemptId\": \"att_XXXXXXXX\",\n \"amount\": 1245,\n \"currency\": \"AUD\",\n \"description\": \"A sweet new hat\",\n \"applicationFee\": 0,\n \"totalFee\": 61,\n \"isSurcharged\": false,\n \"sourceType\": \"credit-card\",\n \"transactionDate\": \"2021-04-19T05:43:01.2642435Z\",\n \"status\": \"approved\",\n \"estimatedTransferDate\": \"2021-04-21\",\n \"actualTransferDate\": null,\n \"payer\": {\n \"id\": \"pyr_XXXXXXXXXXXXXX\",\n \"firstName\": \"Test\",\n \"lastName\": \"Payer\",\n \"emailAddress\": \"test.payer@mailinator.com\",\n \"mobileNumber\": null,\n \"streetAddress\": null,\n \"suburb\": null,\n \"postcode\": null,\n \"state\": null,\n \"country\": null,\n \"companyName\": null,\n \"companyRegistrationNumber\": null,\n \"metadata\": null\n },\n \"subscription\": null,\n \"attempts\": [\n {\n \"id\": \"att_XXXXXXXXX\",\n \"amount\": 1245,\n \"currency\": \"AUD\",\n \"convertedAmount\": null,\n \"conversionRate\": null,\n \"convertedCurrency\": null,\n \"estimatedSettlementDate\": \"2021-04-21T00:00:00\",\n \"isSurcharged\": false,\n \"transactionDate\": \"2021-04-19T05:43:01.2642435Z\",\n \"estimatedTransferDate\": \"2021-04-21\",\n \"actualTransferDate\": null,\n \"source\": {\n \"id\": \"src_XXXXXXXXXXXXXX\",\n \"sourceType\": \"credit-card\",\n \"bankAccountNumber\": null,\n \"bankAccountBsb\": null,\n \"bankAccountName\": null,\n \"creditCardToken\": \"tkn_XXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n \"cardHolderName\": \"Ben Hotdog\",\n \"expiryDate\": \"2022-12-01T00:00:00\",\n \"displayCardNumber\": \"4242\",\n \"cardScheme\": \"visa\",\n \"origin\": \"AU\"\n },\n \"dishonour\": null,\n \"settlement\": null,\n \"fees\": {\n \"transactionFee\": 61,\n \"applicationFee\": 0,\n \"totalFee\": 61,\n \"currency\": \"AUD\",\n \"taxRate\": 0.1,\n \"convertedTransactionFee\": null,\n \"convertedApplicationFee\": null,\n \"convertedTotalFee\": null,\n \"convertedCurrency\": null,\n \"conversionRate\": null\n },\n \"status\": \"approved\"\n }\n ],\n \"metadata\": null\n}" }, { "name": "400 Bad Request", "originalRequest": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"payerId\": \"pyr_XXXXXXXXXXXXXX\", // PayerId to charge (if already setup)\r\n \"email\": \"{{$randomExampleEmail}}\", // Payer's Email\r\n \"fullName\": \"{{$randomFullName}}\", // Only required if no PayerId specified\r\n \"amount\": 1000, // Amount in Cents\r\n \"description\": \"{{$randomLoremSentence}}\", // Payment Description\r\n \"creditCardToken\": \"tkn_XXXXXXX\", // Token generated in the `/Tokens/Create Card Token` request. \r\n \"nonce\" : \"test123\" // Unique Per Request\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/payments/realtime", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payments", "realtime" ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "1090" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:7a9feec7-06e6-4091-a7d8-f6f4ef30d688" }, { "key": "X-SourceFiles", "value": "=?UTF-8?B?QzpcRGV2XEFwcHNcUGluY2hcUGluY2hcc3JjXFBpbmNoLkFwaVx0ZXN0XHBheW1lbnRzXHJlYWx0aW1l?=" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Tue, 11 May 2021 01:04:17 GMT" } ], "cookie": [], "body": "[\n {\n \"propertyName\": \"PayerId\",\n \"errorMessage\": \"Supply only a payerId (no full/first/last names) to use an existing Payer\",\n \"attemptedValue\": \"pyr_XXXXXXXXXXXXXX\",\n \"customState\": null,\n \"severity\": 0,\n \"errorCode\": \"PredicateValidator\",\n \"formattedMessageArguments\": [],\n \"formattedMessagePlaceholderValues\": {\n \"PropertyName\": \"Payer Id\",\n \"PropertyValue\": \"pyr_XXXXXXXXXXXXXX\"\n },\n \"resourceName\": null\n },\n {\n \"propertyName\": \"FullName\",\n \"errorMessage\": \"Supply a fullName only (no payerId or first/last names) to create a new Payer\",\n \"attemptedValue\": \"Megan Johnson\",\n \"customState\": null,\n \"severity\": 0,\n \"errorCode\": \"PredicateValidator\",\n \"formattedMessageArguments\": [],\n \"formattedMessagePlaceholderValues\": {\n \"PropertyName\": \"Full Name\",\n \"PropertyValue\": \"Megan Johnson\"\n },\n \"resourceName\": null\n },\n {\n \"propertyName\": \"FirstName\",\n \"errorMessage\": \"Supply at least a first name (no payerId or fullName) to create a new Payer\",\n \"attemptedValue\": null,\n \"customState\": null,\n \"severity\": 0,\n \"errorCode\": \"PredicateValidator\",\n \"formattedMessageArguments\": [],\n \"formattedMessagePlaceholderValues\": {\n \"PropertyName\": \"First Name\",\n \"PropertyValue\": null\n },\n \"resourceName\": null\n }\n]" }, { "name": "403 Forbidden - Nonce Replay", "originalRequest": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"payerId\": \"pyr_GIHT1k4WVVuCoD\", // PayerId to charge (if already setup)\r\n \"email\": \"{{$randomExampleEmail}}\", // Payer's Email\r\n //\"fullName\": \"{{$randomFullName}}\", // Only required if no PayerId specified\r\n \"amount\": 1000, // Amount in Cents\r\n \"description\": \"{{$randomLoremSentence}}\", // Payment Description\r\n \"creditCardToken\": \"\", // Token generated in the `/Tokens/Create Card Token` request. \r\n \"nonce\" : \"fdb06000-9d3f-4738-ab45-d8d9c7984e93\" // Unique Per Request\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/payments/realtime", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payments", "realtime" ] } }, "status": "Forbidden", "code": 403, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "1457" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:7a9feec7-06e6-4091-a7d8-f6f4ef30d688" }, { "key": "X-SourceFiles", "value": "=?UTF-8?B?QzpcRGV2XEFwcHNcUGluY2hcUGluY2hcc3JjXFBpbmNoLkFwaVx0ZXN0XHBheW1lbnRzXHJlYWx0aW1l?=" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Fri, 14 May 2021 00:50:14 GMT" } ], "cookie": [], "body": "{\n \"isNonceReplay\": true,\n \"nonce\": \"fdb06000-9d3f-4738-ab45-d8d9c7984e93\",\n \"data\": {\n \"id\": \"pmt_XXXXXXXXXXXXXX\",\n \"attemptId\": \"att_XXXXXXXX\",\n \"amount\": 1000,\n \"currency\": \"AUD\",\n \"description\": \"Quis molestias labore incidunt voluptate repellat magni recusandae et.\",\n \"applicationFee\": 0,\n \"totalFee\": 55,\n \"isSurcharged\": false,\n \"sourceType\": \"credit-card\",\n \"transactionDate\": \"2021-05-14T00:49:55.7510577Z\",\n \"status\": \"approved\",\n \"estimatedTransferDate\": \"2021-05-18\",\n \"actualTransferDate\": null,\n \"payer\": {\n \"id\": \"pyr_XXXXXXXXXXXXXX\",\n \"firstName\": \"Alex\",\n \"lastName\": \"Fadel\",\n \"emailAddress\": \"Willis_Wyman@example.com\",\n \"mobileNumber\": null,\n \"streetAddress\": null,\n \"suburb\": null,\n \"postcode\": null,\n \"state\": null,\n \"country\": null,\n \"companyName\": null,\n \"companyRegistrationNumber\": null,\n \"metadata\": null\n },\n \"subscription\": null,\n \"attempts\": [\n {\n \"id\": \"att_XXXXXXXX\",\n \"amount\": 1000,\n \"currency\": \"AUD\",\n \"convertedAmount\": null,\n \"conversionRate\": null,\n \"convertedCurrency\": null,\n \"estimatedSettlementDate\": \"2021-05-18T00:00:00\",\n \"isSurcharged\": false,\n \"transactionDate\": \"2021-05-14T00:49:55.7510577Z\",\n \"estimatedTransferDate\": \"2021-05-18\",\n \"actualTransferDate\": null,\n \"source\": null,\n \"dishonour\": null,\n \"settlement\": null,\n \"fees\": {\n \"transactionFee\": 55,\n \"applicationFee\": 0,\n \"totalFee\": 55,\n \"currency\": \"AUD\",\n \"taxRate\": 0.1,\n \"convertedTransactionFee\": null,\n \"convertedApplicationFee\": null,\n \"convertedTotalFee\": null,\n \"convertedCurrency\": null,\n \"conversionRate\": null\n },\n \"status\": \"approved\"\n }\n ],\n \"refunds\": [],\n \"metadata\": null,\n \"nonce\": \"fdb06000-9d3f-4738-ab45-d8d9c7984e93\"\n }\n}" } ] }, { "name": "Get Payment", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/payments/:id", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payments", ":id" ], "variable": [ { "key": "id", "value": "", "description": "Payment Id in pmt_XXXXXXXXXXXXXX format" } ] } }, "response": [ { "name": "200 OK", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/payments/:id", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payments", ":id" ], "variable": [ { "key": "id", "value": "pmt_vn4HGQxUhn2v3T", "description": "Payment Id in pmt_XXXXXXXXXXXXXX format" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "861" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Encoding", "value": "gzip" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Thu, 29 Apr 2021 11:05:12 GMT" } ], "cookie": [], "body": "{\n \"id\": \"pmt_XXXXXXXXXXXXXX\",\n \"attemptId\": \"att_XXXXXXXX\",\n \"amount\": 1000,\n \"currency\": \"AUD\",\n \"description\": \"asdfasdf\",\n \"applicationFee\": 0,\n \"totalFee\": 40,\n \"isSurcharged\": false,\n \"sourceType\": \"bank-account\",\n \"transactionDate\": \"2021-04-25T14:00:00.0000000Z\",\n \"status\": \"scheduled\",\n \"estimatedTransferDate\": \"2021-04-30\",\n \"actualTransferDate\": null,\n \"payer\": {\n \"id\": \"pyr_XXXXXXXXXXXXXX\",\n \"firstName\": \"Test\",\n \"lastName\": \"WebSample3\",\n \"emailAddress\": \"testwebsample@mailinator.com\",\n \"mobileNumber\": \"0400000000\",\n \"streetAddress\": \"123 Fake st\",\n \"suburb\": \"Teneriffe\",\n \"postcode\": \"4005\",\n \"state\": \"QLD\",\n \"country\": \"Australia\",\n \"companyName\": \"Test Company\",\n \"companyRegistrationNumber\": \"112233\",\n \"metadata\": null\n },\n \"subscription\": null,\n \"attempts\": [\n {\n \"id\": \"att_XXXXXXXX\",\n \"amount\": 1000,\n \"currency\": \"AUD\",\n \"convertedAmount\": null,\n \"conversionRate\": null,\n \"convertedCurrency\": null,\n \"estimatedSettlementDate\": \"2021-04-30T00:00:00\",\n \"isSurcharged\": false,\n \"transactionDate\": \"2021-04-25T14:00:00.0000000Z\",\n \"estimatedTransferDate\": \"2021-04-30\",\n \"actualTransferDate\": null,\n \"source\": {\n \"id\": \"src_vn4HGQxUhn2v3T\",\n \"sourceType\": \"bank-account\",\n \"bankAccountNumber\": \"000000000\",\n \"bankAccountBsb\": \"000000\",\n \"bankAccountName\": \"Example Name\",\n \"creditCardToken\": null,\n \"cardHolderName\": null,\n \"expiryDate\": null,\n \"displayCardNumber\": null,\n \"cardScheme\": null,\n \"origin\": \"AU\",\n \"funding\": null\n },\n \"dishonour\": null,\n \"settlement\": null,\n \"fees\": {\n \"transactionFee\": 40,\n \"applicationFee\": 0,\n \"totalFee\": 40,\n \"currency\": \"AUD\",\n \"taxRate\": 0.1,\n \"convertedTransactionFee\": null,\n \"convertedApplicationFee\": null,\n \"convertedTotalFee\": null,\n \"convertedCurrency\": null,\n \"conversionRate\": null\n },\n \"status\": \"scheduled\"\n }\n ],\n \"metadata\": null\n}" } ] }, { "name": "List Payments - Scheduled", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/payments/scheduled?page&pageSize", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payments", "scheduled" ], "query": [ { "key": "page", "value": "", "description": "The current page" }, { "key": "pageSize", "value": "", "description": "How many items to return for each page" } ] } }, "response": [ { "name": "200 OK", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/payments/scheduled?page&pageSize", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payments", "scheduled" ], "query": [ { "key": "page", "value": null, "description": "The current page" }, { "key": "pageSize", "value": null, "description": "How many items to return for each page" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "576" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Encoding", "value": "gzip" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Mon, 19 Apr 2021 05:53:26 GMT" } ], "cookie": [], "body": "{\n \"page\": 1,\n \"pageSize\": 50,\n \"totalPages\": 1,\n \"totalItems\": 1,\n \"data\": [\n {\n \"id\": \"pmt_XXXXXXXXXXXXXX\",\n \"attemptId\": \"att_XXXXXXXX\",\n \"amount\": 1245,\n \"currency\": \"AUD\",\n \"description\": \"A lovely bunch of coconuts.\",\n \"applicationFee\": 0,\n \"totalFee\": 42,\n \"isSurcharged\": false,\n \"sourceType\": \"bank-account\",\n \"transactionDate\": \"2021-05-04T14:00:00.0000000Z\",\n \"status\": \"scheduled\",\n \"estimatedTransferDate\": \"2021-05-11T00:00:00\",\n \"payer\": {\n \"id\": \"pyr_XXXXXX\",\n \"firstName\": \"Test\",\n \"lastName\": \"Payer\",\n \"emailAddress\": \"test.payer@mailinator.com\",\n \"mobileNumber\": null,\n \"streetAddress\": null,\n \"suburb\": null,\n \"postcode\": null,\n \"state\": null,\n \"country\": null,\n \"companyName\": null,\n \"companyRegistrationNumber\": null,\n \"metadata\": null\n },\n \"subscription\": null,\n \"metadata\": null\n }\n ]\n}" } ] }, { "name": "List Payments - Processed", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/payments/processed?page&pageSize", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payments", "processed" ], "query": [ { "key": "page", "value": "", "description": "The current page" }, { "key": "pageSize", "value": "", "description": "How many items to return for each page" } ] } }, "response": [ { "name": "200 OK", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/payments/processed?page&pageSize", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payments", "processed" ], "query": [ { "key": "page", "value": null, "description": "The current page" }, { "key": "pageSize", "value": null, "description": "How many items to return for each page" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "681" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Encoding", "value": "gzip" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Mon, 19 Apr 2021 06:00:14 GMT" } ], "cookie": [], "body": "{\n \"page\": 1,\n \"pageSize\": 50,\n \"totalPages\": 1,\n \"totalItems\": 2,\n \"data\": [\n {\n \"id\": \"pmt_XXXXXXXXXXXXXX\",\n \"attemptId\": \"att_XXXXXXXX\",\n \"amount\": 1245,\n \"currency\": \"AUD\",\n \"description\": \"A sweet new hat\",\n \"applicationFee\": 0,\n \"totalFee\": 61,\n \"isSurcharged\": false,\n \"sourceType\": \"credit-card\",\n \"transactionDate\": \"2021-04-19T05:43:01.2642435Z\",\n \"status\": \"approved\",\n \"estimatedTransferDate\": \"2021-04-21T00:00:00\",\n \"payer\": {\n \"id\": \"pyr_XXXXXXXXXXXXXX\",\n \"firstName\": \"XXXXXX\",\n \"lastName\": \"XXXXXX\",\n \"emailAddress\": \"XXXXXX.XXXXXX@mailinator.com\",\n \"mobileNumber\": null,\n \"streetAddress\": null,\n \"suburb\": null,\n \"postcode\": null,\n \"state\": null,\n \"country\": null,\n \"companyName\": null,\n \"companyRegistrationNumber\": null,\n \"metadata\": null\n },\n \"subscription\": null,\n \"metadata\": null\n },\n {\n \"id\": \"pmt_XXXXXXXXXXXXXX\",\n \"attemptId\": \"att_XXXXXXXX\",\n \"amount\": 1245,\n \"currency\": \"AUD\",\n \"description\": \"A sweet new hat\",\n \"applicationFee\": 0,\n \"totalFee\": 61,\n \"isSurcharged\": false,\n \"sourceType\": \"credit-card\",\n \"transactionDate\": \"2021-04-19T05:20:54.4601157Z\",\n \"status\": \"approved\",\n \"estimatedTransferDate\": \"2021-04-21T00:00:00\",\n \"payer\": {\n \"id\": \"pyr_XXXXXXXXXXXXXX\",\n \"firstName\": \"Ben\",\n \"lastName\": \"Hotdog\",\n \"emailAddress\": \"ben.hotdog@mailinator.com\",\n \"mobileNumber\": null,\n \"streetAddress\": null,\n \"suburb\": null,\n \"postcode\": null,\n \"state\": null,\n \"country\": null,\n \"companyName\": null,\n \"companyRegistrationNumber\": null,\n \"metadata\": null\n },\n \"subscription\": null,\n \"metadata\": null\n }\n ]\n}" } ] }, { "name": "List Payments for Payer", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/payments/payer/:id", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payments", "payer", ":id" ], "variable": [ { "key": "id", "value": "", "description": "Payment Id in pyr_XXXXXXXXXXXXXX format" } ] } }, "response": [ { "name": "200 OK", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/payments/payer/pyr_XXXXXXXXXXXXXX", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payments", "payer", "pyr_XXXXXXXXXXXXXX" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "1161" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Encoding", "value": "gzip" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Mon, 19 Apr 2021 06:11:05 GMT" } ], "cookie": [], "body": "[\n {\n \"id\": \"pmt_XXXXXXXXXXXXXX\",\n \"attemptId\": \"att_XXXXXXXX\",\n \"amount\": 1245,\n \"currency\": \"AUD\",\n \"description\": \"A lovely bunch of coconuts.\",\n \"applicationFee\": 0,\n \"totalFee\": 42,\n \"isSurcharged\": false,\n \"sourceType\": \"bank-account\",\n \"transactionDate\": \"2021-05-04T14:00:00.0000000Z\",\n \"status\": \"scheduled\",\n \"estimatedTransferDate\": \"2021-05-11\",\n \"actualTransferDate\": null,\n \"payer\": {\n \"id\": \"pyr_XXXXXXXXXXXXXX\",\n \"firstName\": \"Test\",\n \"lastName\": \"Payer\",\n \"emailAddress\": \"test.payer@mailinator.com\",\n \"mobileNumber\": null,\n \"streetAddress\": null,\n \"suburb\": null,\n \"postcode\": null,\n \"state\": null,\n \"country\": null,\n \"companyName\": null,\n \"companyRegistrationNumber\": null,\n \"metadata\": null\n },\n \"subscription\": null,\n \"attempts\": [\n {\n \"id\": \"att_XXXXXXXX\",\n \"amount\": 1245,\n \"currency\": \"AUD\",\n \"convertedAmount\": null,\n \"conversionRate\": null,\n \"convertedCurrency\": null,\n \"estimatedSettlementDate\": \"2021-05-11T00:00:00\",\n \"isSurcharged\": false,\n \"transactionDate\": \"2021-05-04T14:00:00.0000000Z\",\n \"estimatedTransferDate\": \"2021-05-11\",\n \"actualTransferDate\": null,\n \"source\": {\n \"id\": \"src_XXXXXXXXXXXXXX\",\n \"sourceType\": \"bank-account\",\n \"bankAccountNumber\": \"000000000\",\n \"bankAccountBsb\": \"040000\",\n \"bankAccountName\": \"Test Account\",\n \"creditCardToken\": null,\n \"cardHolderName\": null,\n \"expiryDate\": null,\n \"displayCardNumber\": null,\n \"cardScheme\": null,\n \"origin\": \"AU\"\n },\n \"dishonour\": null,\n \"settlement\": null,\n \"fees\": {\n \"transactionFee\": 42,\n \"applicationFee\": 0,\n \"totalFee\": 42,\n \"currency\": \"AUD\",\n \"taxRate\": 0.1,\n \"convertedTransactionFee\": null,\n \"convertedApplicationFee\": null,\n \"convertedTotalFee\": null,\n \"convertedCurrency\": null,\n \"conversionRate\": null\n },\n \"status\": \"scheduled\"\n }\n ],\n \"metadata\": null\n },\n {\n \"id\": \"pmt_XXXXXXXXXXXXXX\",\n \"attemptId\": \"att_XXXXXXXX\",\n \"amount\": 1245,\n \"currency\": \"AUD\",\n \"description\": \"A sweet new hat\",\n \"applicationFee\": 0,\n \"totalFee\": 61,\n \"isSurcharged\": false,\n \"sourceType\": \"credit-card\",\n \"transactionDate\": \"2021-04-19T05:43:01.2642435Z\",\n \"status\": \"approved\",\n \"estimatedTransferDate\": \"2021-04-21\",\n \"actualTransferDate\": null,\n \"payer\": {\n \"id\": \"pyr_XXXXXXXXXXXXXX\",\n \"firstName\": \"Test\",\n \"lastName\": \"Payer\",\n \"emailAddress\": \"test.payer@mailinator.com\",\n \"mobileNumber\": null,\n \"streetAddress\": null,\n \"suburb\": null,\n \"postcode\": null,\n \"state\": null,\n \"country\": null,\n \"companyName\": null,\n \"companyRegistrationNumber\": null,\n \"metadata\": null\n },\n \"subscription\": null,\n \"attempts\": [\n {\n \"id\": \"att_XXXXXXXX\",\n \"amount\": 1245,\n \"currency\": \"AUD\",\n \"convertedAmount\": null,\n \"conversionRate\": null,\n \"convertedCurrency\": null,\n \"estimatedSettlementDate\": \"2021-04-21T00:00:00\",\n \"isSurcharged\": false,\n \"transactionDate\": \"2021-04-19T05:43:01.2642435Z\",\n \"estimatedTransferDate\": \"2021-04-21\",\n \"actualTransferDate\": null,\n \"source\": {\n \"id\": \"src_XXXXXXXXXXXXXX\",\n \"sourceType\": \"credit-card\",\n \"bankAccountNumber\": null,\n \"bankAccountBsb\": null,\n \"bankAccountName\": null,\n \"creditCardToken\": \"tkn_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n \"cardHolderName\": \"Ben Hotdog\",\n \"expiryDate\": \"2022-12-01T00:00:00\",\n \"displayCardNumber\": \"4242\",\n \"cardScheme\": \"visa\",\n \"origin\": \"AU\"\n },\n \"dishonour\": null,\n \"settlement\": null,\n \"fees\": {\n \"transactionFee\": 61,\n \"applicationFee\": 0,\n \"totalFee\": 61,\n \"currency\": \"AUD\",\n \"taxRate\": 0.1,\n \"convertedTransactionFee\": null,\n \"convertedApplicationFee\": null,\n \"convertedTotalFee\": null,\n \"convertedCurrency\": null,\n \"conversionRate\": null\n },\n \"status\": \"approved\"\n }\n ],\n \"metadata\": null\n }\n]" }, { "name": "400 Bad Request", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/payments/payer/pyr_XXXXXXXXXXXXXX", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payments", "payer", "pyr_XXXXXXXXXXXXXX" ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "247" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Mon, 19 Apr 2021 06:11:20 GMT" } ], "cookie": [], "body": "[\n {\n \"propertyName\": \"payerId\",\n \"errorMessage\": \"Could not find a payer with ID: pyr_XXXXXXXXXXXXXX\",\n \"attemptedValue\": null,\n \"customState\": null,\n \"severity\": 0,\n \"errorCode\": null,\n \"formattedMessageArguments\": null,\n \"formattedMessagePlaceholderValues\": null,\n \"resourceName\": null\n }\n]" } ] }, { "name": "Delete Payment", "request": { "method": "DELETE", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/payments/:id", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payments", ":id" ], "variable": [ { "key": "id", "value": "", "description": "Payment Id in pmt_XXXXXXXXXXXXXX format" } ] } }, "response": [ { "name": "200 OK", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/payments/pmt_XXXXX", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payments", "pmt_XXXXX" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "plain", "header": [ { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Mon, 19 Apr 2021 07:14:37 GMT" }, { "key": "Content-Length", "value": "0" } ], "cookie": [], "body": "" }, { "name": "400 Bad Request", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/payments/:id", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payments", ":id" ], "variable": [ { "key": "id", "value": "pmt_XXXXXXXXXXXXXX", "description": "Payment Id in pmt_XXXXXXXXXXXXXX format" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "295" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Thu, 29 Apr 2021 11:22:20 GMT" } ], "cookie": [], "body": "{\n \"errorMessages\": [\n {\n \"propertyName\": \"paymentId\",\n \"errorMessage\": \"Payment with id: pmt_XXXXXXXXXXXXXX not found\",\n \"attemptedValue\": null,\n \"customState\": null,\n \"severity\": 0,\n \"errorCode\": null,\n \"formattedMessageArguments\": null,\n \"formattedMessagePlaceholderValues\": null,\n \"resourceName\": null\n }\n ],\n \"successful\": false\n}" } ] }, { "name": "Check for Nonce", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"nonce\": \"fdb06000-9d3f-4738-ab45-d8d9c7984e93\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/payments/nonce", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payments", "nonce" ] } }, "response": [ { "name": "200 OK - Nonce Doesn't Exist", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"nonce\": \"test456\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/payments/nonce", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payments", "nonce" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "41" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:7a9feec7-06e6-4091-a7d8-f6f4ef30d688" }, { "key": "X-SourceFiles", "value": "=?UTF-8?B?QzpcRGV2XEFwcHNcUGluY2hcUGluY2hcc3JjXFBpbmNoLkFwaVx0ZXN0XHBheW1lbnRzXG5vbmNl?=" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Tue, 11 May 2021 04:32:51 GMT" } ], "cookie": [], "body": "{\n \"isNonceReplay\": false,\n \"nonce\": \"test456\",\n \"data\": null\n}" }, { "name": "200 OK - Nonce Exists", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"nonce\": \"fdb06000-9d3f-4738-ab45-d8d9c7984e93\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/payments/nonce", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "payments", "nonce" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "1457" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:7a9feec7-06e6-4091-a7d8-f6f4ef30d688" }, { "key": "X-SourceFiles", "value": "=?UTF-8?B?QzpcRGV2XEFwcHNcUGluY2hcUGluY2hcc3JjXFBpbmNoLkFwaVx0ZXN0XHBheW1lbnRzXG5vbmNl?=" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Fri, 14 May 2021 00:53:03 GMT" } ], "cookie": [], "body": "{\n \"isNonceReplay\": true,\n \"nonce\": \"fdb06000-9d3f-4738-ab45-d8d9c7984e93\",\n \"data\": {\n \"id\": \"pmt_XXXXXXXXXXXXXX\",\n \"attemptId\": \"att_XXXXXXXXX\",\n \"amount\": 1000,\n \"currency\": \"AUD\",\n \"description\": \"Quis molestias labore incidunt voluptate repellat magni recusandae et.\",\n \"applicationFee\": 0,\n \"totalFee\": 55,\n \"isSurcharged\": false,\n \"sourceType\": \"credit-card\",\n \"transactionDate\": \"2021-05-14T00:49:55.7510577Z\",\n \"status\": \"approved\",\n \"estimatedTransferDate\": \"2021-05-18\",\n \"actualTransferDate\": null,\n \"payer\": {\n \"id\": \"pyr_XXXXXXXXXXXXXX\",\n \"firstName\": \"Alex\",\n \"lastName\": \"Fadel\",\n \"emailAddress\": \"Willis_Wyman@example.com\",\n \"mobileNumber\": null,\n \"streetAddress\": null,\n \"suburb\": null,\n \"postcode\": null,\n \"state\": null,\n \"country\": null,\n \"companyName\": null,\n \"companyRegistrationNumber\": null,\n \"metadata\": null\n },\n \"subscription\": null,\n \"attempts\": [\n {\n \"id\": \"att_XXXXXXXX\",\n \"amount\": 1000,\n \"currency\": \"AUD\",\n \"convertedAmount\": null,\n \"conversionRate\": null,\n \"convertedCurrency\": null,\n \"estimatedSettlementDate\": \"2021-05-18T00:00:00\",\n \"isSurcharged\": false,\n \"transactionDate\": \"2021-05-14T00:49:55.7510577Z\",\n \"estimatedTransferDate\": \"2021-05-18\",\n \"actualTransferDate\": null,\n \"source\": null,\n \"dishonour\": null,\n \"settlement\": null,\n \"fees\": {\n \"transactionFee\": 55,\n \"applicationFee\": 0,\n \"totalFee\": 55,\n \"currency\": \"AUD\",\n \"taxRate\": 0.1,\n \"convertedTransactionFee\": null,\n \"convertedApplicationFee\": null,\n \"convertedTotalFee\": null,\n \"convertedCurrency\": null,\n \"conversionRate\": null\n },\n \"status\": \"approved\"\n }\n ],\n \"refunds\": [],\n \"metadata\": null,\n \"nonce\": \"fdb06000-9d3f-4738-ab45-d8d9c7984e93\"\n }\n}" } ] } ] }, { "name": "Tokens", "item": [ { "name": "Create Card Token", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"publishableKey\": \"{{publishableKey}}\",\r\n \"cardNumber\": \"4242424242424242\",\r\n \"cvc\": \"123\",\r\n \"expiryMonth\": 12,\r\n \"expiryYear\": 2025,\r\n \"cardHolderName\": \"{{$randomFullName}}\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/tokens", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "tokens" ] } }, "response": [ { "name": "200 OK", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"publishableKey\": \"pk_test_XXXXXX\",\r\n \"cardNumber\": \"4242424242424242\",\r\n \"cvc\": \"123\",\r\n \"expiryMonth\": 12,\r\n \"expiryYear\": 2022,\r\n \"cardHolderName\": \"Ben Hotdog\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/tokens", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "tokens" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "271" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Encoding", "value": "gzip" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Mon, 19 Apr 2021 05:18:40 GMT" } ], "cookie": [], "body": "{\n \"token\": \"tkn_XXXXXXXXXXXXXXXXXXXXXX\",\n \"cardHolderName\": \"Ben Hotdog\",\n \"displayCardNumber\": \"4242\",\n \"expiryDate\": \"2022-12-01T00:00:00Z\",\n \"cardScheme\": \"visa\",\n \"origin\": \"AU\"\n}" }, { "name": "400 Bad Request", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"publishableKey\": \"pk_test_XXXXXXXXX\",\r\n \"cardNumber\": \"4242424242424242\",\r\n \"cvc\": \"123\",\r\n \"expiryMonth\": 12,\r\n \"expiryYear\": 2022,\r\n \"cardHolderName\": \"Ben Hotdog\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/tokens", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "tokens" ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "246" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Thu, 29 Apr 2021 11:23:08 GMT" } ], "cookie": [], "body": "[\n {\n \"propertyName\": \"\",\n \"errorMessage\": \"Invalid publishable key: pk_test_XXXXXXXXX\",\n \"attemptedValue\": null,\n \"customState\": null,\n \"severity\": 0,\n \"errorCode\": null,\n \"formattedMessageArguments\": null,\n \"formattedMessagePlaceholderValues\": null,\n \"resourceName\": null\n }\n]" } ] } ] }, { "name": "Plans", "item": [ { "name": "Create or Update Plan", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"id\": \"\", \r\n \"name\": \"20% Deposit with 20% Monthly\",\r\n \"fixedPayments\": [\r\n {\r\n \"amountInCents\": null,\r\n \"amountPercentage\": 0.20,\r\n \"description\": \"Upfront deposit\",\r\n \"cancelPlanOnFailure\": true,\r\n \"scheduledDateInterval\": \"days\",\r\n \"scheduledDateOffset\": 0\r\n }\r\n ],\r\n \"recurringPayment\": {\r\n \"amountInCents\": null,\r\n \"amountPercentage\": 0.2,\r\n \"description\": \"Monthly Repayment\",\r\n \"cancelPlanOnFailure\": false,\r\n \"startDateInterval\": \"months\",\r\n \"startDateOffset\": \"1\",\r\n \"endDateInterval\": null,\r\n \"endDateOffset\": null,\r\n \"frequencyInterval\": \"months\",\r\n \"frequencyOffset\": 1,\r\n \"endAfterNumberOfPayments\": null,\r\n \"endAfterTotalAmount\": null,\r\n \"endType\": \"subscription-fully-paid\"\r\n },\r\n \"metadata\": \"\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/plans", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "plans" ] } }, "response": [ { "name": "201 Created", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"id\": \"\", \r\n \"name\": \"25% Deposit with 10% Monthly\",\r\n \"freePeriods\" : [\r\n {\r\n \"startDateOffset\" : 1,\r\n \"startDateInterval\": \"days\",\r\n \"durationOffset\" : 1,\r\n \"durationInterval\" : \"months\",\r\n \"metadata\" : \"\"\r\n }\r\n ],\r\n \"fixedPayments\": [\r\n {\r\n \"amountInCents\": null,\r\n \"amountPercentage\": 0.25,\r\n \"description\": \"Upfront deposit\",\r\n \"cancelPlanOnFailure\": true,\r\n \"scheduledDateInterval\": \"days\",\r\n \"scheduledDateOffset\": 0\r\n }\r\n ],\r\n \"recurringPayment\": {\r\n \"amountInCents\": null,\r\n \"amountPercentage\": 0.1,\r\n \"description\": \"Monthly Repayment\",\r\n \"cancelPlanOnFailure\": false,\r\n \"startDateInterval\": \"months\",\r\n \"startDateOffset\": \"1\",\r\n \"endDateInterval\": null,\r\n \"endDateOffset\": null,\r\n \"frequencyInterval\": \"months\",\r\n \"frequencyOffset\": 1,\r\n \"endAfterNumberOfPayments\": null,\r\n \"endAfterTotalAmount\": null,\r\n \"endType\": \"subscription-fully-paid\"\r\n },\r\n \"metadata\": \"\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/plans", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "plans" ] } }, "status": "Created", "code": 201, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "827" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Location", "value": "https://api.getpinch.com.au/test/Plans?id=pln_rp0JFLx6qYaPGS" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Mon, 19 Apr 2021 07:58:21 GMT" } ], "cookie": [], "body": "{\n \"id\": \"pln_XXXXXX\",\n \"name\": \"25% Deposit with 10% Monthly\",\n \"freePeriods\": [\n {\n \"startDateOffset\": 1,\n \"startDateInterval\": \"days\",\n \"durationOffset\": 1,\n \"durationInterval\": \"months\",\n \"metadata\": \"\"\n }\n ],\n \"fixedPayments\": [\n {\n \"amountInCents\": null,\n \"amountPercentage\": 0.25,\n \"description\": \"Upfront deposit\",\n \"scheduledDateOffset\": 0,\n \"scheduledDateInterval\": \"days\",\n \"cancelPlanOnFailure\": true,\n \"metadata\": null\n }\n ],\n \"recurringPayment\": {\n \"amountInCents\": null,\n \"amountPercentage\": 0.1,\n \"description\": \"Monthly Repayment\",\n \"startDateOffset\": 1,\n \"startDateInterval\": \"months\",\n \"frequencyOffset\": 1,\n \"frequencyInterval\": \"months\",\n \"endType\": \"subscription-fully-paid\",\n \"endDateOffset\": null,\n \"endDateInterval\": null,\n \"endAfterNumberOfPayments\": null,\n \"endAfterTotalAmount\": null,\n \"cancelPlanOnFailure\": false,\n \"metadata\": null\n },\n \"subscriberCount\": 0,\n \"requiresTotalAmount\": true,\n \"metadata\": \"\"\n}" }, { "name": "200 OK", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"id\": \"pln_XXXXXX\", \r\n \"name\": \"20% Deposit with 20% Monthly\",\r\n \"freePeriods\" : [\r\n {\r\n \"startDateOffset\" : 1,\r\n \"startDateInterval\": \"days\",\r\n \"durationOffset\" : 1,\r\n \"durationInterval\" : \"months\",\r\n \"metadata\" : \"\"\r\n }\r\n ],\r\n \"fixedPayments\": [\r\n {\r\n \"amountInCents\": null,\r\n \"amountPercentage\": 0.20,\r\n \"description\": \"Upfront deposit\",\r\n \"cancelPlanOnFailure\": true,\r\n \"scheduledDateInterval\": \"days\",\r\n \"scheduledDateOffset\": 0\r\n }\r\n ],\r\n \"recurringPayment\": {\r\n \"amountInCents\": null,\r\n \"amountPercentage\": 0.2,\r\n \"description\": \"Monthly Repayment\",\r\n \"cancelPlanOnFailure\": false,\r\n \"startDateInterval\": \"months\",\r\n \"startDateOffset\": \"1\",\r\n \"endDateInterval\": null,\r\n \"endDateOffset\": null,\r\n \"frequencyInterval\": \"months\",\r\n \"frequencyOffset\": 1,\r\n \"endAfterNumberOfPayments\": null,\r\n \"endAfterTotalAmount\": null,\r\n \"endType\": \"subscription-fully-paid\"\r\n },\r\n \"metadata\": \"\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/plans", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "plans" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "505" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Encoding", "value": "gzip" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Mon, 19 Apr 2021 08:00:02 GMT" } ], "cookie": [], "body": "{\n \"id\": \"pln_XXXXXX\",\n \"name\": \"20% Deposit with 20% Monthly\",\n \"freePeriods\": [\n {\n \"startDateOffset\": 1,\n \"startDateInterval\": \"days\",\n \"durationOffset\": 1,\n \"durationInterval\": \"months\",\n \"metadata\": \"\"\n }\n ],\n \"fixedPayments\": [\n {\n \"amountInCents\": null,\n \"amountPercentage\": 0.2,\n \"description\": \"Upfront deposit\",\n \"scheduledDateOffset\": 0,\n \"scheduledDateInterval\": \"days\",\n \"cancelPlanOnFailure\": true,\n \"metadata\": null\n }\n ],\n \"recurringPayment\": {\n \"amountInCents\": null,\n \"amountPercentage\": 0.2,\n \"description\": \"Monthly Repayment\",\n \"startDateOffset\": 1,\n \"startDateInterval\": \"months\",\n \"frequencyOffset\": 1,\n \"frequencyInterval\": \"months\",\n \"endType\": \"subscription-fully-paid\",\n \"endDateOffset\": null,\n \"endDateInterval\": null,\n \"endAfterNumberOfPayments\": null,\n \"endAfterTotalAmount\": null,\n \"cancelPlanOnFailure\": false,\n \"metadata\": null\n },\n \"subscriberCount\": 0,\n \"requiresTotalAmount\": true,\n \"metadata\": \"\"\n}" }, { "name": "400 Bad Request", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"id\": \"\", \r\n \"name\": \"20% Deposit with 20% Monthly\",\r\n \"fixedPayments\": [\r\n {\r\n \"amountInCents\": null,\r\n \"amountPercentage\": 0.20,\r\n \"description\": \"Upfront deposit\",\r\n \"cancelPlanOnFailure\": true,\r\n \"scheduledDateInterval\": \"days\",\r\n \"scheduledDateOffset\": -500\r\n }\r\n ],\r\n \"recurringPayment\": {\r\n \"amountInCents\": null,\r\n \"amountPercentage\": 0.2,\r\n \"description\": \"Monthly Repayment\",\r\n \"cancelPlanOnFailure\": false,\r\n \"startDateInterval\": \"months\",\r\n \"startDateOffset\": \"1\",\r\n \"endDateInterval\": null,\r\n \"endDateOffset\": null,\r\n \"frequencyInterval\": \"months\",\r\n \"frequencyOffset\": 1,\r\n \"endAfterNumberOfPayments\": null,\r\n \"endAfterTotalAmount\": null,\r\n \"endType\": \"subscription-fully-paid\"\r\n },\r\n \"metadata\": \"\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/plans", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "plans" ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "1567" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Thu, 29 Apr 2021 05:45:36 GMT" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"propertyName\": \"ScheduledDateOffset\",\n \"errorMessage\": \"'Scheduled Date Offset' must be between 0 and 9999. You entered -500.\",\n \"attemptedValue\": -500,\n \"customState\": null,\n \"severity\": 0,\n \"errorCode\": \"InclusiveBetweenValidator\",\n \"formattedMessageArguments\": [],\n \"formattedMessagePlaceholderValues\": {\n \"From\": 0,\n \"To\": 9999,\n \"Value\": -500,\n \"PropertyName\": \"Scheduled Date Offset\",\n \"PropertyValue\": -500\n },\n \"resourceName\": \"InclusiveBetweenValidator\"\n }\n ],\n \"inlineErrors\": {\n \"id\": \"\",\n \"name\": \"20% Deposit with 20% Monthly\",\n \"metadata\": \"\",\n \"freePeriods\": [],\n \"fixedPayments\": [\n {\n \"amountInCents\": null,\n \"amountPercentage\": 0.2,\n \"description\": \"Upfront deposit\",\n \"scheduledDateOffset\": -500,\n \"scheduledDateInterval\": \"days\",\n \"cancelPlanOnFailure\": true,\n \"metadata\": null,\n \"errors\": [\n {\n \"propertyName\": \"ScheduledDateOffset\",\n \"errorMessage\": \"'Scheduled Date Offset' must be between 0 and 9999. You entered -500.\",\n \"attemptedValue\": -500,\n \"customState\": null,\n \"severity\": 0,\n \"errorCode\": \"InclusiveBetweenValidator\",\n \"formattedMessageArguments\": [],\n \"formattedMessagePlaceholderValues\": {\n \"From\": 0,\n \"To\": 9999,\n \"Value\": -500,\n \"PropertyName\": \"Scheduled Date Offset\",\n \"PropertyValue\": -500\n },\n \"resourceName\": \"InclusiveBetweenValidator\"\n }\n ]\n }\n ],\n \"recurringPayment\": {\n \"amountInCents\": null,\n \"amountPercentage\": 0.2,\n \"description\": \"Monthly Repayment\",\n \"startDateOffset\": 1,\n \"startDateInterval\": \"months\",\n \"frequencyOffset\": 1,\n \"frequencyInterval\": \"months\",\n \"endType\": \"subscription-fully-paid\",\n \"endDateOffset\": null,\n \"endDateInterval\": null,\n \"endAfterNumberOfPayments\": null,\n \"endAfterTotalAmount\": null,\n \"cancelPlanOnFailure\": false,\n \"metadata\": null,\n \"errors\": []\n },\n \"errors\": []\n }\n}" } ] }, { "name": "Get Plan", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/plans/:id", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "plans", ":id" ], "variable": [ { "key": "id", "value": "", "description": "Plan Id in pln_XXXXXXXXXXXXXX format" } ] } }, "response": [ { "name": "200 OK", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/plans/pln_XXXXXXXXXXXXXX", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "plans", "pln_XXXXXXXXXXXXXX" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "512" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Encoding", "value": "gzip" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Tue, 20 Apr 2021 00:19:32 GMT" } ], "cookie": [], "body": "{\n \"id\": \"pln_XXXXXXXXXXXXXX\",\n \"name\": \"25% Deposit with 10% Monthly\",\n \"freePeriods\": [\n {\n \"startDateOffset\": 1,\n \"startDateInterval\": \"days\",\n \"durationOffset\": 1,\n \"durationInterval\": \"months\",\n \"metadata\": \"\"\n }\n ],\n \"fixedPayments\": [\n {\n \"amountInCents\": null,\n \"amountPercentage\": 0.25,\n \"description\": \"Upfront deposit\",\n \"scheduledDateOffset\": 0,\n \"scheduledDateInterval\": \"days\",\n \"cancelPlanOnFailure\": true,\n \"metadata\": null\n }\n ],\n \"recurringPayment\": {\n \"amountInCents\": null,\n \"amountPercentage\": 0.1,\n \"description\": \"Monthly Repayment\",\n \"startDateOffset\": 1,\n \"startDateInterval\": \"months\",\n \"frequencyOffset\": 1,\n \"frequencyInterval\": \"months\",\n \"endType\": \"subscription-fully-paid\",\n \"endDateOffset\": null,\n \"endDateInterval\": null,\n \"endAfterNumberOfPayments\": null,\n \"endAfterTotalAmount\": null,\n \"cancelPlanOnFailure\": false,\n \"metadata\": null\n },\n \"subscriberCount\": 0,\n \"requiresTotalAmount\": true,\n \"metadata\": \"\"\n}" }, { "name": "400 Bad Request", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/plans/:id", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "plans", ":id" ], "variable": [ { "key": "id", "value": "pln_XXXXXXXXXXXXXX", "description": "Plan Id in pln_XXXXXXXXXXXXXX format" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "253" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Fri, 30 Apr 2021 00:41:55 GMT" } ], "cookie": [], "body": "[\n {\n \"propertyName\": \"\",\n \"errorMessage\": \"Could not find a plan with id: pln_XXXXXXXXXXXXXX\",\n \"attemptedValue\": null,\n \"customState\": null,\n \"severity\": 0,\n \"errorCode\": null,\n \"formattedMessageArguments\": null,\n \"formattedMessagePlaceholderValues\": null,\n \"resourceName\": null\n }\n]" } ] }, { "name": "List Plans", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/plans?page=&pageSize=", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "plans" ], "query": [ { "key": "page", "value": "", "description": "Default: 1" }, { "key": "pageSize", "value": "", "description": "Default: 50" } ] } }, "response": [ { "name": "200 OK", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/plans?page=&pageSize=", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "plans" ], "query": [ { "key": "page", "value": "", "description": "Default: 1" }, { "key": "pageSize", "value": "", "description": "Default: 50" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "654" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Encoding", "value": "gzip" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Tue, 20 Apr 2021 00:45:00 GMT" } ], "cookie": [], "body": "{\n \"page\": 1,\n \"pageSize\": 50,\n \"totalPages\": 1,\n \"totalItems\": 3,\n \"data\": [\n {\n \"id\": \"pln_XXXXXX\",\n \"name\": \"20% Deposit with 20% Monthly\",\n \"freePeriods\": [\n {\n \"startDateOffset\": 1,\n \"startDateInterval\": \"days\",\n \"durationOffset\": 1,\n \"durationInterval\": \"months\",\n \"metadata\": \"\"\n }\n ],\n \"fixedPayments\": [\n {\n \"amountInCents\": null,\n \"amountPercentage\": 0.2,\n \"description\": \"Upfront deposit\",\n \"scheduledDateOffset\": 0,\n \"scheduledDateInterval\": \"days\",\n \"cancelPlanOnFailure\": true,\n \"metadata\": null\n }\n ],\n \"recurringPayment\": {\n \"amountInCents\": null,\n \"amountPercentage\": 0.2,\n \"description\": \"Monthly Repayment\",\n \"startDateOffset\": 1,\n \"startDateInterval\": \"months\",\n \"frequencyOffset\": 1,\n \"frequencyInterval\": \"months\",\n \"endType\": \"subscription-fully-paid\",\n \"endDateOffset\": null,\n \"endDateInterval\": null,\n \"endAfterNumberOfPayments\": null,\n \"endAfterTotalAmount\": null,\n \"cancelPlanOnFailure\": false,\n \"metadata\": null\n },\n \"subscriberCount\": 0,\n \"requiresTotalAmount\": true,\n \"metadata\": \"\"\n },\n {\n \"id\": \"pln_XXXXXX2\",\n \"name\": \"20% Deposit with 20% Monthly\",\n \"freePeriods\": [\n {\n \"startDateOffset\": 1,\n \"startDateInterval\": \"days\",\n \"durationOffset\": 1,\n \"durationInterval\": \"months\",\n \"metadata\": \"\"\n }\n ],\n \"fixedPayments\": [\n {\n \"amountInCents\": null,\n \"amountPercentage\": 0.2,\n \"description\": \"Upfront deposit\",\n \"scheduledDateOffset\": 0,\n \"scheduledDateInterval\": \"days\",\n \"cancelPlanOnFailure\": true,\n \"metadata\": null\n }\n ],\n \"recurringPayment\": {\n \"amountInCents\": null,\n \"amountPercentage\": 0.2,\n \"description\": \"Monthly Repayment\",\n \"startDateOffset\": 1,\n \"startDateInterval\": \"months\",\n \"frequencyOffset\": 1,\n \"frequencyInterval\": \"months\",\n \"endType\": \"subscription-fully-paid\",\n \"endDateOffset\": null,\n \"endDateInterval\": null,\n \"endAfterNumberOfPayments\": null,\n \"endAfterTotalAmount\": null,\n \"cancelPlanOnFailure\": false,\n \"metadata\": null\n },\n \"subscriberCount\": 0,\n \"requiresTotalAmount\": true,\n \"metadata\": \"\"\n },\n {\n \"id\": \"pln_XXXXXX3\",\n \"name\": \"25% Deposit with 10% Monthly\",\n \"freePeriods\": [\n {\n \"startDateOffset\": 1,\n \"startDateInterval\": \"days\",\n \"durationOffset\": 1,\n \"durationInterval\": \"months\",\n \"metadata\": \"\"\n }\n ],\n \"fixedPayments\": [\n {\n \"amountInCents\": null,\n \"amountPercentage\": 0.25,\n \"description\": \"Upfront deposit\",\n \"scheduledDateOffset\": 0,\n \"scheduledDateInterval\": \"days\",\n \"cancelPlanOnFailure\": true,\n \"metadata\": null\n }\n ],\n \"recurringPayment\": {\n \"amountInCents\": null,\n \"amountPercentage\": 0.1,\n \"description\": \"Monthly Repayment\",\n \"startDateOffset\": 1,\n \"startDateInterval\": \"months\",\n \"frequencyOffset\": 1,\n \"frequencyInterval\": \"months\",\n \"endType\": \"subscription-fully-paid\",\n \"endDateOffset\": null,\n \"endDateInterval\": null,\n \"endAfterNumberOfPayments\": null,\n \"endAfterTotalAmount\": null,\n \"cancelPlanOnFailure\": false,\n \"metadata\": null\n },\n \"subscriberCount\": 0,\n \"requiresTotalAmount\": true,\n \"metadata\": \"\"\n }\n ]\n}" } ] }, { "name": "Delete Plan", "request": { "method": "DELETE", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/plans/:id", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "plans", ":id" ], "variable": [ { "key": "id", "value": "pln_XXXXXXXXXXXXXX", "description": "Plan Id in pln_XXXXXXXXXXXXXX format" } ] } }, "response": [ { "name": "200 OK", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/plans/pln_XXXXXXXXXXXXXX", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "plans", "pln_XXXXXXXXXXXXXX" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "plain", "header": [ { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Tue, 20 Apr 2021 00:56:42 GMT" }, { "key": "Content-Length", "value": "0" } ], "cookie": [], "body": "" }, { "name": "400 Bad Request", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/plans/:id", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "plans", ":id" ], "variable": [ { "key": "id", "value": "pln_XXXXXXXXXXXXXX", "description": "Plan Id in pln_XXXXXXXXXXXXXX format" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "248" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Fri, 30 Apr 2021 00:43:32 GMT" } ], "cookie": [], "body": "[\n {\n \"propertyName\": \"id\",\n \"errorMessage\": \"Plan with id: pln_XXXXXXXXXXXXXX not found\",\n \"attemptedValue\": null,\n \"customState\": null,\n \"severity\": 0,\n \"errorCode\": null,\n \"formattedMessageArguments\": null,\n \"formattedMessagePlaceholderValues\": null,\n \"resourceName\": null\n }\n]" } ] }, { "name": "Calculated Payments for Plan", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/plans/{id}/calculated-payments?startDate=&totalAmount=&skip&limit", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "plans", "{id}", "calculated-payments" ], "query": [ { "key": "startDate", "value": "" }, { "key": "totalAmount", "value": "" }, { "key": "skip", "value": "" }, { "key": "limit", "value": "" } ] } }, "response": [ { "name": "200 OK", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/plans/pln_XXXXXX/calculated-payments?startDate=&totalAmount=1000&skip&limit", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "plans", "pln_XXXXXX", "calculated-payments" ], "query": [ { "key": "startDate", "value": "" }, { "key": "totalAmount", "value": "1000" }, { "key": "skip", "value": null }, { "key": "limit", "value": null } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "278" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Encoding", "value": "gzip" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Tue, 20 Apr 2021 04:31:56 GMT" } ], "cookie": [], "body": "[\n {\n \"amountInCents\": 200,\n \"description\": \"Upfront deposit\",\n \"paymentDate\": \"2021-04-19T14:00:00.0000000Z\",\n \"recurringPaymentIndex\": null\n },\n {\n \"amountInCents\": 200,\n \"description\": \"Monthly Repayment\",\n \"paymentDate\": \"2021-05-19T14:00:00.0000000Z\",\n \"recurringPaymentIndex\": 0\n },\n {\n \"amountInCents\": 200,\n \"description\": \"Monthly Repayment\",\n \"paymentDate\": \"2021-06-19T14:00:00.0000000Z\",\n \"recurringPaymentIndex\": 1\n },\n {\n \"amountInCents\": 200,\n \"description\": \"Monthly Repayment\",\n \"paymentDate\": \"2021-07-19T14:00:00.0000000Z\",\n \"recurringPaymentIndex\": 2\n },\n {\n \"amountInCents\": 200,\n \"description\": \"Monthly Repayment\",\n \"paymentDate\": \"2021-08-19T14:00:00.0000000Z\",\n \"recurringPaymentIndex\": 3\n }\n]" }, { "name": "400 Bad Request", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/plans/:id/calculated-payments?startDate=&totalAmount=&skip&limit", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "plans", ":id", "calculated-payments" ], "query": [ { "key": "startDate", "value": "" }, { "key": "totalAmount", "value": "" }, { "key": "skip", "value": null }, { "key": "limit", "value": null } ], "variable": [ { "key": "id", "value": "pln_XXXXXXXXXXXXXX", "description": "Plan Id in pln_XXXXXXXXXXXXXX format" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "252" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=" }, { "key": "X-SourceFiles", "value": "=?UTF-8?B?QzpcRGV2XEFwcHNcUGluY2hcUGluY2hcc3JjXFBpbmNoLkFwaVx0ZXN0XHBsYW5zXHBsbl9YWFhYWFhYWFhYWFhYWFxjYWxjdWxhdGVkLXBheW1lbnRz?=" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Fri, 30 Apr 2021 01:16:18 GMT" } ], "cookie": [], "body": "[\n {\n \"propertyName\": \"PlanId\",\n \"errorMessage\": \"Plan with Id pln_XXXXXXXXXXXXXX not found.\",\n \"attemptedValue\": null,\n \"customState\": null,\n \"severity\": 0,\n \"errorCode\": null,\n \"formattedMessageArguments\": null,\n \"formattedMessagePlaceholderValues\": null,\n \"resourceName\": null\n }\n]" } ] } ] }, { "name": "Subscriptions", "item": [ { "name": "Create Subscription", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"planId\": \"pln_XXXXXXXXXXXXXX\",\r\n \"payerId\": \"pyr_XXXXXXXXXXXXXX\",\r\n \"totalAmount\": 100000,\r\n \"startDate\": \"{{tomorrow}}\",\r\n \"surcharge\": [\r\n \"bank-account\",\r\n \"credit-card\"\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/subscriptions", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "subscriptions" ] } }, "response": [ { "name": "201 Created", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"planId\": \"pln_XXXXXXXXXXXXXX\",\r\n \"payerId\": \"pyr_XXXXXXXXXXXXXX\",\r\n \"totalAmount\": 100000,\r\n \"startDate\": \"2021-05-22\",\r\n \"surcharge\": [\r\n \"bank-account\",\r\n \"credit-card\"\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/subscriptions", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "subscriptions" ] } }, "status": "Created", "code": 201, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "1088" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Location", "value": "https://api.getpinch.com.au/test/Subscriptions?id=sub_glW6VXNM5KSJPV" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Tue, 20 Apr 2021 23:49:51 GMT" } ], "cookie": [], "body": "{\n \"id\": \"sub_XXXXXXXXXXXXXX\",\n \"payer\": {\n \"id\": \"pyr_XXXXXXXXXXXXXX\",\n \"firstName\": \"Ben\",\n \"lastName\": \"Hotdog\",\n \"emailAddress\": \"ben.hotdog@mailinator.com\",\n \"mobileNumber\": null,\n \"streetAddress\": null,\n \"suburb\": null,\n \"postcode\": null,\n \"state\": null,\n \"country\": null,\n \"companyName\": null,\n \"companyRegistrationNumber\": null,\n \"metadata\": null\n },\n \"planId\": \"pln_XXXXXXXXXXXXXX\",\n \"planName\": \"20% Deposit with 20% Monthly\",\n \"status\": \"active\",\n \"startDate\": \"2021-05-21T14:00:00.0000000Z\",\n \"freePeriods\": [\n {\n \"startDate\": \"2021-05-21T14:00:00.0000000Z\",\n \"durationOffset\": 1,\n \"durationInterval\": \"months\",\n \"metadata\": \"\"\n }\n ],\n \"fixedPayments\": [\n {\n \"amount\": 20000,\n \"description\": \"Upfront deposit\",\n \"cancelPlanOnFailure\": true,\n \"metadata\": null,\n \"transactionDate\": \"2021-05-21T14:00:00.0000000Z\"\n }\n ],\n \"recurringPayment\": {\n \"amount\": 20000,\n \"endAfterNumberOfPayments\": null,\n \"endAfterTotalAmount\": null,\n \"frequencyInterval\": \"months\",\n \"frequencyOffset\": 1,\n \"description\": \"Monthly Repayment\",\n \"cancelPlanOnFailure\": false,\n \"metadata\": null,\n \"endAfterDate\": null,\n \"startDate\": \"2021-06-21T14:00:00.0000000Z\"\n },\n \"totalAmount\": 100000,\n \"metadata\": \"\",\n \"surcharge\": [\n \"bank-account\",\n \"credit-card\"\n ]\n}" }, { "name": "400 Bad Request", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"planId\": \"pln_XXXXXX\",\r\n \"payerId\": \"pyr_XXXXXX\",\r\n \"totalAmount\": 100000,\r\n \"startDate\": \"2021-05-22\",\r\n \"surcharge\": [\r\n \"bank-account\",\r\n \"credit-card\"\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/subscriptions", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "subscriptions" ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "253" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Tue, 20 Apr 2021 23:55:49 GMT" } ], "cookie": [], "body": "[\n {\n \"propertyName\": \"\",\n \"errorMessage\": \"Could not find a plan with id: pln_XXXXXX\",\n \"attemptedValue\": null,\n \"customState\": null,\n \"severity\": 0,\n \"errorCode\": null,\n \"formattedMessageArguments\": null,\n \"formattedMessagePlaceholderValues\": null,\n \"resourceName\": null\n }\n]" } ] }, { "name": "List Subscriptions", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/subscriptions?page=&pageSize=", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "subscriptions" ], "query": [ { "key": "page", "value": "", "description": "Default: 1" }, { "key": "pageSize", "value": "", "description": "Default: 50" } ] } }, "response": [ { "name": "200 OK", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/subscriptions?page=&pageSize=", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "subscriptions" ], "query": [ { "key": "page", "value": "", "description": "Default: 1" }, { "key": "pageSize", "value": "", "description": "Default: 50" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "724" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Encoding", "value": "gzip" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Wed, 21 Apr 2021 00:05:58 GMT" } ], "cookie": [], "body": "{\n \"page\": 1,\n \"pageSize\": 50,\n \"totalPages\": 1,\n \"totalItems\": 1,\n \"data\": [\n {\n \"id\": \"sub_\",\n \"payer\": {\n \"id\": \"pyr_\",\n \"firstName\": \"Ben\",\n \"lastName\": \"Hotdog\",\n \"emailAddress\": \"ben.hotdog@mailinator.com\",\n \"mobileNumber\": null,\n \"streetAddress\": null,\n \"suburb\": null,\n \"postcode\": null,\n \"state\": null,\n \"country\": null,\n \"companyName\": null,\n \"companyRegistrationNumber\": null,\n \"metadata\": null\n },\n \"planId\": \"pln_rp0JFLx6qYaPGS\",\n \"planName\": \"25% Deposit with 10% Monthly\",\n \"status\": \"active\",\n \"startDate\": \"2021-05-21T14:00:00.0000000Z\",\n \"freePeriods\": [\n {\n \"startDate\": \"2021-05-21T14:00:00.0000000Z\",\n \"durationOffset\": 1,\n \"durationInterval\": \"months\",\n \"metadata\": \"\"\n }\n ],\n \"fixedPayments\": [\n {\n \"amount\": 25000,\n \"description\": \"Upfront deposit\",\n \"cancelPlanOnFailure\": true,\n \"metadata\": null,\n \"transactionDate\": \"2021-05-21T14:00:00.0000000Z\"\n }\n ],\n \"recurringPayment\": {\n \"amount\": 10000,\n \"endAfterNumberOfPayments\": null,\n \"endAfterTotalAmount\": null,\n \"frequencyInterval\": \"months\",\n \"frequencyOffset\": 1,\n \"description\": \"Monthly Repayment\",\n \"cancelPlanOnFailure\": false,\n \"metadata\": null,\n \"endAfterDate\": null,\n \"startDate\": \"2021-06-21T14:00:00.0000000Z\"\n },\n \"totalAmount\": 100000,\n \"metadata\": \"\",\n \"surcharge\": [\n \"bank-account\",\n \"credit-card\"\n ]\n }\n ]\n}" } ] }, { "name": "Get Subscription", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/subscriptions/:id", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "subscriptions", ":id" ], "variable": [ { "key": "id", "value": "", "description": "Subscription Id in sub_XXXXXXXXXXXXXX format" } ] } }, "response": [ { "name": "200 OK", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/subscriptions/sub_", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "subscriptions", "sub_" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "684" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Encoding", "value": "gzip" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Wed, 21 Apr 2021 00:12:25 GMT" } ], "cookie": [], "body": "{\n \"id\": \"sub_XXXXXXXXXXXXXX\",\n \"payer\": {\n \"id\": \"pyr_XXXXXXXXXXXXXX\",\n \"firstName\": \"Ben\",\n \"lastName\": \"Hotdog\",\n \"emailAddress\": \"ben.hotdog@mailinator.com\",\n \"mobileNumber\": null,\n \"streetAddress\": null,\n \"suburb\": null,\n \"postcode\": null,\n \"state\": null,\n \"country\": null,\n \"companyName\": null,\n \"companyRegistrationNumber\": null,\n \"metadata\": null\n },\n \"planId\": \"pln_XXXXXXXXXXXXXX\",\n \"planName\": \"25% Deposit with 10% Monthly\",\n \"status\": \"active\",\n \"startDate\": \"2021-05-21T14:00:00.0000000Z\",\n \"freePeriods\": [\n {\n \"startDate\": \"2021-05-21T14:00:00.0000000Z\",\n \"durationOffset\": 1,\n \"durationInterval\": \"months\",\n \"metadata\": \"\"\n }\n ],\n \"fixedPayments\": [\n {\n \"amount\": 25000,\n \"description\": \"Upfront deposit\",\n \"cancelPlanOnFailure\": true,\n \"metadata\": null,\n \"transactionDate\": \"2021-05-21T14:00:00.0000000Z\"\n }\n ],\n \"recurringPayment\": {\n \"amount\": 10000,\n \"endAfterNumberOfPayments\": null,\n \"endAfterTotalAmount\": null,\n \"frequencyInterval\": \"months\",\n \"frequencyOffset\": 1,\n \"description\": \"Monthly Repayment\",\n \"cancelPlanOnFailure\": false,\n \"metadata\": null,\n \"endAfterDate\": null,\n \"startDate\": \"2021-06-21T14:00:00.0000000Z\"\n },\n \"totalAmount\": 100000,\n \"metadata\": \"\",\n \"surcharge\": [\n \"bank-account\",\n \"credit-card\"\n ]\n}" }, { "name": "400 Bad Request", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/subscriptions/:id", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "subscriptions", ":id" ], "variable": [ { "key": "id", "value": "sub_XXXXXXXXXXXXXX", "description": "Subscription Id in sub_XXXXXXXXXXXXXX format" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "249" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:7a9feec7-06e6-4091-a7d8-f6f4ef30d688" }, { "key": "X-SourceFiles", "value": "=?UTF-8?B?QzpcRGV2XEFwcHNcUGluY2hcUGluY2hcc3JjXFBpbmNoLkFwaVx0ZXN0XHN1YnNjcmlwdGlvbnNcZmZmZg==?=" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Fri, 30 Apr 2021 02:13:05 GMT" } ], "cookie": [], "body": "[\n {\n \"propertyName\": \"SubscriptionId\",\n \"errorMessage\": \"Subscription Id sub_XXXXXXXXXXXXXX not found.\",\n \"attemptedValue\": null,\n \"customState\": null,\n \"severity\": 0,\n \"errorCode\": null,\n \"formattedMessageArguments\": null,\n \"formattedMessagePlaceholderValues\": null,\n \"resourceName\": null\n }\n]" } ] }, { "name": "Cancel Subscription", "request": { "method": "DELETE", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/subscriptions/:id", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "subscriptions", ":id" ], "variable": [ { "key": "id", "value": "", "description": "Subscription Id in sub_XXXXXXXXXXXXXX format" } ] } }, "response": [ { "name": "200 OK", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/subscriptions/sub_XXXXXXXXXXXXXX", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "subscriptions", "sub_XXXXXXXXXXXXXX" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "plain", "header": [ { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Wed, 21 Apr 2021 00:40:40 GMT" }, { "key": "Content-Length", "value": "0" } ], "cookie": [], "body": "" }, { "name": "400 Bad Request", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/subscriptions/:id", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "subscriptions", ":id" ], "variable": [ { "key": "id", "value": "sub_XXXXXXXXXXXXXX", "description": "Subscription Id in sub_XXXXXXXXXXXXXX format" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "296" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:7a9feec7-06e6-4091-a7d8-f6f4ef30d688" }, { "key": "X-SourceFiles", "value": "=?UTF-8?B?QzpcRGV2XEFwcHNcUGluY2hcUGluY2hcc3JjXFBpbmNoLkFwaVx0ZXN0XHN1YnNjcmlwdGlvbnNcc3ViX1hYWFhYWFhYWFhYWFhY?=" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Fri, 30 Apr 2021 02:14:55 GMT" } ], "cookie": [], "body": "{\n \"errorMessages\": [\n {\n \"propertyName\": \"\",\n \"errorMessage\": \"Could not find subscription with id: sub_XXXXXXXXXXXXXX\",\n \"attemptedValue\": null,\n \"customState\": null,\n \"severity\": 0,\n \"errorCode\": null,\n \"formattedMessageArguments\": null,\n \"formattedMessagePlaceholderValues\": null,\n \"resourceName\": null\n }\n ],\n \"successful\": false\n}" } ] } ] }, { "name": "Merchants", "item": [ { "name": "Update Merchant", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"companyName\": \"{{$randomCompanyName}}\",\r\n \"legalEntityName\": null,\r\n \"companyEmail\": \"{{$randomExampleEmail}}\",\r\n \"companyPhone\": \"0400000000\",\r\n \"companyWebsiteUrl\": \"{{$randomUrl}}\",\r\n \"companyRegistrationNumber\": null,\r\n \"bankAccountRoutingNumber\": \"\",\r\n \"bankAccountNumber\": \"\",\r\n \"bankAccountName\": \"\",\r\n \"streetAddress\": \"{{$randomStreetAddress}}\",\r\n \"suburb\": \"{{$randomCity}}\",\r\n \"state\": \"QLD\",\r\n \"postcode\": \"4000\",\r\n \"country\": \"AU\",\r\n \"bankStatementLabel\": \"\",\r\n \"natureOfBusiness\": null,\r\n \"organisationType\": \"\",\r\n \"notes\" : \"\",\r\n \"contacts\": [\r\n {\r\n \"id\": \"con_XXXXXXXXXXXXX\",\r\n \"isPrimaryContact\": false,\r\n \"firstName\": \"{{$randomFirstName}}\",\r\n \"lastName\": \"{{$randomLastName}}\",\r\n \"email\": \"{{$randomExampleEmail}}\",\r\n \"phone\": \"0400000000\",\r\n \"streetAddress\": \"{{$randomStreetAddress}}\",\r\n \"suburb\": \"{{$randomCity}}\",\r\n \"postcode\": \"4000\",\r\n \"state\": \"QLD\",\r\n \"country\": \"Australia\",\r\n \"dob\": \"{{$randomDatePast}}\",\r\n \"governmentNumberSupplied\": false,\r\n \"contactType\": \"\",\r\n \"ownership\": null,\r\n \"jobTitle\": \"{{$randomJobTitle}}\"\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/merchants/update", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "merchants", "update" ] } }, "response": [ { "name": "200 OK", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"companyName\": \"Test Merchant 123\",\r\n \"legalEntityName\": null,\r\n \"companyEmail\": \"test.merchant@mailinator.com\",\r\n \"companyPhone\": null,\r\n \"companyWebsiteUrl\": null,\r\n \"companyRegistrationNumber\": null,\r\n \"bankAccountRoutingNumber\": \"000000\",\r\n \"bankAccountNumber\": \"000000000\",\r\n \"bankAccountName\": \"Test Bank Account\",\r\n \"streetAddress\": null,\r\n \"suburb\": null,\r\n \"state\": null,\r\n \"postcode\": null,\r\n \"country\": \"AU\",\r\n \"bankStatementLabel\": \"TEST MERCHANT\",\r\n \"natureOfBusiness\": null,\r\n \"organisationType\": \"\",\r\n \"notes\" : \"\",\r\n \"contacts\": [\r\n {\r\n \"id\": \"con_xxxxxx\",\r\n \"isPrimaryContact\": false,\r\n \"firstName\": \"Test\",\r\n \"lastName\": \"Contact\",\r\n \"email\": \"test.contact@mailinator.com\",\r\n \"phone\": null,\r\n \"streetAddress\": null,\r\n \"suburb\": null,\r\n \"postcode\": null,\r\n \"state\": null,\r\n \"country\": null,\r\n \"dob\": null,\r\n \"governmentNumberSupplied\": false,\r\n \"contactType\": \"\",\r\n \"ownership\": null,\r\n \"jobTitle\": null\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/merchants/update", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "merchants", "update" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "743" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Encoding", "value": "gzip" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Wed, 21 Apr 2021 00:57:45 GMT" } ], "cookie": [], "body": "{\n \"id\": \"mch_XXXXXX\",\n \"testMerchantId\": \"mch_test_XXXXX\",\n \"testOnlyMerchant\": false,\n \"companyName\": \"Test Merchant 123\",\n \"legalEntityName\": null,\n \"companyEmail\": \"test.merchant@mailinator.com\",\n \"companyPhone\": null,\n \"companyWebsiteUrl\": null,\n \"companyRegistrationNumber\": null,\n \"bankAccountRoutingNumber\": \"000000\",\n \"bankAccountNumber\": \"000000000\",\n \"bankAccountName\": \"Test Bank Account\",\n \"streetAddress\": null,\n \"suburb\": null,\n \"state\": null,\n \"postcode\": null,\n \"country\": \"AU\",\n \"bankStatementLabel\": \"TEST MERCHANT\",\n \"createdDateUtc\": \"2021-04-14T00:30:18.226759\",\n \"logoUrl\": null,\n \"natureOfBusiness\": null,\n \"organisationType\": \"\",\n \"compliance\": {\n \"merchantNotes\": \"New Merchant Created\",\n \"propertyErrors\": null,\n \"complianceOfficerNotes\": null,\n \"status\": \"new\",\n \"submissionDate\": \"2021-04-14T00:30:18.8283947Z\",\n \"decisionDate\": null,\n \"liveEnabled\": false,\n \"transactionsEnabled\": false,\n \"settlementsEnabled\": false\n },\n \"contacts\": [\n {\n \"id\": \"con_XXXXXX\",\n \"isPrimaryContact\": true,\n \"firstName\": \"Test\",\n \"lastName\": \"Contact\",\n \"email\": \"test.contact@mailinator.com\",\n \"phone\": null,\n \"streetAddress\": null,\n \"suburb\": null,\n \"postcode\": null,\n \"state\": null,\n \"country\": null,\n \"dob\": null,\n \"governmentNumberSupplied\": false,\n \"contactType\": \"\",\n \"ownership\": null,\n \"jobTitle\": null\n }\n ]\n}" }, { "name": "400 Bad Request", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"companyName\": \"Test Merchant 123\",\r\n \"legalEntityName\": null,\r\n \"companyEmail\": \"test.user@mailinator.com\",\r\n \"companyPhone\": null,\r\n \"companyWebsiteUrl\": null,\r\n \"companyRegistrationNumber\": null,\r\n \"bankAccountRoutingNumber\": null,\r\n \"bankAccountNumber\": null,\r\n \"bankAccountName\": null,\r\n \"streetAddress\": null,\r\n \"suburb\": null,\r\n \"state\": null,\r\n \"postcode\": null,\r\n \"country\": \"AU\",\r\n \"bankStatementLabel\": \"TEST Merchant\",\r\n \"natureOfBusiness\": null,\r\n \"organisationType\": \"\",\r\n \"notes\" : \"\",\r\n \"contacts\": [\r\n {\r\n \"id\": \"con_cXQMGpUbYotsqf\",\r\n \"isPrimaryContact\": false,\r\n \"firstName\": \"Test\",\r\n \"lastName\": \"Person\",\r\n \"email\": \"test.person@mailinator.com\",\r\n \"phone\": null,\r\n \"streetAddress\": null,\r\n \"suburb\": null,\r\n \"postcode\": null,\r\n \"state\": null,\r\n \"country\": null,\r\n \"dob\": null,\r\n \"governmentNumberSupplied\": false,\r\n \"contactType\": \"\",\r\n \"ownership\": null,\r\n \"jobTitle\": null\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/merchants/update", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "merchants", "update" ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "1301" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Wed, 21 Apr 2021 00:55:00 GMT" } ], "cookie": [], "body": "{\n \"errors\": [\n {\n \"propertyName\": \"BankAccountRoutingNumber\",\n \"errorMessage\": \"Routing number is required\",\n \"attemptedValue\": null,\n \"customState\": null,\n \"severity\": 0,\n \"errorCode\": null,\n \"formattedMessageArguments\": null,\n \"formattedMessagePlaceholderValues\": null,\n \"resourceName\": null\n },\n {\n \"propertyName\": \"BankAccountNumber\",\n \"errorMessage\": \"Account number is required\",\n \"attemptedValue\": null,\n \"customState\": null,\n \"severity\": 0,\n \"errorCode\": null,\n \"formattedMessageArguments\": null,\n \"formattedMessagePlaceholderValues\": null,\n \"resourceName\": null\n }\n ],\n \"inlineErrors\": {\n \"companyName\": \"Test Merchant\",\n \"legalEntityName\": null,\n \"companyEmail\": \"test.merchant@mailinator.com\",\n \"companyPhone\": null,\n \"companyWebsiteUrl\": null,\n \"companyRegistrationNumber\": null,\n \"bankAccountRoutingNumber\": null,\n \"bankAccountNumber\": null,\n \"bankAccountName\": null,\n \"streetAddress\": null,\n \"suburb\": null,\n \"state\": null,\n \"postcode\": null,\n \"bankStatementLabel\": \"TEST MERCHANT\",\n \"natureOfBusiness\": null,\n \"organisationType\": \"\",\n \"notes\": \"\",\n \"contacts\": [\n {\n \"id\": \"con_XXXXXXXXXXXXXX\",\n \"isPrimaryContact\": false,\n \"firstName\": \"Test\",\n \"lastName\": \"Person\",\n \"email\": \"test.person@mailinator.com\",\n \"phone\": null,\n \"streetAddress\": null,\n \"suburb\": null,\n \"postcode\": null,\n \"state\": null,\n \"country\": null,\n \"dob\": null,\n \"governmentNumber\": null,\n \"contactType\": \"\",\n \"ownership\": null,\n \"jobTitle\": null,\n \"errors\": []\n }\n ],\n \"errors\": []\n }\n}" } ] }, { "name": "Get Merchant", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/merchants", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "merchants" ] } }, "response": [ { "name": "200 OK", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/merchants", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "merchants" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "717" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Encoding", "value": "gzip" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Wed, 21 Apr 2021 00:47:07 GMT" } ], "cookie": [], "body": "{\n \"id\": \"mch_XXXXXX\",\n \"testMerchantId\": \"mch_test_XXXXXX\",\n \"testOnlyMerchant\": false,\n \"companyName\": \"XXXXX's Test Merchant\",\n \"legalEntityName\": null,\n \"companyEmail\": \"test.merchant@mailinator.com\",\n \"companyPhone\": null,\n \"companyWebsiteUrl\": null,\n \"companyRegistrationNumber\": null,\n \"bankAccountRoutingNumber\": null,\n \"bankAccountNumber\": null,\n \"bankAccountName\": null,\n \"streetAddress\": null,\n \"suburb\": null,\n \"state\": null,\n \"postcode\": null,\n \"country\": \"AU\",\n \"bankStatementLabel\": \"XXXXX's Test Merchant\",\n \"createdDateUtc\": \"2021-04-14T00:30:18.226759\",\n \"logoUrl\": null,\n \"natureOfBusiness\": null,\n \"organisationType\": \"\",\n \"compliance\": {\n \"merchantNotes\": \"New Merchant Created\",\n \"propertyErrors\": null,\n \"complianceOfficerNotes\": null,\n \"status\": \"new\",\n \"submissionDate\": \"2021-04-14T00:30:18.8283947Z\",\n \"decisionDate\": null,\n \"liveEnabled\": false,\n \"transactionsEnabled\": false,\n \"settlementsEnabled\": false\n },\n \"contacts\": [\n {\n \"id\": \"con_XXXXXXXX\",\n \"isPrimaryContact\": false,\n \"firstName\": \"Test\",\n \"lastName\": \"Contact\",\n \"email\": \"test.contact@mailinator.com\",\n \"phone\": null,\n \"streetAddress\": null,\n \"suburb\": null,\n \"postcode\": null,\n \"state\": null,\n \"country\": null,\n \"dob\": null,\n \"governmentNumberSupplied\": false,\n \"contactType\": \"\",\n \"ownership\": null,\n \"jobTitle\": null\n }\n ]\n}" } ] }, { "name": "List Managed Merchants", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/merchants/managed", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "merchants", "managed" ] } }, "response": [ { "name": "200 OK", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/merchants/managed", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "merchants", "managed" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "743" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Encoding", "value": "gzip" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Wed, 21 Apr 2021 02:14:35 GMT" } ], "cookie": [], "body": "[\n {\n \"id\": \"mch_XXXXX\",\n \"testMerchantId\": \"mch_test_XXXX\",\n \"testOnlyMerchant\": true,\n \"companyName\": \"Test Managed Company\",\n \"legalEntityName\": null,\n \"companyEmail\": \"test.managed.company@mailinator.com\",\n \"companyPhone\": null,\n \"companyWebsiteUrl\": null,\n \"companyRegistrationNumber\": null,\n \"bankAccountRoutingNumber\": \"000000\",\n \"bankAccountNumber\": \"000000000\",\n \"bankAccountName\": \"Test Managed Account\",\n \"streetAddress\": null,\n \"suburb\": null,\n \"state\": null,\n \"postcode\": null,\n \"country\": \"AU\",\n \"bankStatementLabel\": \"\",\n \"createdDateUtc\": \"2021-04-21T02:08:27.7128967\",\n \"natureOfBusiness\": null,\n \"organisationType\": \"\",\n \"compliance\": {\n \"merchantNotes\": \"New Merchant Created\",\n \"propertyErrors\": null,\n \"complianceOfficerNotes\": null,\n \"status\": \"new\",\n \"submissionDate\": \"2021-04-21T02:08:27.8146977Z\",\n \"decisionDate\": null,\n \"liveEnabled\": false,\n \"transactionsEnabled\": false,\n \"settlementsEnabled\": false\n },\n \"contacts\": [\n {\n \"id\": \"con_XXXXX\",\n \"isPrimaryContact\": true,\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"email\": \"\",\n \"phone\": null,\n \"streetAddress\": null,\n \"suburb\": null,\n \"postcode\": null,\n \"state\": null,\n \"country\": null,\n \"dob\": null,\n \"governmentNumberSupplied\": false,\n \"contactType\": \"owner\",\n \"ownership\": null,\n \"jobTitle\": null\n }\n ]\n }\n]" } ] }, { "name": "Create Managed Merchant", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"companyName\": \"{{$randomCompanyName}}\",\r\n \"legalEntityName\": null,\r\n \"companyEmail\": \"{{$randomExampleEmail}}\",\r\n \"companyPhone\": null,\r\n \"companyWebsiteUrl\": \"{{$randomUrl}}\",\r\n \"companyRegistrationNumber\": null,\r\n \"bankAccountRoutingNumber\": \"000000\",\r\n \"bankAccountNumber\": \"000000000\",\r\n \"bankAccountName\": \"{{$randomCompanyName}}\",\r\n \"streetAddress\": null,\r\n \"suburb\": null,\r\n \"state\": null,\r\n \"postcode\": null,\r\n \"country\": \"AU\",\r\n \"bankStatementLabel\": null,\r\n \"natureOfBusiness\": null,\r\n \"organisationType\": \"\",\r\n \"notes\" : \"\",\r\n \"contacts\": [\r\n {\r\n \"isPrimaryContact\": false,\r\n \"firstName\": \"{{$randomFirstName}}\",\r\n \"lastName\": \"{{$randomLastName}}\",\r\n \"email\": \"{{$randomExampleEmail}}\",\r\n \"phone\": \"0400000000\",\r\n \"streetAddress\": \"{{$randomStreetAddress}}\",\r\n \"suburb\": \"{{$randomCity}}\",\r\n \"postcode\": \"4000\",\r\n \"state\": null,\r\n \"country\": null,\r\n \"dob\": null,\r\n \"governmentNumberSupplied\": false,\r\n \"contactType\": \"\",\r\n \"ownership\": null,\r\n \"jobTitle\": \"{{$randomJobTitle}}\"\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/merchants/managed", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "merchants", "managed" ] } }, "response": [ { "name": "400 Bad Request", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"companyName\": \"\",\r\n \"legalEntityName\": null,\r\n \"companyEmail\": \"\",\r\n \"companyPhone\": null,\r\n \"companyWebsiteUrl\": null,\r\n \"companyRegistrationNumber\": null,\r\n \"bankAccountRoutingNumber\": \"\",\r\n \"bankAccountNumber\": \"\",\r\n \"bankAccountName\": \"\",\r\n \"streetAddress\": null,\r\n \"suburb\": null,\r\n \"state\": null,\r\n \"postcode\": null,\r\n \"country\": \"AU\",\r\n \"bankStatementLabel\": \"\",\r\n \"natureOfBusiness\": null,\r\n \"organisationType\": \"\",\r\n \"notes\" : \"\",\r\n \"contacts\": [\r\n {\r\n \"isPrimaryContact\": false,\r\n \"firstName\": \"\",\r\n \"lastName\": \"\",\r\n \"email\": \"\",\r\n \"phone\": null,\r\n \"streetAddress\": null,\r\n \"suburb\": null,\r\n \"postcode\": null,\r\n \"state\": null,\r\n \"country\": null,\r\n \"dob\": null,\r\n \"governmentNumberSupplied\": false,\r\n \"contactType\": \"\",\r\n \"ownership\": null,\r\n \"jobTitle\": null\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/merchants/managed", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "merchants", "managed" ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "1670" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Wed, 21 Apr 2021 02:06:58 GMT" } ], "cookie": [], "body": "[\n {\n \"propertyName\": \"CompanyName\",\n \"errorMessage\": \"'Company Name' must not be empty.\",\n \"attemptedValue\": \"\",\n \"customState\": null,\n \"severity\": 0,\n \"errorCode\": \"NotEmptyValidator\",\n \"formattedMessageArguments\": [],\n \"formattedMessagePlaceholderValues\": {\n \"PropertyName\": \"Company Name\",\n \"PropertyValue\": \"\"\n },\n \"resourceName\": \"NotEmptyValidator\"\n },\n {\n \"propertyName\": \"CompanyEmail\",\n \"errorMessage\": \"'Company Email' must not be empty.\",\n \"attemptedValue\": \"\",\n \"customState\": null,\n \"severity\": 0,\n \"errorCode\": \"NotEmptyValidator\",\n \"formattedMessageArguments\": [],\n \"formattedMessagePlaceholderValues\": {\n \"PropertyName\": \"Company Email\",\n \"PropertyValue\": \"\"\n },\n \"resourceName\": \"NotEmptyValidator\"\n },\n {\n \"propertyName\": \"CompanyEmail\",\n \"errorMessage\": \"'Company Email' is not a valid email address.\",\n \"attemptedValue\": \"\",\n \"customState\": null,\n \"severity\": 0,\n \"errorCode\": \"EmailValidator\",\n \"formattedMessageArguments\": [],\n \"formattedMessagePlaceholderValues\": {\n \"PropertyName\": \"Company Email\",\n \"PropertyValue\": \"\"\n },\n \"resourceName\": \"EmailValidator\"\n },\n {\n \"propertyName\": \"BankAccountRoutingNumber\",\n \"errorMessage\": \"'Bank Account Routing Number' must not be empty.\",\n \"attemptedValue\": \"\",\n \"customState\": null,\n \"severity\": 0,\n \"errorCode\": \"NotEmptyValidator\",\n \"formattedMessageArguments\": [],\n \"formattedMessagePlaceholderValues\": {\n \"PropertyName\": \"Bank Account Routing Number\",\n \"PropertyValue\": \"\"\n },\n \"resourceName\": \"NotEmptyValidator\"\n },\n {\n \"propertyName\": \"BankAccountNumber\",\n \"errorMessage\": \"'Bank Account Number' must not be empty.\",\n \"attemptedValue\": \"\",\n \"customState\": null,\n \"severity\": 0,\n \"errorCode\": \"NotEmptyValidator\",\n \"formattedMessageArguments\": [],\n \"formattedMessagePlaceholderValues\": {\n \"PropertyName\": \"Bank Account Number\",\n \"PropertyValue\": \"\"\n },\n \"resourceName\": \"NotEmptyValidator\"\n }\n]" }, { "name": "200 OK", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"companyName\": \"Test Managed Company\",\r\n \"legalEntityName\": null,\r\n \"companyEmail\": \"test.managed.company@mailinator.com\",\r\n \"companyPhone\": null,\r\n \"companyWebsiteUrl\": null,\r\n \"companyRegistrationNumber\": null,\r\n \"bankAccountRoutingNumber\": \"000000\",\r\n \"bankAccountNumber\": \"000000000\",\r\n \"bankAccountName\": \"Test Managed Account\",\r\n \"streetAddress\": null,\r\n \"suburb\": null,\r\n \"state\": null,\r\n \"postcode\": null,\r\n \"country\": \"AU\",\r\n \"bankStatementLabel\": \"\",\r\n \"natureOfBusiness\": null,\r\n \"organisationType\": \"\",\r\n \"notes\" : \"\",\r\n \"contacts\": [\r\n {\r\n \"isPrimaryContact\": false,\r\n \"firstName\": \"\",\r\n \"lastName\": \"\",\r\n \"email\": \"\",\r\n \"phone\": null,\r\n \"streetAddress\": null,\r\n \"suburb\": null,\r\n \"postcode\": null,\r\n \"state\": null,\r\n \"country\": null,\r\n \"dob\": null,\r\n \"governmentNumberSupplied\": false,\r\n \"contactType\": \"\",\r\n \"ownership\": null,\r\n \"jobTitle\": null\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/merchants/managed", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "merchants", "managed" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "740" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Encoding", "value": "gzip" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Wed, 21 Apr 2021 02:08:27 GMT" } ], "cookie": [], "body": "{\n \"id\": \"mch_XXXXXXX\",\n \"testMerchantId\": \"mch_test_XXXXX\",\n \"testOnlyMerchant\": true,\n \"companyName\": \"Test Managed Company\",\n \"legalEntityName\": null,\n \"companyEmail\": \"test.managed.company@mailinator.com\",\n \"companyPhone\": null,\n \"companyWebsiteUrl\": null,\n \"companyRegistrationNumber\": null,\n \"bankAccountRoutingNumber\": \"000000\",\n \"bankAccountNumber\": \"000000000\",\n \"bankAccountName\": \"Test Managed Account\",\n \"streetAddress\": null,\n \"suburb\": null,\n \"state\": null,\n \"postcode\": null,\n \"country\": \"AU\",\n \"bankStatementLabel\": \"\",\n \"createdDateUtc\": \"2021-04-21T02:08:27.7128967Z\",\n \"natureOfBusiness\": null,\n \"organisationType\": \"\",\n \"compliance\": {\n \"merchantNotes\": \"New Merchant Created\",\n \"propertyErrors\": null,\n \"complianceOfficerNotes\": null,\n \"status\": \"new\",\n \"submissionDate\": \"2021-04-21T02:08:27.8146977Z\",\n \"decisionDate\": null,\n \"liveEnabled\": false,\n \"transactionsEnabled\": false,\n \"settlementsEnabled\": false\n },\n \"contacts\": [\n {\n \"id\": \"con_XXXXXXXXXXXXXX\",\n \"isPrimaryContact\": true,\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"email\": \"\",\n \"phone\": null,\n \"streetAddress\": null,\n \"suburb\": null,\n \"postcode\": null,\n \"state\": null,\n \"country\": null,\n \"dob\": null,\n \"governmentNumberSupplied\": false,\n \"contactType\": \"owner\",\n \"ownership\": null,\n \"jobTitle\": null\n }\n ]\n}" } ] } ] }, { "name": "Events", "item": [ { "name": "List Events", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/events?page&pageSize&startDate&endDate&eventType=", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "events" ], "query": [ { "key": "page", "value": "" }, { "key": "pageSize", "value": "" }, { "key": "startDate", "value": "" }, { "key": "endDate", "value": "" }, { "key": "eventType", "value": "" } ] } }, "response": [ { "name": "200 OK", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/events?page&pageSize&startDate&endDate", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "events" ], "query": [ { "key": "page", "value": null }, { "key": "pageSize", "value": null }, { "key": "startDate", "value": null }, { "key": "endDate", "value": null } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "1250" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Encoding", "value": "gzip" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Wed, 21 Apr 2021 04:10:33 GMT" } ], "cookie": [], "body": "{\n \"page\": 1,\n \"pageSize\": 50,\n \"totalPages\": 1,\n \"totalItems\": 27,\n \"data\": [\n {\n \"id\": \"evt_XXXX78\",\n \"type\": \"payment-created\",\n \"eventDate\": \"2021-04-21T00:05:52.2322638\",\n \"metadata\": {\n \"status\": \"scheduled\",\n \"amount\": 5158\n }\n },\n {\n \"id\": \"evt_XXXXZyCnCMGf\",\n \"type\": \"payment-created\",\n \"eventDate\": \"2021-04-21T00:05:52.1636637\",\n \"metadata\": {\n \"status\": \"scheduled\",\n \"amount\": 10287\n }\n },\n {\n \"id\": \"evt_9kDXXXXBKFVq7\",\n \"type\": \"payment-created\",\n \"eventDate\": \"2021-04-21T00:05:52.1097666\",\n \"metadata\": {\n \"status\": \"scheduled\",\n \"amount\": 10287\n }\n },\n {\n \"id\": \"evt_E7XXXXppYM\",\n \"type\": \"payment-created\",\n \"eventDate\": \"2021-04-21T00:05:52.0472423\",\n \"metadata\": {\n \"status\": \"scheduled\",\n \"amount\": 10287\n }\n },\n {\n \"id\": \"evt_XXXXTgtYr\",\n \"type\": \"payment-created\",\n \"eventDate\": \"2021-04-21T00:05:51.9966838\",\n \"metadata\": {\n \"status\": \"scheduled\",\n \"amount\": 10287\n }\n },\n {\n \"id\": \"evt_zN0XXXXrrcQ\",\n \"type\": \"payment-created\",\n \"eventDate\": \"2021-04-21T00:05:51.9504904\",\n \"metadata\": {\n \"status\": \"scheduled\",\n \"amount\": 10287\n }\n },\n {\n \"id\": \"evt_YbvBXXXXWHxa\",\n \"type\": \"payment-created\",\n \"eventDate\": \"2021-04-21T00:05:51.8988614\",\n \"metadata\": {\n \"status\": \"scheduled\",\n \"amount\": 10287\n }\n },\n {\n \"id\": \"evt_ZXXXXUzB\",\n \"type\": \"payment-created\",\n \"eventDate\": \"2021-04-21T00:05:51.8491774\",\n \"metadata\": {\n \"status\": \"scheduled\",\n \"amount\": 10287\n }\n },\n {\n \"id\": \"evt_DsXXXXJ3Q\",\n \"type\": \"payment-created\",\n \"eventDate\": \"2021-04-21T00:05:51.7326694\",\n \"metadata\": {\n \"status\": \"scheduled\",\n \"amount\": 25671\n }\n },\n {\n \"id\": \"evt_f2UXXXXvT8v\",\n \"type\": \"payment-created\",\n \"eventDate\": \"2021-04-20T23:54:26.3388387\",\n \"metadata\": {\n \"status\": \"scheduled\",\n \"amount\": 20543\n }\n },\n {\n \"id\": \"evt_wYXtXXXXKE\",\n \"type\": \"payment-created\",\n \"eventDate\": \"2021-04-20T23:54:26.2838371\",\n \"metadata\": {\n \"status\": \"scheduled\",\n \"amount\": 20543\n }\n },\n {\n \"id\": \"evt_8X4tXXXX4k\",\n \"type\": \"payment-created\",\n \"eventDate\": \"2021-04-20T23:54:26.2278341\",\n \"metadata\": {\n \"status\": \"scheduled\",\n \"amount\": 20543\n }\n },\n {\n \"id\": \"evt_pLqXXXX3be\",\n \"type\": \"payment-created\",\n \"eventDate\": \"2021-04-20T23:54:26.0846335\",\n \"metadata\": {\n \"status\": \"scheduled\",\n \"amount\": 20543\n }\n },\n {\n \"id\": \"evt_WmMWlXXXXCW\",\n \"type\": \"payment-created\",\n \"eventDate\": \"2021-04-20T23:54:26.0220359\",\n \"metadata\": {\n \"status\": \"scheduled\",\n \"amount\": 20543\n }\n },\n {\n \"id\": \"evt_VLe5XXXXzQu\",\n \"type\": \"payment-created\",\n \"eventDate\": \"2021-04-20T23:49:51.5979763\",\n \"metadata\": {\n \"status\": \"scheduled\",\n \"amount\": 20543\n }\n },\n {\n \"id\": \"evt_inMXXXX7RW\",\n \"type\": \"payment-created\",\n \"eventDate\": \"2021-04-20T23:49:51.5438939\",\n \"metadata\": {\n \"status\": \"scheduled\",\n \"amount\": 20543\n }\n },\n {\n \"id\": \"evt_mXXXXdT\",\n \"type\": \"payment-created\",\n \"eventDate\": \"2021-04-20T23:49:51.4902632\",\n \"metadata\": {\n \"status\": \"scheduled\",\n \"amount\": 20543\n }\n },\n {\n \"id\": \"evt_Xc5XXXX00vA\",\n \"type\": \"payment-created\",\n \"eventDate\": \"2021-04-20T23:49:51.4326831\",\n \"metadata\": {\n \"status\": \"scheduled\",\n \"amount\": 20543\n }\n },\n {\n \"id\": \"evt_RXXXXtlG\",\n \"type\": \"payment-created\",\n \"eventDate\": \"2021-04-20T23:49:51.31054\",\n \"metadata\": {\n \"status\": \"scheduled\",\n \"amount\": 20543\n }\n },\n {\n \"id\": \"evt_YyRI7XXXXFA\",\n \"type\": \"payment-created\",\n \"eventDate\": \"2021-04-19T07:14:14.7784695\",\n \"metadata\": {\n \"status\": \"scheduled\",\n \"amount\": 1245\n }\n },\n {\n \"id\": \"evt_6XXXXXXXN6E\",\n \"type\": \"payer-updated\",\n \"eventDate\": \"2021-04-19T06:10:18.0038503\",\n \"metadata\": {\n \"payerName\": \"Test Payer\"\n }\n },\n {\n \"id\": \"evt_iFXXXXIS60\",\n \"type\": \"realtime-payment\",\n \"eventDate\": \"2021-04-19T05:43:01.3059479\",\n \"metadata\": {\n \"status\": \"approved\",\n \"amount\": 1245\n }\n },\n {\n \"id\": \"evt_kWXXXXMRy\",\n \"type\": \"realtime-payment\",\n \"eventDate\": \"2021-04-19T05:20:54.5339604\",\n \"metadata\": {\n \"status\": \"approved\",\n \"amount\": 1245\n }\n },\n {\n \"id\": \"evt_c2XXXXdB\",\n \"type\": \"payment-created\",\n \"eventDate\": \"2021-04-19T04:19:00.1411315\",\n \"metadata\": {\n \"status\": \"scheduled\",\n \"amount\": 1245\n }\n },\n {\n \"id\": \"evt_OXXXXoF7i\",\n \"type\": \"payer-created\",\n \"eventDate\": \"2021-04-16T04:28:04.3426884\",\n \"metadata\": {\n \"payerName\": \"Test WebSample3\"\n }\n },\n {\n \"id\": \"evt_7XXXXPD5R\",\n \"type\": \"payer-created\",\n \"eventDate\": \"2021-04-16T02:56:38.7232261\",\n \"metadata\": {\n \"payerName\": \"Test WebSample3\"\n }\n },\n {\n \"id\": \"evt_fg5XXXXY77\",\n \"type\": \"payer-created\",\n \"eventDate\": \"2021-04-16T02:25:54.2549967\",\n \"metadata\": {\n \"payerName\": \"Another Payer\"\n }\n }\n ]\n}" } ] }, { "name": "Get an Event", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/events/:id", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "events", ":id" ], "variable": [ { "key": "id", "value": "", "description": "Event Id in evt_XXXXXXXXXXXXXX format" } ] } }, "response": [ { "name": "200 OK", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/events/evt_XXXXXXXXXXXXXX", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "events", "evt_XXXXXXXXXXXXXX" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "960" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Encoding", "value": "gzip" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Wed, 28 Apr 2021 05:36:51 GMT" } ], "cookie": [], "body": "{\n \"id\": \"evt_XXXXXXXXXXXXXX\",\n \"type\": \"realtime-payment\",\n \"eventDate\": \"2021-04-26T07:15:53.0251702\",\n \"metadata\": {\n \"status\": \"approved\",\n \"amount\": 1000\n },\n \"data\": {\n \"payment\": {\n \"id\": \"pmt_XXXXXXXXXXXXXX\",\n \"attemptId\": \"att_XXXXXXXX\",\n \"amount\": 1000,\n \"currency\": \"AUD\",\n \"description\": \"test\",\n \"applicationFee\": 0,\n \"totalFee\": 55,\n \"isSurcharged\": false,\n \"sourceType\": \"credit-card\",\n \"transactionDate\": \"2021-04-26T07:15:52.8507613Z\",\n \"status\": \"approved\",\n \"estimatedTransferDate\": \"2021-04-29\",\n \"actualTransferDate\": null,\n \"payer\": {\n \"id\": \"pyr_XXXXXXXXXXXXXX\",\n \"firstName\": \"Test\",\n \"lastName\": \"Person\",\n \"emailAddress\": \"test.person@mailinator.com\",\n \"mobileNumber\": \"\",\n \"streetAddress\": null,\n \"suburb\": null,\n \"postcode\": null,\n \"state\": null,\n \"country\": null,\n \"companyName\": null,\n \"companyRegistrationNumber\": null,\n \"metadata\": null\n },\n \"subscription\": null,\n \"attempts\": [\n {\n \"id\": \"att_XXXXXXXX\",\n \"amount\": 1000,\n \"currency\": \"AUD\",\n \"convertedAmount\": null,\n \"conversionRate\": null,\n \"convertedCurrency\": null,\n \"estimatedSettlementDate\": \"2021-04-29T00:00:00\",\n \"isSurcharged\": false,\n \"transactionDate\": \"2021-04-26T07:15:52.8507613Z\",\n \"estimatedTransferDate\": \"2021-04-29\",\n \"actualTransferDate\": null,\n \"source\": {\n \"id\": \"src_M489Kvi8INwmRo\",\n \"sourceType\": \"credit-card\",\n \"bankAccountNumber\": null,\n \"bankAccountBsb\": null,\n \"bankAccountName\": null,\n \"creditCardToken\": \"tkn_XXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n \"cardHolderName\": \"Ben Hotdog\",\n \"expiryDate\": \"2022-12-01T00:00:00\",\n \"displayCardNumber\": \"4242\",\n \"cardScheme\": \"visa\",\n \"origin\": \"AU\",\n \"funding\": \"credit\"\n },\n \"dishonour\": null,\n \"settlement\": null,\n \"fees\": {\n \"transactionFee\": 55,\n \"applicationFee\": 0,\n \"totalFee\": 55,\n \"currency\": \"AUD\",\n \"taxRate\": 0.1,\n \"convertedTransactionFee\": null,\n \"convertedApplicationFee\": null,\n \"convertedTotalFee\": null,\n \"convertedCurrency\": null,\n \"conversionRate\": null\n },\n \"status\": \"approved\"\n }\n ],\n \"metadata\": null\n }\n },\n \"webhooks\": []\n}" }, { "name": "400 Bad Request", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/events/:id", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "events", ":id" ], "variable": [ { "key": "id", "value": "evt_XXXXXXXXXXXXXX", "description": "Event Id in evt_XXXXXXXXXXXXXX format" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "262" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Fri, 30 Apr 2021 02:21:17 GMT" } ], "cookie": [], "body": "[\n {\n \"propertyName\": \"eventId\",\n \"errorMessage\": \"Could not find an event with ID: evt_XXXXXXXXXXXXXX\",\n \"attemptedValue\": null,\n \"customState\": null,\n \"severity\": 0,\n \"errorCode\": null,\n \"formattedMessageArguments\": null,\n \"formattedMessagePlaceholderValues\": null,\n \"resourceName\": null\n }\n]" } ] } ] }, { "name": "Transfers", "item": [ { "name": "List Transfers", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/transfers?page=1&pageSize=50", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "transfers" ], "query": [ { "key": "page", "value": "1" }, { "key": "pageSize", "value": "50" } ] } }, "response": [ { "name": "200 OK", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/transfers?page=1&pageSize=50", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "transfers" ], "query": [ { "key": "page", "value": "1" }, { "key": "pageSize", "value": "50" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "327" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Encoding", "value": "gzip" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Wed, 28 Apr 2021 06:39:40 GMT" } ], "cookie": [], "body": "[\n {\n \"id\": \"tra_XXXXXXXXXXXXX\",\n \"transferDate\": \"2021-05-04T00:00:00\",\n \"amount\": 1850,\n \"currency\": \"AUD\",\n \"accountName\": \"Test Bank Account\",\n \"accountNumber\": \"000000000\",\n \"bsb\": \"000000\",\n \"reference\": \"tra_XXXXXXXXXXXXX\",\n \"status\": \"complete\",\n \"type\": \"bank-account\"\n },\n {\n \"id\": \"tra_XXXXXXXXXXXXX\",\n \"transferDate\": \"2021-05-04T00:00:00\",\n \"amount\": 5233,\n \"currency\": \"AUD\",\n \"accountName\": \"Test Bank Account\",\n \"accountNumber\": \"000000000\",\n \"bsb\": \"000000\",\n \"reference\": \"tra_XXXXXXXXXXXXX\",\n \"status\": \"complete\",\n \"type\": \"credit-card\"\n }\n]" } ] }, { "name": "Get Transfer", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/transfers/:id", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "transfers", ":id" ], "variable": [ { "key": "id", "value": "", "description": "Transfer Id in tra_XXXXXXXXXXXXXX format" } ] } }, "response": [ { "name": "200 OK", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/transfers/:Id", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "transfers", ":Id" ], "variable": [ { "key": "Id", "value": "tra_XXXXXXXXXXXXXX", "description": "Transfer Id in tra_XXXXXXXXXXXXXX format" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "431" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Encoding", "value": "gzip" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Wed, 28 Apr 2021 07:09:29 GMT" } ], "cookie": [], "body": "{\n \"id\": \"tra_XXXXXXXXXXXXXX\",\n \"transferDate\": \"2021-05-04T00:00:00\",\n \"amount\": 1850,\n \"currency\": \"AUD\",\n \"totalFees\": 150,\n \"taxRate\": 0.1,\n \"accountName\": \"Test Bank Account\",\n \"accountNumber\": \"000000000\",\n \"bsb\": \"000000\",\n \"reference\": \"tra_XXXXXXXXXXXXXX\",\n \"status\": \"complete\",\n \"type\": \"bank-account\",\n \"includedTax\": 14,\n \"summary\": [\n {\n \"name\": \"Settlements\",\n \"count\": 1,\n \"gross\": 2000,\n \"fees\": 50,\n \"total\": 1950\n },\n {\n \"name\": \"Dishonours\",\n \"count\": 0,\n \"gross\": 0,\n \"fees\": 0,\n \"total\": 0\n },\n {\n \"name\": \"Application Fees\",\n \"count\": 0,\n \"gross\": 0,\n \"fees\": 0,\n \"total\": 0\n },\n {\n \"name\": \"Transfer Fee\",\n \"count\": 1,\n \"gross\": 0,\n \"fees\": 100,\n \"total\": -100\n }\n ]\n}" }, { "name": "400 Bad Request", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/transfers/:id", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "transfers", ":id" ], "variable": [ { "key": "id", "value": "tra_XXXXXXXXXXXXXX ", "description": "Transfer Id in tra_XXXXXXXXXXXXXX format" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "268" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Fri, 30 Apr 2021 02:23:44 GMT" } ], "cookie": [], "body": "[\n {\n \"propertyName\": \"transferId\",\n \"errorMessage\": \"Could not find a transfer with ID: tra_XXXXXXXXXXXXXX \",\n \"attemptedValue\": null,\n \"customState\": null,\n \"severity\": 0,\n \"errorCode\": null,\n \"formattedMessageArguments\": null,\n \"formattedMessagePlaceholderValues\": null,\n \"resourceName\": null\n }\n]" } ] }, { "name": "Get Transfer Line Items", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/transfers/items/:id", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "transfers", "items", ":id" ], "variable": [ { "key": "id", "value": "", "description": "Transfer Id in tra_XXXXXXXXXXXXXX format" } ] } }, "response": [ { "name": "200 OK", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/transfers/items/:id", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "transfers", "items", ":id" ], "variable": [ { "key": "id", "value": "tra_XXXXXXXXXXXXXX", "description": "Transfer Id in tra_XXXXXXXXXXXXXX format" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "307" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Encoding", "value": "gzip" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Fri, 30 Apr 2021 02:25:19 GMT" } ], "cookie": [], "body": "{\n \"page\": 1,\n \"pageSize\": 50,\n \"totalPages\": 1,\n \"totalItems\": 1,\n \"data\": [\n {\n \"id\": \"pmt_XXXXXXXXXXXXXX\",\n \"type\": \"Settlement\",\n \"gross\": 2000,\n \"fees\": 50,\n \"currency\": \"AUD\",\n \"description\": \"this is also a line item\",\n \"transactionDate\": \"2021-05-04T00:00:00\",\n \"total\": 1950\n }\n ]\n}" }, { "name": "400 Bad Request", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/transfers/items/:id", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "transfers", "items", ":id" ], "variable": [ { "key": "id", "value": "tra_XXXXXXXXXXXXXX", "description": "Transfer Id in tra_XXXXXXXXXXXXXX format" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "267" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Fri, 30 Apr 2021 02:26:26 GMT" } ], "cookie": [], "body": "[\n {\n \"propertyName\": \"transferId\",\n \"errorMessage\": \"Could not find a transfer with ID: tra_XXXXXXXXXXXXXX\",\n \"attemptedValue\": null,\n \"customState\": null,\n \"severity\": 0,\n \"errorCode\": null,\n \"formattedMessageArguments\": null,\n \"formattedMessagePlaceholderValues\": null,\n \"resourceName\": null\n }\n]" } ] } ] }, { "name": "Fees", "item": [ { "name": "Calculate", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"token\": \"\",\r\n \"sourceId\": \"\",\r\n \"sourceType\": \"\",\r\n \"amount\": 0,\r\n \"applicationFee\": 0,\r\n \"currency\": \"\",\r\n \"surcharge\": [\"\"]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/fees/calculate", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "fees", "calculate" ] } }, "response": [ { "name": "400 Bad Request", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"token\": \"\",\r\n \"sourceId\": \"\",\r\n \"sourceType\": \"\",\r\n \"amount\": 0,\r\n \"applicationFee\": 0,\r\n \"currency\": \"\",\r\n \"surcharge\": [\"\"]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/fees/calculate", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "fees", "calculate" ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "262" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Wed, 05 May 2021 08:43:32 GMT" } ], "cookie": [], "body": "[\n {\n \"propertyName\": \"\",\n \"errorMessage\": \"You must supply one of either: Token, SourceId, SourceType\",\n \"attemptedValue\": null,\n \"customState\": null,\n \"severity\": 0,\n \"errorCode\": null,\n \"formattedMessageArguments\": null,\n \"formattedMessagePlaceholderValues\": null,\n \"resourceName\": null\n }\n]" }, { "name": "200 OK", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"token\": \"tkn_aLwsea6Cr9tgVYt4nihjxrwqvjB3iXlD\",\r\n \"sourceId\": \"\",\r\n \"sourceType\": \"\",\r\n \"amount\": 100,\r\n \"applicationFee\": 0,\r\n \"currency\": \"\",\r\n \"surcharge\": [\"\"]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/fees/calculate", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "fees", "calculate" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "588" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Content-Encoding", "value": "gzip" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:833acf35-1857-4bdc-9a45-7dac6de724f0" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Wed, 05 May 2021 08:44:53 GMT" } ], "cookie": [], "body": "{\n \"amount\": 100,\n \"currency\": \"AUD\",\n \"netAmount\": 67,\n \"isSurcharged\": false,\n \"convertedAmount\": null,\n \"convertedCurrency\": null,\n \"convertedNetAmount\": null,\n \"fees\": {\n \"transactionFee\": 33,\n \"applicationFee\": 0,\n \"totalFee\": 33,\n \"currency\": \"AUD\",\n \"taxRate\": 0.1,\n \"convertedTransactionFee\": null,\n \"convertedApplicationFee\": null,\n \"convertedTotalFee\": null,\n \"convertedCurrency\": null,\n \"conversionRate\": null\n },\n \"source\": {\n \"id\": null,\n \"sourceType\": \"credit-card\",\n \"bankAccountNumber\": null,\n \"bankAccountBsb\": null,\n \"bankAccountName\": null,\n \"creditCardToken\": \"tkn_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n \"cardHolderName\": \"Ben Hotdog\",\n \"expiryDate\": \"2022-12-01T00:00:00\",\n \"displayCardNumber\": \"4242\",\n \"cardScheme\": \"visa\",\n \"origin\": \"AU\",\n \"funding\": \"credit\"\n },\n \"feeSchedule\": {\n \"destinationZone\": \"AU\",\n \"originZone\": \"AU\",\n \"feeScheme\": \"visa-master\",\n \"percentageFee\": 0.025,\n \"fixedFee\": 30,\n \"cap\": 0,\n \"dishonourFee\": 0,\n \"disputeFee\": 3500\n }\n}" } ] } ] }, { "name": "Webhooks", "item": [ { "name": "Create or Update Webhook", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"id\": \"\",\r\n \"uri\": \"\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/webhooks", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "webhooks" ] } }, "response": [ { "name": "201 Created - New Webhook", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"id\": null,\r\n \"uri\": \"https://webhook.site/guid\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/webhooks", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "webhooks" ] } }, "status": "Created", "code": 201, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "143" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Location", "value": "https://localhost:44307/test/Webhooks?id=wbk_trEnbYhqNTjvqg" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:7a9feec7-06e6-4091-a7d8-f6f4ef30d688" }, { "key": "X-SourceFiles", "value": "=?UTF-8?B?QzpcRGV2XEFwcHNcUGluY2hcUGluY2hcc3JjXFBpbmNoLkFwaVx0ZXN0XHdlYmhvb2tz?=" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Fri, 30 Apr 2021 03:51:54 GMT" } ], "cookie": [], "body": "{\n \"id\": \"wbk_XXXXXXXXXXXXXX\",\n \"uri\": \"https://webhook.site/guid\",\n \"secret\": \"whsec_XXXXXXXXXXXXXXXXXXXXXXXXXXXX\"\n}" }, { "name": "200 OK - Updated", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"id\": \"wbk_XXXXXXXXXXXXXX\",\r\n \"uri\": \"https://webhook.site/guid\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/webhooks", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "webhooks" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "143" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:7a9feec7-06e6-4091-a7d8-f6f4ef30d688" }, { "key": "X-SourceFiles", "value": "=?UTF-8?B?QzpcRGV2XEFwcHNcUGluY2hcUGluY2hcc3JjXFBpbmNoLkFwaVx0ZXN0XHdlYmhvb2tz?=" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Fri, 30 Apr 2021 03:54:54 GMT" } ], "cookie": [], "body": "{\n \"id\": \"wbk_XXXXXXXXXXXXXX\",\n \"uri\": \"https://webhook.site/Guid\",\n \"secret\": \"whsec_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\"\n}" }, { "name": "400 Bad Request", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"id\": \"\",\r\n \"uri\": \"\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/webhooks", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "webhooks" ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "294" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:7a9feec7-06e6-4091-a7d8-f6f4ef30d688" }, { "key": "X-SourceFiles", "value": "=?UTF-8?B?QzpcRGV2XEFwcHNcUGluY2hcUGluY2hcc3JjXFBpbmNoLkFwaVx0ZXN0XHdlYmhvb2tz?=" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Fri, 30 Apr 2021 03:56:08 GMT" } ], "cookie": [], "body": "[\n {\n \"propertyName\": \"Uri\",\n \"errorMessage\": \"'Uri' must not be empty.\",\n \"attemptedValue\": \"\",\n \"customState\": null,\n \"severity\": 0,\n \"errorCode\": \"NotEmptyValidator\",\n \"formattedMessageArguments\": [],\n \"formattedMessagePlaceholderValues\": {\n \"PropertyName\": \"Uri\",\n \"PropertyValue\": \"\"\n },\n \"resourceName\": \"NotEmptyValidator\"\n }\n]" } ] }, { "name": "List Webhooks", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/webhooks", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "webhooks" ] } }, "response": [ { "name": "200 OK", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/webhooks", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "webhooks" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "145" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=" }, { "key": "X-SourceFiles", "value": "=?UTF-8?B?QzpcRGV2XEFwcHNcUGluY2hcUGluY2hcc3JjXFBpbmNoLkFwaVx0ZXN0XHdlYmhvb2tz?=" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Fri, 30 Apr 2021 03:38:33 GMT" } ], "cookie": [], "body": "[\n {\n \"id\": \"wbk_XXXXXXXXXXXXXX\",\n \"uri\": \"https://example.com/callback\",\n \"secret\": \"whsec_XXXXXXXXXXXXXXXXXXXXXXXXXXXX\"\n }\n]" } ] }, { "name": "Get Webhook", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/webhooks/:id", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "webhooks", ":id" ], "variable": [ { "key": "id", "value": "", "description": "Webhook Id in wbk_XXXXXXXXXXXXXX format" } ] } }, "response": [ { "name": "200 OK", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/webhooks/:id", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "webhooks", ":id" ], "variable": [ { "key": "id", "value": "wbk_XXXXXXXXXXXXXX", "description": "Webhook Id in wbk_XXXXXXXXXXXXXX format" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "143" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:7a9feec7-06e6-4091-a7d8-f6f4ef30d688" }, { "key": "X-SourceFiles", "value": "=?UTF-8?B?QzpcRGV2XEFwcHNcUGluY2hcUGluY2hcc3JjXFBpbmNoLkFwaVx0ZXN0XHdlYmhvb2tzXHdia19qbkxtTEdUMksycXVQaQ==?=" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Fri, 30 Apr 2021 03:42:30 GMT" } ], "cookie": [], "body": "{\n \"id\": \"wbk_XXXXXXXXXXXXXX\",\n \"uri\": \"https://example.com/callback\",\n \"secret\": \"whsec_XXXXXXXXXXXXXXXXXXXXXXXXXXXX\"\n}" }, { "name": "404 Not found", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/webhooks/:id", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "webhooks", ":id" ], "variable": [ { "key": "id", "value": "", "description": "Webhook Id in wbk_XXXXXXXXXXXXXX format" } ] } }, "status": "Not Found", "code": 404, "_postman_previewlanguage": "plain", "header": [ { "key": "Transfer-Encoding", "value": "chunked" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:7a9feec7-06e6-4091-a7d8-f6f4ef30d688" }, { "key": "X-SourceFiles", "value": "=?UTF-8?B?QzpcRGV2XEFwcHNcUGluY2hcUGluY2hcc3JjXFBpbmNoLkFwaVx0ZXN0XHdlYmhvb2tzXHdia19qbkxtTEdUMksycXVQcg==?=" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Fri, 30 Apr 2021 03:44:04 GMT" } ], "cookie": [], "body": "" } ] }, { "name": "Delete Webhook", "request": { "method": "DELETE", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/webhooks/:id", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "webhooks", ":id" ], "variable": [ { "key": "id", "value": "", "description": "Webhook Id in wbk_XXXXXXXXXXXXXX format" } ] } }, "response": [ { "name": "400 Bad Request", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/webhooks/:id", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "webhooks", ":id" ], "variable": [ { "key": "id", "value": "wbk_XXXXXXXXXXXXXX", "description": "Webhook Id in wbk_XXXXXXXXXXXXXX format" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "258" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:7a9feec7-06e6-4091-a7d8-f6f4ef30d688" }, { "key": "X-SourceFiles", "value": "=?UTF-8?B?QzpcRGV2XEFwcHNcUGluY2hcUGluY2hcc3JjXFBpbmNoLkFwaVx0ZXN0XHdlYmhvb2tzXHdia19YWFhYWFhYWFhYWFhYWA==?=" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Fri, 30 Apr 2021 03:59:44 GMT" } ], "cookie": [], "body": "[\n {\n \"propertyName\": \"webhookId\",\n \"errorMessage\": \"Webhook with id: wbk_XXXXXXXXXXXXXX not found\",\n \"attemptedValue\": null,\n \"customState\": null,\n \"severity\": 0,\n \"errorCode\": null,\n \"formattedMessageArguments\": null,\n \"formattedMessagePlaceholderValues\": null,\n \"resourceName\": null\n }\n]" }, { "name": "200 OK", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/webhooks/:id", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "webhooks", ":id" ], "variable": [ { "key": "id", "value": "", "description": "Webhook Id in wbk_XXXXXXXXXXXXXX format" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "plain", "header": [ { "key": "Transfer-Encoding", "value": "chunked" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:7a9feec7-06e6-4091-a7d8-f6f4ef30d688" }, { "key": "X-SourceFiles", "value": "=?UTF-8?B?QzpcRGV2XEFwcHNcUGluY2hcUGluY2hcc3JjXFBpbmNoLkFwaVx0ZXN0XHdlYmhvb2tzXHdia19qbkxtTEdUMksycXVQaQ==?=" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Fri, 30 Apr 2021 04:00:06 GMT" } ], "cookie": [], "body": "" } ] } ] }, { "name": "Refunds", "item": [ { "name": "Create a Refund", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"paymentId\": \"pmt_XXXXXXXXXXXXXX\", // Payment Id in pmt_XXXXXXXXXXXXXX format\r\n \"amount\": 1000,\r\n \"reason\": \"Requested by Payer\",\r\n \"nonce\": \"{{$guid}}\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/refunds", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "refunds" ] } }, "response": [ { "name": "400 Bad Request", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"paymentId\": \"pmt_XXXXXXXXXXXXXX\", // Payment Id in pmt_XXXXXXXXXXXXXX format\r\n \"amount\": 1000,\r\n \"reason\": \"Requested by Payer\",\r\n \"nonce\": \"{{$guid}}\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/refunds", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "refunds" ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "256" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:7a9feec7-06e6-4091-a7d8-f6f4ef30d688" }, { "key": "X-SourceFiles", "value": "=?UTF-8?B?QzpcRGV2XEFwcHNcUGluY2hcUGluY2hcc3JjXFBpbmNoLkFwaVx0ZXN0XHJlZnVuZHM=?=" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Mon, 10 May 2021 23:59:52 GMT" } ], "cookie": [], "body": "[\n {\n \"propertyName\": \"\",\n \"errorMessage\": \"Could not find a payment with ID: pmt_XXXXXXXXXXXXXX\",\n \"attemptedValue\": null,\n \"customState\": null,\n \"severity\": 0,\n \"errorCode\": null,\n \"formattedMessageArguments\": null,\n \"formattedMessagePlaceholderValues\": null,\n \"resourceName\": null\n }\n]" }, { "name": "200 OK", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"paymentId\": \"pmt_OG2N5TAWtYJCMX\", // Payment Id in pmt_XXXXXXXXXXXXXX format\r\n \"amount\": 100,\r\n \"reason\": \"Requested by Payer\",\r\n \"nonce\": \"{{$guid}}\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/refunds", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "refunds" ] } }, "status": "Created", "code": 201, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "422" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Location", "value": "https://localhost:44307/test/Refunds?id=ref_995DGQ38" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=" }, { "key": "X-SourceFiles", "value": "=?UTF-8?B?QzpcRGV2XEFwcHNcUGluY2hcUGluY2hcc3JjXFBpbmNoLkFwaVx0ZXN0XHJlZnVuZHM=?=" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Fri, 14 May 2021 00:08:12 GMT" } ], "cookie": [], "body": "{\n \"id\": \"ref_995DGQ38\",\n \"amount\": 100,\n \"currency\": \"AUD\",\n \"refundFeeCharged\": 0,\n \"requestedDate\": \"2021-05-14T00:08:11.7803470Z\",\n \"submittedDate\": null,\n \"completedDate\": null,\n \"reasonForRefund\": \"Requested by Payer\",\n \"notes\": null,\n \"convertedAmount\": null,\n \"conversionRate\": null,\n \"convertedCurrency\": null,\n \"isGross\": false,\n \"status\": \"requested\",\n \"paymentId\": null,\n \"transferId\": null,\n \"refundedFees\": null,\n \"nonce\": \"5781b2f0-9a09-4579-bbb8-eea734633b13\"\n}" }, { "name": "403 Forbidden - Nonce Replay", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"paymentId\": \"pmt_OG2N5TAWtYJCMX\", // Payment Id in pmt_XXXXXXXXXXXXXX format\r\n \"amount\": 100,\r\n \"reason\": \"Requested by Payer\",\r\n \"nonce\": \"5781b2f0-9a09-4579-bbb8-eea734633b13\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/refunds", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "refunds" ] } }, "status": "Forbidden", "code": 403, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "499" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:7a9feec7-06e6-4091-a7d8-f6f4ef30d688" }, { "key": "X-SourceFiles", "value": "=?UTF-8?B?QzpcRGV2XEFwcHNcUGluY2hcUGluY2hcc3JjXFBpbmNoLkFwaVx0ZXN0XHJlZnVuZHM=?=" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Fri, 14 May 2021 00:09:27 GMT" } ], "cookie": [], "body": "{\n \"isNonceReplay\": true,\n \"nonce\": \"5781b2f0-9a09-4579-bbb8-eea734633b13\",\n \"data\": {\n \"id\": \"ref_995DGQ38\",\n \"amount\": 100,\n \"currency\": \"AUD\",\n \"refundFeeCharged\": 0,\n \"requestedDate\": \"2021-05-14T00:08:11.7803470Z\",\n \"submittedDate\": null,\n \"completedDate\": null,\n \"reasonForRefund\": \"Requested by Payer\",\n \"notes\": null,\n \"convertedAmount\": null,\n \"conversionRate\": null,\n \"convertedCurrency\": null,\n \"isGross\": false,\n \"status\": \"requested\",\n \"paymentId\": null,\n \"transferId\": null,\n \"refundedFees\": null,\n \"nonce\": \"5781b2f0-9a09-4579-bbb8-eea734633b13\"\n }\n}" } ] }, { "name": "Get Refund", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/refunds/:id", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "refunds", ":id" ], "variable": [ { "key": "id", "value": "", "description": "Refund Id in ref_XXXXXXXX format" } ] } }, "response": [ { "name": "200 OK", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/refunds/:id", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "refunds", ":id" ], "variable": [ { "key": "id", "value": "", "description": "Refund Id in ref_XXXXXXXX format" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "434" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:7a9feec7-06e6-4091-a7d8-f6f4ef30d688" }, { "key": "X-SourceFiles", "value": "=?UTF-8?B?QzpcRGV2XEFwcHNcUGluY2hcUGluY2hcc3JjXFBpbmNoLkFwaVx0ZXN0XHJlZnVuZHNccmVmX01LUDVNS0Q0?=" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Thu, 13 May 2021 07:25:51 GMT" } ], "cookie": [], "body": "{\n \"paymentId\": \"pmt_XXXXXXXXXXXXXX\",\n \"transfer\": null,\n \"id\": \"ref_XXXXXXXX\",\n \"amount\": 1000,\n \"currency\": \"AUD\",\n \"refundFeeCharged\": 0,\n \"requestedDate\": \"2021-05-13T07:25:38.2930268Z\",\n \"completedDate\": null,\n \"reasonForRefund\": \"Requested by Payer\",\n \"notes\": null,\n \"convertedAmount\": null,\n \"conversionRate\": null,\n \"convertedCurrency\": null,\n \"isGross\": false,\n \"status\": \"requested\",\n \"transferId\": null,\n \"refundedFees\": null,\n \"nonce\": \"354c3c8e-ddd6-4bdc-8d27-ee5d2dacb9fe\"\n}" }, { "name": "400 Bad Request", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/refunds/:id", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "refunds", ":id" ], "variable": [ { "key": "id", "value": "ref_XXXXXXXX", "description": "Refund Id in ref_XXXXXXXX format" } ] } }, "status": "Bad Request", "code": 400, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "257" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:7a9feec7-06e6-4091-a7d8-f6f4ef30d688" }, { "key": "X-SourceFiles", "value": "=?UTF-8?B?QzpcRGV2XEFwcHNcUGluY2hcUGluY2hcc3JjXFBpbmNoLkFwaVx0ZXN0XHJlZnVuZHNccmVmX1hYWFhYWFhY?=" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Thu, 13 May 2021 07:26:40 GMT" } ], "cookie": [], "body": "[\n {\n \"propertyName\": \"refundId\",\n \"errorMessage\": \"Could not find a Refund with Id: ref_XXXXXXXX\",\n \"attemptedValue\": null,\n \"customState\": null,\n \"severity\": 0,\n \"errorCode\": null,\n \"formattedMessageArguments\": null,\n \"formattedMessagePlaceholderValues\": null,\n \"resourceName\": null\n }\n]" } ] }, { "name": "List Refunds", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/refunds?page&pageSize&startDate&endDate", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "refunds" ], "query": [ { "key": "page", "value": null }, { "key": "pageSize", "value": null }, { "key": "startDate", "value": null }, { "key": "endDate", "value": null } ] } }, "response": [ { "name": "200 OK", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/{{environment}}/refunds", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "refunds" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "2230" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=" }, { "key": "X-SourceFiles", "value": "=?UTF-8?B?QzpcRGV2XEFwcHNcUGluY2hcUGluY2hcc3JjXFBpbmNoLkFwaVx0ZXN0XHJlZnVuZHM=?=" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Thu, 13 May 2021 07:20:20 GMT" } ], "cookie": [], "body": "{\n \"page\": 1,\n \"pageSize\": 50,\n \"totalPages\": 1,\n \"totalItems\": 6,\n \"data\": [\n {\n \"id\": \"ref_XXXXXXXX\",\n \"amount\": 1245,\n \"currency\": \"AUD\",\n \"refundFeeCharged\": 0,\n \"requestedDate\": \"2021-05-14T05:22:00.0980330Z\",\n \"completedDate\": null,\n \"reasonForRefund\": \"duplicate transaction\",\n \"notes\": null,\n \"convertedAmount\": null,\n \"conversionRate\": null,\n \"convertedCurrency\": null,\n \"isGross\": false,\n \"status\": \"requested\",\n \"transferId\": null,\n \"refundedFees\": null,\n \"nonce\": null\n },\n {\n \"id\": \"ref_XXXXXXXX\",\n \"amount\": 100,\n \"currency\": \"AUD\",\n \"refundFeeCharged\": 0,\n \"requestedDate\": \"2021-05-11T02:29:56.6079210Z\",\n \"completedDate\": null,\n \"reasonForRefund\": \"Requested by Payer\",\n \"notes\": null,\n \"convertedAmount\": null,\n \"conversionRate\": null,\n \"convertedCurrency\": null,\n \"isGross\": false,\n \"status\": \"requested\",\n \"transferId\": null,\n \"refundedFees\": null,\n \"nonce\": \"test1234\"\n },\n {\n \"id\": \"ref_XXXXXXXX\",\n \"amount\": 100,\n \"currency\": \"AUD\",\n \"refundFeeCharged\": 0,\n \"requestedDate\": \"2021-05-11T01:08:37.2754508Z\",\n \"completedDate\": null,\n \"reasonForRefund\": \"Requested by Payer\",\n \"notes\": null,\n \"convertedAmount\": null,\n \"conversionRate\": null,\n \"convertedCurrency\": null,\n \"isGross\": false,\n \"status\": \"requested\",\n \"transferId\": null,\n \"refundedFees\": null,\n \"nonce\": \"test123\"\n },\n {\n \"id\": \"ref_XXXXXXXX\",\n \"amount\": 100,\n \"currency\": \"AUD\",\n \"refundFeeCharged\": 0,\n \"requestedDate\": \"2021-05-11T01:08:34.2568023Z\",\n \"completedDate\": null,\n \"reasonForRefund\": \"Requested by Payer\",\n \"notes\": null,\n \"convertedAmount\": null,\n \"conversionRate\": null,\n \"convertedCurrency\": null,\n \"isGross\": false,\n \"status\": \"requested\",\n \"transferId\": null,\n \"refundedFees\": null,\n \"nonce\": \"test123\"\n },\n {\n \"id\": \"ref_XXXXXXXX\",\n \"amount\": 1000,\n \"currency\": \"AUD\",\n \"refundFeeCharged\": 0,\n \"requestedDate\": \"2021-05-11T01:07:58.5216275Z\",\n \"completedDate\": null,\n \"reasonForRefund\": \"Requested by Payer\",\n \"notes\": null,\n \"convertedAmount\": null,\n \"conversionRate\": null,\n \"convertedCurrency\": null,\n \"isGross\": false,\n \"status\": \"requested\",\n \"transferId\": null,\n \"refundedFees\": null,\n \"nonce\": \"test123\"\n },\n {\n \"id\": \"ref_XXXXXXXX\",\n \"amount\": 1000,\n \"currency\": \"AUD\",\n \"refundFeeCharged\": 0,\n \"requestedDate\": \"2021-05-11T00:00:41.6762465Z\",\n \"completedDate\": null,\n \"reasonForRefund\": \"Requested by Payer\",\n \"notes\": null,\n \"convertedAmount\": null,\n \"conversionRate\": null,\n \"convertedCurrency\": null,\n \"isGross\": false,\n \"status\": \"requested\",\n \"transferId\": null,\n \"refundedFees\": null,\n \"nonce\": \"0e44d18b-8b69-4b9f-8736-bdd86a9e4aea\"\n }\n ]\n}" } ] }, { "name": "Check for Nonce", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"nonce\": \"test\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/refunds/nonce", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "refunds", "nonce" ] } }, "response": [ { "name": "200 OK - Nonce Exists", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"nonce\": \"test1234\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/refunds/nonce", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "refunds", "nonce" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "377" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:7a9feec7-06e6-4091-a7d8-f6f4ef30d688" }, { "key": "X-SourceFiles", "value": "=?UTF-8?B?QzpcRGV2XEFwcHNcUGluY2hcUGluY2hcc3JjXFBpbmNoLkFwaVx0ZXN0XHJlZnVuZHNcbm9uY2U=?=" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Tue, 11 May 2021 04:20:36 GMT" } ], "cookie": [], "body": "{\n \"isNonceReplay\": true,\n \"nonce\": \"test1234\",\n \"data\": {\n \"id\": \"ref_XGPRRXNZ\",\n \"amount\": 100,\n \"currency\": \"AUD\",\n \"refundFeeCharged\": 0,\n \"requestedDate\": \"2021-05-11T02:29:56.6079210Z\",\n \"submittedDate\": null,\n \"completedDate\": null,\n \"reasonForRefund\": \"Requested by Payer\",\n \"notes\": null,\n \"convertedAmount\": null,\n \"conversionRate\": null,\n \"convertedCurrency\": null,\n \"isGross\": false,\n \"status\": \"requested\",\n \"paymentId\": null,\n \"transferId\": null,\n \"refundedFees\": null,\n \"nonce\": \"test1234\"\n }\n}" }, { "name": "200 OK - Nonce Doesn't Exist", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"nonce\": \"test12345\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/{{environment}}/refunds/nonce", "host": [ "{{baseUrl}}" ], "path": [ "{{environment}}", "refunds", "nonce" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "43" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Server", "value": "Microsoft-IIS/10.0" }, { "key": "Request-Context", "value": "appId=cid-v1:7a9feec7-06e6-4091-a7d8-f6f4ef30d688" }, { "key": "X-SourceFiles", "value": "=?UTF-8?B?QzpcRGV2XEFwcHNcUGluY2hcUGluY2hcc3JjXFBpbmNoLkFwaVx0ZXN0XHJlZnVuZHNcbm9uY2U=?=" }, { "key": "X-Powered-By", "value": "ASP.NET" }, { "key": "Date", "value": "Tue, 11 May 2021 04:21:17 GMT" } ], "cookie": [], "body": "{\n \"isNonceReplay\": false,\n \"nonce\": \"test\",\n \"data\": null\n}" } ] } ] } ], "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "{{currentAccessToken}}", "type": "string" } ] }, "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "", "/*", " * This pre-request script retrieves a Bearer token from the client credentials", " * you provide in your environment file.", " */", "// Retrieve env variables currently configured", "const env_variables = pm.environment.toObject({", " excludeDisabled: true", "});", "", "const collection_variables = pm.collectionVariables.toObject({", " excludeDisabled: true", "});", "", "let authTokenUrl = env_variables.authUrl + \"/connect/token\";", "", "const echoPostRequest = {", " url: authTokenUrl,", " method: 'POST',", " header: {", " 'Content-Type':'application/x-www-form-urlencoded'", " },", " auth: {", " type: 'basic',", " basic: {", " username: env_variables.merchantId,", " password: env_variables.secretKey", " }", " },", " body: {", " mode: 'urlencoded',", " urlencoded: [", " { key: \"grant_type\", value: \"client_credentials\" },", " { key: \"scope\", value: \"api1\" }", " ]", " }", "};", "", "let getToken = true;", "", "if (!env_variables.accessTokenExpiry || !env_variables.currentAccessToken) {", " console.log('Token or expiry date are missing');", "} else if (env_variables.accessTokenExpiry <= (new Date()).getTime()) {", " console.log('Token is expired');", "} else {", " getToken = false;", " console.log('Token and expiry date are all good');", "}", "", "if (getToken === true) {", " pm.sendRequest(echoPostRequest, function (err, res) {", " if (err) {", " console.error('Error while generating a bearer token:', err);", " } else {", " const {access_token, expires_in} = res.json();", " pm.environment.set('currentAccessToken', access_token); ", " var expiryDate = new Date();", " expiryDate.setSeconds(expiryDate.getSeconds() + expires_in);", " pm.environment.set('accessTokenExpiry', expiryDate.getTime());", " }", " });", "}", "", "pm.request.headers.add({key: 'pinch-version', value: collection_variables.pinchVersion });", "", "const moment = require('moment');", "pm.globals.set(\"today\", moment().format(\"YYYY-MM-DD\"));", "pm.globals.set(\"tomorrow\", moment().add('days', 1).format(\"YYYY-MM-DD\"));", "pm.globals.set(\"yesterday\", moment().add('days', -1).format(\"YYYY-MM-DD\"));" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ], "variable": [ { "key": "environment", "value": "test" }, { "key": "pinchVersion", "value": "2020.1" } ] }