API 参考

REST 端点、请求与响应结构、错误封装与版本管理。

尚未上线 —— api.baynoy.com 无法解析,下面的示例目前无法运行。它们描述的是我们正在实现的接口约定,本页的结构仍可能调整。

Resources

/v1/payment_links · /v1/payment_intents · /v1/payment_methods · /v1/refunds · /v1/disputes · /v1/accounts · /v1/balances · /v1/transactions · /v1/beneficiaries · /v1/payouts · /v1/fx_quotes · /v1/cards · /v1/cardholders · /v1/stablecoin_addresses · /v1/deposits · /v1/withdrawals · /v1/webhook_endpoints · /v1/events.

The error envelope

Every non-2xx response carries {"error": {"code", "message", "details?"}}. Codes are stable identifiers you can branch on; messages are human-readable and may change.

Idempotency

Financial POSTs require an Idempotency-Key header, scoped to your account and endpoint. The same key with the same body safely returns the first result; the same key with a different body is a conflict.

Node
const baynoy = require("@baynoy/sdk")("bk_test_...");

const link = await baynoy.paymentLinks.create({
  amount: 4900, // integer minor units — never floats
  currency: "EUR",
  title: "Design retainer",
});
Python
import baynoy
client = baynoy.Client("bk_test_...")

link = client.payment_links.create(
    amount=4900,  # integer minor units
    currency="EUR",
    title="Design retainer",
)