๐ฆ One-time Purchase Products
SaaSykit comes with support for one-time purchase products. This allows you to sell products that are not subscription-based, like a course, an ebook, a software license, etc.
One-time Purchase Productsโ
A one-time purchase product is a product you sell for a one-time fee. For example, you can have a product called "Ebook" that you sell for a one-time fee of $10.
Each product can have a set of metadata that you define in the Admin Panel that is accessible to your application. You can use this metadata to store information about the product that you want to access in your application. For example, if you have a consumable product like pre-purchased credits that your users can use to make API calls against your service, you can store the number of credits in the product metadata and then user the Order::items()[x]->oneTimeProduct->metadata
array to access that information in your application and display it to your users or check against it.
This offers a lot of flexibility and allows you to customize your product offering to your customers and have this data in centralized place.
To create a new one-time purchase product, go to the Admin Panel and under "Product Management" click on "One-time Purchase Products", then click on "New One-time Purchase Product". You will be redirected to the create product page.
You need to enter the following information about your new product:
- Name: The name of the product.
- Slug: The slug of the product. This will be generated automatically based on the name, but you can change it if you want.
- Description: The description of the product.
- Active: Whether this product is active or not. If this is disabled, then your users will not be able to purchase this product.
- Metadata: The metadata of the product. This is a JSON object that you can use to store any information you want about the product.
- Features: The features of the product. These will be displayed during checkout to show the features of the product to your users.
Pricingโ
Each one-time purchase product can have multiple prices. You can define pricing for each product while editing the product in the Admin Panel.
SaaSykit allows you to define multiple prices for each product but does not allow for switching prices at checkout page yet. Your users can only pay in the Default Currency
that you defined on the settings page.
Supporting multiple prices at checkout will be added in the future.
One-time Purchase Products Checkoutโ
To allow your users to buy one-time purchase products, you can use the following laravel route:
route('buy.product', ['productSlug' => 'your-product-slug']);
where productSlug
is the slug of the product you want to sell.
This will take your users to the checkout page where they can purchase the product. You can have a button on your website that links to this route:
<a href="{{ route('buy.product', ['productSlug' => 'your-product-slug']) }}">Buy Now</a>