Modèle de courriel des factures
Ce modèle est envoyé chaque fois qu'une nouvelle commande est complétée.
Lorsque vous créez votre modèle de facture, vous aurez accès à des données spécifiques à la facture :
Données du modèle de facture
{
"context": "Email",
"settings": {
"signature": "<p>SNIPCART <br /><br />\nsnipcart.com <br /><br />\n<br /><br />\nBureau de Québec (administration) <br /><br />\n4885 1ere Avenue <br /><br />\nQuébec (Québec) G1H 2T5 <br /><br />\ngeeks@snipcart.com <br /><br />\n1 418 800 8440 <br /><br />\n<br /><br />\nTPS #XXXXXXXXXX <br /><br />\nTVQ #XXXXXXXXXX <br /></p>\n",
"businessAddress": {
"company": "snipcart.com",
"address1": "226 rue St-Joseph Est",
"address2": null,
"city": "Québec",
"country": "CA",
"postalCode": "G1K3A9",
"province": "QC",
"phone": null
},
"includeProductImagesInInvoice": false,
"logoUrl": "https://snipcart.com/images/snipcart_logo.svg",
"orderHistoryUrl": null
},
"order": {
"isRecurringInvoice": false,
"token": "b698211d-02bc-4745-8ea7-6f8330a53136",
"email": "john.doe@example.com",
"mode": "Live",
"status": "Processed",
"shipToBillingAddress": false,
"billingAddress": {
"fullName": "John Doe",
"firstName": null,
"name": "John Doe",
"company": "Snipcart",
"address1": "226 rue St-Joseph Est",
"address2": null,
"city": "Québec",
"country": "CA",
"postalCode": "G1K 3A9",
"province": "QC",
"phone": null
},
"modificationDate": "2016-10-06T18:59:43.4305264Z",
"shippingAddress": {
"fullName": "John Doe",
"firstName": null,
"name": "John Doe",
"company": "Snipcart",
"address1": "226 rue St-Joseph Est",
"address2": null,
"city": "Québec",
"country": "CA",
"postalCode": "G1K 3A9",
"province": "QC",
"phone": null
},
"completionDate": "2016-10-05T18:59:43.4305264Z",
"invoiceNumber": "SNIP-1001",
"shippingInformation": {
"provider": null,
"fees": 20,
"method": "Standard shipping"
},
"paymentMethod": "CreditCard",
"card": {
"last4Digits": "4242",
"ownerName": null,
"type": "Visa"
},
"summary": {
"subtotal": 100,
"taxableTotal": 150,
"total": 120,
"payableNow": 120,
"paymentMethod": "CreditCard",
"taxes": [],
"upcomingPayments": [
{
"name": "Monthly plan",
"subtotal": 20,
"taxableTotal": 0,
"date": "2016-10-05T00:00:00Z",
"total": 20,
"paymentMethod": 0,
"taxes": [],
"adjustedTotal": null
}
],
"adjustedTotal": 100
},
"items": [
{
"uniqueId": "a5871a31-e219-4748-944e-750077e985ff",
"token": null,
"id": "tshirt",
"name": "Geek T-Shirt",
"price": 50,
"description": null,
"url": "/",
"image": "https://placeholdit.imgix.net/~text?txtsize=14&txt=150%C3%97150&w=150&h=150",
"quantity": 2,
"minQuantity": null,
"maxQuantity": null,
"stackable": false,
"shippable": false,
"taxable": true,
"taxes": [],
"customFields": [
{
"name": "Size",
"operation": null,
"type": null,
"options": null,
"required": false,
"value": "Medium",
"optionsArray": null
},
{
"name": "Color",
"operation": null,
"type": null,
"options": null,
"required": false,
"value": "Red",
"optionsArray": null
}
],
"duplicatable": false,
"alternatePrices": null,
"unitPrice": 50,
"totalPrice": 100,
"addedOn": "2016-10-05T17:59:43.4305264Z"
},
{
"uniqueId": "c2516b1f-0d7d-414d-82df-59537756d08b",
"token": null,
"id": "poster",
"name": "Awesome poster",
"price": 10,
"description": null,
"url": "/",
"image": "https://placeholdit.imgix.net/~text?txtsize=14&txt=150%C3%97150&w=150&h=150",
"quantity": 3,
"minQuantity": null,
"maxQuantity": null,
"stackable": false,
"shippable": false,
"taxable": true,
"taxes": [],
"customFields": [],
"duplicatable": false,
"alternatePrices": null,
"unitPrice": 10,
"totalPrice": 30,
"addedOn": "2016-10-05T17:59:43.4305264Z"
}
],
"discounts": [
{
"id": "18a2add9-660c-49a4-93b4-e050c6f19734",
"amountSaved": 50,
"name": "50$ off",
"value": -50,
"type": "FixedAmount",
"trigger": "Code",
"code": "50_OFF",
"affectedItems": []
}
],
"customFields": [
{
"name": "Comment",
"operation": null,
"type": null,
"options": null,
"required": false,
"value": "This is a comment on this order",
"optionsArray": null
},
{
"name": "Accept terms",
"operation": null,
"type": null,
"options": null,
"required": false,
"value": "true",
"optionsArray": null
}
],
"plans": [
{
"orderToken": null,
"uniqueId": "e4df38ba-6a87-4c83-83de-afb3141229df",
"id": "MTLY_PLAN",
"url": "/",
"name": "Monthly plan",
"subscriptionId": null,
"interval": "Month",
"intervalCount": 0,
"trialPeriodInDays": null,
"amount": 20,
"totalAmount": 20,
"amountWithTaxes": 20,
"totalAmountWithTaxes": 20,
"quantity": 1,
"metadata": null
}
],
"refunds": [
{
"amount": 20,
"comment": "Refunded after speaking with customer.",
"notifyCustomer": false,
"refundedByPaymentGateway": false,
"creationDate": "2016-10-06T18:59:43.4305264Z"
}
],
"currency": null,
"totalWeight": 0,
"total": 120
}
}