Configuration for the Paysafe client.
Options
:username- (required) API username from the Paysafe Business Portal.:password- (required) API password from the Paysafe Business Portal.:environment-:testor:production. Defaults to:test.:account_id- Default account ID for requests. Can be overridden per-call.:base_url_override- Override the computed base URL entirely. Primarily intended for testing (pointing at a local mock server) or routing through a corporate proxy. When set, this replaces the:environment-derived base URL for every API (Payments, Scheduler, Applications, etc).:http_options- Options passed directly toReq. Defaults to[].:timeout- Request timeout in milliseconds. Defaults to30_000.:recv_timeout- Receive timeout in milliseconds. Defaults to30_000.:max_retries- Maximum number of retries on transient failures. Defaults to3.:retry_delay- Base delay in ms between retries (exponential backoff). Defaults to500.:rate_limit-{scale_ms, limit}tuple for token bucket rate limiting. Defaults to{1_000, 100}.:telemetry_prefix- Telemetry event prefix. Defaults to[:paysafe].
Example
config :paysafe,
username: "1001062690",
password: "B-qa2-0-...",
environment: :test,
account_id: "1009688230"
Summary
Functions
Returns the Applications (Onboarding) API base URL.
Computes the Base64-encoded Basic Auth header value.
Returns the Bank Account Validator API base URL (also used by the Interac
Verification Service, which lives under /verifiedme on the same base).
Returns the full base URL for the configured environment, or
base_url_override if set.
Returns the Cards API base URL.
Returns the Customer Identification (KYC) API base URL.
Returns the Customer Vault API base URL.
Returns the Direct Debit API base URL.
Load config from the application environment and merge with any overrides.
Returns the FX Rates API base URL.
Build and validate a Config struct from a keyword list or map.
Returns the Payments API base URL.
Returns the Payment Scheduler API base URL.
Returns the NimbleOptions schema for external inspection.
Types
@type t() :: %Paysafe.Config{ account_id: String.t() | nil, base_url_override: String.t() | nil, environment: :test | :production, http_options: keyword(), max_retries: non_neg_integer(), password: String.t(), rate_limit: {pos_integer(), pos_integer()}, recv_timeout: pos_integer(), retry_delay: pos_integer(), telemetry_prefix: [atom()], timeout: pos_integer(), username: String.t() }
Functions
Returns the Applications (Onboarding) API base URL.
Computes the Base64-encoded Basic Auth header value.
Returns the Bank Account Validator API base URL (also used by the Interac
Verification Service, which lives under /verifiedme on the same base).
Returns the full base URL for the configured environment, or
base_url_override if set.
Returns the Cards API base URL.
Returns the Customer Identification (KYC) API base URL.
Returns the Customer Vault API base URL.
Returns the Direct Debit API base URL.
Load config from the application environment and merge with any overrides.
Returns the FX Rates API base URL.
Build and validate a Config struct from a keyword list or map.
Raises NimbleOptions.ValidationError on invalid input.
Returns the Payments API base URL.
Returns the Payment Scheduler API base URL.
@spec schema() :: NimbleOptions.t()
Returns the NimbleOptions schema for external inspection.