Require and Spend Tokens for Matchmaking
Let players enter matchmaking with either 40 standard tokens or 40 gold tokens. At match start, spend standard tokens when they have enough; otherwise spend gold tokens. The queue requirement and match-start mutations both run on the Relay server.
Require Either Currency to Join the Queue
In Unity, open Tools → TurnKit → Configuration → Relay Configs, edit the target Relay, and add this queue requirement. Groups are OR branches, while conditions inside each group use the group combinator.
- Group 1, combinator AND: STORE key
token, operator GTE, value 40. - Group 2, combinator AND: STORE key
gold_token, operator GTE, value 40.
Because the groups are OR branches, either balance is enough to pass the queue check.

Spend Currency When the Match Starts
Add two Player Store mutations in the same Relay configuration, each at phase ON_MATCH_START and target ACTING_PLAYER. The conditions choose one mutation, so only one balance is charged.
- Standard tokens: mutation ID
token_on_start_reduction; keytoken; operation SUB; value 40; condition STOREtoken GTE 40. - Gold tokens: mutation ID
gold_token_reduction; keygold_token; operation SUB; value 40; combinator AND; conditions STOREtoken LT 40and STOREgold_token GTE 40.


Save Relay changes and confirm your Player Store definitions include numeric token and gold_token keys. See TurnKit Relay and the Player Store reference for the related configuration concepts.