Skip to content
This repository has been archived by the owner on Nov 15, 2021. It is now read-only.

phucprime/stripe_pay

Repository files navigation

stripe - A payment product suite that is completely integrated

The internet's payment infrastructure

Have you ever wanted to build an e-commerce platform and earn money from it?

Stripe's software and APIs are used by millions of businesses of all sizes, from startups to Fortune 500s, to take payments, deliver payouts, and manage their businesses online.

gif

I'm using the Next Image, thus I need to whitelist it in next.config.js. Also, include the following env key, which contains both the public and secret Stripe API keys:

module.exports = {
  images: {
    domains: ["domain.com"],
  },
  env: {
    stripe_public_key: process.env.STRIPE_PUBLIC_KEY,
  },
};

Stripe expects receiving the following object types:

{
    description: "description",
    quantity: 1,
    price_data: {
      currency: "vnd",
      unit_amount: 99999,
      product_data: {
        name: "name",
        image: ["url"],
      },
    },
}

Learn more

Enjoy!