Accept payments in ASP.NET through Stripe with 25+ payment methods
Tags: stripe, aspnet, csharp, webdev
Published: 2022-11-30 14:29:58

Accept payment methods from around the globe with a single secure, embeddable UI component. This guide walks you through how to get one-time payments and sell fixed-price subscriptions and provides an example of a well-working integration. Using the codes and documentation in this example, you can customize it according to your needs and integrate it into your own application. You will use Stripe Elements to create a custom payment form that you embed in your app.

**Live demo for Checkout -->** [https://techtolia.com/Stripe/New/](https://techtolia.com/Stripe/New/)
**Live demo for Subscriptions -->** [https://techtolia.com/Stripe/New/Subscriptions/](https://techtolia.com/Stripe/New/Subscriptions/)

Learn how to embed a custom Stripe payment form in your website or application. The client-side and server-side code builds a checkout form with Elements to complete a payment using various payment methods.

The Payment Element is an embeddable UI component that lets you accept up to 25+ payment methods with a single integration (Payment methods: ACH Direct Debit, Affirm, Afterpay and Clearpay, Alipay, Apple Pay, Bacs Direct Debit, Bancontact, Bank transfers, BECS direct debit, Boleto, BLIK, Cards (American Express, China UnionPay (CUP), Discover & Diners, Japan Credit Bureau (JCB), Mastercard, Visa, Cartes Bancaires (CB)), EPS, FPX, Giropay, Grabpay, Google Pay, iDEAL, Klarna, Konbini, Link, OXXO, P24, PayNow, PromptPay, SEPA debit, Sofort, WeChat Pay).

Whether you’re just collecting card payments or dozens of payment methods, the Payment Element is the easiest way to build an embedded and customized payments experience.

Automatically adjusts input fields to collect information based on the payment method and country.
Dynamically sorts payment methods based on a customer’s locale and location to optimize for conversion.
Reduces friction for card payments with input validation, masking, styling and error handling.
Adds new payment methods without any front-end changes, and gives you access to new payment methods as soon as Stripe supports them.
The application supports 3D Secure 2 for card payments.

Elements are completely customizable. You can style Elements to match the look and feel of your site, providing a seamless checkout/subscription experience for your customers.

In order to use these payment methods, you must first activate them from your Stripe Dashboard. Each payment method has a different Merchant Country requirement, and the currencies you can accept with each are different. 
<table>
                            <tbody><tr>
                                <td><strong>PAYMENT METHOD</strong></td>
                                <td><strong>CURRENCIES</strong></td>
                                <td><strong>MERCHANT COUNTRY</strong></td>
                            </tr>
                            <tr>
                                <td><a href="https://stripe.com/docs/payments/ach-debit" rel="nofollow">ACH Direct Debit</a></td>
                                <td>USD</td>
                                <td>US</td>
                            </tr>
                            <tr>
                                <td><a href="https://stripe.com/docs/payments/payment-methods/bacs-debit" rel="nofollow">Bacs Direct Debit</a></td>
                                <td>GBP</td>
                                <td>UK</td>
                            </tr>
                            <tr>
                                <td><a href="https://stripe.com/docs/payments/au-becs-debit" rel="nofollow">BECS direct debit</a></td>
                                <td>AUD</td>
                                <td>AU</td>
                            </tr>
                            <tr>
                                <td><a href="https://stripe.com/docs/payments/sepa-debit" rel="nofollow">SEPA debit</a></td>
                                <td>EUR</td>
                                <td>AU, CA, EU, HK, JP, MX, NZ, SG, US</td>
                            </tr>
                            <tr>
                                <td><a href="https://stripe.com/docs/payments/bancontact" rel="nofollow">Bancontact</a></td>
                                <td>EUR</td>
                                <td>AU, CA, EU, HK, JP, MX,<br> NZ, SG, US</td>
                            </tr>
                            <tr>
                                <td><a href="https://stripe.com/docs/payments/bank-transfers" rel="nofollow">Bank transfers</a></td>
                                <td>EUR, GBP, JPY, MXN</td>
                                <td>EU, JP, MX, UK</td>
                            </tr>
                            <tr>
                                <td><a href="https://stripe.com/docs/payments/blik" rel="nofollow">BLIK</a></td>
                                <td>PLN</td>
                                <td>AT, BE, BG, CY, CZ, DE,<br> DK, EE, ES, FI, FR, GI,<br> GR, HR, HU, IE, IS, IT,<br> LI, LT, LU, LV, MT, NL,<br> NO, PL, PT, RO, SE, SI, SK</td>
                            </tr>
                            <tr>
                                <td><a href="https://stripe.com/docs/payments/eps" rel="nofollow">EPS</a></td>
                                <td>EUR</td>
                                <td>AU, CA, EU, HK, JP, MX,<br> NZ, SG, US</td>
                            </tr>
                            <tr>
                                <td><a href="https://stripe.com/docs/payments/fpx" rel="nofollow">FPX</a></td>
                                <td>MYR</td>
                                <td>MY</td>
                            </tr>
                            <tr>
                                <td><a href="https://stripe.com/docs/payments/giropay" rel="nofollow">Giropay</a></td>
                                <td>EUR</td>
                                <td>AU, CA, EU, HK, JP, MX,<br> NZ, SG, US</td>
                            </tr>
                            <tr>
                                <td><a href="https://stripe.com/docs/payments/ideal" rel="nofollow">iDEAL</a></td>
                                <td>EUR</td>
                                <td>AU, CA, EU, HK, JP, MX,<br> NZ, SG, US</td>
                            </tr>
                            <tr>
                                <td><a href="https://stripe.com/docs/payments/p24" rel="nofollow">Prezewly24 (P24)</a></td>
                                <td>EUR, PLN</td>
                                <td>AU, CA, EU, HK, JP, MX,<br> NZ, SG, US</td>
                            </tr>
                            <tr>
                                <td><a href="https://stripe.com/docs/payments/sofort" rel="nofollow">Sofort</a></td>
                                <td>EUR</td>
                                <td>AU, CA, EU, HK, JP, MX,<br> NZ, SG, US</td>
                            </tr>
                            <tr>
                                <td><a href="https://stripe.com/docs/payments/affirm" rel="nofollow">Affirm</a></td>
                                <td>USD</td>
                                <td>US</td>
                            </tr>
                            <tr>
                                <td><a href="https://stripe.com/docs/payments/afterpay-clearpay" rel="nofollow">Afterpay and Clearpay</a></td>
                                <td>AUD, CAD, NZD, GBP,<br> USD, EUR</td>
                                <td>AU, CA, ES, FR, IE, NZ,<br> UK, US</td>
                            </tr>
                            <tr>
                                <td><a href="https://stripe.com/docs/payments/klarna" rel="nofollow">Klarna</a></td>
                                <td>DKK, EUR, GBP, NOK,&nbsp;<br> SEK, USD</td>
                                <td>AT,&nbsp;BE, DE, DK, EE,ES,<br> FI, FR, GR, IE, IT, LT,<br> LV, NL, NO,&nbsp;SE, SI, SK,<br> UK, US</td>
                            </tr>
                            <tr>
                                <td><a href="https://stripe.com/docs/payments/cards/supported-card-brands" rel="nofollow">Cards</a></td>
                                <td>Most currencies</td>
                                <td>Most locations</td>
                            </tr>
                            <tr>
                                <td><a href="https://stripe.com/docs/payments/link" rel="nofollow">Link</a></td>
                                <td>All currencies supported<br> on cards</td>
                                <td>Most locations</td>
                            </tr>
                            <tr>
                                <td><a href="https://stripe.com/docs/payments/paynow" rel="nofollow">PayNow</a></td>
                                <td>SGD</td>
                                <td>SG</td>
                            </tr>
                            <tr>
                                <td><a href="https://stripe.com/docs/payments/promptpay" rel="nofollow">PromptPay</a></td>
                                <td>THB</td>
                                <td>TH</td>
                            </tr>
                            <tr>
                                <td><a href="https://stripe.com/docs/payments/boleto" rel="nofollow">Boleto</a></td>
                                <td>BRL</td>
                                <td>BR</td>
                            </tr>
                            <tr>
                                <td><a href="https://stripe.com/docs/payments/konbini" rel="nofollow">Konbini</a></td>
                                <td>JPY</td>
                                <td>JP</td>
                            </tr>
                            <tr>
                                <td><a href="https://stripe.com/docs/payments/oxxo" rel="nofollow">OXXO</a></td>
                                <td>MXN</td>
                                <td>MX</td>
                            </tr>
                            <tr>
                                <td><a href="https://stripe.com/docs/payments/alipay" rel="nofollow">Alipay</a></td>
                                <td>AUD, CAD, CNY, EUR,<br> GBP, HKD, JPY, MYR,<br> NZD, SGD, USD</td>
                                <td>AU, CA, EU, HK, JP, NZ,<br> SG, US</td>
                            </tr>
                            <tr>
                                <td><a href="https://stripe.com/docs/payments/grabpay" rel="nofollow">GrabPay</a></td>
                                <td>MYR, SGD</td>
                                <td>MY, SG</td>
                            </tr>
                            <tr>
                                <td><a href="https://stripe.com/docs/payments/wechat-pay" rel="nofollow">WeChat Pay</a></td>
                                <td>CNY, AUD, CAD, EUR,<br> GBP, HKD, JPY, SGD, <br>USD, DKK, NOK, SEK,<br> CHF (depending on <br>business location)</td>
                                <td>AU, CA, EU, HK, JP, SG,<br> UK, US</td>
                            </tr>
                        </tbody></table>
[Cards](https://stripe.com/docs/payments/cards/supported-card-brands): American Express, China UnionPay (CUP), Discover & Diners, Japan Credit Bureau (JCB), Mastercard, Visa, Cartes Bancaires (CB)

**Purchase on CodeCanyon**
-- [Purchase for ASP.NET Web Forms on CodeCanyon](https://1.envato.market/Gjqgkr) -- Target Framework: .NET Framework 4.7.2 - Language: c#
-- [Purchase for ASP.NET Core MVC on CodeCanyon](https://1.envato.market/VyVNDa) -- Target Framework: .NET Core – ASP.NET Core 3.1 – Language: c#

**What are the core features of Payment Element?**
With Payment Element, Stripe is launching a new generation of Elements (see: https://stripe.com/payments/elements) Previous to the Payment Element, merchants would need to build and maintain a new integration for each separate payment method. Because this is no longer necessary, you would save significant time and resources by utilizing the Payment Element.

See some core features of Payment Element below:
- Support for multiple payment methods via a single Elements integration
- It surfaces relevant payment options to each buyer through sorting logic based on customer country location (derived from IP address) and preferred language (derived from browser locale)
- It is localized for 42 locales: https://stripe.com/docs/js/appendix/supported_locales
- It can be styled to merchant brand (font, colors, spacing, etc.)
- It is mobile responsive
- It has in-built input validations
- It is PCI-DSS Compliant

**How do I use the Payment Element to offer all the payment methods Stripe supports?**
To use the Payment Element to offer all the payment methods Stripe supports, you can pass an array of payment methods to payment_method_types when you create a PaymentIntent. However, you can’t pass all supported payment methods at the same time because some payment methods require different currencies. You can only create a PaymentIntent with payment methods that support the same currency. Please see the Payment method and product support table here: https://stripe.com/docs/payments/payment-methods/integration-options

**Configure payment methods**
With automatic_payment_methods enabled, Stripe automatically detects the payment methods relevant to your customer. Card payments are enabled by default but you can enable and disable other payment methods in the Stripe Dashboard. Before the payment form is displayed, Stripe evaluates the currency, payment method restrictions, and other parameters to determine the list of supported payment methods. Payment methods that increase conversion and that are most relevant to the currency and customer’s location are prioritized. Lower priority payment methods are hidden beneath an overflow menu.

**What is Strong Customer Authentication?**
Strong Customer Authentication (SCA) is a new European regulatory requirement to reduce fraud and make online payments more secure. To accept payments and meet SCA requirements, you need to build additional authentication into your checkout flow.

Banks will need to start declining payments that require SCA and don’t meet these criteria. Although the regulation was introduced on 14 September 2019, we expect these requirements to be enforced by regulators over the course of 2020 and 2021.

3D Secure 2—the new version of the authentication protocol rolling out in 2019—will be the main method for authenticating online card payments and meeting the new SCA requirements. This new version introduces a better user experience that will help minimise some of the friction that authentication adds into the checkout flow.

The application supports 3D Secure 2

The Payment Intents API that uses Stripe’s SCA logic to apply the right exemption and trigger 3D Secure when necessary.

The application uses the Payment Intents API

**Apple Pay and Google Pay**
You can offer these payment methods on their associated platforms when you pass the card type.

For most users, the Payment Element is the best option to process cards. The integration effort is the same as the Card Element and it supports all the common payment flows. It also gives you instant access to additional payment methods, including Apple Pay and Google Pay.

**Faster checkout with Link**
Link autofills your customers’ saved information in a few simple steps. Your customers’ data is encrypted to keep it secure and, as a certified PCI Service Provider Level 1, Link meets the highest level of certification available in the payments industry.

A customer who visits a business that accepts Link can make a payment with the information they stored in Link by authenticating with an SMS code. After the customer authenticates, Link loads their billing, shipping, and payment details, and then they can pay with one click.

Customers can change their preferred Link payment details, add new cards, or change their address without you needing to manage the changes. For example, if a customer switches from a debit card to a credit card, Link handles the update and automatically applies the changes to your saved link PaymentMethod.