Lottery · Get started
Lottery concepts
Draws, boards, rematch options, prices, branches and payer references.
Draw
A draw is a lottery event with a draw_number and a draw_date. There is one active draw at a time. You must get it before every purchase, because draw information changes over time. See Get the active draw.
The draw includes:
- Draw details.
draw_numberanddraw_date(DD/MM/YYYY). - Prices.
base_price,rematchandsecond_rematch, in cents. - Sales period.
begin_salesandend_sales, inHH:MM:SS24-hour format. You can only buy tickets during this period. - Betting limits.
minimum_number_of_boardsandmaximum_number_of_boards.
Boards and combinations
A ticket has one or more bets, also called boards or combinations. combination_count must be between the draw’s minimum and maximum number of boards, typically 1 to 6. The spec caps it at 6.
Betting options
| Option | Price per combination |
|---|---|
| Standard bet | base_price |
| Rematch | Adds rematch |
| Second rematch | Adds second_rematch. Requires rematch. |
Prices and amounts
All draw prices are in cents: 1500 is $15.00 MXN.
Base Total = base_price × combination_count
If rematch enabled: Add (rematch × combination_count)
If second_rematch enabled (and rematch enabled): Add (second_rematch × combination_count)
Final Amount = Base Total + Rematch Additions (as string)total_amount must be the string form of the integer amount in cents, and must match the calculated price exactly. All amounts are processed in MXN.
The payment.amount in the purchase response is in monetary units, not cents. For example, 150.00.
Payee ID
The payee_id is your lottery service identifier. Monato provides it. It is a UUID v4.
Payer reference
payer_reference is a unique identifier for each transaction. You generate it. Use a UUID or a timestamp-based ID.
Branch
The branch is the business where the sale is made: name, street, city and neighborhood. All four are required.
Ticket and payment
A purchase creates a ticket and processes its payment in the same request. The response has:
status: the ticket status. One ofpending,processed,completedorfailed.payment.status: the payment status. One ofpending,completedorfailed. Check it to confirm the payment succeeded.payment.pay_type:gamblingin the examples.
Receipt
Every ticket comes with a receipt that includes transaction numbers, reference codes, security numbers, store and point-of-sale identifiers, combination numbers and timestamps. See Show the receipt.