Purchase
Information on how Lottery Operators can send Purchase events.
REST API
RabbitMQ Connector
Kafka Connector
⬆️ POST /v2/integration/lottery [Bet]
RabbitMQ Message Properties 
key  | value  | 
type  | LOTTERY_V2  | 
The type is expected as a property (but not in the payload) of the RabbitMQ Message. Any header will be ignored.
Kafka Message Headers
key  | value  | 
type  | LOTTERY_V2  | 
The lottery v2 endpoints take in more parameters in the post body and they do first take a bet request and after a settlement request.
Sample Request for a Bet Update
Example Payload
Data Types
Required properties are marked with *
| Key | Example Value | Description | 
|---|---|---|
ticket_id *  | "2019020103308257480"  | The unique identifer of the lottery ticket  | 
lottery_id *  | "1"  | The unique identifier of the lottery  | 
lottery_name *  | "Mega Millions"  | The text friendly name of the lottery  | 
lottery_type *  | "Lottery", "Raffle"  | The type of lottery  | 
draw_id *  | "1"  | The unique identifier of the draw  | 
draw_date *  | "2015-03-02T8:27:58.721607+06:00"  | The date and time of when the draw took place, in RFC3339 format.  | 
currency *  | "EUR"  | Transactions currency in ISO 4217 format  | 
exchange_rate *  | 1  | The exchange rate at the timestamp  | 
bonus_code   | "WelcomeBonus"  | Any bonus code used, if the transcation was made with a bonus code.  | 
amount *  | 4.0  | The amount of the lottery purchase  | 
discount_amount  | 2.0  | The discount amount, if the purchase was used with a discounted promotion.  | 
lines *  |   | See table below  | 
origin *  | "origin"  | The  origin  | 
timestamp *  | "2015-03-02T8:27:58.721607+06:00"  | The date and time of the purchase event, in RFC3339 format.  | 
type *   | "Bet", "Settlement"  | Indicates wether the event was a Bet (Purchase) or a Settlement  | 
user_id *   | "123"  | The unique identifier of the user  | 
device_type   | "Mobile", "Desktop", "App"  | The device used for the transaction  | 
meta  |   | A placeholder for any custom data that may be sent  | 
Lines object
| Key | Example Value | Description | 
|---|---|---|
line_id *  | 2  | The unique id of this lottery line  | 
is_free_bet   | true  | If the transaction was made using a free bet  | 
numbers *  | [32,23,12,11,35,54]  | The numbers of the lottery line  | 
special_numbers  | [32]  | Any special numbers as part of the lottery  | 
is_quick_pick  | false  | If the lottery line was made using a quick pick feature  | 
meta  |   | A placeholder for any custom data that may be sent  |