Skip to content

Taking payments from your app

Most integrations look the same: your backend decides what’s owed, your site shows 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, and hands the link’s ID to your frontend.

    const { data: link } = await kite.paymentLinks.create({
    body: {
    title: "Pro plan",
    currency: "USD",
    amount: "49",
    reference: order.id,
    },
    });
  2. Your site opens checkout over the page with @kite-01/js, or sends the customer to /pay/<id> on your Kite server.

    openCheckout({ baseUrl: "https://pay.example.com", paymentLinkId });

    Checkout open over a store’s pricing page

  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.

Everything the packages do is plain HTTP. Sign requests as in Signing requests, link customers to /pay/<id>, and verify webhooks as in Webhooks.