# Stripe: Payment Plataform

See the Quickstart Guide (opens new window)

# Processing Payments in E-commerce

The payment in an e-commerce site follows this workflow:

  1. The site takes the customer’s billing information and pass it, along with the order information (e.g., the total), to a payment gateway[1] such as authorize.net .
  2. The payment gateway confirms that the charge can be made to the customer’s credit card and passes that charge information to the merchant account[2].
  3. The payment gateway will report the results back to the e-commerce site

stripe payments

Stripe simplifies this process by acting as both the payment gateway and the merchant account.

  1. The ecommerce website communicates the customer and order information to Stripe,
  2. Stripe clears the payment information with the associated credit card company, and
  3. Stripe puts the money in the bank account.

stripe payments

For more details read the article Introduction to Stripe (opens new window)

# Stripe CLI

Stripe CLI is a command-line tool that makes it easy to test and develop your Stripe integration locally. It can also be used to manage your Stripe account from the command line.

# Install

➜  explorers-up-and-running-with-serverless-functions git:(main) brew install stripe/stripe-cli/stripe
1

# Login

➜  explorers-up-and-running-with-serverless-functions git:(main) stripe login
1

# Create a product

➜  explorers-up-and-running-with-serverless-functions git:(main) stripe products create \
--name="My First Product" \
--description="Created with the Stripe CLI"
{
  "id": "prod_Mx0L6MowMq57SS",
  "object": "product",
  "active": true,
  "attributes": [],
  "created": 1670591402,
  "default_price": null,
  "description": "Created with the Stripe CLI",
  "images": [],
  "livemode": false,
  "metadata": {},
  "name": "My First Product",
  "package_dimensions": null,
  "shippable": null,
  "statement_descriptor": null,
  "tax_code": null,
  "type": "service",
  "unit_label": null,
  "updated": 1670591402,
  "url": null
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

# Create a price

➜  explorers-up-and-running-with-serverless-functions git:(main) stripe prices create \
  --unit-amount=3000 \
  --currency=usd \
  --product="prod_Mx0L6MowMq57SS"
{
  "id": "price_1MD6OBGnlvMtQ0hOt5Jf0r1l",
  "object": "price",
  "active": true,
  "billing_scheme": "per_unit",
  "created": 1670591599,
  "currency": "usd",
  "custom_unit_amount": null,
  "livemode": false,
  "lookup_key": null,
  "metadata": {},
  "nickname": null,
  "product": "prod_Mx0L6MowMq57SS",
  "recurring": null,
  "tax_behavior": "unspecified",
  "tiers_mode": null,
  "transform_quantity": null,
  "type": "one_time",
  "unit_amount": 3000,
  "unit_amount_decimal": "3000"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

# Identity

# Ecommerce Example

# References

# Footnotes


  1. A payment gateway is a service that authorizes credit card payments for e-commerce websites. Payment gateways are the equivalent of a physical point-of-sale terminal located in many retail outlets. It is an intermediary between the credit card companies and a merchant account ↩︎

  2. A merchant account is a bank account that allows you to accept credit card payments. It is a type of bank account that is specifically designed to accept credit card payments. The merchant account is what actually allows your business to accept credit card transactions. It coordinates the credit card transactions with your bank account (i.e., getting personally the money). ↩︎

Last Updated: 2 years ago