Skip to content
inlet
Developers

A crypto payments API with one call to start

Create a payment in US cents, send the customer to the hosted checkout, and fulfil the order on a signed webhook. 62 coins on 8 networks, one integration.

Three steps, in code

Taken straight from the integration guide.

1. Create a paymentsh
curl -s https://api.inlet.cash/v1/payments \
  -H "Authorization: Bearer $INLET_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-1001" \
  -d '{"price_amount": 4999, "price_currency": "USD", "order_id": "order-1001",
       "description": "Pro plan, 1 month",
       "success_url": "https://example.com/thanks",
       "webhook_url": "https://example.com/inlet/webhook"}'
2. Check the webhook signaturejs
import { createHmac, timingSafeEqual } from "node:crypto";

function verify(raw, header, secret) {
  if (typeof header !== "string") return false;
  const parts = {};
  for (const kv of header.split(",")) {
    const i = kv.indexOf("=");
    if (i > 0) parts[kv.slice(0, i).trim()] = kv.slice(i + 1).trim();
  }
  const t = Number(parts.t);
  if (!t || Math.abs(Date.now() / 1000 - t) > 300 || !/^[0-9a-f]{64}$/.test(parts.v1 ?? "")) return false;
  const expected = createHmac("sha256", secret).update(`${t}.${raw}`).digest("hex");
  return timingSafeEqual(Buffer.from(expected), Buffer.from(parts.v1));
}
3. Test without coinssh
curl -s https://api.inlet.cash/v1/test/payments/$PAYMENT_ID/simulate \
  -H "Authorization: Bearer $INLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"outcome": "paid"}'

Built so your books stay right

Money as integers

Prices in US cents. Coin amounts as strings in the coin's smallest unit. No floats near money.

Idempotent by key

Send an Idempotency-Key and a retry returns the same payment instead of a second one.

Signed webhooks

HMAC-SHA256 over the raw body, retried after 1 minute, 5, 30, 2 hours, 6 and 12.

Every outcome named

Paid, underpaid, overpaid, late, expired, wrong coin, reorged, refunded: each has its own event.

Checkout your way

Redirect to the hosted page, or open it in a modal with one script tag.

Test mode

Finish any test payment as paid, underpaid, expired, late or the wrong coin, and get the real webhooks.

Developer questions

Which languages does the API support?

Any language that can make an HTTPS request and compute an HMAC. The guide's examples use curl and Node.js; the webhook check needs no dependencies.

Is there an SDK?

A Node.js package exists but is not on npm yet. The API is small enough that most integrations call it directly, as the guide shows.

How do I test without real coins?

With a test key, call the simulate endpoint to finish a payment as paid, underpaid, expired, late or the wrong coin. It runs the real logic and sends real, signed webhooks.

Can my coding agent integrate Inlet?

Yes. The integration guide is written to be followed top to bottom, and there is an OpenAPI file and an llms.txt index for agents.

Get your test keys.

Join our first merchants. We'll set you up with test keys.

Test mode first: nothing real moves until you switch to live.