Setup Payment Methods

Below are the steps to integrate Stripe payment functionality into the Enatega app dashboard:

1.1.

Sign up for a Stripe account

Visit Stripe | Financial Infrastructure for the Internet and sign up for a Stripe account

  • Enter business details and accept Stripe's terms

  • Take note of your Stripe API keys (Secret and Publishable)

    1.2.

Install Stripe package

  • Open Enatega app folder in a code editor

  • Run npm install stripe to install Stripe SDK

    1.3.

Create products in Stripe dashboard

  • Define products like delivery plans, memberships etc.

  • Set prices, inventory levels, metadata etc.

    1.4.

Configure Stripe in Enatega

  • Create config/stripe.js and export Stripe keys

  • Import Stripe configuration in app.js

    1.5.

Add payment form component

  • Build form UI to collect payment details

  • Integrate client-side Stripe Elements for input rendering

    1.6.

Make server-side API call

  • Create POST API to tokenize payment details

  • Pass details to Stripe.js to create PaymentIntent

    1.7.

Handle payment responses

  • Process success/failure response from Stripe

  • Save subscription details to database

    1.8.

Process future payments

  • Listen for webhook events like invoice.paid

  • Update order/subscription status accordingly

    1.9.

Add receipts/subscription page

  • Display past orders, subscriptions details

  • Allow canceling future invoices

    1.10.

Test end-to-end integration

  • Try dummy payments to ensure success
  • View transactions in Stripe dashboard