# Linked Bank Accounts ## Create a linked bank account `client.Embed.LinkedBankAccounts.New(ctx, params) (*LinkedBankAccountV1, error)` **post** `/v1/linked_bank_accounts` Creates a new linked bank account associated with a Straddle account. This endpoint allows you to associate external bank accounts with a Straddle account for various payment operations such as payment deposits, payout withdrawals, and more. ### Parameters - `params EmbedLinkedBankAccountNewParams` - `AccountID param.Field[string]` Body param: The unique identifier of the Straddle account to associate this bank account with. - `BankAccount param.Field[EmbedLinkedBankAccountNewParamsBankAccount]` Body param - `AccountHolder string` The name of the account holder as it appears on the bank account. Typically, this is the legal name of the business associated with the account. - `AccountNumber string` The bank account number. - `RoutingNumber string` The routing number of the bank account. - `Description param.Field[string]` Body param: Optional description for the bank account. - `Metadata param.Field[map[string, string]]` Body param: Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the linked bank account in a structured format. - `PlatformID param.Field[string]` Body param: The unique identifier of the Straddle Platform to associate this bank account with. - `Purposes param.Field[[]string]` Body param: The purposes for the linked bank account. - `const EmbedLinkedBankAccountNewParamsPurposeCharges EmbedLinkedBankAccountNewParamsPurpose = "charges"` - `const EmbedLinkedBankAccountNewParamsPurposePayouts EmbedLinkedBankAccountNewParamsPurpose = "payouts"` - `const EmbedLinkedBankAccountNewParamsPurposeBilling EmbedLinkedBankAccountNewParamsPurpose = "billing"` - `CorrelationID param.Field[string]` Header param: Optional client generated identifier to trace and debug a series of requests. - `IdempotencyKey param.Field[string]` Header param: Optional client generated value to use for idempotent requests. - `RequestID param.Field[string]` Header param: Optional client generated identifier to trace and debug a request. ### Returns - `type LinkedBankAccountV1 struct{…}` - `Data LinkedBankAccountV1Data` - `ID string` Unique identifier for the linked bank account. - `AccountID string` The unique identifier of the Straddle account related to this bank account. - `BankAccount LinkedBankAccountV1DataBankAccount` - `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 LinkedBankAccountV1DataPurposeCharges LinkedBankAccountV1DataPurpose = "charges"` - `const LinkedBankAccountV1DataPurposePayouts LinkedBankAccountV1DataPurpose = "payouts"` - `const LinkedBankAccountV1DataPurposeBilling LinkedBankAccountV1DataPurpose = "billing"` - `Status string` The current status of the linked bank account. - `const LinkedBankAccountV1DataStatusCreated LinkedBankAccountV1DataStatus = "created"` - `const LinkedBankAccountV1DataStatusOnboarding LinkedBankAccountV1DataStatus = "onboarding"` - `const LinkedBankAccountV1DataStatusActive LinkedBankAccountV1DataStatus = "active"` - `const LinkedBankAccountV1DataStatusRejected LinkedBankAccountV1DataStatus = "rejected"` - `const LinkedBankAccountV1DataStatusInactive LinkedBankAccountV1DataStatus = "inactive"` - `const LinkedBankAccountV1DataStatusCanceled LinkedBankAccountV1DataStatus = "canceled"` - `StatusDetail LinkedBankAccountV1DataStatusDetail` - `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 LinkedBankAccountV1DataStatusDetailReasonUnverified LinkedBankAccountV1DataStatusDetailReason = "unverified"` - `const LinkedBankAccountV1DataStatusDetailReasonInReview LinkedBankAccountV1DataStatusDetailReason = "in_review"` - `const LinkedBankAccountV1DataStatusDetailReasonPending LinkedBankAccountV1DataStatusDetailReason = "pending"` - `const LinkedBankAccountV1DataStatusDetailReasonStuck LinkedBankAccountV1DataStatusDetailReason = "stuck"` - `const LinkedBankAccountV1DataStatusDetailReasonVerified LinkedBankAccountV1DataStatusDetailReason = "verified"` - `const LinkedBankAccountV1DataStatusDetailReasonFailedVerification LinkedBankAccountV1DataStatusDetailReason = "failed_verification"` - `const LinkedBankAccountV1DataStatusDetailReasonDisabled LinkedBankAccountV1DataStatusDetailReason = "disabled"` - `const LinkedBankAccountV1DataStatusDetailReasonNew LinkedBankAccountV1DataStatusDetailReason = "new"` - `Source string` Identifies the origin of the status change (e.g., `watchtower`). This helps in tracking the cause of status updates. - `const LinkedBankAccountV1DataStatusDetailSourceWatchtower LinkedBankAccountV1DataStatusDetailSource = "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. - `Meta ResponseMetadata` Metadata about the API request, including an identifier and timestamp. - `APIRequestID string` Unique identifier for this API request, useful for troubleshooting. - `APIRequestTimestamp Time` Timestamp for this API request, useful for troubleshooting. - `ResponseType LinkedBankAccountV1ResponseType` Indicates the structure of the returned content. - "object" means the `data` field contains a single JSON object. - "array" means the `data` field contains an array of objects. - "error" means the `data` field contains an error object with details of the issue. - "none" means no data is returned. - `const LinkedBankAccountV1ResponseTypeObject LinkedBankAccountV1ResponseType = "object"` - `const LinkedBankAccountV1ResponseTypeArray LinkedBankAccountV1ResponseType = "array"` - `const LinkedBankAccountV1ResponseTypeError LinkedBankAccountV1ResponseType = "error"` - `const LinkedBankAccountV1ResponseTypeNone LinkedBankAccountV1ResponseType = "none"` ### 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"), ) linkedBankAccountV1, err := client.Embed.LinkedBankAccounts.New(context.TODO(), straddle.EmbedLinkedBankAccountNewParams{ AccountID: straddle.String("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"), BankAccount: straddle.EmbedLinkedBankAccountNewParamsBankAccount{ AccountHolder: "account_holder", AccountNumber: "account_number", RoutingNumber: "xxxxxxxxx", }, }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", linkedBankAccountV1.Data) } ``` #### 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" }, "response_type": "object" } ``` ## 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" } ``` ## Update a linked bank account `client.Embed.LinkedBankAccounts.Update(ctx, linkedBankAccountID, params) (*LinkedBankAccountV1, error)` **put** `/v1/linked_bank_accounts/{linked_bank_account_id}` Updates an existing linked bank account's information. This can be used to update account details during onboarding or to update metadata associated with the linked account. The linked bank account must be in 'created' or 'onboarding' status. ### Parameters - `linkedBankAccountID string` - `params EmbedLinkedBankAccountUpdateParams` - `BankAccount param.Field[EmbedLinkedBankAccountUpdateParamsBankAccount]` Body param - `AccountHolder string` The name of the account holder as it appears on the bank account. Typically, this is the legal name of the business associated with the account. - `AccountNumber string` The bank account number. - `RoutingNumber string` The routing number of the bank account. - `Metadata param.Field[map[string, string]]` Body param: Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the linked bank account in a structured format. - `CorrelationID param.Field[string]` Header param: Optional client generated identifier to trace and debug a series of requests. - `IdempotencyKey param.Field[string]` Header param: Optional client generated value to use for idempotent requests. - `RequestID param.Field[string]` Header param: Optional client generated identifier to trace and debug a request. ### Returns - `type LinkedBankAccountV1 struct{…}` - `Data LinkedBankAccountV1Data` - `ID string` Unique identifier for the linked bank account. - `AccountID string` The unique identifier of the Straddle account related to this bank account. - `BankAccount LinkedBankAccountV1DataBankAccount` - `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 LinkedBankAccountV1DataPurposeCharges LinkedBankAccountV1DataPurpose = "charges"` - `const LinkedBankAccountV1DataPurposePayouts LinkedBankAccountV1DataPurpose = "payouts"` - `const LinkedBankAccountV1DataPurposeBilling LinkedBankAccountV1DataPurpose = "billing"` - `Status string` The current status of the linked bank account. - `const LinkedBankAccountV1DataStatusCreated LinkedBankAccountV1DataStatus = "created"` - `const LinkedBankAccountV1DataStatusOnboarding LinkedBankAccountV1DataStatus = "onboarding"` - `const LinkedBankAccountV1DataStatusActive LinkedBankAccountV1DataStatus = "active"` - `const LinkedBankAccountV1DataStatusRejected LinkedBankAccountV1DataStatus = "rejected"` - `const LinkedBankAccountV1DataStatusInactive LinkedBankAccountV1DataStatus = "inactive"` - `const LinkedBankAccountV1DataStatusCanceled LinkedBankAccountV1DataStatus = "canceled"` - `StatusDetail LinkedBankAccountV1DataStatusDetail` - `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 LinkedBankAccountV1DataStatusDetailReasonUnverified LinkedBankAccountV1DataStatusDetailReason = "unverified"` - `const LinkedBankAccountV1DataStatusDetailReasonInReview LinkedBankAccountV1DataStatusDetailReason = "in_review"` - `const LinkedBankAccountV1DataStatusDetailReasonPending LinkedBankAccountV1DataStatusDetailReason = "pending"` - `const LinkedBankAccountV1DataStatusDetailReasonStuck LinkedBankAccountV1DataStatusDetailReason = "stuck"` - `const LinkedBankAccountV1DataStatusDetailReasonVerified LinkedBankAccountV1DataStatusDetailReason = "verified"` - `const LinkedBankAccountV1DataStatusDetailReasonFailedVerification LinkedBankAccountV1DataStatusDetailReason = "failed_verification"` - `const LinkedBankAccountV1DataStatusDetailReasonDisabled LinkedBankAccountV1DataStatusDetailReason = "disabled"` - `const LinkedBankAccountV1DataStatusDetailReasonNew LinkedBankAccountV1DataStatusDetailReason = "new"` - `Source string` Identifies the origin of the status change (e.g., `watchtower`). This helps in tracking the cause of status updates. - `const LinkedBankAccountV1DataStatusDetailSourceWatchtower LinkedBankAccountV1DataStatusDetailSource = "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. - `Meta ResponseMetadata` Metadata about the API request, including an identifier and timestamp. - `APIRequestID string` Unique identifier for this API request, useful for troubleshooting. - `APIRequestTimestamp Time` Timestamp for this API request, useful for troubleshooting. - `ResponseType LinkedBankAccountV1ResponseType` Indicates the structure of the returned content. - "object" means the `data` field contains a single JSON object. - "array" means the `data` field contains an array of objects. - "error" means the `data` field contains an error object with details of the issue. - "none" means no data is returned. - `const LinkedBankAccountV1ResponseTypeObject LinkedBankAccountV1ResponseType = "object"` - `const LinkedBankAccountV1ResponseTypeArray LinkedBankAccountV1ResponseType = "array"` - `const LinkedBankAccountV1ResponseTypeError LinkedBankAccountV1ResponseType = "error"` - `const LinkedBankAccountV1ResponseTypeNone LinkedBankAccountV1ResponseType = "none"` ### 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"), ) linkedBankAccountV1, err := client.Embed.LinkedBankAccounts.Update( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", straddle.EmbedLinkedBankAccountUpdateParams{ BankAccount: straddle.EmbedLinkedBankAccountUpdateParamsBankAccount{ AccountHolder: "account_holder", AccountNumber: "account_number", RoutingNumber: "xxxxxxxxx", }, }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", linkedBankAccountV1.Data) } ``` #### 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" }, "response_type": "object" } ``` ## Lookup a linked bank account `client.Embed.LinkedBankAccounts.Get(ctx, linkedBankAccountID, query) (*LinkedBankAccountV1, error)` **get** `/v1/linked_bank_accounts/{linked_bank_account_id}` Retrieves the details of a linked bank account that has previously been created. Supply the unique linked bank account `id`, and Straddle will return the corresponding information. The response includes masked account details for security purposes. ### Parameters - `linkedBankAccountID string` - `query EmbedLinkedBankAccountGetParams` - `CorrelationID param.Field[string]` Optional client generated identifier to trace and debug a series of requests. - `RequestID param.Field[string]` Optional client generated identifier to trace and debug a request. ### Returns - `type LinkedBankAccountV1 struct{…}` - `Data LinkedBankAccountV1Data` - `ID string` Unique identifier for the linked bank account. - `AccountID string` The unique identifier of the Straddle account related to this bank account. - `BankAccount LinkedBankAccountV1DataBankAccount` - `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 LinkedBankAccountV1DataPurposeCharges LinkedBankAccountV1DataPurpose = "charges"` - `const LinkedBankAccountV1DataPurposePayouts LinkedBankAccountV1DataPurpose = "payouts"` - `const LinkedBankAccountV1DataPurposeBilling LinkedBankAccountV1DataPurpose = "billing"` - `Status string` The current status of the linked bank account. - `const LinkedBankAccountV1DataStatusCreated LinkedBankAccountV1DataStatus = "created"` - `const LinkedBankAccountV1DataStatusOnboarding LinkedBankAccountV1DataStatus = "onboarding"` - `const LinkedBankAccountV1DataStatusActive LinkedBankAccountV1DataStatus = "active"` - `const LinkedBankAccountV1DataStatusRejected LinkedBankAccountV1DataStatus = "rejected"` - `const LinkedBankAccountV1DataStatusInactive LinkedBankAccountV1DataStatus = "inactive"` - `const LinkedBankAccountV1DataStatusCanceled LinkedBankAccountV1DataStatus = "canceled"` - `StatusDetail LinkedBankAccountV1DataStatusDetail` - `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 LinkedBankAccountV1DataStatusDetailReasonUnverified LinkedBankAccountV1DataStatusDetailReason = "unverified"` - `const LinkedBankAccountV1DataStatusDetailReasonInReview LinkedBankAccountV1DataStatusDetailReason = "in_review"` - `const LinkedBankAccountV1DataStatusDetailReasonPending LinkedBankAccountV1DataStatusDetailReason = "pending"` - `const LinkedBankAccountV1DataStatusDetailReasonStuck LinkedBankAccountV1DataStatusDetailReason = "stuck"` - `const LinkedBankAccountV1DataStatusDetailReasonVerified LinkedBankAccountV1DataStatusDetailReason = "verified"` - `const LinkedBankAccountV1DataStatusDetailReasonFailedVerification LinkedBankAccountV1DataStatusDetailReason = "failed_verification"` - `const LinkedBankAccountV1DataStatusDetailReasonDisabled LinkedBankAccountV1DataStatusDetailReason = "disabled"` - `const LinkedBankAccountV1DataStatusDetailReasonNew LinkedBankAccountV1DataStatusDetailReason = "new"` - `Source string` Identifies the origin of the status change (e.g., `watchtower`). This helps in tracking the cause of status updates. - `const LinkedBankAccountV1DataStatusDetailSourceWatchtower LinkedBankAccountV1DataStatusDetailSource = "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. - `Meta ResponseMetadata` Metadata about the API request, including an identifier and timestamp. - `APIRequestID string` Unique identifier for this API request, useful for troubleshooting. - `APIRequestTimestamp Time` Timestamp for this API request, useful for troubleshooting. - `ResponseType LinkedBankAccountV1ResponseType` Indicates the structure of the returned content. - "object" means the `data` field contains a single JSON object. - "array" means the `data` field contains an array of objects. - "error" means the `data` field contains an error object with details of the issue. - "none" means no data is returned. - `const LinkedBankAccountV1ResponseTypeObject LinkedBankAccountV1ResponseType = "object"` - `const LinkedBankAccountV1ResponseTypeArray LinkedBankAccountV1ResponseType = "array"` - `const LinkedBankAccountV1ResponseTypeError LinkedBankAccountV1ResponseType = "error"` - `const LinkedBankAccountV1ResponseTypeNone LinkedBankAccountV1ResponseType = "none"` ### 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"), ) linkedBankAccountV1, err := client.Embed.LinkedBankAccounts.Get( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", straddle.EmbedLinkedBankAccountGetParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", linkedBankAccountV1.Data) } ``` #### 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" }, "response_type": "object" } ``` ## Unmask a linked bank account `client.Embed.LinkedBankAccounts.Unmask(ctx, linkedBankAccountID, query) (*LinkedBankAccountUnmaskV1, error)` **get** `/v1/linked_bank_accounts/{linked_bank_account_id}/unmask` Retrieves the unmasked details of a linked bank account that has previously been created. Supply the unique linked bank account `id`, and Straddle will return the corresponding information, including sensitive details. This endpoint needs to be enabled by Straddle for your account and should only be used when absolutely necessary. ### Parameters - `linkedBankAccountID string` - `query EmbedLinkedBankAccountUnmaskParams` - `CorrelationID param.Field[string]` Optional client generated identifier to trace and debug a series of requests. - `RequestID param.Field[string]` Optional client generated identifier to trace and debug a request. ### Returns - `type LinkedBankAccountUnmaskV1 struct{…}` - `Data LinkedBankAccountUnmaskV1Data` - `ID string` Unique identifier for the linked bank account. - `AccountID string` Unique identifier for the Straddle account related to this bank account. - `BankAccount LinkedBankAccountUnmaskV1DataBankAccount` The bank account details associated with the linked bank account. - `AccountHolder string` - `AccountNumber string` - `InstitutionName string` - `RoutingNumber string` - `CreatedAt Time` Timestamp of when the linked bank account was created. - `Status string` The current status of the linked bank account. - `const LinkedBankAccountUnmaskV1DataStatusCreated LinkedBankAccountUnmaskV1DataStatus = "created"` - `const LinkedBankAccountUnmaskV1DataStatusOnboarding LinkedBankAccountUnmaskV1DataStatus = "onboarding"` - `const LinkedBankAccountUnmaskV1DataStatusActive LinkedBankAccountUnmaskV1DataStatus = "active"` - `const LinkedBankAccountUnmaskV1DataStatusRejected LinkedBankAccountUnmaskV1DataStatus = "rejected"` - `const LinkedBankAccountUnmaskV1DataStatusInactive LinkedBankAccountUnmaskV1DataStatus = "inactive"` - `const LinkedBankAccountUnmaskV1DataStatusCanceled LinkedBankAccountUnmaskV1DataStatus = "canceled"` - `StatusDetail LinkedBankAccountUnmaskV1DataStatusDetail` Additional details about the current status of the linked bank account. - `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 LinkedBankAccountUnmaskV1DataStatusDetailReasonUnverified LinkedBankAccountUnmaskV1DataStatusDetailReason = "unverified"` - `const LinkedBankAccountUnmaskV1DataStatusDetailReasonInReview LinkedBankAccountUnmaskV1DataStatusDetailReason = "in_review"` - `const LinkedBankAccountUnmaskV1DataStatusDetailReasonPending LinkedBankAccountUnmaskV1DataStatusDetailReason = "pending"` - `const LinkedBankAccountUnmaskV1DataStatusDetailReasonStuck LinkedBankAccountUnmaskV1DataStatusDetailReason = "stuck"` - `const LinkedBankAccountUnmaskV1DataStatusDetailReasonVerified LinkedBankAccountUnmaskV1DataStatusDetailReason = "verified"` - `const LinkedBankAccountUnmaskV1DataStatusDetailReasonFailedVerification LinkedBankAccountUnmaskV1DataStatusDetailReason = "failed_verification"` - `const LinkedBankAccountUnmaskV1DataStatusDetailReasonDisabled LinkedBankAccountUnmaskV1DataStatusDetailReason = "disabled"` - `const LinkedBankAccountUnmaskV1DataStatusDetailReasonNew LinkedBankAccountUnmaskV1DataStatusDetailReason = "new"` - `Source string` Identifies the origin of the status change (e.g., `watchtower`). This helps in tracking the cause of status updates. - `const LinkedBankAccountUnmaskV1DataStatusDetailSourceWatchtower LinkedBankAccountUnmaskV1DataStatusDetailSource = "watchtower"` - `UpdatedAt Time` Timestamp of when the linked bank account was last updated. - `Metadata map[string, string]` - `Meta ResponseMetadata` Metadata about the API request, including an identifier and timestamp. - `APIRequestID string` Unique identifier for this API request, useful for troubleshooting. - `APIRequestTimestamp Time` Timestamp for this API request, useful for troubleshooting. - `ResponseType LinkedBankAccountUnmaskV1ResponseType` Indicates the structure of the returned content. - "object" means the `data` field contains a single JSON object. - "array" means the `data` field contains an array of objects. - "error" means the `data` field contains an error object with details of the issue. - "none" means no data is returned. - `const LinkedBankAccountUnmaskV1ResponseTypeObject LinkedBankAccountUnmaskV1ResponseType = "object"` - `const LinkedBankAccountUnmaskV1ResponseTypeArray LinkedBankAccountUnmaskV1ResponseType = "array"` - `const LinkedBankAccountUnmaskV1ResponseTypeError LinkedBankAccountUnmaskV1ResponseType = "error"` - `const LinkedBankAccountUnmaskV1ResponseTypeNone LinkedBankAccountUnmaskV1ResponseType = "none"` ### 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"), ) linkedBankAccountUnmaskV1, err := client.Embed.LinkedBankAccounts.Unmask( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", straddle.EmbedLinkedBankAccountUnmaskParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", linkedBankAccountUnmaskV1.Data) } ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "bank_account": { "account_holder": "account_holder", "account_number": "account_number", "institution_name": "institution_name", "routing_number": "routing_number" }, "created_at": "2019-12-27T18:11:19.117Z", "status": "created", "status_detail": { "code": "code", "message": "message", "reason": "unverified", "source": "watchtower" }, "updated_at": "2019-12-27T18:11:19.117Z", "metadata": { "foo": "string" } }, "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z" }, "response_type": "object" } ``` ## Cancel a linked bank account `client.Embed.LinkedBankAccounts.Cancel(ctx, linkedBankAccountID, body) (*LinkedBankAccountV1, error)` **patch** `/v1/linked_bank_accounts/{linked_bank_account_id}/cancel` Cancels an existing linked bank account. This can be used to cancel a linked bank account before it has been reviewed. The linked bank account must be in 'created' status. ### Parameters - `linkedBankAccountID string` - `body EmbedLinkedBankAccountCancelParams` - `CorrelationID param.Field[string]` Optional client generated identifier to trace and debug a series of requests. - `IdempotencyKey param.Field[string]` Optional client generated value to use for idempotent requests. - `RequestID param.Field[string]` Optional client generated identifier to trace and debug a request. ### Returns - `type LinkedBankAccountV1 struct{…}` - `Data LinkedBankAccountV1Data` - `ID string` Unique identifier for the linked bank account. - `AccountID string` The unique identifier of the Straddle account related to this bank account. - `BankAccount LinkedBankAccountV1DataBankAccount` - `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 LinkedBankAccountV1DataPurposeCharges LinkedBankAccountV1DataPurpose = "charges"` - `const LinkedBankAccountV1DataPurposePayouts LinkedBankAccountV1DataPurpose = "payouts"` - `const LinkedBankAccountV1DataPurposeBilling LinkedBankAccountV1DataPurpose = "billing"` - `Status string` The current status of the linked bank account. - `const LinkedBankAccountV1DataStatusCreated LinkedBankAccountV1DataStatus = "created"` - `const LinkedBankAccountV1DataStatusOnboarding LinkedBankAccountV1DataStatus = "onboarding"` - `const LinkedBankAccountV1DataStatusActive LinkedBankAccountV1DataStatus = "active"` - `const LinkedBankAccountV1DataStatusRejected LinkedBankAccountV1DataStatus = "rejected"` - `const LinkedBankAccountV1DataStatusInactive LinkedBankAccountV1DataStatus = "inactive"` - `const LinkedBankAccountV1DataStatusCanceled LinkedBankAccountV1DataStatus = "canceled"` - `StatusDetail LinkedBankAccountV1DataStatusDetail` - `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 LinkedBankAccountV1DataStatusDetailReasonUnverified LinkedBankAccountV1DataStatusDetailReason = "unverified"` - `const LinkedBankAccountV1DataStatusDetailReasonInReview LinkedBankAccountV1DataStatusDetailReason = "in_review"` - `const LinkedBankAccountV1DataStatusDetailReasonPending LinkedBankAccountV1DataStatusDetailReason = "pending"` - `const LinkedBankAccountV1DataStatusDetailReasonStuck LinkedBankAccountV1DataStatusDetailReason = "stuck"` - `const LinkedBankAccountV1DataStatusDetailReasonVerified LinkedBankAccountV1DataStatusDetailReason = "verified"` - `const LinkedBankAccountV1DataStatusDetailReasonFailedVerification LinkedBankAccountV1DataStatusDetailReason = "failed_verification"` - `const LinkedBankAccountV1DataStatusDetailReasonDisabled LinkedBankAccountV1DataStatusDetailReason = "disabled"` - `const LinkedBankAccountV1DataStatusDetailReasonNew LinkedBankAccountV1DataStatusDetailReason = "new"` - `Source string` Identifies the origin of the status change (e.g., `watchtower`). This helps in tracking the cause of status updates. - `const LinkedBankAccountV1DataStatusDetailSourceWatchtower LinkedBankAccountV1DataStatusDetailSource = "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. - `Meta ResponseMetadata` Metadata about the API request, including an identifier and timestamp. - `APIRequestID string` Unique identifier for this API request, useful for troubleshooting. - `APIRequestTimestamp Time` Timestamp for this API request, useful for troubleshooting. - `ResponseType LinkedBankAccountV1ResponseType` Indicates the structure of the returned content. - "object" means the `data` field contains a single JSON object. - "array" means the `data` field contains an array of objects. - "error" means the `data` field contains an error object with details of the issue. - "none" means no data is returned. - `const LinkedBankAccountV1ResponseTypeObject LinkedBankAccountV1ResponseType = "object"` - `const LinkedBankAccountV1ResponseTypeArray LinkedBankAccountV1ResponseType = "array"` - `const LinkedBankAccountV1ResponseTypeError LinkedBankAccountV1ResponseType = "error"` - `const LinkedBankAccountV1ResponseTypeNone LinkedBankAccountV1ResponseType = "none"` ### 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"), ) linkedBankAccountV1, err := client.Embed.LinkedBankAccounts.Cancel( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", straddle.EmbedLinkedBankAccountCancelParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", linkedBankAccountV1.Data) } ``` #### 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" }, "response_type": "object" } ``` ## Domain Types ### Linked Bank Account Paged V1 - `type LinkedBankAccountPagedV1 struct{…}` - `Data []LinkedBankAccountPagedV1Data` - `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. - `Meta PagedResponseMetadata` Metadata about the API request, including an identifier, timestamp, and pagination details. - `APIRequestID string` Unique identifier for this API request, useful for troubleshooting. - `APIRequestTimestamp Time` Timestamp for this API request, useful for troubleshooting. - `MaxPageSize int64` Maximum allowed page size for this endpoint. - `PageNumber int64` Page number for paginated results. - `PageSize int64` Number of items per page in this response. - `SortBy string` The field that the results were sorted by. - `SortOrder PagedResponseMetadataSortOrder` - `const PagedResponseMetadataSortOrderAsc PagedResponseMetadataSortOrder = "asc"` - `const PagedResponseMetadataSortOrderDesc PagedResponseMetadataSortOrder = "desc"` - `TotalItems int64` Total number of items returned in this response. - `TotalPages int64` The number of pages available. - `ResponseType LinkedBankAccountPagedV1ResponseType` Indicates the structure of the returned content. - "object" means the `data` field contains a single JSON object. - "array" means the `data` field contains an array of objects. - "error" means the `data` field contains an error object with details of the issue. - "none" means no data is returned. - `const LinkedBankAccountPagedV1ResponseTypeObject LinkedBankAccountPagedV1ResponseType = "object"` - `const LinkedBankAccountPagedV1ResponseTypeArray LinkedBankAccountPagedV1ResponseType = "array"` - `const LinkedBankAccountPagedV1ResponseTypeError LinkedBankAccountPagedV1ResponseType = "error"` - `const LinkedBankAccountPagedV1ResponseTypeNone LinkedBankAccountPagedV1ResponseType = "none"` ### Linked Bank Account Unmask V1 - `type LinkedBankAccountUnmaskV1 struct{…}` - `Data LinkedBankAccountUnmaskV1Data` - `ID string` Unique identifier for the linked bank account. - `AccountID string` Unique identifier for the Straddle account related to this bank account. - `BankAccount LinkedBankAccountUnmaskV1DataBankAccount` The bank account details associated with the linked bank account. - `AccountHolder string` - `AccountNumber string` - `InstitutionName string` - `RoutingNumber string` - `CreatedAt Time` Timestamp of when the linked bank account was created. - `Status string` The current status of the linked bank account. - `const LinkedBankAccountUnmaskV1DataStatusCreated LinkedBankAccountUnmaskV1DataStatus = "created"` - `const LinkedBankAccountUnmaskV1DataStatusOnboarding LinkedBankAccountUnmaskV1DataStatus = "onboarding"` - `const LinkedBankAccountUnmaskV1DataStatusActive LinkedBankAccountUnmaskV1DataStatus = "active"` - `const LinkedBankAccountUnmaskV1DataStatusRejected LinkedBankAccountUnmaskV1DataStatus = "rejected"` - `const LinkedBankAccountUnmaskV1DataStatusInactive LinkedBankAccountUnmaskV1DataStatus = "inactive"` - `const LinkedBankAccountUnmaskV1DataStatusCanceled LinkedBankAccountUnmaskV1DataStatus = "canceled"` - `StatusDetail LinkedBankAccountUnmaskV1DataStatusDetail` Additional details about the current status of the linked bank account. - `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 LinkedBankAccountUnmaskV1DataStatusDetailReasonUnverified LinkedBankAccountUnmaskV1DataStatusDetailReason = "unverified"` - `const LinkedBankAccountUnmaskV1DataStatusDetailReasonInReview LinkedBankAccountUnmaskV1DataStatusDetailReason = "in_review"` - `const LinkedBankAccountUnmaskV1DataStatusDetailReasonPending LinkedBankAccountUnmaskV1DataStatusDetailReason = "pending"` - `const LinkedBankAccountUnmaskV1DataStatusDetailReasonStuck LinkedBankAccountUnmaskV1DataStatusDetailReason = "stuck"` - `const LinkedBankAccountUnmaskV1DataStatusDetailReasonVerified LinkedBankAccountUnmaskV1DataStatusDetailReason = "verified"` - `const LinkedBankAccountUnmaskV1DataStatusDetailReasonFailedVerification LinkedBankAccountUnmaskV1DataStatusDetailReason = "failed_verification"` - `const LinkedBankAccountUnmaskV1DataStatusDetailReasonDisabled LinkedBankAccountUnmaskV1DataStatusDetailReason = "disabled"` - `const LinkedBankAccountUnmaskV1DataStatusDetailReasonNew LinkedBankAccountUnmaskV1DataStatusDetailReason = "new"` - `Source string` Identifies the origin of the status change (e.g., `watchtower`). This helps in tracking the cause of status updates. - `const LinkedBankAccountUnmaskV1DataStatusDetailSourceWatchtower LinkedBankAccountUnmaskV1DataStatusDetailSource = "watchtower"` - `UpdatedAt Time` Timestamp of when the linked bank account was last updated. - `Metadata map[string, string]` - `Meta ResponseMetadata` Metadata about the API request, including an identifier and timestamp. - `APIRequestID string` Unique identifier for this API request, useful for troubleshooting. - `APIRequestTimestamp Time` Timestamp for this API request, useful for troubleshooting. - `ResponseType LinkedBankAccountUnmaskV1ResponseType` Indicates the structure of the returned content. - "object" means the `data` field contains a single JSON object. - "array" means the `data` field contains an array of objects. - "error" means the `data` field contains an error object with details of the issue. - "none" means no data is returned. - `const LinkedBankAccountUnmaskV1ResponseTypeObject LinkedBankAccountUnmaskV1ResponseType = "object"` - `const LinkedBankAccountUnmaskV1ResponseTypeArray LinkedBankAccountUnmaskV1ResponseType = "array"` - `const LinkedBankAccountUnmaskV1ResponseTypeError LinkedBankAccountUnmaskV1ResponseType = "error"` - `const LinkedBankAccountUnmaskV1ResponseTypeNone LinkedBankAccountUnmaskV1ResponseType = "none"` ### Linked Bank Account V1 - `type LinkedBankAccountV1 struct{…}` - `Data LinkedBankAccountV1Data` - `ID string` Unique identifier for the linked bank account. - `AccountID string` The unique identifier of the Straddle account related to this bank account. - `BankAccount LinkedBankAccountV1DataBankAccount` - `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 LinkedBankAccountV1DataPurposeCharges LinkedBankAccountV1DataPurpose = "charges"` - `const LinkedBankAccountV1DataPurposePayouts LinkedBankAccountV1DataPurpose = "payouts"` - `const LinkedBankAccountV1DataPurposeBilling LinkedBankAccountV1DataPurpose = "billing"` - `Status string` The current status of the linked bank account. - `const LinkedBankAccountV1DataStatusCreated LinkedBankAccountV1DataStatus = "created"` - `const LinkedBankAccountV1DataStatusOnboarding LinkedBankAccountV1DataStatus = "onboarding"` - `const LinkedBankAccountV1DataStatusActive LinkedBankAccountV1DataStatus = "active"` - `const LinkedBankAccountV1DataStatusRejected LinkedBankAccountV1DataStatus = "rejected"` - `const LinkedBankAccountV1DataStatusInactive LinkedBankAccountV1DataStatus = "inactive"` - `const LinkedBankAccountV1DataStatusCanceled LinkedBankAccountV1DataStatus = "canceled"` - `StatusDetail LinkedBankAccountV1DataStatusDetail` - `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 LinkedBankAccountV1DataStatusDetailReasonUnverified LinkedBankAccountV1DataStatusDetailReason = "unverified"` - `const LinkedBankAccountV1DataStatusDetailReasonInReview LinkedBankAccountV1DataStatusDetailReason = "in_review"` - `const LinkedBankAccountV1DataStatusDetailReasonPending LinkedBankAccountV1DataStatusDetailReason = "pending"` - `const LinkedBankAccountV1DataStatusDetailReasonStuck LinkedBankAccountV1DataStatusDetailReason = "stuck"` - `const LinkedBankAccountV1DataStatusDetailReasonVerified LinkedBankAccountV1DataStatusDetailReason = "verified"` - `const LinkedBankAccountV1DataStatusDetailReasonFailedVerification LinkedBankAccountV1DataStatusDetailReason = "failed_verification"` - `const LinkedBankAccountV1DataStatusDetailReasonDisabled LinkedBankAccountV1DataStatusDetailReason = "disabled"` - `const LinkedBankAccountV1DataStatusDetailReasonNew LinkedBankAccountV1DataStatusDetailReason = "new"` - `Source string` Identifies the origin of the status change (e.g., `watchtower`). This helps in tracking the cause of status updates. - `const LinkedBankAccountV1DataStatusDetailSourceWatchtower LinkedBankAccountV1DataStatusDetailSource = "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. - `Meta ResponseMetadata` Metadata about the API request, including an identifier and timestamp. - `APIRequestID string` Unique identifier for this API request, useful for troubleshooting. - `APIRequestTimestamp Time` Timestamp for this API request, useful for troubleshooting. - `ResponseType LinkedBankAccountV1ResponseType` Indicates the structure of the returned content. - "object" means the `data` field contains a single JSON object. - "array" means the `data` field contains an array of objects. - "error" means the `data` field contains an error object with details of the issue. - "none" means no data is returned. - `const LinkedBankAccountV1ResponseTypeObject LinkedBankAccountV1ResponseType = "object"` - `const LinkedBankAccountV1ResponseTypeArray LinkedBankAccountV1ResponseType = "array"` - `const LinkedBankAccountV1ResponseTypeError LinkedBankAccountV1ResponseType = "error"` - `const LinkedBankAccountV1ResponseTypeNone LinkedBankAccountV1ResponseType = "none"`