Plaid Sandbox API — sandbox-only test utilities.
Use these endpoints to test your integration without real bank accounts.
All functions in this module fail in production environments.
Summary
Functions
Creates a test bank transfer in sandbox.
Creates a sandbox Item with test accounts.
Fires a webhook for a sandbox Item.
Resets an Item's login state to trigger ITEM_LOGIN_REQUIRED.
Sets an Item into a specific verification state for testing error handling.
Simulates a transfer event in sandbox.
Returns a list of available test usernames for sandbox.
Functions
@spec create_bank_transfer(PlaidEx.Config.t(), map(), keyword()) :: {:ok, map()} | {:error, PlaidEx.Error.t()}
Creates a test bank transfer in sandbox.
@spec create_public_token( PlaidEx.Config.t(), keyword() ) :: {:ok, %{public_token: String.t()}} | {:error, PlaidEx.Error.t()}
Creates a sandbox Item with test accounts.
Returns a public_token ready for exchange, without needing
to open Link. Used in automated testing.
Example
{:ok, %{public_token: token}} = PlaidEx.API.Sandbox.create_public_token(config,
institution_id: "ins_109508",
initial_products: ["transactions"],
options: %{override_username: "user_good"}
)
@spec fire_webhook( PlaidEx.Config.t(), keyword() ) :: {:ok, map()} | {:error, PlaidEx.Error.t()}
Fires a webhook for a sandbox Item.
Example
PlaidEx.API.Sandbox.fire_webhook(config,
access_token: "access-sandbox-...",
webhook_type: "TRANSACTIONS",
webhook_code: "SYNC_UPDATES_AVAILABLE"
)
@spec reset_login(PlaidEx.Config.t(), String.t(), keyword()) :: {:ok, map()} | {:error, PlaidEx.Error.t()}
Resets an Item's login state to trigger ITEM_LOGIN_REQUIRED.
@spec set_item_verification_status( PlaidEx.Config.t(), String.t(), String.t(), String.t(), keyword() ) :: {:ok, map()} | {:error, PlaidEx.Error.t()}
Sets an Item into a specific verification state for testing error handling.
@spec simulate_transfer_event(PlaidEx.Config.t(), String.t(), String.t(), keyword()) :: {:ok, map()} | {:error, PlaidEx.Error.t()}
Simulates a transfer event in sandbox.
Returns a list of available test usernames for sandbox.