API & SDK

AN API BUILT FOR BUILDERS

A REST API with OpenAPI 3.1, idempotency keys, cursor pagination, and SDKs in JavaScript, Python, PHP, Ruby and Go.

Developer working with the Baynoy API

<150ms

P50 API latency

99.95%

Uptime SLA

5

Official SDKs

  • OpenAPI 3.1 spec
  • Idempotency keys
  • Cursor pagination
  • Bearer auth
  • HMAC webhooks
  • Sandbox + test cards
  • 5 official SDKs
  • 1,000 req/sec rate limit
  • 99.95% uptime SLA

Create a charge

ONE ENDPOINT, THIRTY METHODS

POST a single resource and Baynoy figures out the rest — card, Apple/Google Pay, USDC, SEPA, ACH. Set the destination currency and we route the payout to your bank or wallet at settlement.

  • Idempotency-Key prevents double-charges on retry
  • Cursor pagination for high-volume reports
  • Inline 3DS challenge with checkout_url
  • Sandbox keys never touch real money

Request

POST /v1/payments
Authorization: Bearer sk_live_••••
Idempotency-Key: 7a1f2e

{
  "amount": 125000,
  "currency": "EUR",
  "payout":  { "type": "bank", "currency": "TRY" },
  "methods": ["card","usdc","sepa"],
  "metadata": { "patient_id": "p_8821" }
}

Response

{
  "id": "pmt_a7c91...",
  "status": "requires_action",
  "checkout_url": "https://pay.baynoy.com/c/a7c91"
}

Install

# JavaScript / TypeScript
npm i @baynoy/sdk

# Python
pip install baynoy

# PHP
composer require baynoy/baynoy

# Ruby
gem install baynoy

# Go
go get github.com/baynoy/baynoy-go

Five SDKs

TYPED, RETRIED, READY

Official, typed SDKs in JavaScript / TypeScript, Python, PHP, Ruby and Go. Each ships with a thin client, automatic retry on idempotent operations, structured webhook verifiers, and helpers for the most-used endpoints.

  • Full type definitions, including discriminated unions for events
  • Automatic exponential-backoff retry on 5xx
  • Webhook signature verifier in 4 lines
  • Pagination iterators for every list endpoint
Read the docs

Webhooks

EVENTS YOU CAN TRUST

Every webhook is signed with HMAC SHA-256, retried with exponential backoff for up to 7 days, and browseable in your dashboard with full request / response history. Replay any past event with one click.

  • HMAC SHA-256 signed payloads
  • 8 event types covering the full payment lifecycle
  • Exponential backoff up to 7 days
  • One-click replay from dashboard
Manage endpoints

Signed event

POST /your-endpoint
Baynoy-Signature: t=1716210000,v1=8b3...
Content-Type: application/json

{
  "id": "evt_2zX...",
  "type": "payment.succeeded",
  "data": { "object": { "id": "pmt_a7c91..." } }
}

Get a key, send a charge

Sandbox keys ship immediately. Production unlocks after Tier 1 verification.