Skip to content
Seismic Orchestration

customers.create*Account

Four typed methods, one per (kind, origin) cell of the create matrix. Each one wires to its matching REST endpoint and returns the same response envelope: { request, account }.

MethodREST endpoint
customers.createExternalCryptoAccountPOST /customers/:id/accounts/crypto/external
customers.createVirtualCryptoAccountPOST /customers/:id/accounts/crypto/virtual
customers.createVirtualFiatAccountPOST /customers/:id/accounts/fiat/virtual
customers.createExternalFiatAccountPOST /customers/:id/accounts/fiat/external

Register an existing wallet: createExternalCryptoAccount

await ..("2f10…", {
  : "0x742d35Cc6634C0532925a3b844Bc9e7595f8b840",
  : "ethereum",
  : "USDC",
  : {
    : "individual",
    : "Alice",
    : "Walker",
    : "1990-01-15",
    : { : "US" },
  },
});
 
// Optional idempotency key: drop it into the input alongside the
// wire-side fields. Re-POSTing with the same value returns the
// existing AccountCreationRequest unchanged.
await ..("2f10…", {
  : "0x742d…",
  : "base",
  : "USDC",
  : {
    : "individual",
    : "Alice",
    : "Walker",
    : { : "US" },
  },
  : "abc-123",
});

shape defaults to "evm". Only EVM is accepted today (passing "sol" or another variant returns 400 InvalidAccountFields).

Provision a virtual wallet: createVirtualCryptoAccount

const  = await ..("2f10…", {
  : "base",
  : "USDC",
});
 
// resp.account is null until Seismic finishes provisioning.
// Poll the request by id, or look it up by idempotency key.
const  = await ..("2f10…", ..);

Provision a virtual bank account: createVirtualFiatAccount

Shape and rails are inferred from currency. See Virtual accounts for the available currencies.

const  = await ..("2f10…", {
  : "USD",
});
.(..); // "pending" → "completed"
// resp.account is null until provisioning completes.

Choosing the bank

Pass bank to say where the account is held. Omit it and a bank is chosen for you.

customers.virtualAccountBanks lists the banks this customer can pick. An empty array means there is no choice to make for them, not that the account cannot be opened — so offer the picker only when it has something in it.

const  = await ..("2f10…", {
  : "USD",
});
// [{ bank: "PORTAGE_BANK", name: "Portage Bank", country: "US" }, …]
 
await ..("2f10…", {
  : "USD",
  : [0]?.,
});

Naming a bank the customer cannot be issued an account at throws a 409 VirtualAccountBankNotAvailable, and nothing is created.

Register an existing bank account: createExternalFiatAccount

The variant of details must match the shape inferred from currency.

// USD → us-shape: routing_number + account_number + bank address. The
// `account_holder` block sits at the top level; Seismic registers
// external accounts against a holder identity, not the customer alone.
await ..("2f10…", {
  : "USD",
  : {
    : "business",
    : "Acme Inc.",
    : { : "US" },
  },
  : {
    : "0123456789",
    : "021000021",
    : {
      : "1 Wells Fargo Way",
      : "San Francisco",
      : "CA",
      : "94104",
      : "US",
    },
  },
});
 
// EUR → iban-shape: just the IBAN string.
await ..("2f10…", {
  : "EUR",
  : {
    : "business",
    : "Acme GmbH",
    : { : "DE" },
  },
  : {
    : "DE89370400440532013000",
    : {
      : "Friedrichstraße 1",
      : "Berlin",
      : "10117",
      : "DE",
    },
  },
});

Idempotency

Every create method accepts an optional idempotencyKey on the input alongside the wire-side fields. The client strips it and lifts it onto the Idempotency-Key HTTP header. Re-POSTing the same (org, key) returns the existing creation request instead of re-inserting. Omit the field to let the server mint one.

Polling virtual creates

// Poll by request id.
const  = await ..("2f10…", "req_…");
 
// Or look up by the idempotency key the request was created with;
// useful when retrying from a context that's lost the request id.
const  = await ..(
  "2f10…",
  "abc-123",
);

Reading attached accounts

// Per-kind getters: return a narrower type when you know the kind.
const  = await ..("2f10…", "acct_…");
const  = await ..("2f10…", "acct_…");
 
// Polymorphic getter: useful when you only have the id.
const  = await ..("acct_…");
if (. === "fiat") {
  // acct.details is a FiatAccount variant
} else {
  // acct.details is a CryptoAccount
}