Skip to main content
Version: 2.0.0

Stripe Integration in Nimara

Nimara supports Stripe integration via a Saleor App. You can choose between a Python-based app or a TypeScript-based app, depending on your preference and deployment setup.

Both apps support:

  • Stripe Payment Intents
  • Multi-channel Stripe configuration
  • Stripe Tax calculation
  • Webhook setup via Stripe keys

Option 1: Use the Python Stripe App​

The Nimara Stripe app is a standalone Python service that can be installed in Saleor via a manifest URL and connects with Saleor via webhooks. This option uses the official Nimara Stripe Python app.

Prerequisites​

Before proceeding, ensure you have:

  • Access to your Stripe account (with API keys)
  • Access to your Saleor Dashboard
  • A deployed instance of the Nimara Stripe Python App

Set environment variables​

Add the following to your root .env file:

STRIPE_SECRET_KEY

  • Description: Secret API key for Stripe server-side operations.
  • How to get it: Stripe Dashboard → Developers → API keys.

NEXT_PUBLIC_STRIPE_PUBLIC_KEY

  • Description: Public Stripe key used on the client side.
  • How to get it: Stripe Dashboard → Developers → API keys.

NEXT_PUBLIC_PAYMENT_APP_ID

  • Description: ID of the Saleor Payment App integration.
  • Note: This will be available after installing the Stripe App in the Saleor Dashboard.

Deploy the Python Stripe App​

See the Deployment Guide below.

Configure Stripe Webhooks​

Go to Stripe Dashboard → Developers → Webhooks → click + Add destination.

Select events: click Select all Payment Intent events under Payment Intent events.

Choose destination type: select Webhook endpoints.

Configure your destination: add name and endpoint URL:

https://<your-stripe-app-domain>/payment/webhook

Copy the Signing secret and add it to the app configuration in Saleor.

Install the Stripe App in Saleor​

To connect Stripe to Saleor, install the app from its manifest.

Copy the manifest URL (typically ends in /saleor/manifest), e.g.:

https://your-stripe-app-url/saleor/manifest

Go to the Saleor Dashboard → Extensions.

Click Add Extension → select Install From Manifest.

Paste the manifest URL and click Install.

Deployment Guide​

The Nimara Stripe Python App can be run in Docker or be deployed to AWS Lambda using provided Terraform.

Option 1: Docker (Quick Start)​

You can run the app with Docker for basic usage or testing:

docker run -p 8080:8080 ghcr.io/mirumee/nimara-stripe:latest

The app will be accessible at http://localhost:8080.

note

For detailed setup instructions, see the official docs: Nimara Python Stripe App documentation

Option 2: AWS Lambda (Production)​

To deploy on AWS with Terraform:

  1. Clone the repo:

    git clone https://github.com/mirumee/nimara-stripe.git
    cd nimara-stripe
  2. Create and fill in the Terraform config:

    cp terraform.tfvars.example terraform.tfvars
  3. Build the app:

    make all
  4. Deploy:

    aws-vault exec <your-aws-profile> -- make init
    aws-vault exec <your-profile> -- make plan
note

For detailed deployment instructions, see the official docs: Nimara Python Stripe App deployment documentation

Option 2: Use the TypeScript Stripe App​

The Nimara Stripe App is a serverless TypeScript-based integration built with Next.js and intended for deployment on Vercel.

Prerequisites​

Before proceeding, ensure you have:

  • Access to your Stripe account (with API keys)
  • Access to your Saleor Dashboard
  • Access to your Vercel account

Set Environment Variables​

Add the following variables to your .env file in the apps/stripe directory:

NEXT_PUBLIC_ENVIRONMENT

  • Description: Environment type for error reporting and logging.
  • Example: LOCAL, STAGING, PRODUCTION, etc.

NEXT_PUBLIC_SALEOR_API_URL

  • Description: URL of the Saleor GraphQL API endpoint.
  • How to get it: Saleor Cloud → Projects → select the relevant project → Environment Details.
  • Note: Must end with a trailing slash /graphql/.
  • Example: https://your-domain.saleor.cloud/graphql/

VERCEL_TEAM_ID

  • Description: The unique identifier of your Vercel team account.
  • How to get it: Vercel Dashboard → Settings → General → copy the Team ID.

VERCEL_ACCESS_TOKEN

  • Description: Personal Vercel API token used to authenticate automated deployments or API calls.
  • How to get it: Vercel Dashboard → click your avatar and select Account Settings → select Tokens → Create Token.

VERCEL_EDGE_CONFIG_ID

  • Description: ID of the Edge Config database where dynamic settings are stored.
  • How to get it: Vercel Dashboard → open your project → Storage → click Create Database → select an Edge Config → copy its ID.

CONFIG_KEY

  • Description: Key used to identify and store app-specific configuration in Edge Config.
  • How to get it: Set this manually. It should be unique and descriptive.
  • Example: nimara-config

Configure the Nimara Storefront​

In your Nimara storefront, update the .env with:

NEXT_PUBLIC_PAYMENT_APP_ID=LOCAL.nimara-ts-stripe

Note: The LOCAL prefix may vary depending on your NEXT_PUBLIC_ENVIRONMENT.

Deploy the App​

Deploy the app to Vercel using the Vercel CLI or dashboard.

Once deployed, your app's manifest will be available at:

https://<your-app-domain>/api/saleor/manifest

Install the App in Saleor​

You can install the app via the manifest URL in two ways:

  • Replace the values and open this link:

    https://<YOUR-SALEOR-CLOUD-DOMAIN>/dashboard/apps/install?manifestUrl=https://<YOUR-APP-DOMAIN>/api/saleor/manifest
  • From the Saleor Dashboard → Extensions → click Add Extension → select Install From Manifest.

Note: For detailed setup instructions, see the official docs: Nimara TypeScript Stripe App documentation