Tink.SettlementAccounts (Tink v1.0.0)

Copy Markdown View Source

Merchant settlement accounts — accounts, refunds, withdrawals, transactions. Requires settlement-accounts or settlement-accounts:readonly scopes.

Summary

Functions

Create a refund. Requires settlement-accounts.

Create a withdrawal. Requires settlement-accounts.

Get a specific settlement account.

Get a specific transaction from a settlement account.

List settlement accounts for a merchant.

List refunds for a settlement account.

List transactions for a settlement account.

List withdrawals for a settlement account.

Update a settlement account. Requires settlement-accounts.

Functions

create_refund(client, merchant_id, account_id, params)

@spec create_refund(Tink.Client.t(), String.t(), String.t(), map()) ::
  {:ok, map()} | {:error, Tink.Error.t()}

Create a refund. Requires settlement-accounts.

create_withdrawal(client, merchant_id, account_id, params)

@spec create_withdrawal(Tink.Client.t(), String.t(), String.t(), map()) ::
  {:ok, map()} | {:error, Tink.Error.t()}

Create a withdrawal. Requires settlement-accounts.

get(client, merchant_id, account_id)

@spec get(Tink.Client.t(), String.t(), String.t()) ::
  {:ok, map()} | {:error, Tink.Error.t()}

Get a specific settlement account.

get_refund(client, merchant_id, account_id, refund_id)

@spec get_refund(Tink.Client.t(), String.t(), String.t(), String.t()) ::
  {:ok, map()} | {:error, Tink.Error.t()}

Get a refund by ID.

get_transaction(client, merchant_id, account_id, transaction_id)

@spec get_transaction(Tink.Client.t(), String.t(), String.t(), String.t()) ::
  {:ok, map()} | {:error, Tink.Error.t()}

Get a specific transaction from a settlement account.

get_withdrawal(client, merchant_id, account_id, withdrawal_id)

@spec get_withdrawal(Tink.Client.t(), String.t(), String.t(), String.t()) ::
  {:ok, map()} | {:error, Tink.Error.t()}

Get a withdrawal by ID.

list(client, merchant_id)

@spec list(Tink.Client.t(), String.t()) :: {:ok, map()} | {:error, Tink.Error.t()}

List settlement accounts for a merchant.

list_refunds(client, merchant_id, account_id)

@spec list_refunds(Tink.Client.t(), String.t(), String.t()) ::
  {:ok, map()} | {:error, Tink.Error.t()}

List refunds for a settlement account.

list_transactions(client, merchant_id, account_id, opts \\ [])

@spec list_transactions(Tink.Client.t(), String.t(), String.t(), keyword()) ::
  {:ok, map()} | {:error, Tink.Error.t()}

List transactions for a settlement account.

list_withdrawals(client, merchant_id, account_id)

@spec list_withdrawals(Tink.Client.t(), String.t(), String.t()) ::
  {:ok, map()} | {:error, Tink.Error.t()}

List withdrawals for a settlement account.

update(client, merchant_id, account_id, params)

@spec update(Tink.Client.t(), String.t(), String.t(), map()) ::
  {:ok, map()} | {:error, Tink.Error.t()}

Update a settlement account. Requires settlement-accounts.