## List linked bank accounts `client.Embed.LinkedBankAccounts.List(ctx, params) (*PageNumberSchema[LinkedBankAccountPagedV1Data], error)` **get** `/v1/linked_bank_accounts` Returns a list of bank accounts associated with a specific Straddle account. The linked bank accounts are returned sorted by creation date, with the most recently created appearing first. This endpoint supports pagination to handle accounts with multiple linked bank accounts. ### Parameters - `params EmbedLinkedBankAccountListParams` - `AccountID param.Field[string]` Query param: The unique identifier of the related account. - `Level param.Field[EmbedLinkedBankAccountListParamsLevel]` Query param - `const EmbedLinkedBankAccountListParamsLevelAccount EmbedLinkedBankAccountListParamsLevel = "account"` - `const EmbedLinkedBankAccountListParamsLevelPlatform EmbedLinkedBankAccountListParamsLevel = "platform"` - `PageNumber param.Field[int64]` Query param: Results page number. Starts at page 1. - `PageSize param.Field[int64]` Query param: Page size. Max value: 1000 - `Purpose param.Field[EmbedLinkedBankAccountListParamsPurpose]` Query param: The purpose of the linked bank accounts to return. Possible values: 'charges', 'payouts', 'billing'. - `const EmbedLinkedBankAccountListParamsPurposeCharges EmbedLinkedBankAccountListParamsPurpose = "charges"` - `const EmbedLinkedBankAccountListParamsPurposePayouts EmbedLinkedBankAccountListParamsPurpose = "payouts"` - `const EmbedLinkedBankAccountListParamsPurposeBilling EmbedLinkedBankAccountListParamsPurpose = "billing"` - `SortBy param.Field[string]` Query param: Sort By. - `SortOrder param.Field[EmbedLinkedBankAccountListParamsSortOrder]` Query param: Sort Order. - `const EmbedLinkedBankAccountListParamsSortOrderAsc EmbedLinkedBankAccountListParamsSortOrder = "asc"` - `const EmbedLinkedBankAccountListParamsSortOrderDesc EmbedLinkedBankAccountListParamsSortOrder = "desc"` - `Status param.Field[EmbedLinkedBankAccountListParamsStatus]` Query param: The status of the linked bank accounts to return. Possible values: 'created', 'onboarding', 'active', 'inactive', 'rejected'. - `const EmbedLinkedBankAccountListParamsStatusCreated EmbedLinkedBankAccountListParamsStatus = "created"` - `const EmbedLinkedBankAccountListParamsStatusOnboarding EmbedLinkedBankAccountListParamsStatus = "onboarding"` - `const EmbedLinkedBankAccountListParamsStatusActive EmbedLinkedBankAccountListParamsStatus = "active"` - `const EmbedLinkedBankAccountListParamsStatusRejected EmbedLinkedBankAccountListParamsStatus = "rejected"` - `const EmbedLinkedBankAccountListParamsStatusInactive EmbedLinkedBankAccountListParamsStatus = "inactive"` - `const EmbedLinkedBankAccountListParamsStatusCanceled EmbedLinkedBankAccountListParamsStatus = "canceled"` - `CorrelationID param.Field[string]` Header param: Optional client generated identifier to trace and debug a series of requests. - `RequestID param.Field[string]` Header param: Optional client generated identifier to trace and debug a request. ### Returns - `type LinkedBankAccountPagedV1Data struct{…}` - `ID string` Unique identifier for the linked bank account. - `AccountID string` The unique identifier of the Straddle account related to this bank account. - `BankAccount LinkedBankAccountPagedV1DataBankAccount` - `AccountHolder string` - `AccountMask string` - `InstitutionName string` - `RoutingNumber string` - `CreatedAt Time` Timestamp of when the bank account object was created. - `Purposes []string` The purposes for the linked bank account. - `const LinkedBankAccountPagedV1DataPurposeCharges LinkedBankAccountPagedV1DataPurpose = "charges"` - `const LinkedBankAccountPagedV1DataPurposePayouts LinkedBankAccountPagedV1DataPurpose = "payouts"` - `const LinkedBankAccountPagedV1DataPurposeBilling LinkedBankAccountPagedV1DataPurpose = "billing"` - `Status string` The current status of the linked bank account. - `const LinkedBankAccountPagedV1DataStatusCreated LinkedBankAccountPagedV1DataStatus = "created"` - `const LinkedBankAccountPagedV1DataStatusOnboarding LinkedBankAccountPagedV1DataStatus = "onboarding"` - `const LinkedBankAccountPagedV1DataStatusActive LinkedBankAccountPagedV1DataStatus = "active"` - `const LinkedBankAccountPagedV1DataStatusRejected LinkedBankAccountPagedV1DataStatus = "rejected"` - `const LinkedBankAccountPagedV1DataStatusInactive LinkedBankAccountPagedV1DataStatus = "inactive"` - `const LinkedBankAccountPagedV1DataStatusCanceled LinkedBankAccountPagedV1DataStatus = "canceled"` - `StatusDetail LinkedBankAccountPagedV1DataStatusDetail` - `Code string` A machine-readable code for the specific status, useful for programmatic handling. - `Message string` A human-readable message describing the current status. - `Reason string` A machine-readable identifier for the specific status, useful for programmatic handling. - `const LinkedBankAccountPagedV1DataStatusDetailReasonUnverified LinkedBankAccountPagedV1DataStatusDetailReason = "unverified"` - `const LinkedBankAccountPagedV1DataStatusDetailReasonInReview LinkedBankAccountPagedV1DataStatusDetailReason = "in_review"` - `const LinkedBankAccountPagedV1DataStatusDetailReasonPending LinkedBankAccountPagedV1DataStatusDetailReason = "pending"` - `const LinkedBankAccountPagedV1DataStatusDetailReasonStuck LinkedBankAccountPagedV1DataStatusDetailReason = "stuck"` - `const LinkedBankAccountPagedV1DataStatusDetailReasonVerified LinkedBankAccountPagedV1DataStatusDetailReason = "verified"` - `const LinkedBankAccountPagedV1DataStatusDetailReasonFailedVerification LinkedBankAccountPagedV1DataStatusDetailReason = "failed_verification"` - `const LinkedBankAccountPagedV1DataStatusDetailReasonDisabled LinkedBankAccountPagedV1DataStatusDetailReason = "disabled"` - `const LinkedBankAccountPagedV1DataStatusDetailReasonNew LinkedBankAccountPagedV1DataStatusDetailReason = "new"` - `Source string` Identifies the origin of the status change (e.g., `watchtower`). This helps in tracking the cause of status updates. - `const LinkedBankAccountPagedV1DataStatusDetailSourceWatchtower LinkedBankAccountPagedV1DataStatusDetailSource = "watchtower"` - `UpdatedAt Time` Timestamp of the most recent update to the linked bank account. - `Description string` Optional description for the bank account. - `Metadata map[string, string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the linked bank account in a structured format. - `PlatformID string` The unique identifier of the Straddle Platform relatd to this bank account. ### Example ```go package main import ( "context" "fmt" "github.com/straddleio/straddle-go" "github.com/straddleio/straddle-go/option" ) func main() { client := straddle.NewClient( option.WithAPIKey("My API Key"), ) page, err := client.Embed.LinkedBankAccounts.List(context.TODO(), straddle.EmbedLinkedBankAccountListParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", page) } ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "bank_account": { "account_holder": "account_holder", "account_mask": "account_mask", "institution_name": "institution_name", "routing_number": "routing_number" }, "created_at": "2019-12-27T18:11:19.117Z", "purposes": [ "charges" ], "status": "created", "status_detail": { "code": "code", "message": "message", "reason": "unverified", "source": "watchtower" }, "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "metadata": { "foo": "string" }, "platform_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z", "max_page_size": 0, "page_number": 0, "page_size": 0, "sort_by": "sort_by", "sort_order": "asc", "total_items": 0, "total_pages": 0 }, "response_type": "object" } ```