#Recommend methods for managing licenses.

1 messages · Page 1 of 1 (latest)

vital roost
#

Hello team,

Context:

I am launching my product on AppSumo and other lifetime-deal marketplaces. The marketplaces handle the payments on their infrastructure and split the revenue. I have to submit unique one-time use "redemption codes" to AppSumo that will be shared with users who pay for the product.

I use Dodo Payments not only for payments infrastructure but also license management and a lightweight CRM to analyze customer data.

AppSumo recommended that I host a custom webpage for AppSumo buyers who can redeem their code they get after checkout and I use that webpage to later send them an email with a 100% off discount code so they can proceed with normal checkout process with Dodo Payments so license delivery / management is sorted.

I would like to know your recommendations, what would be the best way?

modest jacinthBOT
#

To integrate your AppSumo redemption codes with Dodo Payments effectively, follow these steps:

  1. Create a Custom Redemption Webpage:

    • Develop a webpage where AppSumo buyers can input their redemption codes. This page will serve as the entry point for users to redeem their AppSumo purchase.
  2. Verify Redemption Codes:

    • Implement a backend service to verify the redemption codes. This could involve checking against a database or a predefined list of codes you have issued to AppSumo.
  3. Generate Discount Codes:

    • Once a redemption code is verified, generate a 100% off discount code using Dodo Payments. This can be done via the Dodo Payments API:
      import DodoPayments from 'dodopayments';
      
      const client = new DodoPayments({
        bearerToken: 'YourBearerToken',
      });
      
      const discount = await client.discounts.create({
        amount: 100,
        type: 'percentage',
      });
      
      console.log(discount.code); // Use this code to send to the user
      
  4. Send Discount Codes via Email:

    • After generating the discount code, send it to the user's email. Ensure your system captures the user's email address during the redemption process.
  5. Redirect to Dodo Payments Checkout:

    • Provide a link to the Dodo Payments checkout page where the user can apply the discount code. Use the Dodo Payments API to create a payment link:
      const response = await fetch(`${process.env.DODO_API_URL}/payments`, {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
          Authorization: `Bearer ${process.env.DODO_API_KEY}`,
        },
        body: JSON.stringify({
          payment_link: true,
          product_cart: [{ product_id: 'product_id', quantity: 1 }],
          return_url: 'https://yourwebsite.com/return',
        }),
      });
#

const data = await response.json();
// Redirect the user to data.payment_link
```

  1. Handle Post-Purchase:
    • Use Dodo Payments' webhooks to handle post-purchase events, such as granting access to the product or sending confirmation emails.

By setting up this flow, you can ensure a smooth experience for AppSumo buyers, integrating their purchase seamlessly with your existing Dodo Payments infrastructure.

Helpful Links

vital roost
#

I can try creating a unique discount code programmatically.

I hope there's no limit on discounts code that can be generated.