Skip to documentation
Developers
Dashboard ↗
Documentation / Integrations
Sandbox Only

JavaScript & TypeScript

Use the standard Fetch API from Node.js 22 or another supported server runtime.

Build in sandbox. These guides describe the current implementation. Live payments and payouts are disabled; planned capabilities are labelled explicitly.

Server-side Fetch

javascript
// Run on your server. Never expose the key in a browser bundle.
const response = await fetch(
  'https://api.unalaunch.com/api/v1/integration/checkout-links',
  {
    method: 'POST',
    headers: {
      Authorization: `Bearer ${process.env.UNA_SANDBOX_KEY}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({ productId: process.env.UNA_PRODUCT_ID }),
  },
);
if (!response.ok) throw new Error('Checkout link unavailable');
const { checkoutUrl } = await response.json();
// Send the URL to your frontend or issue a server-side redirect.

SDK availability

An official published TypeScript SDK is not yet available. The Fetch example calls the actual REST API directly. Do not install an unverified package or assume an unpublished package is on npm.