Purchase

Information on how Lottery Operators can send Purchase events.

⬆️ POST /v2/integration/lottery [Bet]

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

{
  "ticket_id": "2019020103308257480",
  "lottery_id": "1",
  "lottery_name": "Mega Millions",  
  "lottery_type": "Lottery",
  "draw_id": "1",
  "draw_date": "2015-03-02T8:27:58.721607+06:00",
  "currency": "EUR",
  "exchange_rate": 1,
  "bonus_code": "WelcomeBonus",
  "amount": 4.0,
  "discount_amount": 2.0,
  "lines": [{
    "line_id": 1,
    "is_free_bet": false,
    "numbers": [12,31,32,11,35,54],
    "special_numbers": [35],
    "is_quick_pick": true,
    "meta": {}
  },
  {
    "line_id": 2,
    "is_free_bet": true,
    "numbers": [32,23,12,11,35,54],
    "special_numbers": [32],
    "is_quick_pick": false,
    "meta": {}
  }],
  "origin": "origin",
  "timestamp": "2015-03-02T8:27:58.721607+06:00",
  "type": "Bet",
  "user_id": "52530",
  "device_type": "Mobile",
  "meta": {
    "key1": 10.00,
		"key2": "some string",
		"key3": false
  }
}

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 of the transaction

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

Last updated

Was this helpful?