payManaCost
Sent while the player pays a spell or ability’s mana cost interactively -
tapping lands, activating mana abilities, spending from the floating pool, or
paying alternative costs such as delve. Every available step is one entry in
actions; the client sends incremental actions by echoing an entry’s id
and the engine re-sends an updated payManaCost prompt until the cost is met,
then the client sends a final pay.

Arguments
Section titled “Arguments”input.type is "payManaCost". The remaining fields:
interface PayManaCostInput { presentation: PromptPresentation; cardId: string; cardName: string; manaCost: string; canConfirmFromPool: boolean; actions: Array<PaymentAction>;}#[serde(rename_all = "camelCase")]pub struct PayManaCostInput { pub presentation: PromptPresentation, pub card_id: String, pub card_name: String, pub mana_cost: String, pub can_confirm_from_pool: bool, pub actions: Vec<PaymentAction>,}
References: PaymentAction , PromptPresentation
Response
Section titled “Response”type PayManaCostOutput = | { type: "act"; actionId: string } | { type: "pay"; auto: boolean } | { type: "cancel" };Sending { type: "act", actionId } will take an incremental step towards the payment. This can be something like tapping (or untapping) a land for mana,
delving, convoking, or paying life for a Phyrexian cost.
The engine answers with an updated payManaCost prompt, which will include the updated leftover price to pay.
actionId must always be chosen from the ids provided in the prompt.
Sending { type: "pay", auto } will let the engine auto-tap resources to match the cost.
Sending { type: "pay" } when the remaining cost is 0 will confirm the payment.
Sending { type: "cancel" } will abort the payment, and with it, the cast or activation.
Example
Section titled “Example”{ "promptId": 7, "decidingPlayerId": "player-0", "input": { "type": "payManaCost", "cardId": "stack-3", "cardName": "Cryptic Command", "manaCost": "{1}{U}{U}{U}", "canConfirmFromPool": false, "actions": [ { "id": "tap:perm-9:0", "type": "activateAbility", "cardId": "perm-9", "abilityIndex": 0, "description": "{T}: Add {U}.", "isManaAbility": true, "producedMana": [{ "color": "U", "amount": 1 }] } ] }}{ "kind": "response", "promptId": 7, "action": { "type": "payManaCost", "output": { "type": "act", "actionId": "tap:perm-9:0" } }}