tollgate

TIP-02 - Cashu payments

draft mandatory kind=10021 kind=21000 kind=1022


TollGate Discovery

A TollGate that accepts Cashu tokens as payment may advertise its pricing using the following tags.

{
    "kind": 10021,
    // ...
    "tags": [
        // <TIP-01 tags>
        ["price_per_step", "<bearer_asset_type>", "<price>", "<unit>", "<mint_url>", "<min_steps>"],
        ["price_per_step", "...", "...", "...", "...", "..."],
    ]
}

Tags:

Example

{
    "kind": 10021,
    // ...
    "tags": [
        // <TIP-01 tags>
        ["price_per_step", "cashu", "210", "sat", "https://mint.domain.net", 1],
        ["price_per_step", "cashu", "210", "sat", "https://other.mint.net", 1],
        ["price_per_step", "cashu", "500", "eur", "https://mint.thirddomain.eu", 3],
    ]
}

Payment

When the customer pays an exact multiple of <price_per_step> and adds <mint_fee>. The TolGate MUST allot at least that amount of steps to the customer.

{
	"kind": 21000,
	// ...
	"tags": [
		// <TIP-01 tags>
		["payment", "cashuB..."]
	]
}

Tags: