Production-grade Elixir client for the Wise Platform API.

Installation

Add wise to your mix.exs dependencies:

def deps do
  [{:wise, "~> 1.0"}]
end

Quick Start

# Build a config
config = Wise.Config.new!(
  personal_token: System.fetch_env!("WISE_API_TOKEN"),
  sandbox: true
)

# Use any service
{:ok, profiles} = Wise.Services.Profiles.list(config)
{:ok, quote}    = Wise.Services.Quotes.create(config, profile_id, %{
  sourceCurrency: "USD",
  targetCurrency: "GBP",
  sourceAmount:   1000
})
{:ok, transfer} = Wise.Services.Transfers.create(config, %{
  targetAccount:         recipient_id,
  quoteUuid:             quote["id"],
  customerTransactionId: Wise.IdempotencyKey.new()
})
{:ok, _funded}  = Wise.Services.Transfers.fund(config, profile_id, transfer["id"])

Error Handling

case Wise.Services.Transfers.fund(config, pid, tid) do
  {:ok, result}                                    -> result
  {:error, %Wise.Error{code: "SCA_REQUIRED"}}      -> redirect_to_sca()
  {:error, %Wise.Error{type: :circuit_open}}       -> handle_open_circuit()
  {:error, %Wise.Error{type: :network, message: m}} -> Logger.warn(m)
end

All 42 API Groups

ModuleDescription
Wise.Services.ProfilesPersonal & business profiles
Wise.Services.QuotesRate locking & fee calculation
Wise.Services.RecipientsBeneficiary account management
Wise.Services.TransfersPayment creation & funding
Wise.Services.BalancesMulti-currency balances
Wise.Services.StatementsJSON/CSV/PDF/XLSX/MT940 statements
Wise.Services.BankAccountsReceive-money bank details
Wise.Services.BatchesBatch payments (up to 1,000)
Wise.Services.DirectDebitsACH/EFT funding accounts
Wise.Services.RatesMid-market exchange rates
Wise.Services.CurrenciesSupported currencies
Wise.Services.ComparisonsMulti-provider price comparison
Wise.Services.CardsCard status, permissions, PCI data
Wise.Services.CardOrdersPhysical and virtual card ordering
Wise.Services.CardTransactionsCard transaction history
Wise.Services.SpendLimitsPer-card & per-profile limits
Wise.Services.SpendControlsMCC & transaction-type controls
Wise.Services.DisputesCard transaction disputes
Wise.Services.KioskCollectionOn-site card production
Wise.Services.PushProvisioningApple/Google Pay provisioning
Wise.Services.ThreeDS3D Secure challenge results
Wise.Services.WebhooksSubscription management & verification
Wise.Services.ActivitiesProfile activity log
Wise.Services.AddressesProfile address management
Wise.Services.ContactsFind profiles by Wisetag/email/phone
Wise.Services.KYCEvidence upload & verification
Wise.Services.KYCReviewHosted & API-based KYC reviews
Wise.Services.OAuthOAuth 2.0 token exchange
Wise.Services.OTTOne Time Token SCA (deprecated)
Wise.Services.SCAStrong Customer Authentication
Wise.Services.CasesPartner support case management
Wise.Services.MCAMulti Currency Account
Wise.Services.UsersUser account management
Wise.Services.UserSecurityPIN, FaceMap, phone, device setup
Wise.Services.FaceTecBiometric public key retrieval
Wise.Services.JOSEJWS/JWE key management
Wise.Services.ClaimAccountAccount claim code generation
Wise.Services.SimulationsSandbox state simulation

Advanced Features

  • Rate limiting — token-bucket GenServer (10 req/s, burst 20)
  • Circuit breaker — CLOSED/OPEN/HALF_OPEN state machine GenServer
  • Retry — exponential back-off with cryptographic jitter (:crypto.strong_rand_bytes/1)
  • Request/response hooks — telemetry, logging, custom headers
  • HMAC-SHA256 webhook verification — constant-time comparison
  • Connection pooling — hackney pool via Wise.Application
  • OTP supervision — started automatically as part of the application tree

Summary

Functions

Checks API connectivity. Returns :ok or {:error, Wise.Error.t()}.

Functions

ping(config)

@spec ping(Wise.Config.t()) :: :ok | {:error, Wise.Error.t()}
@spec ping(Wise.Config.t()) :: :ok | {:error, Wise.Error.t()}

Checks API connectivity. Returns :ok or {:error, Wise.Error.t()}.