🌐 Adfin Environment setup

Adfin environment setup to support testing and production flows

Staging vs Production

Adfin provides two isolated environments to develop, test and run your “money in” integration:


1. Authentication & Credentials

  • OAuth 2.0 (Auth Code Grant) in both environments.
  • Client ID / Secret are environment-specific.
  • Staging creds only work against staging.adfin.com endpoints.
  • Production creds only work against console.adfin.com endpoints.
  • Remember to store each set in separate environment variables (never mix).

2. Payment Rails

Staging

  • Test payment rails only.
  • Use our built-in test card numbers (e.g. 4242 4242 4242 4242), mock direct-debit & open-banking flows.
  • Simulate success, failures or edge-cases on demand.

Production

  • Live payment rails via your connected merchant accounts.
  • Test card numbers or sandbox credentials will be rejected.
  • Real money moves; settlement times, refunds, chargebacks follow live-network rules.

Use domain names, not specific IP addresses, when connecting to the Adfin API. IP addresses are subject to change.


3. Data handling & Retention

Staging

  • Fully sandboxed: no real customer data, no live transactions.
  • Data may be reset or purged
  • No guaranteed retention.

Production

  • Persistent, backed-up per our SLAs.
  • Immutable audit logs, exportable reports.
  • To delete or modify data, follow our data-deletion policy.

Best practices for environment switch-over

Example configuration

# Staging
export ADFIN_BASE_URL=https://staging.adfin.com/api
export ADFIN_OAUTH_AUTHORIZE=https://staging.adfin.com/oauth/authorize
export ADFIN_OAUTH_TOKEN=https://staging.adfin.com/oauth/token

# Production
export ADFIN_BASE_URL=https://console.adfin.com/api
export ADFIN_OAUTH_AUTHORIZE=https://console.adfin.com/oauth/authorize
export ADFIN_OAUTH_TOKEN=https://console.adfin.com/oauth/token

Test Thoroughly in Staging

  • Cover happy & unhappy paths: successes, declines, network errors, mandate revocations.

Obtain Staging & Production Credentials

  • When your ready to test and start development email [[email protected]] to get your staging client_id / client_secret
  • When you’re ready to go live, email [email protected] to get your production client_id / client_secret.