---
title: "One-Time Payment"
description: "How to accept one time payments from your customers via LaunchFa.st?"
source: "https://www.launchfa.st/documentation/tutorials/one-time-payment"
---

> **Site index for agents**
> Fetch https://www.launchfa.st/llms.txt to discover every page on this site.
> Every page is also available as Markdown by appending `.md` to its URL.

import { Tabs, TabItem } from '@astrojs/starlight/components'

Capturing one time payments is heck easy with LaunchFa.st. Post payment processes such as updating users in a database, or sending them emails becomes super easy with APIs shipped with LaunchFa.st.

## Accept Payments via Stripe

To start accepting payments via Stripe and creating checkout sessions:

- Update the `STRIPE_SECRET_KEY` in the `.env` file
- Import the Button-Checkout component to start accepting payments. For example on the homepage:

<Tabs>

<TabItem label="Astro">

```astro
---
import ButtonCheckout from '@/components/Button-Checkout.astro'
---

<html>
  <body>
    <ButtonCheckout />
  </body>
</html>
```

</TabItem>

<TabItem label="SvelteKit">

```svelte
<script>
import ButtonCheckout from '@/components/Button-Checkout.svelte'
</script>

<ButtonCheckout />
```

</TabItem>

</Tabs>

<div style="height: 1px; background: #C1C1C150; width: 100%;" />

Click the pay button to make a payment with the credit card number `4242 4242 4242 4242`.

The Stripe webhook will be fired and the user will be created in the database.

You can add your own logic in `src/pages/api/stripe/webhook.js` like sending an email using the resend helper, turning on a boolean in the database for specific access, etc.

## Accept Payments via Lemon Squeezy

Once you're done setting up your Lemon Squeezy account and adding a product(s), import the Button-LS-Checkout component to start accepting payments. For example on the homepage:

<Tabs>

<TabItem label="Astro">

```astro
---
import ButtonLSCheckout from '@/components/Button-LS-Checkout.astro'
---

<html>
  <body>
    <ButtonLSCheckout product_url="https://launchfast.lemonsqueezy.com/checkout/buy/30dd570f-3598-440d-a29a-1e002bda0eb6?checkout[discount_code]=M0OTIWMA" />
  </body>
</html>
```

</TabItem>

<TabItem label="SvelteKit">

```svelte
<script>
import ButtonLSCheckout from '@/components/Button-LS-Checkout.svelte'
</script>

<ButtonLSCheckout
    product_url="https://launchfast.lemonsqueezy.com/checkout/buy/30dd570f-3598-440d-a29a-1e002bda0eb6?checkout[discount_code]=M0OTIWMA"
/>
```

</TabItem>

</Tabs>

<div style="height: 1px; background: #C1C1C150; width: 100%;" />

Click the pay button to make a payment with the credit card number `4242 4242 4242 4242`.

The Lemon Squeezy webhook will be fired and the user will be created in the database.

You can add your own logic in `src/pages/api/lemonsqueezy/webhook.js` like sending an email using the resend helper, turning on a boolean in the database for specific access, etc.
