Ticket books or bundles for specific lotteries can be added to an users cart by clicking on a URL. When an individual clicks on an Add to Cart link, they will be directed to the cart on your website, and a specific product will be automatically added for them.
Add To Cart URL Formats
Standard Ticket
[your-url.com]/cart/buy?lottery=[your_lottery_key]&draw=[draw_number]offer=[value]_book_[tickets]
Recurring Purchases
[your-url.com]/cart/buy?lottery=[your_lottery_key]&offer=[value_book_tickets]&[recurring_purchase_type]=true
| Key | Description | Required |
| your-url | The URL of your lottery’s website | Y |
| your_lottery_key | The key used to identify the lottery product you want to add | Y |
draw_number |
The draw number you're specifying the ticket for. | N |
| value | The ticket book’s dollar value, in numerals only | Y |
| tickets | The number of tickets included in the ticket book | Y |
| recurring_purchase_type | subscription, autoplay or multi_offer | N |
The value must be correct for the number of tickets, otherwise the item will not be added to the cart successfully.
Add To Cart URL Example
Standard Ticket without Draw
https://ozlotteries.com/cart/buy?lottery=mater_prize_home&offer=25_book_20
Standard Ticket with Draw
Subscription
https://www.materlotteries.com.au/cart/buylottery=mater_prize_home&offer=25_book_20&subscribe=true
AutoPlay
https://www.deaflottery.com.au/cart/buy?lottery=deaf_lottery&offer=100_book_50&autoplay=true
Multiple Cart Items
One or more Lottery, Raffle or Syndicate products in the same URL.
You will need to add an item[] and a & to connect another item[] all other & symbols will need to be replaced with a ;
https://materlotteries.com.au/cart/buyitem[]=lottery=mater_prize_home;offer=2_book_1;subscribe=true&item[]=lottery=mater_cars_for_cancer;offer=30_book_1
If you are unsure of what your lottery key is, contact our Customer Success Team by submitting a ticket.