Link Search Menu Expand Document

Receipt created webhook

Triggered as a result of a basket being sent successfully to Spaaza and a digital receipt being subsequently created in Spaaza.

The object returned as a result of registering to this webhook is as follows:

{
    "id": 123456,
    "retailer_basket_code": "0000100101000000102",
    "fx_rate": 1,
    "currency": {
        "currency_id": 2,
        "currency_code": "EUR",
        "currency_name_en": "Euro",
        "currency_symbol": "€"
    },
    "timestamp": "2017-07-03T11:56:04Z",
    "type": "in_store",
    "quantity": 1,
    "subtotal": 1000,
    "subtotal_converted": 1000,
    "total_value": 1000,
    "total_converted": 1000,
    "shipping_charge": 0,
    "shipping_charge_converted": 0,
    "payment_methods": [
        {
            "payment_method": "Cash EUR",
            "payment_amount": 1000,
            "payment_amount_converted": null
        }
    ],
    "line_items": [
        {
            "product_id": 0,
            "barcode": "2000046371025",
            "sku": "2000046371025",
            "name": "ACME shorts",
            "description": "the best pair you can buy",
            "type": "shorts",
            "original_price": 1000,
            "original_price_converted": 1000,
            "quantity": 1,
            "sale_price": 1000,
            "sale_price_converted": 1000,
            "vouchers": 0,
            "metadata": {
                "color": "blue",
                "size": "L",
                "image": ""
            },
            "sale_discount": ""
        }
    ],
    "tax_lines": [],
    "chain": {
        "id": 1740,
        "name": "ACME",
        "email": "support@acme.co.za",
        "logo_url": "https://s3-eu-west-1.amazonaws.com/receipts-chain-logo/1000.png",
        "website_url": "",
        "currency": "South African Rand",
        "currency_symbol": "R",
        "business": {
            "id": 0,
            "name": "ACME Cape Town",
            "address": {
                "address_1": "1 Table Mountain Drive",
                "address_2": "",
                "address_3": "",
                "towncity": "Cape Town",
                "postal_code": "",
                "country_code": "ZA",
                "location": {
                    "lat": -33.962822,
                    "lon": 18.409841
                }
            },
            "phone_number": "+272189777777",
            "email": "table-mountain@acme.co.za",
            "website_url": ""
        },
        "receipts_service_active": true
    },
    "shopper": {
        "id": 897654,
        "user_name": "",
        "entity_code": "",
        "first_name": "John",
        "last_name": "Smith",
        "country_code": "",
        "gender": "M",
        "birthday": "1982-05-30",
        "total_points_balance": 0,
        "email": "john.smith@email.com",
        "registered": false,
        "shipping_address": {
            "address_1": "",
            "address_2": "",
            "address_3": "",
            "towncity": "",
            "postal_code": "",
            "country_code": "",
            "location": {
                "lat": 0,
                "lon": 0
            }
        },
        "billing_address": {
            "address_1": "",
            "address_2": "",
            "address_3": "",
            "towncity": "",
            "postal_code": "",
            "country_code": "",
            "location": {
                "lat": 0,
                "lon": 0
            }
        }
    },
    "monetary_wallet": {
        "contributions": [
            {
                "amount": 100,
                "campaign_title": "Earn big on every purchase"
            }
        ],
        "total": 1640,
        "title": "ACME Bucks"
    },
    "points_wallet": {
        "contributions": [],
        "total": 0,
        "title": ""
    },
    "basket_vouchers": [
        {
            "campaign_title": "Acme Loyalty Campaign",
            "campaign_id": 1805,
            "campaign_title_localised": "Acme Loyalty Campaign",
            "voucher_text": "5% off for Acme customers",
            "task_id": 0,
            "amount": 22.5,
            "discount_ratio": 0,
            "type": "basket",
            "description": "",
            "notes": "",
            "title": "",
            "image_url": ""
        }
    ]
}