Sign Up

Log In

Generate and send PDF receipts via email.

FREEMIUM
By OxeBox
Updated 6 hours ago
6/10
Popularity Score
2007ms
Latency
100%
Success Rate

Generate and send PDF receipts via email. API Overview

OxeBox API enables the developers who are building e-commerce/other solutions, that require digital receipts, to generate and securely send digital receipts over email.

Creating PDF bill receipt involves setting up third-party library and development efforts & receipts sent to customers via email often land in users's SPAM folder due to poor server reputation. OxeBox API primarily solves these two problems by creating awesome PDF bill receipts on-the-fly and delivering them to user's inbox via its dedicated email service.

API Documentation : Generate and send PDF receipts via email

https://oxebox.com/c/rapid-api.php OxeBox platform enables the developers building e-commerce solutions to generate and securely send digital receipts over email.

Creating PDF bill receipt involves setting up third-party library and development efforts & receipts sent to customers via email often land in users' SPAM folder due to poor server reputation. OxeBox API primarily solves these two problems by creating awesome PDF bill receipts on-the-fly and delivering them to user's inbox via its dedicated email service.

All the bills receipts are sent from receipts@oxebox.com email address, You can use your company name set as part of JSON request in 'From Name' and use your 'Reply To' E-mail as the reply-to address if any of your customers were to respond to the email.

Apart from sending email bill receipts, you can also embed latest offers, or your social media handles like facebook, youtube, twitter or Instagram on the bill for user engagement.

The basic structure of the JSON payload and what all different sections mean is explained below.

    + StoreDetails (object)
        + Name (string)
            Name of your store
        + LogoUrl (string)
            Complete URL representing the logo of your store
        + TaxDetails (string)
            Your store's tax id's i.e. GST/State/TIN information etc that you want to display on the receipt. Its possible to provide multiple Tax ID's seperated by semi-colon (;). The format should be <TaxID><colon><TaxValue> . Ex: TaxID-1:TaxValue-1;TaxID-2:TaxValue2
        + Phone (number)
            Your store's phone number
        + Address (object)
            This will be your store address. Currency codes for bill receipt is automatically fetched based on the country of your business, so please make sure you are using only countries listed below.
            + AddressLine1 (string)
            + AddressLine2 (string)
            + Area (string)
            + City (string)
            + Zipcode(string)
            + Country(string)
        + ReceiptHeader (string)
            Text that you want to display on receipt header
        + ReceiptFooter (string)
            Text that you want to display on receipt footer
    + CustomerDetails (object)
        + Name (string)
            Name of the customer doing the purchase
        + Phone (number)
            Mobile number of the customer where OxeBox smart bill will be sent to.
        + CountryCode (number)
            Country code of the user mobile number, required if the mobile number is provided
        + Email (object)
            + recepientEmail (string)
                Email-id  where bill receipt will be sent
            + subject (string)
                The subject line of the email bill receipt
            + fromEmail (string, read-only)
                Email-id of the sender. All the bills are sent from [email protected] 
            + fromName (string)
                Name of the business who is sending the bill receipt to show on the email.
            + replyToEmail (string)
                This email-id will be used as a reply-to address if any of your customers were to respond to email
    + BillingDetails (object)
        + BillReceiptID (string, required)
            Receipt number of the bill, must be unique for every bill
        + TransactionDate (string, required)
            Date of billing (Format: YYYY-MM-DD e.g. 2017-09-30 for 30th Sep 2017)
        + TransactionTime (string, required)
            The time when the bill is generated. (Format: HH:MM:SS in 24hrs format. E.g. 22:10:10)
        + AdditionalDetails (array)
            An array of any additional details that you want to display on the bill
            + (object)
                + Name (string)
                + Value (string)
        + PaymentDetails (array)
            An array of any payment methods like card/cash etc used for making the bill payment
            + (object)
                + Amount (number, required)
                + Type (string, required)  
                + Cashier (string)
        + ItemDetails (array, required)
            An array of billing items that have been purchased. You can also provide item-wise discounts, taxes and sub-items. 
            + (object)
                + ItemCode (string)
                + ItemName (string, required) 
                + ItemHeader (string) 
                + ItemQty (number, required) 
                + ItemUnit (string) 
                + ItemPrice (number, required) 
                + ItemTotal (number, required) 
                + SubItems (array)
                    An array of sub-items related to the main item, for e.g. a Pizza can have additional toppings, cheese etc.
                    + (object)
                        + ItemName (string, required) 
                        + ItemQty (number, required) 
                        + ItemUnit (string) 
                        + ItemPrice (number, required) 
                        + ItemTotal (number, required) 
                + Discounts (array)
                    The array of discounts to be applied to the individual billing item. If the discount is in percentage, you need to provide Percent value, otherwise, you can keep it blank.
                    + (object)
                        + Name (string, required)
                        + Total (number, required)
                        + Percent (number)  
                + Taxes (array)
                    Array of taxes to be applied on the individual billing item. If the tax is in percentage, you need to provide Percent value, otherwise, you can keep it blank.
                    + (object)
                        + Name (string, required)
                        + Total (number, required)
                        + Percent (number)
        + Discounts (array)
             Array of discounts to be applied on the overall bill. If the discount is in percentage, you need to provide Percent value, otherwise, you can keep it blank.
            + (object)
                + Name (string, required)
                + Total (number, required)
                + Percent (number)  
        + Taxes (array)
             Array of taxes to be applied on the overall bill. If the discount is in percentage, you need to provide Percent value, otherwise, you can keep it blank.
            + (object)
                + Name (string, required)
                + Total (number, required)
                + Percent (number)
        + SubTotal (string)
        + GrandTotal (string)
        + RoundOff (string)
        + TotalBillAmount (string, required)
        + AdditionalCharges (array)
            An array of additional charges that you may want to put along with their discounts and taxes. For e.g, you may want to put delivery charges for an order delivery or packaging charges for some food delivery items and so on. 
            + (object)
                + Name (string, required)
                + Amount (number, required)
                + Discounts (array)
                    + (object)
                        + Name (string, required)
                        + Total (number, required)
                        + Percent (number)  
                + Taxes (array)
                    + (object)
                        + Name (string, required)
                        + Total (number, required)
                        + Percent (number)
        + BillingAddress (object)
            Customer details that you want to put as billing address on receipt.
            + AddressLine1 (string)
            + AddressLine2 (string)
            + Area (string)
            + City (string)
            + State (string)
            + Zip(string)
            + Country(string)
            + Name(string)
            + Phone(string)
        + ShippingAddress (object)
            Customer details that you want to put as shipping address on receipt.
            + AddressLine1 (string)
            + AddressLine2 (string)
            + Area (string)
            + City (string)
            + State (string)
            + Zip(string)
            + Country(string)
            + Name(string)
            + Phone(string)
    + StorePromotions (object)
        + OfferImage (string)
            Url for ongoing store promotion/discount-coupon image that you want to put on the bill
        + facebook_link (string)
            Url for your store's Facebook channel that you want to put on the bill
        + twitter_link (string)
            Url for your store's Twitter channel that you want to put on the bill
        + instagram_link (string)
            Url for your store's Instagram channel that you want to put on the bill
        + youtube_link (string)
            Url for your store's Youtube channel that you want to put on the bill

Here is a list of supported countries. Please make sure you put one of the countries

AFGHANISTAN, ALAND ISLANDS, ALBANIA, ALGERIA, ANDORRA, ANGOLA, ANGUILLA, ANTIGUA AND BARBUDA, ARGENTINA, ARMENIA, ARUBA, AUSTRALIA, AUSTRIA, AZERBAIJAN, BAHAMAS, BAHRAIN, BANGLADESH, BARBADOS, BELARUS, BELGIUM, BELIZE, BENIN, BERMUDA, BHUTAN, BOLIVIA, BONAIRE, SINT EUSTATIUS AND SABA, BOSNIA AND HERZEGOVINA, BOTSWANA, BOUVET ISLAND, BRAZIL, BRITISH INDIAN OCEAN TERRITORY, BRUNEI, BULGARIA, BURKINA FASO, BURUNDI, CAMBODIA, CANADA, CAPE VERDE, CAYMAN ISLANDS, CENTRAL AFRICAN REPUBLIC, CHAD, CHILE, CHINA, CHRISTMAS ISLAND, COCOS (KEELING) ISLANDS, COLOMBIA, COMOROS, CONGO, CONGO, THE DEMOCRATIC REPUBLIC OF THE, COOK ISLANDS, COSTA RICA, CROATIA, CUBA, CURAÇAO, CYPRUS, CZECH REPUBLIC, CÔTE D'IVOIRE, DENMARK, DJIBOUTI, DOMINICA, DOMINICAN REPUBLIC, ECUADOR, EGYPT, EL SALVADOR, EQUATORIAL GUINEA, ERITREA, ESTONIA, ETHIOPIA, FALKLAND ISLANDS (MALVINAS), FAROE ISLANDS, FIJI, FINLAND, FRANCE, FRENCH GUIANA, FRENCH POLYNESIA, FRENCH SOUTHERN TERRITORIES, GABON, GAMBIA, GEORGIA, GERMANY, GHANA, GIBRALTAR, GREECE, GREENLAND, GRENADA, GUADELOUPE, GUATEMALA, GUERNSEY, GUINEA, GUINEA BISSAU, GUYANA, HAITI, HEARD ISLAND AND MCDONALD ISLANDS, HOLY SEE (VATICAN CITY STATE), HONDURAS, HONG KONG, HUNGARY, ICELAND, INDIA, INDONESIA, IRAN, ISLAMIC REPUBLIC OF, IRAQ, IRELAND, ISLE OF MAN, ISRAEL, ITALY, JAMAICA, JAPAN, JERSEY, JORDAN, KAZAKHSTAN, KENYA, KIRIBATI, KOREA, DEMOCRATIC PEOPLE'S REPUBLIC OF, KOSOVO, KUWAIT, KYRGYZSTAN, LAO PEOPLE'S DEMOCRATIC REPUBLIC, LATVIA, LEBANON, LESOTHO, LIBERIA, LIBYAN ARAB JAMAHIRIYA, LIECHTENSTEIN, LITHUANIA, LUXEMBOURG, MACAO, MACEDONIA, REPUBLIC OF, MADAGASCAR, MALAWI, MALAYSIA, MALDIVES, MALI, MALTA, MARTINIQUE, MAURITANIA, MAURITIUS, MAYOTTE, MEXICO, MOLDOVA, REPUBLIC OF, MONACO, MONGOLIA, MONTENEGRO, MONTSERRAT, MOROCCO, MOZAMBIQUE, MYANMAR, NAMIBIA, NAURU, NEPAL, NETHERLANDS, NETHERLANDS ANTILLES, NEW CALEDONIA, NEW ZEALAND, NICARAGUA, NIGER, NIGERIA, NIUE, NORFOLK ISLAND, NORWAY, OMAN, PAKISTAN, PALESTINIAN TERRITORY, OCCUPIED, PANAMA, PAPUA NEW GUINEA, PARAGUAY, PERU, PHILIPPINES, PITCAIRN, POLAND, PORTUGAL, QATAR, REPUBLIC OF CAMEROON, REUNION, ROMANIA, RUSSIA, RWANDA, SAINT BARTHÉLEMY, SAINT HELENA, SAINT KITTS AND NEVIS, SAINT LUCIA, SAINT MARTIN, SAINT PIERRE AND MIQUELON, SAMOA, SAN MARINO, SAO TOME AND PRINCIPE, SAUDI ARABIA, SERBIA, SENEGAL, SEYCHELLES, SIERRA LEONE, SINGAPORE, SINT MAARTEN, SLOVAKIA, SLOVENIA, SOLOMON ISLANDS, SOMALIA, SOUTH AFRICA, SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS, SOUTH KOREA, SOUTH SUDAN, SPAIN, SRI LANKA, ST. VINCENT, SUDAN, SURINAME, SVALBARD AND JAN MAYEN, SWAZILAND, SWEDEN, SWITZERLAND, SYRIA, TAIWAN, TAJIKISTAN, TANZANIA, UNITED REPUBLIC OF, THAILAND, TIMOR LESTE, TOGO, TOKELAU, TONGA, TRINIDAD AND TOBAGO, TUNISIA, TURKEY, TURKMENISTAN, TURKS AND CAICOS ISLANDS, TUVALU, UGANDA, UKRAINE, UNITED ARAB EMIRATES, UNITED KINGDOM, UNITED STATES, UNITED STATES MINOR OUTLYING ISLANDS, URUGUAY, UZBEKISTAN, VANUATU, VENEZUELA, VIETNAM, VIRGIN ISLANDS, BRITISH, WALLIS AND FUTUNA, WESTERN SAHARA, YEMEN, ZAMBIA, ZIMBABWE

Log inSign up

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.post("https://oxebox-generate-a-new-oxebox-bill-receipt-v1.p.rapidapi.com/generateNewBill")
.header("X-RapidAPI-Key", "undefined")
.header("Content-Type", "application/json")
.send({"StoreDetails":{"Name":"Jamies Cafe","LogoUrl":"https://www.oxebox.com/assets/images/store_logo/store_5bfbb2b7b1863.png","TaxDetails":"","Phone":"+18008563275","ReceiptHeader":"Welcome to Jamies Cafe","ReceiptFooter":"Thanks for your visit !!!","Address":{"AddressLine1":"P.O. Box 649","AddressLine2":"6067 Vel Road 652374 ","City":"Fuenlabrada","Area":"Anguilla","Zipcode":"23456","Country":"SPAIN"}},"CustomerDetails":{"Name":"Zeph Foreman","Phone":"","CountryCode":"","Email":{"recepientEmail":"","subject":"Here is the receipt for your recent order from Jamies Cafe","fromEmail":"[email protected]","fromName":"Jamies T-shirts","replyToEmail":""}},"BillingDetails":{"BillReceiptID":"Rec-1088686AABC","TransactionDate":"2018-11-30","TransactionTime":"22:10:01","AdditionalDetails":[{"Name":"Table No","Value":"1234"},{"Name":"Order No","Value":"06161"}],"PaymentDetails":[{"Amount":4000,"Type":"card","Cashier":"John Rock"},{"Amount":1646,"Type":"cash","Cashier":"John Rock"}],"ItemDetails":[{"ItemCode":"Pizza - 01","ItemName":"Exotica Supreme Pizza","ItemHeader":"12 medium, extra cheeze,olives","ItemQty":20,"ItemUnit":"pcs","ItemPrice":40,"ItemTotal":800,"SubItems":[{"ItemName":"Extra cheese","ItemQty":1,"ItemUnit":"pcs","ItemPrice":29,"ItemTotal":29},{"ItemName":"Extra Toppings","ItemQty":2,"ItemUnit":"pcs","ItemPrice":55,"ItemTotal":110}]},{"ItemCode":"Pizza-02","ItemName":"Triple chicken feast pizza","ItemHeader":"Crust: Pan, Medium, spicy","ItemQty":40,"ItemUnit":"pcs","ItemPrice":100,"ItemTotal":4000,"Discounts":[{"Name":"Store Promo","Total":99,"Percent":0},{"Name":"Additional discount","Total":18,"Percent":9}],"Taxes":[{"Name":"SGST 6","Total":240,"Percent":6},{"Name":"SGST 9","Total":240,"Percent":9}]}],"Discounts":[{"Name":"Store Promo","Total":99,"Percent":""},{"Name":"Bulk discount","Total":400,"Percent":""}],"Taxes":[{"Name":"SGST","Total":222.86,"Percent":6},{"Name":"CGST","Total":222.86,"Percent":9}],"SubTotal":5600,"GrandTotal":0,"RoundOff":0.29,"TotalBillAmount":5646,"AdditionalCharges":[{"Name":"Delivery Charges","Amount":4000,"Discounts":[{"Name":"Store Promo","Total":99,"Percent":""},{"Name":"Additional discount","Total":18,"Percent":9}],"Taxes":[{"Name":"CGST 9","Total":7.63,"Percent":9},{"Name":"SGST 9","Total":7.63,"Percent":9}]}],"BillingAddress":{"AddressLine1":"954 Dui. St.","AddressLine2":"Leganes ACT","Area":"BTM","City":"Hartford","State":"Mayotte","Zip":16205,"Country":"SPAIN","Name":"Isaiah Marquez","Phone":"+61423475219"},"ShippingAddress":{"AddressLine1":"954 Dui. St.","AddressLine2":"Leganes ACT","Area":"BTM","City":"Hartford","State":"Mayotte","Zip":16205,"Country":"SPAIN","Name":"Isaiah Marquez","Phone":"+61423475219"}},"StorePromotions":{"OfferImage":"https://www.oxebox.com/assets/images/store_promo/promo_5a66a9fae0c2d.png","facebook_link":"https://www.facebook.com/Munafa-Mart-2019937031565683/","twitter_link":"https://twitter.com/munafamart","instagram_link":"https://www.instagram.com/dominos/?hl=en","youtube_link":"https://www.youtube.com/watch?v=dKwDkzdUZvI"}})
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication
Sign up for freeto test this endpoint
Join the world’s largest API marketplace with over half a million developers and thousands of APIs.
DiscoverAPIs
Testfrom the browser
Connectusing code snippets
Managefrom one dashboard