Prood
Guides

Payment Integration

Configure Stripe, Easypay, or Ifthenpay payment providers for your Prood store.

Prood supports three payment providers out of the box. Each implements the same PaymentProvider interface, making them interchangeable without code changes.

Provider overview

ProviderRegionMethodsIntegration type
StripeGlobalCredit/debit cards (Payment Element)Embedded UI
EasypayPortugalMultibanco, MB WAY, cardReference + redirect
IfthenpayPortugalMultibanco, MB WAY, cardReference + redirect

Global vs per-tenant configuration

Payment credentials can be configured at two levels:

LevelWhereWhen to use
Environment variables.env.local / Vercel project settingsPlatform-wide defaults, development
Dashboard integrations/integrations/{provider}Per-merchant credentials in production

Per-tenant config overrides env vars field-by-field. If a merchant configures Stripe in the dashboard, their checkout uses their keys — not the platform defaults.

Stripe setup

1. Create a Stripe account

Sign up at stripe.com and get your API keys from the Dashboard → Developers → API keys.

2. Environment variables

DEFAULT_PAYMENT_PROVIDER=stripe
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_...

3. Per-tenant configuration (production)

In the dashboard → Integrations → Stripe:

FieldValue
Secret keysk_live_...
Webhook secretwhsec_...
Publishable keypk_live_...

4. Webhook

Configure in Stripe Dashboard → Webhooks:

URL: https://checkout.example.com/api/webhooks/stripe/{orgId}
Events: payment_intent.succeeded, payment_intent.payment_failed, charge.refunded

5. Test

Use test card 4242 4242 4242 4242 with any future expiry and CVC.

Easypay setup

1. Create an Easypay account

Sign up at easypay.pt and obtain your account ID and API key.

2. Environment variables

DEFAULT_PAYMENT_PROVIDER=easypay
EASYPAY_ACCOUNT_ID=your_account_id
EASYPAY_API_KEY=your_api_key
EASYPAY_BASE_URL=https://api.test.easypay.pt  # sandbox

3. Per-tenant configuration

Dashboard → Integrations → Easypay:

FieldValue
Account IDEasypay account ID
API keyAPI key
Base URLhttps://api.prod.easypay.pt

4. Webhook

Configure in Easypay merchant panel:

URL: https://checkout.example.com/api/webhooks/easypay/{orgId}

Ifthenpay setup

1. Create an Ifthenpay account

Sign up at ifthenpay.com and enable payment methods in the backoffice.

2. Environment variables

DEFAULT_PAYMENT_PROVIDER=ifthenpay
IFTHENPAY_ANTIPHISHING_KEY=your_key
IFTHENPAY_MB_KEY=your_mb_key
IFTHENPAY_MBWAY_KEY=your_mbway_key
IFTHENPAY_CC_KEY=your_cc_key

3. Per-tenant configuration

Dashboard → Integrations → Ifthenpay — enter each key separately.

4. Webhook

Configure callback URL in Ifthenpay backoffice:

URL: https://checkout.example.com/api/webhooks/ifthenpay/{orgId}

How credentials flow at runtime

Drag to pan · Scroll to zoom

Switching providers

To change the default provider for a tenant:

  1. Configure the new provider in dashboard Integrations
  2. Set it as the default in store settings (or pass provider in checkout session creation)
  3. Update webhook URLs for the new provider

No code changes required — the checkout app renders the appropriate UI based on the provider type.

Troubleshooting

IssueSolution
Payment Element not loadingCheck NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY is set on checkout app
Webhook verification failsEnsure webhook secret matches dashboard integration config
Multibanco reference not showingVerify Easypay/Ifthenpay keys are correct for the selected method
Wrong tenant chargedVerify tenantId in checkout session matches the merchant's org
Env fallback used instead of tenant configCheck integration is saved in dashboard for the correct org

On this page