Receipt Slip Template
Receipt Receipt Slip Template
This receipt slip template converts JSON to PDF, allowing you to manage the structure and information through the JSON payload.
Info
Information to call the Receipt Slip Template
API End Point:
https://api.advicement.io/v1/templates/pub-general-json-to-pdf-template-v2/compile
Authentication:
Use your API Security Token (which is generated in your dashboard) in the Adv-Security-Token header parameter
Refer to our authentication guide for more information.
Uses Luatex:
FALSE
Uses Charts:
FALSE
Available On:

Receipt Slip Template

The Receipt Slip Template is a cutting-edge solution designed to simplify and enhance the process of generating professional and detailed receipts for a variety of transactions. Powered by the DynamicDocs API, this advanced template effortlessly transforms your transaction data, structured in JSON format, into well-formatted, print-ready receipt slips.

With this template, you have the flexibility to customize various elements of the receipt, including logos, payment details, and itemized lists. Through seamless JSON data integration, you can efficiently manage transaction information, ensuring accuracy and completeness in every receipt.

By harnessing the capabilities of the DynamicDocs API, the Receipt Slip Template ensures that your receipts align with your business's branding and professionalism, providing a polished and organized record of transactions for both you and your customers.

Use Cases for JSON to Receipt Slip Conversion

  1. Retail Businesses: Ideal for stores and online retailers looking to generate detailed and branded receipts for customer transactions, promoting transparency and professionalism.
  2. Service Providers: Professionals such as freelancers, consultants, and service providers can use this template to create itemized receipts for their clients, ensuring clarity in billing.
  3. Restaurants and Cafes: Establishments in the food and beverage industry can produce neatly formatted receipts for customer orders, enhancing the overall dining experience.
  4. Event Organizers: Receipts for ticket sales, merchandise, or registration fees can be efficiently generated using this template, providing attendees with clear documentation of their transactions.
  5. Rental Services: Companies renting equipment or spaces can utilize this template to issue professional receipts, documenting rental agreements and payment details.
  6. Non-Profit Organizations: Charities and non-profits can leverage this template for donation receipts, ensuring compliance with tax regulations and providing donors with clear acknowledgment.

Key Takeaways

In summary, the Receipt Slip Template is an invaluable tool for businesses and individuals aiming to streamline their transaction documentation. It simplifies the creation of detailed and professional receipts through quick and automated data integration via JSON, all backed by the reliable DynamicDocs API. Elevate your customer experience and financial record-keeping with well-designed receipt slips that reflect your brand and commitment to transparency.

{ "documentSettings": { "primaryHEXColour": "343D49", "secondaryHEXColour": "0dbb72", "textHEXColour": "444444", "font": "roboto", "fontSize": 7, "documentName": "Receipt Template from ADVICEment", "logoType": "png", "logoWidth": "4.5cm", "paperWidth": "5.5cm", "topMargin": "0.1cm", "rightMargin": "0.2cm", "bottomMargin": "0.1cm", "leftMargin": "0.2cm", "headheight": "3.13cm", "headsep": "0.5cm", "footskip": "1.5cm", "includehead": false, "includefoot": false, "showframe": false, "latexPreamble": "\\usepackage[active,tightpage]{preview} \\usepackage{lipsum} \\usepackage{multirow} \\usepackage[gen]{eurosym} \\usepackage{moresize} \\newcommand\\asteriskfill{\\leavevmode\\xleaders\\hbox{$\\ast$}\\hfill\\kern0pt} \\usepackage{qrcode} \\renewcommand{\\PreviewBorder}{0.5cm} \\newcommand{\\Newpage}{\\end{preview}\\begin{preview}}", "header": { "headerLine": false, "leftContent": "", "centerContent": " ", "rightContent": " ", "adjustMargin": "1cm" }, "footer": { "footerLine": false, "leftContent": "", "centerContent": " ", "rightContent": " ", "adjustMargin": "1cm" } }, "documentContent": { "content": [ { "type": "latex", "content": "\\begin{preview}", "order": 0 }, { "type": "latex", "content": "\\asteriskfill", "order": 1 }, { "type": "latex", "content": "\\bigskip \\centering \\large RECEIPT \\medskip", "order": 2 }, { "type": "latex", "content": "\\asteriskfill", "order": 3 }, { "type": "latex", "content": "\\vspace{0.5cm}", "order": 5 }, { "type": "latex", "content": "\\footnotesize \\RaggedRight \\textbf{Terminal}", "order": 6 }, { "type": "latex", "content": "\\footnotesize \\RaggedRight \\textbf{01-02-2023 at 11:32 AM}", "order": 7 }, { "type": "latex", "content": "\\vspace{0.25cm}", "order": 8 }, { "type": "latex", "content": "\\dotfill", "order": 9 }, { "type": "latex", "content": "\\vspace{0.25cm} \\renewcommand{\\arraystretch}{1.5} \\setlength{\\tabcolsep}{1pt}", "order": 10 }, { "type": "kable", "content": "kable(data.frame(lapply(params$documentContent$costBreakdownInfo,latexifyWithCommands)), escape = FALSE, format = 'latex', format.args = list(scientific = FALSE, big.mark = ' '), col.names = NULL, align = c('L{2.5cm}','R{2cm}'),booktabs = T, bottomrule = '',toprule = '',midrule = '',linesep = '') %>% kable_styling(font_size = 6) %>% stri_replace_all_fixed('\\\\begin{table}', '') %>% stri_replace_all_fixed('\\\\end{table}', '')", "order": 11 }, { "type": "latex", "content": "\\smallskip \\dotfill", "order": 12 }, { "type": "latex", "content": "\\vspace{0.25cm}", "order": 13 }, { "type": "kable", "content": "kable(data.frame(lapply(params$documentContent$costBreakdownTotal,latexifyWithCommands)), escape = FALSE, format = 'latex', format.args = list(scientific = FALSE, big.mark = ' '), col.names = NULL, align = c('L{2.5cm}','R{2cm}'),booktabs = T, bottomrule = '',toprule = '',midrule = '',linesep = '') %>% kable_styling(font_size = 6) %>% stri_replace_all_fixed('\\\\begin{table}', '') %>% stri_replace_all_fixed('\\\\end{table}', '')", "order": 20 }, { "type": "latex", "content": "\\smallskip \\dotfill", "order": 25 }, { "type": "latex", "content": "\\vspace{0.25cm}", "order": 30 }, { "type": "latex", "content": "\\vspace{0.25cm}", "order": 40 }, { "type": "latex", "content": "\\qrcode[height=1.25cm]{https://advicement.io} \\bigskip", "order": 45 }, { "type": "latex", "content": "\\vspace{0.25cm}", "order": 46 }, { "type": "latex", "content": "\\asteriskfill \\hspace{10pt}THANK YOU! \\hspace{10pt}\\asteriskfill", "order": 47 }, { "type": "latex", "content": "\\end{preview}", "order": 50 } ], "costBreakdownTotal": [ { "column1": "\\bfseries TOTAL AMOUNT", "column2": "\\bfseries \\euro{} 363.99" }, { "column1": "CASH", "column2": "\\euro{} 400.00" }, { "column1": "CHANGE", "column2": "\\euro{} 36.01" }, { "column1": " ", "column2": " " }, { "column1": "Bank Card", "column2": "**** **** 7211" }, { "column1": "Approval No.", "column2": "192107" } ], "costBreakdownInfo": [ { "column1": "1x T-Shirt", "column2": "\\euro{} 25.50" }, { "column1": "1x Watch", "column2": "\\euro{} 199.00" }, { "column1": "1x Cap", "column2": "\\euro{} 49.00" }, { "column1": "1x Shorts", "column2": "\\euro{} 50.00" }, { "column1": "1x Pants", "column2": "\\euro{} 32.99" }, { "column1": "1x Socks", "column2": "\\euro{} 6.50" } ] } }

documentSettings - A JSON object which contains the settings of the template (primaryHEXColour, secondaryHEXColour, textHEXColour, font, documentName, logo, logoType, logoWidth, margins, headSep, footSkip, showframe, header, footer).

font - An optional string which contains the font of the document. Possible options are: 'helvetica', 'avant garde', 'sans serif', 'charter', 'open sans', 'bera', 'venturis', 'raleway', 'overlock', 'roboto', 'spectral', 'clear sans', 'noto sans', 'noto mono', 'josefin', 'bera sans', 'latin modern', 'theano modern', 'droid sans', 'fira sans', 'XCharter', 'bookman', 'gyre bonum', 'gyre schola', 'gyre termes'.

fontSize - An optional integer which contains the font size of the document. Possible options are: 8, 9, 10, 11, 12, 14.

primaryHEXColour - An optional string which contains the primary font colour of the document.

secondaryHEXColour - An optional string which contains the secondary font colour of the document.

textHEXColour - An optional string which contains the text font colour of the document.

documentName - An optional string for the name of the document.

topMargin - An optional string containing the top margin size (in cm).

rightMargin - An optional string containing the right margin size (in cm).

bottomMargin - An optional string containing the bottom margin size (in cm).

leftMargin - An optional string containing the left margin size (in cm).

headheight - An optional string relating to the height of the header (in cm). See LaTeX geometry package documentation for more information on this parameter.

headSep - An optional string relating to the space between the header and the beginning of the document (in cm). See LaTeX geometry package documentation for more information on this parameter.

footSkip - An optional string relating to the space between the end of the document and the footer (in cm). See LaTeX geometry package documentation for more information on this parameter.

paperHeight - An optional string relating to the height of the paper size (in cm). See LaTeX geometry package documentation for more information on this parameter.

paperWidth - An optional string relating to the width of the paper size (in cm). See LaTeX geometry package documentation for more information on this parameter.

includehead - A boolean expression which determines whether the header is part of the top margin (false) or below it (true).

includehead - A boolean expression which determines whether the footer is part of the bottom margin (false) or below it (true).

showFrame - A boolean expression (true/false) to show the frame of the document.

header - An object containing settings to control the header.

headerLine - A boolean expression that generates a horizontal line between the header and the beginning of the document.

leftContent - The content that appears on the left-hand side of the header. Can contain LaTeX commands, text or simply 'logo'.

centreContent - The content that appears in the centre of the header. Can contain LaTeX commands, text or simply 'logo'.

rightContent - The content that appears of the right-hand side of the header. Can contain LaTeX commands, text or simply 'logo'.

adjustMargin - An optional string containing whether the header margin needs to be adjusted sideways (in cm).

footer - An object containing settings to control the footer.

footerLine - A boolean expression that generates a horizontal line between the footer and the end of the document.

leftContent - The content that appears on the left-hand side of the footer. Can contain LaTeX commands, text or simply 'logo'.

centreContent - The content that appears in the centre of the footer. Can contain LaTeX commands, text or simply 'logo'.

rightContent - The content that appears of the right-hand side of the footer. Can contain LaTeX commands, text or simply 'logo'.

adjustMargin - An optional string containing whether the header margin needs to be adjusted sideways (in cm).

latexPreamble - Contains custom LaTeX commands which will be inserted before '\begin{document}'.

documentContent - A JSON object which contains the content of the template and other data for charts and tables).

content - A required object which contains the data for the right column on the first page.

type - A required string which contains the type of text for the body of the document. Possible options are: 'heading', 'section', 'subsection', 'paragraph', 'newpage', 'enumerate', 'itemize', 'table'.

content - A required string or array of strings which contains the text for the body of the document. Can contain LaTeX commands. Note that in an event of a table, this contains the key-name for the table.

order - A required number which determines the order of the text.

height - An optional parameter controling the height of the chart.

width - An optional parameter controling the width of the chart.