API & Webhooks
Integrate payments through one API
A straightforward REST API for custom integrations, plus a webhook for every payment event, so your systems always know the latest transaction status.

Key Features
Everything you need to integrate
Build a stable, secure, and flexible payment experience on Baiyar's infrastructure.
A consistent REST API
One API to create payment links, manage checkout, and track transactions, with a consistent request and response structure.
A webhook for every event
Get notified automatically through webhooks on every payment status change, no repeated API polling required.
Full documentation
Integration guides and API reference with code samples, available in Baiyar's documentation.
Sandbox for testing
Test your entire integration, including payment links, checkout, and webhooks, in sandbox before going live.
Industry-grade security
API keys, HTTPS, and multiple layers of security to protect your data and transactions.
How It Works
Integrate in 3 steps
From request to notification, every step is designed to be simple and developer-friendly.
Send a request
Call the API to create a payment link or checkout for whatever you need.
Get a response
Receive a response with the details of the payment link or checkout you just created.
Listen for webhooks
Your systems get a webhook automatically the moment payment status changes, like when a payment succeeds.
Your System
Real-Time Notifications
Always in sync with webhooks
Get real-time transaction status updates and keep your systems perfectly in sync.
Learn about webhooksFrequently asked questions
Questions about API & Webhooks
See all FAQsHow do I get an API key?
You can create an API key from the Baiyar dashboard, on the Project > Integration page. Each API key is scoped to one project and one environment (sandbox or production).
Is a sandbox available for testing?
Yes. Every account gets full sandbox access to test creating payment links, checkout, and webhooks before going live, with no real money involved.
Which webhook events are available?
Two events are currently available: payment.paid when a payment succeeds, and payment.failed when a payment fails or expires.
How do I secure my webhook endpoint?
Every webhook is sent with an X-Baiyar-Signature header containing a timestamp and an HMAC-SHA256 signature of the request body, signed with your project's webhook secret. Verify this signature before processing the payload.
Is there a rate limit on the API?
Public checkout endpoints are limited to 60 requests per minute per IP. Authenticated API endpoints don't currently have a dedicated rate limit from the API itself.
Are official SDKs available?
Not yet. Baiyar currently provides a REST API and an OpenAPI spec you can use to generate a client library in any language.
Ready to integrate payments into your system?
Start building now with full documentation and our developer support.