View Source Circlex.Api.Payouts.BankAccounts (Circlex v0.1.12)

API Client to the Payouts Bank Accounts API.

Reference: https://developers.circle.com/reference/payments-bank-accounts-wires-create

Link to this section Summary

Link to this section Functions

Link to this function

create(account_number, routing_number, billing_details, bank_address, opts \\ [])

View Source

Create a bank account (wires).

Reference: https://developers.circle.com/reference/payouts-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.Payouts.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"
  }
}
Link to this function

get_bank_account(id, opts \\ [])

View Source

Get a bank account (wires)

Reference: https://developers.circle.com/reference/payouts-bank-accounts-wires-get-id

examples

Examples

iex> host = Circlex.Test.start_server()
iex> Circlex.Api.Payouts.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"
  }
}