Skip to content
Get started

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.

ParametersExpand Collapse
linkedBankAccountID string
query EmbedLinkedBankAccountGetParams
CorrelationID param.Field[string]optional

Optional client generated identifier to trace and debug a series of requests.

RequestID param.Field[string]optional

Optional client generated identifier to trace and debug a request.

ReturnsExpand Collapse
type LinkedBankAccountV1 struct{…}
Data LinkedBankAccountV1Data
ID string

Unique identifier for the linked bank account.

formatuuid
AccountID string

The unique identifier of the Straddle account related to this bank account.

formatuuid
BankAccount LinkedBankAccountV1DataBankAccount
AccountHolder string
AccountMask string
InstitutionName string
RoutingNumber string
CreatedAt Time

Timestamp of when the bank account object was created.

formatdate-time
Purposes []string

The purposes for the linked bank account.

One of the following:
const LinkedBankAccountV1DataPurposeCharges LinkedBankAccountV1DataPurpose = "charges"
const LinkedBankAccountV1DataPurposePayouts LinkedBankAccountV1DataPurpose = "payouts"
const LinkedBankAccountV1DataPurposeBilling LinkedBankAccountV1DataPurpose = "billing"
Status string

The current status of the linked bank account.

One of the following:
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.

One of the following:
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.

UpdatedAt Time

Timestamp of the most recent update to the linked bank account.

formatdate-time
Description stringoptional

Optional description for the bank account.

Metadata map[string, string]optional

Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the linked bank account in a structured format.

PlatformID stringoptional

The unique identifier of the Straddle Platform relatd to this bank account.

formatuuid

Metadata about the API request, including an identifier and timestamp.

APIRequestID string

Unique identifier for this API request, useful for troubleshooting.

formatuuid
APIRequestTimestamp Time

Timestamp for this API request, useful for troubleshooting.

formatdate-time
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.
One of the following:
const LinkedBankAccountV1ResponseTypeObject LinkedBankAccountV1ResponseType = "object"
const LinkedBankAccountV1ResponseTypeArray LinkedBankAccountV1ResponseType = "array"
const LinkedBankAccountV1ResponseTypeError LinkedBankAccountV1ResponseType = "error"
const LinkedBankAccountV1ResponseTypeNone LinkedBankAccountV1ResponseType = "none"

Lookup a linked bank account

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)
}
{
  "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"
}
Returns Examples
{
  "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"
}