Kite

Taking payments from your app

The usual integration, in three parts.

Most integrations look the same: your backend decides what's owed, the customer pays on the checkout, and your backend hears when it's paid.

  1. Your backend creates a payment link for the order with @kite-01/sdk, with your order ID as its reference.

    const { data: link } = await kite.paymentLinks.create({
      body: {
        title: "Pro plan",
        currency: "USD",
        amount: "49",
        reference: order.id,
      },
    });
  2. The customer pays on the checkout. Send them to /pay/<id> on your Kite server, or on the hosted instance you use.

    return Response.redirect(`https://pay.example.com/pay/${link.id}`);

    The checkout for a $49 Pro plan, asking how the customer would like to pay

  3. Kite calls your webhook when the payment settles. Your backend verifies it, reads the reference, and fulfils the order.

The price is always set on your server, where customers can't change it. The browser only opens a link that already exists, and only a verified webhook marks an order paid.