Coldtill Get Coldtill

EmDash crypto payment gateway

Coldtill for EmDash lets you sell products from your EmDash site for USDT, USDC, Bitcoin, Ethereum, Solana, Tron or 200+ other coins, with the money going to your own wallets. It's a sandboxed plugin in the EmDash plugin registry, so you install it from the EmDash admin. You don't need a separate shop plugin.

Coldtill Crypto Payments in the EmDash registry · Source on GitHub · MIT licence

Already running DashCommerce? Use the DashCommerce plugin instead, which adds Coldtill to DashCommerce's own cart and checkout.

Features

Requirements

Install

In the EmDash admin, open Plugins, search the registry for Coldtill Crypto Payments and install it. EmDash asks you to approve its access:

Setup

  1. In Coldtill, create a project API key under API keys and copy it.
  2. In EmDash, open the plugin's settings and enter:
    • Coldtill URL, for example https://pay.example.com (include the path if Coldtill runs under one);
    • API key;
    • Product collection, if your products aren't in a collection called products.
  3. Open Coldtill orders in the admin sidebar and copy the Webhook URL (https://your-site/_emdash/api/plugins/<plugin id>/webhook).
  4. In Coldtill → Webhooks, add that URL and paste its signing secret into the plugin's Webhook signing secret setting. Use Send test in Coldtill to check delivery.
  5. Make sure each product has a number field named price holding the USD price. Optional fields: name or title, and a boolean active (products with active off can't be bought). If a product has a currency field, it must be USD.

Storefront usage

The plugin's routes live under /_emdash/api/plugins/<plugin id>/. For a registry install the plugin id is r_iq46b5ezsks5zhaf; the Coldtill orders page shows the exact Storefront API base for your site.

The helpers are one file with no dependencies, src/storefront/index.ts. Copy it into your site (the Astro example uses src/lib/coldtill-storefront.ts).

A Buy button:

<button
  data-coldtill-checkout
  data-product-id="PRODUCT_CONTENT_ID"
  data-checkout-api="/_emdash/api/plugins/r_iq46b5ezsks5zhaf"
>Buy with crypto</button>

<script type="module">
  import { initializeCheckoutButtons } from "./coldtill-storefront.js";
  initializeCheckoutButtons();
</script>

Optional attributes: data-quantity, data-return-path (the page the buyer comes back to; defaults to the current page) and data-email-input="#email" to send the buyer's email to Coldtill.

Or call the helpers yourself:

import { startCheckout, verifyCheckout } from "./coldtill-storefront";

const apiBase = "/_emdash/api/plugins/r_iq46b5ezsks5zhaf";
window.location.assign(await startCheckout({ apiBase, productId, quantity: 2 }));

// On the page the buyer returns to (it carries ?coldtill_order=...):
const result = await verifyCheckout({ apiBase }); // { orderId, status, paid } or null

After paying, Coldtill's Return to store button opens your page with ?coldtill_order=<id>; verifyCheckout re-checks the payment with Coldtill if the webhook hasn't arrived yet. Use it for the message you show the buyer. Fulfil orders from the Coldtill orders page, never from a visit to the return page, which anyone can open.

Routes

Route Access Purpose
POST checkout public { productId, quantity?, email?, returnPath? } → { ok, orderId, checkoutUrl }
POST verify public { orderId } → { ok, orderId, status, paid }
GET config public { productCollection }
POST webhook public Coldtill webhooks (signature checked)
POST admin admin The Coldtill orders page

JSON routes answer in EmDash's envelope, { "success": true, "data": { ... } }. Expected errors come back as data: { ok: false, code, error }.

Order statuses

Coldtill payment Order
Filled or overpaid, for the order amount (within 1 cent) Paid
Partially paid Partial (held)
Cancelled or replaced, nothing received Cancelled
Cancelled or replaced after a partial payment Partial, with a note to settle by hand
Amount doesn't match the order Unchanged, with a note

A full payment that arrives after a cancellation still marks the order paid, since the money is in your wallet.

Limits

More integrations