thepaliaDevelopers

Set up Stripe payment links

Sell your course without a custom shop integration and send course access automatically.

Sell your course with a Stripe payment link. After the agreed checkout event is processed, thepalia sends the participant an email to register for their course.

Before you start

You need a Stripe account, a course product and price, the offer_id, the exact thepalia webhook URL, and your course's agreed contraindication text. Ask our dev team for these integration details.

Agree which Stripe test environment connects to which thepalia environment, and how you will share the webhook signing secret securely. Start in that test environment; do not use a real payment as an improvised test.

About the screenshots and GIFs

These original walkthroughs show Stripe's German dashboard. Menu labels and layout may differ in your account. Follow the written steps and use your own environment-specific values, not the example account or payment links in the recordings. Expand a demo when you want to watch it.

1. Prepare your Stripe account and product

  1. Create a Stripe account if you do not have one, and verify your email address.
  2. Open the product area in the Stripe Dashboard.
  3. Create a course product with the agreed one-time price. Add its name, description, and an image if needed.
  4. Save the product in the agreed test environment.
Stripe account registration form with email, name, password, and country fields.
Create your Stripe account before setting up the course product. Original German dashboard screenshot.
Watch: create a course productGIF
Stripe walkthrough showing how to add a course product and set a one-time price.
The product walkthrough shows a sample course. Use your agreed course name and price.
  1. Open Payment Links and create a new link for the course product.
  2. Check the product, amount, and currency.
  3. Create two new text fields labelled Vorname and Nachname. Use those exact labels; do not just rename existing fields.
  4. Make sure the buyer's email address is collected. The registration email will be sent there.
  5. Save the link.

Keep the required field labels in German

Use Vorname for first name and Nachname for last name, even if your Stripe Dashboard is in English. The integration expects these exact labels on newly created fields.

Watch: create the payment linkGIF
Creating a Stripe payment link and adding the Vorname and Nachname custom text fields.
Add both required name fields when creating your payment link.

3. Map the course offer

Add the metadata key offer_id to the Payment Link. Its value must be the ID supplied by thepalia for this course and environment. YOUR_OFFER_ID is a placeholder; replace it with your own ID.

Watch: add the offer_id metadataGIF
Adding the offer_id metadata key to a Stripe payment link.
Use the offer ID supplied for your course and environment, not the sample text in the recording.

4. Connect the webhook

A webhook sends the checkout event from Stripe to thepalia. After successful processing, thepalia can send the buyer their registration email.

  1. Open Stripe's webhooks or event destinations area. Its menu location may vary.
  2. Add the exact webhook URL supplied by thepalia. Do not construct your own URL.
  3. Select only checkout.session.completed for this integration.
  4. Save the endpoint and copy the signing secret for this environment.
  5. Share it with thepalia through the agreed secure channel. Wait for confirmation that the connection is configured.

Only enable payment methods with delayed payment confirmation after agreeing this with our dev team. A completed checkout does not always mean that these payments have finally succeeded.

Watch: configure the webhook destinationGIF
Selecting checkout.session.completed and configuring a webhook endpoint in Stripe Workbench.
The recording illustrates the event destination setup. Enter the valid webhook URL supplied by thepalia and save it; the sample input is not a working endpoint.

5. Test the purchase and course access

Use Stripe's official testing guide and the test case agreed with thepalia.

  1. Open the test payment link and check the course and price.
  2. Enter a test name and email address, then complete the agreed test purchase.
  3. Check the processed event in Stripe and its mapping to the correct offer_id.
  4. Confirm that the registration email arrives and its link leads to the correct course.
  5. Complete registration and verify actual course access.

Manually sending a webhook event does not replace this complete test. The staging environment is for testing and does not generate completion certificates.

Watch: test checkout and inspect the eventGIF
Opening a Stripe test checkout, entering participant details, and inspecting checkout.session.completed in Workbench.
The original recording shows a sandbox purchase and event inspection. Use the test payment method agreed with thepalia; the method shown is not a universal testing instruction.

6. Prepare to go live

Set up the live product, live payment link, live offer_id, webhook URL, and signing secret separately. Complete Stripe's required business and payout details too.

Ask thepalia to confirm the configuration before using the live payment link. Switching the Stripe Dashboard alone does not move the entire integration to production. Enrollments created in thepalia’s production environment are billed.

Stripe sandbox settings, with the switch-to-live-account button and business settings.
Stripe's account switch and business settings. Live integration values still need to be configured separately.

Payment refunds and removal of course access are separate cancellation steps. Agree the process with thepalia.

Participants must confirm the course-specific suitability requirements before purchase, including when you send payment links directly. Use the agreed purchase flow and the contraindication text supplied by thepalia.

Copy the code below into your website; it is displayed here as an example. Replace YOUR_LIVE_STRIPE_CHECKOUT_URL and [INSERT_COURSE_CONTRAINDICATIONS]. Adjust the colours in the commented CSS lines if needed. The example's customer-facing text is in English; the German version of this guide includes a German snippet.

Watch: copy the checkout linkGIF
Copying a Stripe payment link from the Payment Links list.
Copy your own live payment link after the live configuration has been confirmed.
<div>
  <style>
    .stripe-checkoutButton {
      text-align: center;
      border: none;
      border-radius: 0.25rem;
      min-width: 11.625rem;
      padding: 0 2rem;
      height: 2.625rem;
      font-weight: bold;
      background-color: #000000;
      color: #ffffff;
      font-family: "Helvetica Neue", Arial, sans-serif;
      font-size: 1rem;
      line-height: 1.25rem;
      cursor: pointer;
    }

    .stripe-checkoutButton:disabled {
      background-color: #cccccc;
      color: #666666;
      cursor: not-allowed;
    }

    .checkbox-container {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      font-family: "Helvetica Neue", Arial, sans-serif;
      font-size: 0.875rem;
      color: #333333;
    }

    .checkbox-container input[type="checkbox"] {
      margin: 0;
    }

    .kontraindikationen-link {
      color: #000000;
      text-decoration: underline;
      cursor: pointer;
      font-weight: bold;
    }

    .kontraindikationen-link:hover {
      color: #004499;
    }

    .kontraindikationen-disclosure {
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.3s ease-in-out;
      background-color: #f8f9fa;
      border: 1px solid #e9ecef;
      border-radius: 0.25rem;
      margin-top: 0.5rem;
    }

    .kontraindikationen-disclosure.open {
      max-height: 500px;
      overflow: scroll;
    }

    .kontraindikationen-content {
      padding: 0.5rem;
      font-family: "Helvetica Neue", Arial, sans-serif;
      font-size: 0.875rem;
      line-height: 1.5;
      color: #333333;
    }

    @media (min-width: 768px) {
      .kontraindikationen-content {
        padding: 1rem;
      }
    }
  </style>

  <div>
    <form
      target="_blank"
      style="
        display: inline-grid;
        justify-items: center;
        align-content: start;
        gap: 0.5rem;
      "
    >
      <div class="checkbox-container">
        <input type="checkbox" id="termsCheckbox" required />
        <label for="termsCheckbox"
          >I confirm that I do not have any of the listed
          <span class="kontraindikationen-link" id="kontraindikationenLink">contraindications</span>
          .</label
        >
      </div>
      <div class="kontraindikationen-disclosure" id="kontraindikationenDisclosure">
        <div class="kontraindikationen-content">
          <h3>Contraindications</h3>
          [INSERT_COURSE_CONTRAINDICATIONS]
        </div>
      </div>
      <a
        href="YOUR_LIVE_STRIPE_CHECKOUT_URL"
        class="stripe-checkoutButton"
        id="stripeButton"
        target="_blank"
        rel="noopener noreferrer"
        style="
          text-decoration: none;
          display: inline-block;
          text-align: center;
          line-height: 2.625rem;
          pointer-events: none;
          opacity: 0.5;
          background-color: #635bff; /* SET YOUR BACKGROUND COLOUR HERE  */
          color: white; /* SET YOUR TEXT COLOUR HERE  */
          padding: 0 1.5rem;
          border-radius: 0.5rem;
        "
      >
        Buy now
      </a>
    </form>
  </div>
  <script>
    document.addEventListener("DOMContentLoaded", function () {
      const checkbox = document.getElementById("termsCheckbox");
      const stripeButton = document.getElementById("stripeButton");
      const kontraindikationenLink = document.getElementById("kontraindikationenLink");
      const kontraindikationenDisclosure = document.getElementById("kontraindikationenDisclosure");

      checkbox.addEventListener("change", function () {
        const isChecked = this.checked;

        if (stripeButton) {
          if (isChecked) {
            stripeButton.style.pointerEvents = "auto";
            stripeButton.style.opacity = "1";
            stripeButton.style.cursor = "pointer";
          } else {
            stripeButton.style.pointerEvents = "none";
            stripeButton.style.opacity = "0.5";
            stripeButton.style.cursor = "not-allowed";
          }
        }
      });

      kontraindikationenLink.addEventListener("click", function (e) {
        e.preventDefault();
        kontraindikationenDisclosure.classList.toggle("open");
      });
    });
  </script>
</div>

Check the result

Your payment link collects first name, last name, and email, maps the course through offer_id, and sends the agreed event to thepalia. The integration test is complete when the registration email arrives, registration succeeds, and the participant can open the correct course.

On this page