Sr. Content Developer at Microsoft, working remotely in PA, TechBash conference organizer, former Microsoft MVP, Husband, Dad and Geek.
141819 stories
·
32 followers

Microsoft for Startups evolves to better serve the startup ecosystem - Microsoft for Startups Blog

1 Share

Microsoft for Startups is evolving our approach to provide startups with support that matches their pace, their path, and their potential, reflecting feedback we’ve received from startups, investors, and partners.

  • For early-stage startups, we’ve streamlined access to Azure with a self-service option. Founders can sign up and gain access to $5,000 in Azure credits quickly, without the delay of a lengthy validation process.
  • For startups that have secured investment from VCs or startup accelerators, we’ve created a new path to access Azure. As of launch, a select group of investors and accelerators will be able to share a path to access benefits that allow rapidly developing early-stage startups access to Azure and the Microsoft ecosystem. 
  • Please find more details around our changes and FAQs at our Learn page.

Trying new things and learning from outcomes (the famed growth mindset) is a critical component of Microsoft’s culture. This principle anchors on the fundamental belief that everyone can grow and develop, and that potential is nurtured rather than predetermined.  This same mindset is common across founders, as it’s critical for success in a market where iteration is a requirement for relevance.  

At Microsoft for Startups, this is an always-on mindset for us, as we are consistently working to improve the startup experience with Microsoft. Over the past year, in true startup form, we’ve been making quick iterations on our platform—experimenting with new ideas, refining our approach, and listening closely to our startup community. We’re happy to see that it’s paying off: within the Microsoft for Startups program, Azure OpenAI credit usage has grown by 48% year over year,1 a clear signal that more startups are finding value in what we’re building. Every experiment we have tried has helped sharpen our focus and strengthen our platform for exploring what’s next. 

As we evaluated our progress, we saw startups leveraging Microsoft Azure to achieve three main goals: build fast, scale smart, and sell more. We’ve been proud to be part of the solution that is helping startups accelerate their progress and find success, and we’re doubling down on making our partnership with startups even more powerful.  

Gain quick access to enterprise-approved cloud services 

As startups strive to gain market share with limited resources, “customer trust” provides the foundation for a fast track to growth. Azure helps startups gain enterprise trust more quickly. How? By building on Azure, the trusted cloud solution by enterprises, startups are building on a cloud that prioritizes security and enterprise-readiness. It’s the halo effect of the trust that Microsoft has cultivated over years of development, investment, and innovation in the industry.

It stands to reason that Microsoft’s enterprise customers are eager to work with startups that are built on our technology—because it’s the same technology they use.  

Take Faros AI. By leveraging technology from the Microsoft ecosystem, Faros AI provides an open, flexible platform that integrates seamlessly with existing engineering tools to deliver comprehensive visibility into software development processes. By aggregating data from multiple sources, Faros AI offers actionable insights on productivity, DevOps performance, software quality, AI adoption and more without requiring teams to re-architect their workflows. 

Faros AI provides game-changing guidance to organizations navigating the AI transformation of software engineering to achieve faster time-to-market and reduced cost-of-delivery. Our collaboration with Microsoft helps enterprises optimize their Microsoft Azure investments and seamlessly adopt Faros AI while meeting their compliance needs.

Vitaly Gordon, Cofounder and Chief Executive Officer, Faros AI

Expand your capabilities with Azure 

Microsoft for Startups is also working to unlock growth at scale for startups. 

Basecamp Research is one noteworthy example of what happens when a startup takes advantage of the Azure platform. By collaborating with Microsoft for Startups and NVIDIA Inception, the startup had the opportunity to leverage Microsoft’s leading AI capabilities, cloud services, and enterprise go-to-market expertise to build its AI metagenomic discovery platform.  

The Basecamp Research team is leveraging the Azure Kubernetes Service (AKS) to orchestrate complex Dagster data pipelines, requiring precise coordination between complex metagenomic data ingestion, processing, and analysis workflows.  

AKS’s scalability and flexibility unlocked huge productivity gains for our team, enabling us to increase our data processing throughput 100 times, and grow our novel biological dataset to more than three petabytes in scale over the past year.

Saif Ur-Rehman, Principle Data Engineer, Basecamp 

How we’re evolving Microsoft for Startups 

Beginning this week, to further ensure that every startup can access Azure and benefit from the trust that Microsoft has built in the market, we’re making sure that starting on Azure is even easier for every startup.  

  • For early-stage startups, we’ve streamlined access to Azure for any founder wanting to get started. In this self-service option, founders can sign up and gain access to Azure quickly, without the delay of a lengthy validation process. Startups will now go directly into a startup-specific Azure portal view. This tailored experience ensures startups get the most relevant information with credits ready to use, reducing the friction to get started. Best of all, founders will get hands-on experience with enterprise-grade tools that make building a startup even more attractive to enterprise customers, right out of the gate.  
  • For startups that have secured investment from VCs or startup accelerators, we’ve created a new path to access Azure. As of launch, a select group of investors and accelerators will be able to share a path to access benefits that allow rapidly developing early-stage startups access to Azure and the Microsoft ecosystem. Similar to the self-service option, this investor-driven access is designed to get startups up and going on Azure as quickly and efficiently as possible.  

Microsoft for Startups is no stranger to the investor ecosystem, and we continue to expand our network of accelerator partners. Neo, a relatively new entrant into the world of startup accelerators, has quickly ascended to be one of the most sought-after accelerator programs today. Feedback from accelerator and investment partners like Neo has helped us hone our strategy to address how we can best serve startups. 

We love working with Microsoft for Startups, and over the years I’ve seen how earnestly they support young companies. Microsoft’s services and hands-on support have been invaluable to Neo startups, and we’re proud to share the next leg of the journey with them.

Ali Partovi, Chief Executive Officer, Neo

But it’s not just credits and technology that our partners find valuable. Microsoft for Startups also brings go-to-market (GTM) knowledge to every relationship. PearX, one of the most selective pre-seed accelerators, also helps their companies with GTM services and find that startups are hungry to grow their business with enterprise customers alongside Microsoft. 

We’re excited for PearX companies to use the Microsoft network to land enterprise customers. That will be a game changer for their early growth.

Ajay Kamat, Partner, PearX 

We’re making progress, but we’re far from done 

We have reduced the friction in accessing Azure to help more founders start (and succeed!) with Microsoft for Startups. Now, early-stage startups around the world can immediately benefit from Azure and the models on Azure AI Foundry as they build their companies. 

We’re not stopping there. Over the lifetime of Microsoft for Startups, we have also learned that we’re able to be far more helpful to far more startups by collaborating with existing investor partners in the startup ecosystem.  

That’s why we’re increasing our engagement with venture capital firms, startup accelerators, and university innovation programs as they work to support a wide variety of startup founders, from the newest student innovation to the latest unicorn. By contributing to the efforts of our investor partners, we can work collaboratively to drive even more impact and success.  

We’ve created multiple paths for startups to engage with Microsoft: a self-service Azure credit offer for anyone with an idea, and an investor partner-led experience for funded startups. With these paths, and startup-specific view on Azure portal, we’re providing startups with support that matches their pace, their path, and their potential. These changes reflect the feedback we’ve received directly from the thousands of startup founders we’ve had the opportunity to work with over the years. 

We’re committed to supporting startups at every stage, from first line of code to global scale. It’s been an amazing journey thus far, and Microsoft for Startups remains dedicated to a growth mindset. Embracing that mindset means that we will continue to find ways to drive value for startups and the ecosystem at large.  

We’re excited to see what the future holds for Microsoft for Startups and the incredible startups we have the privilege to work with every day! 


1May 2025 Azure credit usage.

Read the whole story
alvinashcraft
6 hours ago
reply
Pennsylvania, USA
Share this story
Delete

Everything you need to know about Flashes, the Bluesky-based Instagram alternative

1 Share
The app, which is now available in beta, offers a different way to browse the visual posts on Bluesky.
Read the whole story
alvinashcraft
9 hours ago
reply
Pennsylvania, USA
Share this story
Delete

Q&A: How Warp 2.0 Compares to Claude Code and Gemini CLI

1 Share
warp space

A couple of weeks ago, the AI terminal app Warp released its 2.0 product, which it is calling an “Agentic Development Environment.” I will be reviewing this product shortly, but in the meantime, I carried out an email interview with Warp CEO Zach Lloyd. I’ve been a long-time fan (and user) of Warp, mainly because it is a great terminal available for every OS.

While AI assistance in the terminal is useful, it had seemed that with all the major LLMs competing to get into code editors, AI would eventually pull away from the command line — that is, until the agentic era hit us. Warp seems well-placed to take advantage of agentic AI, since Claude Code resides in your aging terminal application. So I had plenty of questions for Zach.

David: The very first thing I noticed about Warp 2.0 was that it now has its own code editor. I realise it’s just for quick and dirty hacking, but how strong was the wish in the team to create a code editor in Warp?

Zach: Our philosophy is that coding by hand is going to become less common and go away entirely over time, but right now, there are definitely still times when you need to hop in and make manual changes.

The code editor in Warp isn’t designed for writing code from scratch. The main use case we’re focused on is human review of agent-written code. While most of the time people don’t need to use a code editor in Warp at all, when they do, we think there are two main ways for a human to intervene: one is by re-prompting the agent, and the other is by directly editing the code.

“Our philosophy is that coding by hand is going to become less common and go away entirely over time.”
– Zach Lloyd, Warp CEO

So the goal with the editor is to make sure you don’t have to context-switch out of Warp just to make a small change. We want to take the editing functionality far enough that it’s usable and convenient within that workflow, without needing to jump into a separate IDE.

David: It is amazingly sparse which is nice. How much functionality are you going to give it?

Zach: You’re right that our editor is intentionally sparse. That’s by design. We’re not trying to recreate a full-featured IDE. But we do plan to add what we consider table-stakes functionality for basic editing: Things like formatting on save, linting, simple LSP support — just enough to make the experience smooth when you need it.

That said, we have a real advantage on the UI side compared to other tools in the space like Claude Code, Codex CLI, or Gemini CLI. Those products can’t build a WYSWYG editor at all — let alone a great code review experience.

David: You have put LLMs in the faces of grumpy developers for some time, but even now people ask “Why do I need AI for a terminal?” Are you tempted to release a Warp Classic that removes the LLM aspect to leave a cleaner terminal?

Zach: The solution we’ve landed on is pretty simple: there’s a single toggle in Warp’s settings where you can just turn AI off. It removes all AI features from Warp. We don’t think we need to make a totally separate app that’s just a terminal without AI, since it’s easy for users to disable it if they want to.

But personally, I really believe Warp is an incredible AI tool; and if you’re not using the AI features, you’re kind of handicapping yourself as a developer. We know not everyone sees that right away, so the real challenge for us is helping users reach that aha moment. Once they do, they usually don’t want to go back.

“…if you’re not using the AI features, you’re kind of handicapping yourself as a developer.”

The most common way that happens is when someone hits an error in the terminal and Warp just fixes it for them — like your Python dependencies are messed up, or you’re stuck debugging a Docker issue, and Warp steps in and solves it. I want to keep giving even AI skeptics a chance to bump into those moments; because when they do, it can really change how they work.

David: How are you going to maximize this ADE [Agentic Development Environment] moment before the LLM creators move the action back into the cloud?

Zach: Yeah, this really feels like our moment. The zeitgeist is shifting toward terminal-based coding agents — a big move away from the traditional IDE. That’s because people are starting to get the value of the terminal interface. Whether it’s Warp’s ADE, Claude Code, Codex, Gemini CLI, or others, the idea of having a time-based log and an imperative interface — where you just tell the agent what you want and it does it — is emerging as the best way to work with AI.

That’s a much smoother experience than trying to use a side panel or chat window inside a VS Code clone. Those setups feel clunky by comparison and having the whole screen optimized for interacting with an agent just works better.

Since launching ADE, we’ve seen daily paid signups jump by about 5x — even accounting for discounts — so the traction is real.

“…the idea of having a time-based log and an imperative interface — where you just tell the agent what you want and it does it — is emerging as the best way to work with AI.”

What’s wild is that most professional developers still haven’t changed their workflows — the people trying agentic tools today are mostly hobbyists, vibe coders, or AI early adopters. Our focus is on building for pros — developers working on real codebases — and giving them the right tools to manage, edit, and review agent-written code. That requires a much deeper interface than a typical terminal app can offer.

That’s why being the outer platform — with full control over the UI — is such an advantage. We’re really one-of-a-kind right now because we’re the only purpose-built agent platform that isn’t a VS Code clone or a CLI wrapper.

As for whether the action moves back to the cloud — if the question is whether we’ll support cloud-based agents like Devin or Factory, I think we probably will. But only if we can make the transition between local and remote feel seamless. That’s the bar we’re aiming for.

David: It’s likely there will be an increased need for token use monitoring and process monitoring as agentic threads go wild. How do you plan to keep Warp’s UI advantage?

Zach: Yes, we definitely have an advantage here because we have a really nice UX for managing agent multithreading.

As people start running more agents at once, costs can climb quickly. One big piece of feedback we’ve heard is that Warp can feel “token hungry,” so we have a major engineering effort underway to make it more efficient without sacrificing quality. This includes optimizing which models we use for different tasks and possibly raising limits, so users don’t hit them so fast.

“As people start running more agents at once, costs can climb quickly.”

On the UI side, we have a big edge over CLI apps with a fully native agent management layer — including system notifications, in-tab updates, and a unified view to track all your agents. We’re going to keep pushing that further and make agent management an even more central, first-class part of the app. While the UI is still fairly minimal today, it already offers a much better way to see, control, and intervene — something only Warp can do given our place in the stack.

David: Now that Warp works in Linux, Mac and Windows, are you slowly (or fast) losing your Mac-first startup mentality?

Zach: Yes, we definitely try to be platform agnostic. Most of us started on Mac and still work on Mac daily, but we also have team members who use Warp on Windows and Linux every day.

I actually think we have a big advantage on Windows. Tools like Claude Code, Codex, and other CLI-based setups don’t really work in PowerShell as far as I know — you pretty much need WSL. So if you’re a Windows developer and you want to do agentic development without WSL, Warp is really the only great option. We definitely want to keep pushing to make Warp awesome across all platforms.

David: Is Rust helping you keep the speed you want everywhere? I noticed that the new Ladybird browser has chosen Swift over Rust.

Zach: Rust has been a pretty good choice. We looked at web tech with Electron early on, and I think there are basically two good options for cross-platform desktop development: Rust or Electron.

The big advantage of Electron is faster development time — no doubt about that. There are more libraries and a bigger ecosystem, so you have to rebuild less. We ultimately went with Rust, though, because we wanted higher performance and more control. Developing in a web sandbox can be a pain — with Rust, we get real threads, direct memory access, and much deeper system integration. You could probably do some of that with Electron, but it’s a lot more of a hassle. I also think Rust is just much faster overall.

“We ultimately went with Rust […] because we wanted higher performance and more control.”

I don’t know much about Ladybird or why they chose Swift over Rust, but my understanding is that using Swift cross-platform is still kind of a research project rather than something production-ready. I think other teams have tried it, but it hasn’t really taken off yet. So, for us, picking something truly built for cross-platform like Rust just made more sense.

David: MCP seems like a natural outlet for Warp, but so far it still feels experimental on most platforms — and a little awkward. In terms of control and UI, is Warp jumping on MCP or waiting to see how it catches on?

Zach: I’ve hooked up our crash reporting, Sentry, to Notion, and it lets me do things like tell Warp, “Hey, fix this Linear issue,” and just paste in a Linear link, or “Help me debug this server crash,” and paste in a Sentry link.

We’re fully leaning into MCP. Where it really shines for Warp is when CLI integrations don’t exist. One of the powerful things about being at the terminal layer is that our first choice is always: is there a CLI tool that can gather the context? If there is, we’ll call that since it’s faster and more native.

For example, we’re not going to use a Git MCP server when we can just run a Git command, and we’ll always prefer the GitHub CLI over using the GitHub MCP server. Basically, if there’s a good CLI, we’ll use it.

But for a lot of tools, there isn’t a solid CLI — tools like Notion or Linear are great examples. For those, having a super easy MCP integration really opens up a lot of context.

We’re definitely jumping on MCP. We’re investing heavily to make it easier to install, easier to share, and easier to debug.

A Final Note From David

Whether you are onboard with LLMs assisting development or not (and as Zach says, many professional developers have absolutely not changed their workflows), Zach’s insights should help you see why agentic developers will receive plenty of love from the professional tool community in the future.

The post Q&A: How Warp 2.0 Compares to Claude Code and Gemini CLI appeared first on The New Stack.

Read the whole story
alvinashcraft
9 hours ago
reply
Pennsylvania, USA
Share this story
Delete

Vivaldi 7.5 Arrives on Desktop

1 Share

Vivaldi 7.5 for desktop delivers improvements to Tab Stacks and tab context menus, plus several smaller refinements.

The post Vivaldi 7.5 Arrives on Desktop appeared first on Thurrott.com.

Read the whole story
alvinashcraft
9 hours ago
reply
Pennsylvania, USA
Share this story
Delete

Integrating Stripe in Blazor Applications

1 Share

Learn how to add Stripe payment capabilities to your Blazor web application.

In this article, I will show you the step-by-step process you need to follow to integrate Stripe into your Blazor-based applications. This is very useful for processing online payments through debit/credit cards quickly and easily. Let’s get started!

What Is Stripe?

Stripe is an all-in-one comprehensive platform that provides tools to securely process online payments. Among its advantages, we can highlight:

  • Creation of products with variations
  • Handling of coupons
  • Generation of subscriptions
  • Billing automation

Additionally, it has the option to enable a testing environment where you can easily simulate transactions of your products, allowing for fast and reliable development.

Integrating Stripe Payments into Blazor

We will carry out the integration of payments through Stripe in different steps, starting with creating a Razor component page with a test example, as shown below.

Creating a Practical Example to Receive Payments

The first thing we will do is configure a project that simulates the generation of images using AI. The idea is that after generating five images, the user will be prompted to purchase credits to continue generating images. The steps to achieve this are:

  1. Create a new project using the Blazor Web App template, with Interactive render mode set to Server and Interactivity location set to Per page/component.
  2. Follow steps 1-4 of the installation guide for Telerik controls.
  3. Inside the Components | Pages folder, create a new component named Purchase.razor and add the following code:
@page "/"
@using Telerik.Blazor.Components
@using System.ComponentModel.DataAnnotations

@rendermode InteractiveServer

<style>
    .card-style {
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        border: none;
        border-radius: 10px;
        overflow: hidden;
    }

    .card-header-content {
        background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
        color: white;
        padding: 20px;
        text-align: center;
    }

        .card-header-content h3 {
            margin: 0;
            font-size: 1.5rem;
        }

        .card-header-content .card-price {
            margin: 5px 0 0;
            font-size: 1.2rem;
            font-weight: bold;
        }

    .card-body {
        padding: 20px;
        text-align: center;
    }

    .card-footer {
        background-color: #f7f7f7;
        padding: 15px;
        text-align: center;
    }

    .buy-button {
        font-weight: bold;
        font-size: 1rem;
        padding: 10px 20px;
    }
</style>

<div class="container" style="max-width: 800px; margin: auto; padding: 20px;">
    <h1>AI Image Generator Demo</h1>
    <div class="generator-section" style="padding: 20px; border: 1px solid #ccc; border-radius: 8px;">        
        <TelerikForm Model="@generatorInput">
            <FormValidation>
                <DataAnnotationsValidator />
            </FormValidation>
            <FormItems>
                <FormItem Field="@nameof(generatorInput.Prompt)" LabelText="Prompt">
                    <Template>
                        <TelerikTextBox @bind-Value="generatorInput.Prompt"
                                        Placeholder="Enter your prompt here"
                                        Class="full-width" />
                    </Template>
                </FormItem>
                <FormItem Field="@nameof(generatorInput.Dimensions)" LabelText="Dimensions (px)">
                    <Template>
                        <TelerikNumericTextBox @bind-Value="generatorInput.Dimensions"
                                               Min="64" Max="1024" Step="64"
                                               Class="full-width" />
                    </Template>
                </FormItem>
                <FormItem Field="@nameof(generatorInput.Style)" LabelText="Style">
                    <Template>
                        <TelerikTextBox @bind-Value="generatorInput.Style"
                                        Placeholder="Enter style"
                                        Class="full-width" />
                    </Template>
                </FormItem>
            </FormItems>
            <FormButtons></FormButtons>
        </TelerikForm>
    
        <div class="generate-button" style="text-align: center; margin-top: 20px;">
            <TelerikButton OnClick="@GenerateImage" Enabled="@(!isGenerating && generationCount < generationLimit)">
                @if (isGenerating)
                {
                    <span>Generating...</span>
                }
                else
                {
                    <span>Generate</span>
                }
            </TelerikButton>
        </div>
        
        @if (generationCount >= generationLimit)
        {
            <div class="alert alert-warning" style="margin-top: 20px; text-align: center;">
                You have reached the generation limit.
            </div>
        }
        
        @if (!string.IsNullOrEmpty(currentImageUrl))
        {
            <div class="generated-image" style="margin-top: 20px; text-align: center;">
                <img src="@currentImageUrl" alt="Generated Image" style="max-width: 100%; border: 1px solid #ddd; border-radius: 4px;" />
            </div>
        }
    </div>
    
    <div class="credits-sale-section" style="margin-top: 40px; padding: 20px; border: 1px solid #ccc; border-radius: 8px;">
        <h2 style="text-align: center;">Buy Credits</h2>
        <TelerikCard Class="card-style">
            <CardHeader>
                <div class="card-header-content">
                    <h3>1000 Credits</h3>
                    <p class="card-price">$10</p>
                </div>
            </CardHeader>
            <CardBody>
                <p>Enhance your creative journey with 1000 additional credits. Unlock more image generations and explore endless possibilities.</p>
            </CardBody>
            <CardFooter>
                <TelerikButton OnClick="@BuyCredits" ThemeColor="primary" Class="buy-button">Buy Now</TelerikButton>
            </CardFooter>
        </TelerikCard>
        
        @if (!string.IsNullOrEmpty(purchaseMessage))
        {
            <div class="alert alert-success" style="margin-top: 20px; text-align: center;">
                @purchaseMessage
            </div>
        }
    </div>
</div>

@code {    
    public class ImageGenerationInput
    {
        public string Prompt { get; set; } = string.Empty;
        public int Dimensions { get; set; } = 256;
        public string Style { get; set; } = string.Empty;
    }
    
    private ImageGenerationInput generatorInput = new ImageGenerationInput();
    
    private bool isGenerating = false;
    
    private string currentImageUrl = string.Empty;
    
    private int generationCount = 0;
    
    private int generationLimit = 5;
    
    private readonly List<string> allImageUrls = new List<string>
    {
        "https://th.bing.com/th/id/OIG3.GgMpBxUXw4K1MHTWDfwG?pid=ImgGn",
        "https://th.bing.com/th/id/OIG2.fwYLXgRzLnnm2DMcdfl1?pid=ImgGn",
        "https://th.bing.com/th/id/OIG3.80EN2JPNx7kp5VqoB5kz?pid=ImgGn",
        "https://th.bing.com/th/id/OIG2.DR0emznkughEtqI1JLl.?pid=ImgGn",
        "https://th.bing.com/th/id/OIG4.7h3EEAkofdcgjDEjeOyg?pid=ImgGn"
    };
    
    private List<string> availableImageUrls = new List<string>();
    
    private string purchaseMessage = string.Empty;

    protected override void OnInitialized()
    {        
        availableImageUrls = new List<string>(allImageUrls);
    }

    private async Task GenerateImage()
    {        
        if (generationCount >= generationLimit)
        {
            return;
        }

        isGenerating = true;
        
        await Task.Delay(1500);

        if (availableImageUrls.Count == 0)
        {
            availableImageUrls = new List<string>(allImageUrls);
        }
        
        currentImageUrl = availableImageUrls[0];

        availableImageUrls.RemoveAt(0);
        
        generationCount++;

        isGenerating = false;
    }

    private void BuyCredits()
    {        
        purchaseMessage = "Thank you for your purchase of 1000 credits!";
    }
}

In the previous code, we created a Blazor page component using Telerik controls for a beautiful display, quickly achieved thanks to the properties available in the controls.

  1. In the Home component, change the @page directive to point to a different URL, so that the new component becomes the main page:
@page "/home"

With the above steps, once the application is started, you should see an example like the following:

An example application simulating AI-generated images

Now that we have created a test page, let’s see how to purchase credits using Stripe.

Setting Up a Product in Stripe

After creating the example page, go to your Stripe Dashboard to create a product. It’s important to enable the Test mode option located at the top right of your account before making any changes to avoid affecting your real configuration, including transactions, settings, etc.:

Activating test mode in Stripe

Once test mode is activated, go to the Product catalog section located in the sidebar:

The Product catalog section in the Stripe dashboard

On the Product catalog page, click the Create product button to begin creating a new product:

Selecting the button to create a new product

Clicking the button will bring up a flyout where you should fill in the test product information. Once done, press the Add product button as shown below:

Setting up a new product in Stripe

As part of the product setup, note that I selected the One-off option, indicating that the purchase is not a subscription.

After adding the product, you will see it listed in the Product catalog. If you click on the new product, you will be taken to the product page where you will find the Product ID, which is the identifier for the product.

Additionally, if you click on the three dots in the price details, you can see the Price ID, which we will need to complete the purchase from the Blazor application:

Retrieving the Product ID and Price ID of a product in Stripe

I recommend saving both of these, as we will use them later.

Creating an API Key for External Access to Stripe Services

After setting up the product to sell, we need an API Key to access Stripe’s services. To do this, navigate to the Stripe Developers Dashboard.

In this dashboard, go to the API keys tab where you can generate a key for API access. You’ll see that under Standard keys, there are two types: Publishable key and Secret key. The first is useful for non-critical operations and can be safely exposed in a frontend. The Secret key, however, should never be exposed and should be stored in an environment variable or similar secure location.

The API Keys Dashboard in Stripe

In my example, I copied the Secret key and stored it in an environment variable named Stripe__SecretKey, which I will use in the code.

Configuring the Project to Interact with Stripe

It’s time to return to Visual Studio and integrate Stripe into our project. First, install the Stripe.net package. Then, open the Program.cs file and add the obtained API key to Stripe’s configuration using the ApiKey property as follows:

...
StripeConfiguration.ApiKey = Environment.GetEnvironmentVariable("Stripe__SecretKey");

app.Run();

Replace Stripe__SecretKey with the name you assigned to the environment variable.

Creating Success and Cancellation Pages

Before implementing the redirection to the payment page, it’s important to create a success page for successful purchases and a cancellation page for failed or canceled purchases. I’ve created two simple pages:

PurchaseSuccess.razor page:

@page "/purchase-success"

<!-- Purchase Success Page -->
<div class="container mt-5">
    <div class="card mx-auto" style="max-width: 500px;">
        <div class="card-header bg-success text-white text-center">
            <h3>Purchase Successful</h3>
        </div>
        <div class="card-body text-center">
            <p class="card-text">
                Thank you for your purchase! Your transaction was completed successfully.
            </p>
            <a href="/" class="btn btn-primary">Return Home</a>
        </div>
    </div>
</div>

PurchaseFailed.razor page:

@page "/purchase-failed"

<!-- Purchase Failed Page -->
<div class="container mt-5">
    <div class="card mx-auto" style="max-width: 500px;">
        <div class="card-header bg-danger text-white text-center">
            <h3>Purchase Failed</h3>
        </div>
        <div class="card-body text-center">
            <p class="card-text">
                Unfortunately, your purchase could not be processed. Please try again later or contact support.
            </p>
            <a href="/" class="btn btn-primary">Return Home</a>
        </div>
    </div>
</div>

These pages will be part of the purchase request, so it’s essential to create them before continuing.

Redirecting the User to Stripe’s Payment Page

After completing the previous steps, navigate to the Purchase.razor file. Here, modify the BuyCredits method to create a purchase session and redirect the user to the Stripe payment page to simulate a purchase:

@page "/"
@using Stripe.Checkout
@using Telerik.Blazor.Components
@using System.ComponentModel.DataAnnotations

@inject NavigationManager NavManager

...

private async Task BuyCredits()
{    
    var options = new SessionCreateOptions
        {
            LineItems = new List<SessionLineItemOptions>
                {
                    new()
                    {                            
                        Price = "price_1QpwY7FBZGBGO2FB2pcv0AHp",
                        Quantity = 1,
                    },
                },                
            Mode = "payment",
            SuccessUrl = "https://localhost:7286/purchase-success",
            CancelUrl = "https://localhost:7286/purchase-failed",
            CustomerCreation = "always"
        };

    var service = new SessionService();
    var session = await service.CreateAsync(options);
    NavManager.NavigateTo(session.Url);
}

In the above code, note the following key points:

  • A SessionCreateOptions object is created to define the purchase type.
  • The LineItems property specifies the product to be sold through the price ID and assigns the product quantity using the Quantity property.
  • The Mode indicates whether the purchase is a one-time transaction or a subscription.
  • SuccessUrl and CancelUrl specify the URLs to redirect the user to in case of a successful or failed purchase.
  • CustomerCreation determines whether the user should be created in Stripe.
  • The user is redirected to the payment page after the session is created.

When running the application, pressing the purchase button will redirect you to Stripe’s payment page. To make a test purchase, you can use a test card from the Stripe documentation.

Whether you successfully complete the purchase or cancel it, you will be redirected to the respective page based on the setup.

Purchase process initiated in Stripe with successful payment

When you’re ready to switch to production, you’ll need to generate a real API key and set up a real product. You can also process payment information based on events received through a webhook, but that’s a topic for another post.

Conclusion

Throughout this article, you have learned how to integrate Stripe into Blazor, starting with product creation, API key generation and setting up a purchase session to redirect users to the payment page. Now it’s time to get started and begin accepting payments in your Blazor application.

Read the whole story
alvinashcraft
9 hours ago
reply
Pennsylvania, USA
Share this story
Delete

RFK Jr.’s plan to put ‘AI’ in everything is a disaster

1 Share

In a 92-minute interview with Tucker Carlson on Monday, RFK Jr. drilled down on his vision for the US Department of Health and Human Services (HHS). Artificial intelligence - arguably, a uselessly vague umbrella term - came up multiple times. (As did conspiracy theories and disinformation on vaccines and autism, the medical establishment, and covid-19 deaths.)

As the head of HHS, Kennedy said his federal department is undergoing an "AI revolution." He implored viewers to "stop trusting the experts," as highlighted by Gizmodo, and, presumably, put their trust into AI instead of decades of scientific consensus.

He referenced that AI tools …

Read the full story at The Verge.

Read the whole story
alvinashcraft
10 hours ago
reply
Pennsylvania, USA
Share this story
Delete
Next Page of Stories