{"info":{"_postman_id":"8a931021-1eec-45b6-be69-f80b979acb6c","name":"Invoice","description":"<html><head></head><body><p>The Invoice API lets you generate invoices, fetch existing ones, and view detailed line items. It’s designed to be simple to adopt, even if you’re new to APIs, and works neatly alongside Customers, Subscriptions, and Transactions.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"34291398","collectionId":"8a931021-1eec-45b6-be69-f80b979acb6c","publishedId":"2sB3BKEnm2","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2025-08-19T20:22:56.000Z"},"item":[{"name":"Create Invoice","id":"6d5f5ff0-b04d-42d6-a627-484971880af9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"invoice\": {\n        \"uniqueID\": null, // You don't create uniqueID, the server does.\n        \"customer_id\": {{customer_id}},\n        \"customer\": {\n            \"uniqueID\": null, // ID should be null, as the server sets the ID.\n            \"customer_information\": {\n                \"firstname\": \"\",\n                \"lastname\": \"\",\n                \"address1\": \"\",\n                \"address2\": \"\",\n                \"city\": \"\",\n                \"state\": \"\",\n                \"zip\": \"\",\n                \"country\": \"\",\n                \"phone1\": \"\",\n                \"phone2\": \"\",\n                \"email\": \"\"\n            },\n            \"billing_information\": {\n                \"firstname\": \"\",\n                \"lastname\": \"\",\n                \"address1\": \"\",\n                \"address2\": \"\",\n                \"city\": \"\",\n                \"state\": \"\",\n                \"zip\": \"\",\n                \"country\": \"\",\n                \"phone\": \"\",\n                \"email\": \"\"\n            },\n            \"custom\": {\n                \"custom1\": \"\",\n                \"custom2\": \"\",\n                \"custom3\": \"\",\n                \"custom4\": \"\",\n                \"custom5\": \"\",\n                \"custom6\": \"\",\n                \"custom7\": \"\",\n                \"custom8\": \"\",\n                \"custom9\": \"\",\n                \"custom10\": \"\"\n            },\n            \"customer_payments\": [\n                {\n                    \"paymentID\": null,\n                    \"paymenttype\": \"\",\n                    \"lastfour\": \"\",\n                    \"brand\": \"\"\n                }\n            ]\n        },\n        \"date_created\": \"\", \n        \"due_date\": \"\",\n        \"status\": \"\", // Can be `Paid`, `Unpaid` or `Cancelled`\n        \"date_closed\": \"\", // `Y-m-d H:i:s` so `2025-10-06 09:55:52\n        \"invoice_number\": \"\", // Can be anything you want, Troute typically does YYYYMMDDHHiiss\n        \"notes\": \"\",\n        \"amount\": \"\",\n        \"discount\": \"\",\n        \"tax\": \"\",\n        \"shipping\": \"\",\n        \"surcharge\": \"\",\n        \"items\": [\n            {\n                \"title\": \"\",\n                \"description\": \"\",\n                \"quantity\": 0,\n                \"unit_price\": 21.3 // Individual price, NOT collective price\n            }\n        ]\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{baseURL}}/query/expiinvoice","description":"<p>Creates an Invoice and customer(if you don't pass an ID. Check Examples for more information), and returns the Invoice object back.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access_token}}"}]},"isInherited":true,"source":{"_postman_id":"8a931021-1eec-45b6-be69-f80b979acb6c","id":"8a931021-1eec-45b6-be69-f80b979acb6c","name":"Invoice","type":"collection"}},"urlObject":{"path":["query","expiinvoice"],"host":["{{baseURL}}"],"query":[{"disabled":true,"description":{"content":"<p>Reduces response to given variable(s) and uniqueID</p>\n","type":"text/plain"},"key":"modifiers","value":""}],"variable":[]}},"response":[{"id":"091efd50-61a8-41cc-ae05-6e4412189a15","name":"Create Invoice & Customer","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"invoice\": {\n        \"uniqueID\": null, // You don't create uniqueID, the server does.\n        \"customer\": {\n            \"uniqueID\": null, // ID should be null, as the server sets the ID.\n            \"customer_information\": {\n                \"firstname\": \"\",\n                \"lastname\": \"\",\n                \"address1\": \"\",\n                \"address2\": \"\",\n                \"city\": \"\",\n                \"state\": \"\",\n                \"zip\": \"\",\n                \"country\": \"\",\n                \"phone1\": \"\",\n                \"phone2\": \"\",\n                \"email\": \"\"\n            },\n            \"billing_information\": {\n                \"firstname\": \"\",\n                \"lastname\": \"\",\n                \"address1\": \"\",\n                \"address2\": \"\",\n                \"city\": \"\",\n                \"state\": \"\",\n                \"zip\": \"\",\n                \"country\": \"\",\n                \"phone\": \"\",\n                \"email\": \"\"\n            },\n            \"custom\": {\n                \"custom1\": \"\",\n                \"custom2\": \"\",\n                \"custom3\": \"\",\n                \"custom4\": \"\",\n                \"custom5\": \"\",\n                \"custom6\": \"\",\n                \"custom7\": \"\",\n                \"custom8\": \"\",\n                \"custom9\": \"\",\n                \"custom10\": \"\"\n            },\n            \"customer_payments\": [\n                {\n                    \"paymentID\": null,\n                    \"paymenttype\": \"\",\n                    \"lastfour\": \"\",\n                    \"brand\": \"\"\n                }\n            ]\n        },\n        \"date_created\": \"\", \n        \"due_date\": \"\",\n        \"status\": \"\",\n        \"date_closed\": \"\",\n        \"invoice_number\": \"\",\n        \"notes\": \"\",\n        \"amount\": \"\",\n        \"discount\": \"\",\n        \"tax\": \"\",\n        \"shipping\": \"\",\n        \"surcharge\": \"\",\n        \"items\": [\n            {\n                \"title\": \"\",\n                \"description\": \"\",\n                \"quantity\": 0,\n                \"unit_price\": 21.3 // Individual price, NOT collective price\n            }\n        ]\n    }\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{baseURL}}/query/expiinvoice","host":["{{baseURL}}"],"path":["query","expiinvoice"],"query":[{"key":"modifiers","value":null,"description":"Any modifier for the return object. \n**This does not prevent variables from being set.** You'll have to mark them as null(or \"\") if you don't want them set.","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"{\n    \"invoice\": {\n        \"uniqueID\": {{invoice_id}},\n        \"customer\": {\n            \"uniqueID\": {{customer_id}},\n            \"customer_information\": {\n                \"firstname\": \"\",\n                \"lastname\": \"\",\n                \"address1\": \"\",\n                \"address2\": \"\",\n                \"city\": \"\",\n                \"state\": \"\",\n                \"zip\": \"\",\n                \"country\": \"\",\n                \"phone1\": \"\",\n                \"phone2\": \"\",\n                \"email\": \"\"\n            },\n            \"billing_information\": {\n                \"firstname\": \"\",\n                \"lastname\": \"\",\n                \"address1\": \"\",\n                \"address2\": \"\",\n                \"city\": \"\",\n                \"state\": \"\",\n                \"zip\": \"\",\n                \"country\": \"\",\n                \"phone\": \"\",\n                \"email\": \"\"\n            },\n            \"custom\": {\n                \"custom1\": \"\",\n                \"custom2\": \"\",\n                \"custom3\": \"\",\n                \"custom4\": \"\",\n                \"custom5\": \"\",\n                \"custom6\": \"\",\n                \"custom7\": \"\",\n                \"custom8\": \"\",\n                \"custom9\": \"\",\n                \"custom10\": \"\"\n            },\n            \"customer_payments\": [\n                {\n                    \"paymentID\": 0,\n                    \"paymenttype\": \"\",\n                    \"lastfour\": \"\",\n                    \"brand\": \"\"\n                }\n            ]\n        },\n        \"date_created\": \"\", \n        \"due_date\": \"\",\n        \"status\": \"\",\n        \"date_closed\": \"\",\n        \"invoice_number\": \"\",\n        \"notes\": \"\",\n        \"amount\": \"\",\n        \"discount\": \"\",\n        \"tax\": \"\",\n        \"shipping\": \"\",\n        \"surcharge\": \"\"\n    }\n}"},{"id":"4a555383-604c-4088-9cf5-daeaa65c72d5","name":"Customer ID","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"invoice\": {\n        \"customerID\": {{customer_id}},\n        \"date_created\": \"2025-10-06 02:02:03\", \n        \"due_date\": \"2025-10-20 02:02:03\",\n        \"status\": \"unpaid\",\n        \"date_closed\": \"\",\n        \"invoice_number\": \"20251006000001\",\n        \"notes\": \"These are notes that you can add to make the invoice a bit more detailed.\",\n        \"amount\": \"\",\n        \"discount\": \"\",\n        \"tax\": \"\",\n        \"shipping\": \"\",\n        \"surcharge\": \"\",\n        \"items\": [\n            {\n                \"title\": \"\",\n                \"description\": \"\",\n                \"quantity\": 0,\n                \"unit_price\": 21.3 // Individual price, NOT collective price\n            }\n        ]\n    }\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{baseURL}}/query?action=expiinvoice&modifiers=customer.uniqueID","host":["{{baseURL}}"],"path":["query"],"query":[{"key":"action","value":"expiinvoice","description":"Tells the server that you want to interact with \"Invoice\""},{"key":"modifiers","value":"customer.uniqueID","description":"Any modifier for the return object. \n**This does not prevent variables from being set.** You'll have to mark them as null(or \"\") if you don't want them set."}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"{\n    \"invoice\": {\n        \"customer\": {\n            \"uniqueID\": \"{{customer_id}}\"\n        },\n        \"date_created\": \"2025-10-06 02:02:03\", \n        \"due_date\": \"2025-10-20 02:02:03\",\n        \"status\": \"unpaid\",\n        \"date_closed\": \"\",\n        \"invoice_number\": \"20251006000001\",\n        \"notes\": \"These are notes that you can add to make the invoice a bit more detailed.\",\n        \"amount\": \"\",\n        \"discount\": \"\",\n        \"tax\": \"\",\n        \"shipping\": \"\",\n        \"surcharge\": \"\"\n    }\n}"},{"id":"0a83e1b7-3da4-43ae-a6f9-fde879b1658d","name":"Deprecated","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    // DEPRECATED, DO NOT USE\n    \"x_tran_key\": \"{{secretKey}}\",\n    \"x_login\": \"{{merchantKey}}\",\n    \"firstname\": \"\",\n    \"lastname\": \"\",\n    \"email\": \"\",\n    \"date_created\": \"\", \n    \"due_date\": \"\",\n    \"status\": \"\", // Can be `Paid`, `Unpaid` or `Cancelled`\n    \"date_closed\": \"\", // `Y-m-d H:i:s` so `2025-10-06 09:55:52\n    \"invoice_number\": \"\",\n    \"notes\": \"\",\n    \"amount\": \"\",\n    \"discount\": \"\",\n    \"tax\": \"\",\n    \"shipping\": \"\",\n    \"surcharge\": \"\",\n    \"items\": [\n        {\n            \"title\": \"\",\n            \"description\": \"\",\n            \"quantity\": 0,\n            \"unit_price\": 21.3 // Individual price, NOT collective price\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{baseURL}}/query?action=create_invoice","host":["{{baseURL}}"],"path":["query"],"query":[{"key":"action","value":"create_invoice","description":"Tells the server that you want to interact with \"Invoice\""}]}},"_postman_previewlanguage":"","header":[],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":""}],"_postman_id":"6d5f5ff0-b04d-42d6-a627-484971880af9"},{"name":"Get Invoice","id":"71514d03-1447-4f7d-955e-0ef550a9ca80","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{baseURL}}/query/expiinvoice?uniqueID=1639","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access_token}}"}]},"isInherited":true,"source":{"_postman_id":"8a931021-1eec-45b6-be69-f80b979acb6c","id":"8a931021-1eec-45b6-be69-f80b979acb6c","name":"Invoice","type":"collection"}},"urlObject":{"path":["query","expiinvoice"],"host":["{{baseURL}}"],"query":[{"key":"uniqueID","value":"1639"},{"disabled":true,"description":{"content":"<p>Reduces response to given variable(s) and uniqueID</p>\n","type":"text/plain"},"key":"modifiers","value":""}],"variable":[]}},"response":[{"id":"25af9980-56cd-4745-addd-f8f62b38eaea","name":"Get Invoice","originalRequest":{"method":"GET","header":[],"url":{"raw":"{{baseURL}}/query?action=expiinvoice&uniqueID=1638","host":["{{baseURL}}"],"path":["query"],"query":[{"key":"action","value":"expiinvoice","description":"Tells the server that you want to interact with \"Invoice\""},{"key":"modifiers","value":"","description":"Any modifier for the return object. \n**This does not prevent variables from being set.** You'll have to mark them as null(or \"\") if you don't want them set.","disabled":true},{"key":"uniqueID","value":"1638"}]}},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null}],"_postman_id":"71514d03-1447-4f7d-955e-0ef550a9ca80"},{"name":"Get Invoices","id":"728544fc-04db-4592-b08e-b3cf326056c3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{baseURL}}/query/expiinvoice?sort","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access_token}}"}]},"isInherited":true,"source":{"_postman_id":"8a931021-1eec-45b6-be69-f80b979acb6c","id":"8a931021-1eec-45b6-be69-f80b979acb6c","name":"Invoice","type":"collection"}},"urlObject":{"path":["query","expiinvoice"],"host":["{{baseURL}}"],"query":[{"disabled":true,"description":{"content":"<p>Reduces response to given variable(s) and uniqueID</p>\n","type":"text/plain"},"key":"modifiers","value":""},{"disabled":true,"description":{"content":"<p>Filters response by given variable(s)</p>\n","type":"text/plain"},"key":"filters","value":""},{"description":{"content":"<p>Sorts response by given variable</p>\n","type":"text/plain"},"key":"sort","value":null}],"variable":[]}},"response":[],"_postman_id":"728544fc-04db-4592-b08e-b3cf326056c3"},{"name":"Update Invoice","id":"adc27c12-00ed-400a-933c-bffb8434b6e2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"invoice\": {\n        \"uniqueID\": 1638,\n        \"customer\": {\n            \"uniqueID\": 6202,\n            \"customer_information\": {\n                \"firstname\": \"Test\"\n            }\n        }\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{baseURL}}/query/expiinvoice","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access_token}}"}]},"isInherited":true,"source":{"_postman_id":"8a931021-1eec-45b6-be69-f80b979acb6c","id":"8a931021-1eec-45b6-be69-f80b979acb6c","name":"Invoice","type":"collection"}},"urlObject":{"path":["query","expiinvoice"],"host":["{{baseURL}}"],"query":[{"disabled":true,"description":{"content":"<p>Reduces response to given variable(s) and uniqueID</p>\n","type":"text/plain"},"key":"modifiers","value":""}],"variable":[]}},"response":[],"_postman_id":"adc27c12-00ed-400a-933c-bffb8434b6e2"},{"name":"Delete Invoice","id":"640e2831-9fa4-4fa8-bdfe-49d33ec79ab2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"{{baseURL}}/query/expiinvoice?uniqueID=1638","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access_token}}"}]},"isInherited":true,"source":{"_postman_id":"8a931021-1eec-45b6-be69-f80b979acb6c","id":"8a931021-1eec-45b6-be69-f80b979acb6c","name":"Invoice","type":"collection"}},"urlObject":{"path":["query","expiinvoice"],"host":["{{baseURL}}"],"query":[{"key":"uniqueID","value":"1638"}],"variable":[]}},"response":[],"_postman_id":"640e2831-9fa4-4fa8-bdfe-49d33ec79ab2"}],"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access_token}}"}]}},"event":[{"listen":"prerequest","script":{"id":"baa9b9b8-6820-48f5-b2a0-8fd07c871a2f","type":"text/javascript","requests":{},"exec":[""]}},{"listen":"test","script":{"id":"d5cf6fc4-991a-4bbc-b396-c207b31eb082","type":"text/javascript","requests":{},"exec":["pm.test(\"Check for 401 Unauthorized\", function () {","    pm.expect(pm.response.code).to.not.eql(401, \"Unauthorized: Please use query/login to continue.\");","});"]}}],"variable":[{"key":"id","value":"1"},{"key":"base_url","value":"https://99318cc5-f2db-4208-ad3a-d1964e768001.mock.pstmn.io"}]}