Cart
Information on how Lottery Operators can send Cart events.
This request is sent when a cart event occurs. It can receive multiple embedded payment events and multiple cart items.
{
"amount": 100.0,
"bonus_code": "WelcomeBonus",
"cart_id": 1,
"discount_amount": 10.00,
"status": "Successful",
"timestamp": "2015-03-02T8:27:58.721607+06:00",
"type": "Checkout",
"user_id": "abc1234",
"currency": "EUR",
"device_type": "mobile",
"exchange_rate": 1.00,
"origin": "sub.example.com" ,
"payments": [
{
"type": "Wallet",
"amount": 70.00,
"meta": {}
},
{
"type": "Deposit",
"amount": 20.00,
"meta": {}
},
{
"type": "VirtualCurrency",
"amount": 0.00,
"meta": {}
}
],
"items": [
{
"id": 1,
"type": "Scratch",
"name": "Scratch And Win",
"description": "Win this summers biggest prize",
"amount": 10.00,
"discount_amount": 0.00,
"bonus_code": "",
"meta": {}
},
{
"id": 2,
"type": "Lottery",
"name": "Mega Millions",
"description": "Weekend Lottery Lines",
"amount": 90.00,
"discount_amount": 0.00,
"bonus_code": "",
"meta": {}
}
],
"meta":{
"key1": 10.00,
"key2": "some string",
"key3": false
}
}
Required properties are marked with *
amount*
100.0
Total amount of the combined cart items during checkout
bonus_code
"WelcomeBonus"
The bonus code of any promotion used for the cart checkout
cart_id*
1
The unique identifier of the transaction
discount_amount
10.00
The discounted amount, if the cart was checked out using a discount
status*
"Successful"
The status of the cart checkout
timestamp*
"2015-03-02T8:27:58.721607+06:00"
The timestamp of the cart checkout, in RFC3339 format
type*
"Checkout"
Currently only type "Checkout" supported
user_id*
"123"
The unique identifier of the user
currency*
"EUR"
The currency used in the transcation
device_type*
"mobile", "desktop", "app", "unkown"
The device used in the transaction
exchange_rate*
1.00
The exchange rate to convert the amount to base currency
origin*
"origin"
The of the transaction
payments*
See table below
items*
See table below
meta
A placeholder for any custom data
Payments object
type*
"Wallet", "VirtualCurrency", "Deposit"
The payment type used in the checkout
amount*
15.0
The amount used for the specific payment type
meta
A placeholder for any custom data
Items object
id*
1
The unique identifier of the cart item
type*
"Lottery ticket",
The category of the cart item
name*
"Freespins"
The text friendly name of the cart item
description
"Freespins"
The text friendly description of the cart item
amount*
5.0
The price of the item
discount_amount
2.0
The discount amount, if the item was purchased with a dicsount
bonus_code
"Xmas2020"
The bonus code used if the cart was checked out with a promotion
meta
A placeholder for any custom data
Last updated
Was this helpful?