---
title: "Build an unsigned lottery ticket transaction"
method: POST
path: "/api/lottery/build-ticket-tx"
tags: ["Lottery"]
---

# Build an unsigned lottery ticket transaction

`POST /api/lottery/build-ticket-tx`

Builds transaction data for buying a lottery ticket. Polygon returns a native POL value transaction. Base returns a USDC approval transaction plus a zero-value ticket purchase transaction.

## Request body

- object
  - `chain` 'polygon' | 'base'
  - `wallet_address` string, required
  - `numbers` integer[], required
  - `referral_id` string — Optional Base referral ID as 0x bytes32 or a short code up to 32 characters.

## Response `200`

Unsigned transaction payloads ready for wallet signing

## Other responses

- `400` — Invalid input
- `503` — RPC unavailable

---

[API](https://skmtc.net/blocklottos/apis/block-lottos-api.md) · [All operations](https://skmtc.net/blocklottos/apis/block-lottos-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/blocklottos/block-lottos-api/versions/43ed97cec4a5/schema)
