What is the Stripe Payment method?

Building a web or mobile integration to accept payment online from anywhere has become the need of the time. We can manage the business through the Payment method, and Stripe is a provider that handles payment between merchant and user. Whether you want online payment, transfer payment, or other features, they all are available in Stripe.
Stripe has Multiparty payment options.

  • Build a platform, marketplace, or any two-sided business with Stripe.
  • Collect payment, then the payout
  • Enable businesses to accept payments directly
  • Pay out money 

One Time Payment

One-time payment is an online transaction like e-commerce and related online platforms. Users can pay the admin through a payment method.  Using stripes, we can quickly pay money using different types of methods.  Here we can follow a few steps to make a payment to the admin easily. 

1. Create Merchant Account


2. Set Secret Key in Project from stripe account


3. Payment Gateway (Pay to Admin)

Here we can follow the steps to make a payment to the admin. 

3.1 Create a token for the card

Create a single token to use the credit card's details used in place of a credit card dictionary and API method. We can use it once. We can create a new charge for this. This card token also passes a customer the I.D. of a card belonging to the customer. If you are not passing in a customer, this dictionary contains the user's credit card with the option described below:

There are two types of payment integrations instead of using the API.

3.1.1 Prebuild checkout page :

Code sample of integration with Stripe Checkout. The client & server side code redirects the payment page hosted on the Stripe account.


3.1.2 Custom payment flow :

Custom Stripe payment from your website or application. The client and server-side code build a checkout with Elements to complete payment using various payment methods.


Accept payment using Stripe Elements and the Charges API (.net)

Use Stripe Elements & prebuilt U.I. components to create a payment form that lets you securely collect a customer's card details without managing the sensitive data. Card detail is then converted to a representative Token that can safely send to your server. Your server can use that token to create a new charge.

1) Set up Stripe

Use official libraries for access to the Stripe API from your application:

1.1) Command Line:

2) Create your payment form

To securely collect card details from your customers, Stripe Elements create U.I.components for you that Stripe hosts. They are placed into your payment form, rather than you creating them directly.

Set up stripe Element

To have Elements available on your webpage, add this script tag in the head of your HTML page:

2.1) Pyment.html:

That script should always be loaded directly from https://js.stripe.com 

Create an instance of Elements with the following JavaScript on your payment page:

2.2) client.js:

Once Elements is loaded, you can create an empty DOM container with a uniqueID within your payment form if you want Element to add this input field. We recommend placing that container within a <label> or next to a <label> with a for an attribute that matches a unique id of the Element container. By doing this, the Element automatically gains focus when the customer clicks on the corresponding label.

2.3) Payment.html :

When the form above has loaded then, create an instance of card Element and mount it to the Element containers created above describe:

2.4) client.js

Card Element simplifies the form and minimizes the number of required input fields that collects all necessary card details.

3) Create a Token

 Add an event listener for your customer submits their card information and use Stripe.createToken(card details) to tokenize that information:

3.1) client.js :

Creating a Token that also accepts an optional second parameter containing additional card information collected from the customer is not used in this example. The function returns a result object. This object has either described:

result.token: a Token was created successfully.

result. error: there was an error, including a client-side validation error. 

Refer to the API references for all possible errors. Suppose the object contains a result token; send it to your server. Otherwise, it will show the customer an error.

4) Submit the token to your server

Send a token to your server with any additional information that has been collected:

4.1) Client.js:

5) Create a charge with the token

After the client posts, the token is sent to your server, and you can use it to create a new charge. On your server, grab the Stripe token in the POST parameter submitted by your form. From there, it is one API call to charge the card:

5.1) .net C# :

The response from creating a new charge will either be a charge or an error with an error code. If the response succeeds, fulfill the customer's order and show them a success page. Otherwise, show them an error page.

6) Test your integration

If you can reliably enter a test card detail in your HTML form and submit it to the server, you see that your server created the charge then your integration is finished. Congratulations! You completed an actual payments integration with the Charges API.  This API does not support scaling businesses or customers outside the U.S. and Canada. 

Saving credit card details for later

You can create a new Customer instead of a Charge by providing their email address and tokenized card information.Be sure to store customer I.D. on your side for later use. You can subsequently charge that customer by passing the customer's I.D. instead of card representation in the charges request.


User to User Money Transfer using Stripe

1) Create New Connected Account

Custom accounts can modify the connected account detail and set them through the API, including managing their bank account and payout schedule. Since Custom account holders can not log into Stripe, it's up to you to build the onboarding flow- user dashboard- reporting functionality, and communication channels.

1.1) Requirements for creating a custom account

Minimum API version: You must be using an API version at least  2014/12/17.

Terms of Service update: Created Custom accounts require an update to your terms of service must include a reference to the Stripe services agreement. Stripe recommends that you consult with your attorneys on whether you should update. In terms, accept languages to include reference to Stripe's terms.

Handling information requests: Instead of requesting information such as  Social Security Number or passport scan directly from your user, Stripe requests the the information it needs from you. You must collect the information from your user and provide it to Stripe details. Otherwise, Stripe may disable payouts for that connected account.

Platform in a supported country: Platforms support in Australia, Austria, Belgium, Brazil, Bulgaria, Canada, Cyprus, Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Hong Kong, Hungary, India, Ireland, Italy, Japan, Latvia, Lithuania, Luxembourg, Malta, Mexico, Netherlands, New Zealand, Norway, Poland, Portugal, Romania, Singapore, Slovakia, Slovenia, Spain, Sweden, Switzerland, Thailand, The United Kingdom and the United States can create Custom accounts for any country Stripe support.

1.2) Create a custom account

At the bare minimum, to create and connect the Custom account type to customize the account creation requests, provide a country & the appropriate capabilities.

1.2.1 Account Capabilities

The capabilities you request for a connected account determine the information need to collect for that account. To reduce onboarding effort & only request the capabilities you need. The more capabilities you request and the more information you must collect it.

1.2.2 Support Capabilities :

-  Transfer

- Card payment

- U.S tax reporting

- Payment method

1.2.3 Create an account with multiple Capabilities:

Capabilities are set on the Account object. To find the list of available capabilities use the list-capabilities endpoint

1.3) Create a custom account using .net c#

The result of a successful API call is the user's account information received:

2) A required field for creating an account 

Verification requirements differ based on this:

  • The connected country accounts are created 
  • The capabilities connected accounts are requested
  • The business type (for example, individual & company) and structure  (for example, public corporation & private partnership)
  • The service agreement type and connected accounts are under

As an added convenience and most arguments in the tables below are followed by a localized version - suitable as a label in your user interface.

Minimum verification requirements for the United States (U.S.)
For Individual Business types, described below:

3) Create Person/Identity

This is an object representing a person with a Stripe account.

A platform cannot access a Standard / Express account's persons after the account starts on board, such as after generating an account link for this account. the Standard onboarding or Express onboarding documentation for information about platform prefilling and understanding the onboarding steps below.

3.1) Create Person

Create a personal account on Stripe under the admin(merchant) account

3.2) Update Person

Update a personal account on Stripe under the admin(merchant) account

4) List all connected accounts

Returns a list of connected accounts to your platform via Connect. 

If you are not a platform, then the list is empty.

5) Merchant category codes / Industry details

MCCs classify the business by the type of goods or services they provide. For example, grocery stores, hotels, and airlines have different MCCs. These codes are often used for calculating interchange fees, authorizing payment and preventing fraud. so this is important that your connected accounts have MCC's that matches their business.

Each Stripe account has precisely one MCC. you can view MCC for a specific budget and you can retrieve the business profile.mcc field on the account objects.

Stripe automatically sets MCC codes for connected accounts, but you can choose to set for Custom and Express accounts.

5.1) Setting MCCs automatically

Stripe automatically evaluates accounts to determine appropriate MCCs. That means you don't need to build and maintain any custom logic. Generally, the industry is listed in the Stripe Dashboard for the connected. The account is used to determine MCC. This value is set during the onboarding flow for Standard and Express accounts in Connect Onboarding. You can set MCC manually for the account created with the API or set explicitly in the same way for Express accounts.

5.2) Setting MCCs manually

You can set MCC manually when you create an account. The example below use the code for Computer Software Stores (5734), but you can see a full list in the next section for code.

Merchant category code list :
Below is the list of supported MCCs you can use when creating newCustom or Express accounts sample.

6) Retrieve account for connected account details with status active/inactive :

Retrieves the details of an account.

7) The Payment Intents

The Payment Intents API to build for that can manage complex payment flows. It tracks a payment from creation through the checkout and triggers additional authentication step when it's required. Some of the advantages of using the Payment Intents API include described below:

  • Automatic authentication handle
  • No double charge
  • No idempotency key issue
  • Support for Strong Customer Authentications (SCA) and similar regulatory change

7.1) Create a PaymentIntent

After the Payment Intent is created, attach a payment method and confirm to continue payment. When confirmed, true is used during creation. It is equivalent to creating and confirm the Payments Intent in the same call. You may use any parameter available in the confirm API when confirm true is supplied.

8) Collect payments, then pay out

Collect payment from customers and pay them out to sellers or service providers In this method, one user pays another user through Stripe. That time using a merchant Account as a Platform account. The first user pays $10 to the 2nd user. The platform account receives $10, and then the Platform account transfer amount of $10 to 2nd user with deduction of Stripe processing fees and platform account (merchant account)  charges will be deducted. So, the 2nd user receives an amount of $8.77 from the 1st User. That's why this method is called to collect a payment, then the payout

9) Creating separate charges and transfers

Separate charges and transfers are recommended for Express & Custom accounts where you collect charges that can be a different amount than What's paid out to your connected account? The platform is responsible for Stripe fees - refunds and chargeback.
Create a charge and set up associated transfers, create a transfer group and assign the charge to the transfer group.