Skip to content

Payment Methods

EaseLab processes SaaS subscription payments through configured payment gateways. This guide covers how lab owners pay for plans, what data EaseLab stores, and how platform administrators wire the payment account.

Payment architecture

mermaid
flowchart TB
    subgraph Lab Portal
        CO[Checkout]
    end
    subgraph EaseLab API
        BILL[BillingService]
        WH[Webhook handler]
    end
    subgraph Provider
        GW[Payment gateway]
    end
    CO --> BILL --> GW
    GW --> WH --> BILL
    WH --> SUB[Subscription activation]

Patient invoice payments (cash, card at desk) are recorded in tenant ledgers — separate from SaaS gateway flows documented here.

Supported payment flows

FlowRouteEnvironment
Standard checkout/billing/checkout/:planIdProduction
Payment return/billing/returnAfter redirect
Dev simulation/billing/dev-payDevelopment only
Billing history/billing/historyReceipts

Gateway brand depends on platform configuration (Stripe, regional PSP, etc.).

Checkout payment capture

During checkout:

  1. User selects plan and billing cycle.
  2. EaseLab creates a payment session with the provider.
  3. User enters card or wallet details on provider-hosted or embedded fields.
  4. Provider tokenizes sensitive data — PAN never touches EaseLab databases.
  5. Webhook confirms success → subscription activated.

3-D Secure

Cards requiring SCA may show an extra bank challenge — complete it or payment stays pending.

Stored payment data

DataStored in EaseLab?
Full card numberNo
Provider customer IDYes
Last four digitsOptional display
ExpiryOptional display
Billing addressYes for invoices

PCI scope is minimized via provider tokenization.

Platform payment account

Platform operators configure merchant credentials in Payment Account Setup:

SettingPurpose
API keysServer-side charge creation
Webhook secretValidate callback authenticity
CurrencyDefault checkout currency
Test modeSandbox transactions

Labs cannot edit platform gateway keys — only consume checkout.

Webhooks

mermaid
sequenceDiagram
    participant Gateway
    participant EaseLab
    Gateway->>EaseLab: payment.succeeded
    EaseLab->>EaseLab: Verify signature
    EaseLab->>EaseLab: Extend subscription ExpiresAt
    EaseLab->>EaseLab: Clear IsLocked

Failed webhooks may leave paid customers in read-only mode until manual reconciliation.

Failed payments

EventTenant state
Card declinedCheckout error — no change
Renewal failedMay transition to Overdue
ChargebackPlatform admin review

Users should update payment method and retry from /billing/plans or billing history.

Receipts and invoicing

/billing/history provides:

  • Transaction reference
  • Amount and tax
  • PDF receipt download (when enabled)
  • Email copy to billing contact

Export for accounting alongside financial reports of your lab business.

Security

ControlDetail
HTTPSRequired for checkout
Webhook signaturesPrevents forged activations
IdempotencyDuplicate webhooks ignored
AuditPlatform admin billing log

Phishing

EaseLab never asks for card details via email. Checkout only on official portal URLs — verify custom domain TLS certificate.

Troubleshooting

IssueAction
Payment succeeded, still lockedWait 2 min; contact support with txn ID
Currency mismatchPlatform currency config
Webhook 401Secret rotation — platform admin
Dev-pay only works locallyExpected — use real checkout in staging

Ease Lab — Cloud Pathology Lab Management