- Stripe is a payment service provider that lets merchants accept credit and debit cards or other payments. Its payment processing solution, Stripe Payments, is best suited for businesses that make most of their sales online, as most of its unique features are primarily geared toward online sales.
-
Stripe processes payments in six steps.
-
The customer provides their card information, either online or in person.
-
Those card details enter Stripe’s payment gateway, which encrypts the data.
-
Stripe sends that data to the acquirer, which is a bank that will process the transaction on the merchant’s behalf. In this step, Stripe serves as the merchant (with the business owner as a submerchant). This means Stripe users don’t have to set up a merchant account, which can be cumbersome.
-
The payment passes through a credit card network, such as Visa or Mastercard, to the cardholder’s issuing bank.
-
The issuing bank approves or denies the transaction.
-
That signal travels from the issuing bank through the card network to the acquirer, then through the gateway to the customer — who sees a message telling them the payment has been accepted or declined.
-
-
Step 1 : Create stripe account by clicking stripe dashboard
-
Step 2 : Get Stripe keys
- At the top of your Stripe Dashboard, you got a link named Developers. Click that and also enable Test mode by switching the button next to Developers.
-
What are the keys used for?
- The Publishable key is used by the client application. This could be a web or mobile app making connections.
- The Secret key is used in the authentication process at the backend server (API Server). By default, we use this key to perform any of the requests between our Web API and Stripe.
-
Step 3 : Create Asp.Net Core Web app and in
appsettings.jsonadd public key and secret key. After that install below nuget packageInstall through Package Manager Console:
Install-Package Stripe.net
-
Step 4 : Add Stript Apikey in Program.cs file to interact with stripe account
-
Step 5 : Let's create checkout functionality when user click on checkout the we redirect to stripe payment page as shown in figure.
-
Here is our checkout UI :
-
After Clicking the
Checkoutbutton ajax call toCheckout Action Methodand After Configuring the stripe UI Page and create checkout session we redirect to stripe payment page -
Here is the stripe UI look like that we setup using above options
-
After Applying the Promocode, here i use
JILPATELas promocode and off 30% amount that i already configure in my stript dashboard. -
After filling the card details, we can place the order. For testing click here to get stripe test card.
-














