Skip to content
Abyxo
REST · HMAC · SSE · OPENAPI 3.1

为工程师而设的 API。

六种语言的官方 SDK,无限沙箱,HMAC-SHA256 签名 Webhook。底层 Solana 与 Sui 通过 gRPC 节点骨干 — 链上分发极速。

开发者

三行代码。一笔支付。

官方 SDK: JavaScript、TypeScript、Python、PHP、Go、Rust。所有链均通过 REST。底层,Solana 与 Sui 走 gRPC 节点骨干 — 链上分发极速。

  • TypeScript 优先
  • HMAC-SHA256 签名 Webhook
  • 托管收银页
  • 可嵌入 Elements
  • 免费无限沙箱
  • 低延迟 gRPC
api · v1
// npm i @abyxo/node
import Abyxo from "@abyxo/node";

const abyxo = new Abyxo("sk_live_…");

const session = await abyxo.checkout.sessions.create({
  amount: 4990,            // 49,90 €
  currency: "EUR",
  accept: ["BTC", "ETH", "USDC", "SUI"],
  success_url: "https://shop.io/ok",
});

res.redirect(session.url);
文档

你需要的一切。

OpenAPI 3.1 规范、Postman 集合、六种语言的复制粘贴示例,以及 gRPC 端点的 Protobuf 文档。

Webhook · HMAC-SHA256

服务端验证。

使用 webhook 密钥对原始请求体计算 HMAC-SHA256,然后用恒定时间与 Abyxo-Signature 头部比较。

// Express.js — HMAC validation
import crypto from "node:crypto";

app.post("/webhook", express.raw({ type: "*/*" }), (req, res) => {
  const sig = req.headers["abyxo-signature"];
  if (typeof sig !== "string") return res.status(401).end();

  const expected = crypto
    .createHmac("sha256", process.env.ABYXO_WHSEC)
    .update(req.body)
    .digest("hex");

  const a = Buffer.from(sig, "hex");
  const b = Buffer.from(expected, "hex");
  if (a.length !== b.length || !crypto.timingSafeEqual(a, b)) {
    return res.status(401).end();
  }
  // + replay-check via Abyxo-Timestamp

  const event = JSON.parse(req.body.toString("utf8"));
  if (event.type === "checkout.completed") {
    // Fulfill the order
  }
  res.json({ ok: true });
});
更新日志

近期发布。

准备好收加密了吗 ?

60 秒创建账户。免费无限测试,无需信用卡。