Use Case

Send order confirmation emails with Postkit

Confirm orders instantly with a rich, templated email. Postkit's Handlebars templates and batch API handle everything from single orders to checkout rushes.

Get Started Free

The problem

Customers expect an order confirmation within seconds of checkout. During peak traffic (Black Friday, launches), your email service needs to keep up without dropping messages.

The Postkit solution

Postkit's batch API sends up to 100 emails per call. Idempotency keys keyed on order ID prevent double-sends during checkout retries. Templates handle the formatting.

order-confirmation.ts
await fetch("https://api.postkit.eu/v1/emails", {
  method: "POST",
  headers: {
    Authorization: "Bearer pk_live_...",
    "Content-Type": "application/json",
    "Idempotency-Key": `order-confirm-${orderId}`,
  },
  body: JSON.stringify({
    from: "orders@yourapp.eu",
    to: customer.email,
    subject: `Order confirmed: #${orderId}`,
    template_id: "tmpl_order_confirm",
    data: {
      name: customer.name,
      orderId,
      items: order.items,
      deliveryDate: order.estimatedDelivery,
    },
  }),
});

Start sending in under 5 minutes

Free plan. No credit card required.

Get Started Free