View Source Circlex.Api.Payments.BankAccounts (Circlex v0.1.12)
API Client to the Payments Bank Accounts API.
Reference: https://developers.circle.com/reference/payments-bank-accounts-wires-create
Link to this section Summary
Functions
Create a bank account (wires).
Create a bank account (wires) for an international bank account that supports list_bank_accounts
Get a bank account (wires)
Get a list of bank accounts (wires).
Link to this section Functions
create(account_number, routing_number, billing_details, bank_address, opts \\ [])
View SourceCreate a bank account (wires).
Reference: https://developers.circle.com/reference/payments-bank-accounts-wires-create
examples
Examples
iex> host = Circlex.Test.start_server()
iex> billing_details = %{city: "Toronto", country: "CA", district: "ON", line1: "100 Money St", name: "Satoshi Nakamoto", postalCode: "ON M5J 1S9"}
iex> bank_address = %{bankName: "HSBC Canada", city: "Toronto", country: "CA"}
iex> Circlex.Api.Payments.BankAccounts.create("1000000001", "999999999", billing_details, bank_address, host: host)
{
:ok,
%Circlex.Struct.BankAccount{
description: "HSBC Canada 0001",
bank_address: %{"bankName" => "HSBC Canada", "city" => "Toronto", "country" => "CA"},
billing_details: %{"city" => "Toronto", "country" => "CA", "district" => "ON", "line1" => "100 Money St", "name" => "Satoshi Nakamoto", "postalCode" => "ON M5J 1S9"},
create_date: "2022-07-17T08:59:41.344582Z",
fingerprint: "b09eb536-05ae-11ed-aaa8-6a1733211c01",
id: "a033a6d8-05ae-11ed-9e62-6a1733211c00",
status: "pending",
tracking_ref: "CIR3KXZZ00",
update_date: "2022-07-17T08:59:41.344582Z"
}
}
create_non_us_iban_supported(iban, billing_details, bank_address, opts \\ [])
View Source@spec create_non_us_iban_supported(String.t(), map(), map(), list()) :: {:ok, %Circlex.Struct.BankAccount{ bank_address: term(), billing_details: term(), create_date: term(), description: term(), fingerprint: term(), id: term(), status: term(), tracking_ref: term(), update_date: term() }} | {:error, term()}
Create a bank account (wires) for an international bank account that supports list_bank_accounts
Reference: https://developers.circle.com/reference/payments-bank-accounts-wires-create, see body params section for NON US BANK ACCOUNT - IBAN SUPPORTED
examples
Examples
iex> host = Circlex.Test.start_server() iex> billing_details = %{city: "Toronto", country: "CA", district: "ON", line1: "100 Money St", name: "Satoshi Nakamoto", postalCode: "ON M5J 1S9"} iex> bank_address = %{bankName: "HSBC Canada", city: "Toronto", country: "CA"} iex> Circlex.Api.Payments.BankAccounts.create_non_us_iban_supported("1000000001", billing_details, bank_address, host: host) {
:ok,
%Circlex.Struct.BankAccount{
description: "HSBC Canada 0001",
bank_address: %{"bankName" => "HSBC Canada", "city" => "Toronto", "country" => "CA"},
billing_details: %{"city" => "Toronto", "country" => "CA", "district" => "ON", "line1" => "100 Money St", "name" => "Satoshi Nakamoto", "postalCode" => "ON M5J 1S9"},
create_date: "2022-07-17T08:59:41.344582Z",
fingerprint: "b09eb536-05ae-11ed-aaa8-6a1733211c01",
id: "a033a6d8-05ae-11ed-9e62-6a1733211c00",
status: "pending",
tracking_ref: "CIR3KXZZ00",
update_date: "2022-07-17T08:59:41.344582Z"
}
}
Get a bank account (wires)
Reference: https://developers.circle.com/reference/getbusinessaccountwirebankaccounts
examples
Examples
iex> host = Circlex.Test.start_server()
iex> Circlex.Api.Payments.BankAccounts.get_bank_account("fce6d303-2923-43cf-a66a-1e4690e08d1b", host: host)
{
:ok,
%Circlex.Struct.BankAccount{
description: "HSBC Canada ****4444",
bank_address: %{"bankName" => "HSBC Canada", "city" => "Toronto", "country" => "CA"},
billing_details: %{"city" => "Toronto", "country" => "CA", "district" => "ON", "line1" => "100 Money St", "name" => "Satoshi Nakamoto", "postalCode" => "ON M5J 1S9"},
create_date: "2022-02-14T22:29:32.779Z",
fingerprint: "b296029f-8ec2-49bf-9b11-22ba09973c49",
id: "fce6d303-2923-43cf-a66a-1e4690e08d1b",
status: "complete",
tracking_ref: "CIR3KX3L99",
update_date: "2022-02-14T22:29:33.516Z"
}
}
Get a list of bank accounts (wires).
Reference: https://developers.circle.com/reference/getbusinessaccountwirebankaccount
examples
Examples
iex> host = Circlex.Test.start_server()
iex> Circlex.Api.Payments.BankAccounts.list_bank_accounts(host: host)
{
:ok,
[
%Circlex.Struct.BankAccount{
description: "HSBC Canada ****4444",
bank_address: %{"bankName" => "HSBC Canada", "city" => "Toronto", "country" => "CA"},
billing_details: %{"city" => "Toronto", "country" => "CA", "district" => "ON", "line1" => "100 Money St", "name" => "Satoshi Nakamoto", "postalCode" => "ON M5J 1S9"},
create_date: "2022-02-14T22:29:32.779Z",
fingerprint: "b296029f-8ec2-49bf-9b11-22ba09973c49",
id: "fce6d303-2923-43cf-a66a-1e4690e08d1b",
status: "complete",
tracking_ref: "CIR3KX3L99",
update_date: "2022-02-14T22:29:33.516Z"
}
]
}