Embeddable Flows

An embeddable_flow creates a pre-built UI that you can embed in your application with modern-treasury-js. template picks the flow: legal_entity_onboarding collects an individual's details and creates a legal entity, account_collection collects bank account details, and payment collects payment details and initiates a payment. Pass the returned client_token to createEmbeddableFlow.

AttributeDescription
id
string
The ID of the embeddable flow.
object
string
The object type: embeddable_flow.
live_mode
bool
This field will be true if this object exists in the live environment or false if it exists in the test environment.
template
string
The selected template: legal_entity_onboarding, account_collection, or payment.
client_token
string
The client token for embedding the flow in your application.
status
string
The current status of the underlying flow: pending, completed, expired, or cancelled.
expires_at
string
7 days after the last activity on the flow.
created_at
string
The time the flow was created.
updated_at
string
The time the flow was last updated.
options
object
The options from the request, plus any IDs created by Modern Treasury, such as legal_entity_id.
{
  "id": "0199f2c1-6a4e-7c2b-9d3f-5b8e1a2c4d6f",
  "object": "embeddable_flow",
  "live_mode": true,
  "template": "legal_entity_onboarding",
  "client_token": "le-live-fmsXHyYikKHstYHeSB6Co5AjezMqKoFKFhKmwnY2tvJMUFmndkarJY7GcwYkcBvr",
  "status": "pending",
  "expires_at": "2026-11-02T18:00:00Z",
  "created_at": "2026-10-26T18:00:00Z",
  "updated_at": "2026-10-26T18:00:00Z",
  "options": {
    "type": "individual",
    "legal_entity_id": "0199f2c1-6a51-7e8a-b2c4-8d0f3a5b7c9e"
  }
}
{
  "id": "454e874b-ff1d-46e8-9d22-0464615cf1e0",
  "object": "embeddable_flow",
  "live_mode": true,
  "template": "account_collection",
  "client_token": "ac-live-QVj2yTSt6qRNAzXQGKLHS9qfLF7Gs5JcCYHT5xztgjucGRbS6VfrJBpaNo5SrmfZ",
  "status": "pending",
  "expires_at": "2026-11-02T18:00:00Z",
  "created_at": "2026-10-26T18:00:00Z",
  "updated_at": "2026-10-26T18:00:00Z",
  "options": {
    "counterparty_id": "c03581a8-c948-41a9-889a-e5228390fd80",
    "payment_types": ["ach"],
    "receiving_countries": ["USA"],
    "external_account_id": null
  }
}
{
  "id": "d93b8ae4-b30e-42ce-bc5d-e1ca5785f863",
  "object": "embeddable_flow",
  "live_mode": false,
  "template": "payment",
  "client_token": "pay-test-fmsXHyYikKHstYHeSB6Co5AjezMqKoFKFhKmwnY2tvJMUFmndkarJY7GcwYkcBvr",
  "status": "pending",
  "expires_at": "2026-11-02T18:00:00Z",
  "created_at": "2026-10-26T18:00:00Z",
  "updated_at": "2026-10-26T18:00:00Z",
  "options": {
    "amount": 10000,
    "currency": "USD",
    "direction": "debit",
    "counterparty_id": "34b33f71-daaa-4ce3-b9f3-a275e7b9a6f7",
    "originating_account_id": "ceab8d17-1312-44fe-94e2-a858370c3f10",
    "receiving_account_id": null,
    "payment_order_id": null,
    "due_date": "2026-11-15",
    "effective_date_selection_enabled": true,
    "selected_effective_date": null,
    "external_account_collection": "enabled",
    "existing_external_accounts_filter": null
  }
}