Developer docs
Everything you need to connect BlazeCart or any store. Create an API key in your dashboard first.
1. Create a payment
Call this from your server. Never expose your API key in the browser.
POST /api/public/v1/payments
Authorization: Bearer bz_live_xxx
Content-Type: application/json
{
"amount": 49.99, // USD
"description": "Order #1042",
"reference": "1042", // your order id
"customer_email": "jane@example.com",
"success_url": "https://store.com/thanks"
}Response includes id and checkout_url.
2a. Redirect to checkout
Send the customer to checkout_url. After paying they return to your success_url.
2b. Or embed the widget
<script src="https://your-domain/widget.js"></script>
<script>
BlazePay.open("PAYMENT_ID", {
onClose: () => console.log("closed")
});
</script>3. Check status
GET /api/public/v1/payments/PAYMENT_ID
Authorization: Bearer bz_live_xxx
{ "id": "...", "status": "paid", "amount": 49.99, "reference": "1042" }4. Webhooks
Set a webhook URL in Settings. We POST when a payment's status changes:
{ "event": "payment.paid", "payment": { "id": "...", "reference": "1042", "amount": 49.99, "status": "paid" } }Statuses: pending, processing, paid, failed.