You are viewing the legacy v2 documentation. New integrations should use
v3-beta, which is RESTful (plural resources,
Stripe-style) and adds saved payment methods, setup intents, hosted checkout
sessions, and a unified balance. v2 remains available for existing merchants.
What is Suby.fi?
Suby.fi is a payment platform for one-time and subscription payments. Accept credit/debit card payments and cryptocurrency payments, with pricing in USD or EUR. Whether you’re running a SaaS business, online community, or digital product service, Suby provides the infrastructure to handle payments, manage subscriptions, and grant access to your customers automatically.Payment Methods
Suby.fi supports three payment configurations depending on your needs:
You configure payment methods per product using the
paymentMethods field: ["CARD"], ["CRYPTO"], or ["CARD", "CRYPTO"].
Supported Currencies
Products can be priced in USD or EUR. The currency is set at product creation via thecurrency field.
- Card payments: Charged in the product’s currency (USD or EUR)
- Crypto payments: Converted automatically using real-time oracle rates (Pyth)
Supported Chains & Assets
You can restrict accepted chains and assets per product, or leave them open to accept all available options.
Authentication
Include your API key in theX-Suby-Api-Key header:
API Endpoints Overview
All endpoints require the
X-Suby-Api-Key header. Full request/response schemas are in the API Reference.
Customer Identity
Every customer has a stablecustomerId, returned by the GET /api/customer endpoints and on every payment/subscription response and webhook. It never changes even if the customer updates their email, so it is the reliable key for long-term account history.
When creating a payment or subscription, pass customerId to link an existing customer (it takes precedence over customerEmail), or customerEmail the first time you see a customer — then store the returned customerId for next time. Omit both and the hosted checkout page collects the email at pay time.
Idempotent Refunds
POST /api/refund/:paymentId accepts an optional Idempotency-Key header. Retry a timed-out refund with the same key and the original result is replayed (Idempotency-Replayed: true) instead of refunding twice — essential for partial refunds, which are otherwise legitimately repeatable. See the API Reference for details.
Webhook Events
Suby.fi sends signed webhooks to notify your server about payment lifecycle events. Payment events:CHECKOUT_INITIATED, CHECKOUT_SUCCESS, PAYMENT_SUCCESS, PAYMENT_FAILED, PARTIAL_REFUNDED, PAYMENT_REFUNDED, PAYMENT_CHARGEBACK, PAYMENT_SETTLED.
Subscription events: SUBSCRIPTION_CREATED, SUBSCRIPTION_RENEWED, SUBSCRIPTION_PAST_DUE, SUBSCRIPTION_EXPIRED.
Recommended Access Granting Strategy
Verifying Webhook Signatures
Every webhook is signed with HMAC-SHA256. The signature is sent in theX-Webhook-Signature header as v1=<hex>.

