## Lookup an account `client.Embed.Accounts.Get(ctx, accountID, query) (*AccountV1, error)` **get** `/v1/accounts/{account_id}` Retrieves the details of an account that has previously been created. Supply the unique account ID that was returned from your previous request, and Straddle will return the corresponding account information. ### Parameters - `accountID string` The unique identifier of the account to retrieve. - `query EmbedAccountGetParams` - `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 AccountV1 struct{…}` - `Data AccountV1Data` - `ID string` Unique identifier for the account. - `AccessLevel string` The access level granted to the account. This is determined by your platform configuration. Use `standard` unless instructed otherwise by Straddle. - `const AccountV1DataAccessLevelStandard AccountV1DataAccessLevel = "standard"` - `const AccountV1DataAccessLevelManaged AccountV1DataAccessLevel = "managed"` - `OrganizationID string` The unique identifier of the organization this account belongs to. - `Status string` The current status of the account (e.g., 'active', 'inactive', 'pending'). - `const AccountV1DataStatusCreated AccountV1DataStatus = "created"` - `const AccountV1DataStatusOnboarding AccountV1DataStatus = "onboarding"` - `const AccountV1DataStatusActive AccountV1DataStatus = "active"` - `const AccountV1DataStatusRejected AccountV1DataStatus = "rejected"` - `const AccountV1DataStatusInactive AccountV1DataStatus = "inactive"` - `StatusDetail AccountV1DataStatusDetail` - `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 AccountV1DataStatusDetailReasonUnverified AccountV1DataStatusDetailReason = "unverified"` - `const AccountV1DataStatusDetailReasonInReview AccountV1DataStatusDetailReason = "in_review"` - `const AccountV1DataStatusDetailReasonPending AccountV1DataStatusDetailReason = "pending"` - `const AccountV1DataStatusDetailReasonStuck AccountV1DataStatusDetailReason = "stuck"` - `const AccountV1DataStatusDetailReasonVerified AccountV1DataStatusDetailReason = "verified"` - `const AccountV1DataStatusDetailReasonFailedVerification AccountV1DataStatusDetailReason = "failed_verification"` - `const AccountV1DataStatusDetailReasonDisabled AccountV1DataStatusDetailReason = "disabled"` - `const AccountV1DataStatusDetailReasonTerminated AccountV1DataStatusDetailReason = "terminated"` - `const AccountV1DataStatusDetailReasonNew AccountV1DataStatusDetailReason = "new"` - `Source string` Identifies the origin of the status change (e.g., `bank_decline`, `watchtower`). This helps in tracking the cause of status updates. - `const AccountV1DataStatusDetailSourceWatchtower AccountV1DataStatusDetailSource = "watchtower"` - `Type string` The type of account (e.g., 'individual', 'business'). - `const AccountV1DataTypeBusiness AccountV1DataType = "business"` - `BusinessProfile BusinessProfileV1` - `Name string` The operating or trade name of the business. - `Website string` URL of the business's primary marketing website. - `Address AddressV1` The address object is optional. If provided, it must be a valid address. - `City string` City, district, suburb, town, or village. - `Line1 string` Primary address line (e.g., street, PO Box). - `PostalCode string` Postal or ZIP code. - `State string` Two-letter state code. - `Country string` The country of the address, in ISO 3166-1 alpha-2 format. - `Line2 string` Secondary address line (e.g., apartment, suite, unit, or building). - `Description string` A brief description of the business and its products or services. - `Industry IndustryV1` - `Category string` The general category of the industry. Required if not providing MCC. - `Mcc string` The Merchant Category Code (MCC) that best describes the business. Optional. - `Sector string` The specific sector within the industry category. Required if not providing MCC. - `LegalName string` The official registered name of the business. - `Phone string` The primary contact phone number for the business. - `SupportChannels SupportChannelsV1` - `Email string` The email address for customer support inquiries. - `Phone string` The phone number for customer support. - `URL string` The URL of the business's customer support page or contact form. - `TaxID string` The business's tax identification number (e.g., EIN in the US). - `UseCase string` A description of how the business intends to use Straddle's services. - `Capabilities AccountV1DataCapabilities` - `ConsentTypes AccountV1DataCapabilitiesConsentTypes` - `Internet CapabilityV1` Whether the internet payment authorization capability is enabled for the account. - `CapabilityStatus CapabilityV1CapabilityStatus` - `const CapabilityV1CapabilityStatusActive CapabilityV1CapabilityStatus = "active"` - `const CapabilityV1CapabilityStatusInactive CapabilityV1CapabilityStatus = "inactive"` - `SignedAgreement CapabilityV1` Whether the signed agreement payment authorization capability is enabled for the account. - `CustomerTypes AccountV1DataCapabilitiesCustomerTypes` - `Businesses CapabilityV1` - `Individuals CapabilityV1` - `PaymentTypes AccountV1DataCapabilitiesPaymentTypes` - `Charges CapabilityV1` - `Payouts CapabilityV1` - `CreatedAt Time` Timestamp of when the account was created. - `ExternalID string` Unique identifier for the account in your database, used for cross-referencing between Straddle and your systems. - `Metadata map[string, string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the account in a structured format. - `Settings AccountV1DataSettings` - `Charges AccountV1DataSettingsCharges` - `DailyAmount int64` The maximum dollar amount of charges in a calendar day. - `FundingTime string` The amount of time it takes for a charge to be funded. This value is defined by Straddle. - `const AccountV1DataSettingsChargesFundingTimeImmediate AccountV1DataSettingsChargesFundingTime = "immediate"` - `const AccountV1DataSettingsChargesFundingTimeNextDay AccountV1DataSettingsChargesFundingTime = "next_day"` - `const AccountV1DataSettingsChargesFundingTimeOneDay AccountV1DataSettingsChargesFundingTime = "one_day"` - `const AccountV1DataSettingsChargesFundingTimeTwoDay AccountV1DataSettingsChargesFundingTime = "two_day"` - `const AccountV1DataSettingsChargesFundingTimeThreeDay AccountV1DataSettingsChargesFundingTime = "three_day"` - `const AccountV1DataSettingsChargesFundingTimeFourDay AccountV1DataSettingsChargesFundingTime = "four_day"` - `const AccountV1DataSettingsChargesFundingTimeFiveDay AccountV1DataSettingsChargesFundingTime = "five_day"` - `LinkedBankAccountID string` The unique identifier of the linked bank account associated with charges. This value is defined by Straddle. - `MaxAmount int64` The maximum amount of a single charge. - `MonthlyAmount int64` The maximum dollar amount of charges in a calendar month. - `MonthlyCount int64` The maximum number of charges in a calendar month. - `Payouts AccountV1DataSettingsPayouts` - `DailyAmount int64` The maximum dollar amount of payouts in a day. - `FundingTime string` The amount of time it takes for a payout to be funded. This value is defined by Straddle. - `const AccountV1DataSettingsPayoutsFundingTimeImmediate AccountV1DataSettingsPayoutsFundingTime = "immediate"` - `const AccountV1DataSettingsPayoutsFundingTimeNextDay AccountV1DataSettingsPayoutsFundingTime = "next_day"` - `const AccountV1DataSettingsPayoutsFundingTimeOneDay AccountV1DataSettingsPayoutsFundingTime = "one_day"` - `const AccountV1DataSettingsPayoutsFundingTimeTwoDay AccountV1DataSettingsPayoutsFundingTime = "two_day"` - `const AccountV1DataSettingsPayoutsFundingTimeThreeDay AccountV1DataSettingsPayoutsFundingTime = "three_day"` - `const AccountV1DataSettingsPayoutsFundingTimeFourDay AccountV1DataSettingsPayoutsFundingTime = "four_day"` - `const AccountV1DataSettingsPayoutsFundingTimeFiveDay AccountV1DataSettingsPayoutsFundingTime = "five_day"` - `LinkedBankAccountID string` The unique identifier of the linked bank account to use for payouts. - `MaxAmount int64` The maximum amount of a single payout. - `MonthlyAmount int64` The maximum dollar amount of payouts in a month. - `MonthlyCount int64` The maximum number of payouts in a month. - `TermsOfService TermsOfServiceV1` - `AcceptedDate Time` The datetime of when the terms of service were accepted, in ISO 8601 format. - `AgreementType TermsOfServiceV1AgreementType` The type or version of the agreement accepted. Use `embedded` unless your platform was specifically enabled for `direct` agreements. - `const TermsOfServiceV1AgreementTypeEmbedded TermsOfServiceV1AgreementType = "embedded"` - `const TermsOfServiceV1AgreementTypeDirect TermsOfServiceV1AgreementType = "direct"` - `AgreementURL string` The URL where the full text of the accepted agreement can be found. - `AcceptedIP string` The IP address from which the terms of service were accepted. - `AcceptedUserAgent string` The user agent string of the browser or application used to accept the terms. - `UpdatedAt Time` Timestamp of the most recent update to the 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 AccountV1ResponseType` 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 AccountV1ResponseTypeObject AccountV1ResponseType = "object"` - `const AccountV1ResponseTypeArray AccountV1ResponseType = "array"` - `const AccountV1ResponseTypeError AccountV1ResponseType = "error"` - `const AccountV1ResponseTypeNone AccountV1ResponseType = "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"), ) accountV1, err := client.Embed.Accounts.Get( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", straddle.EmbedAccountGetParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", accountV1.Data) } ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "access_level": "standard", "organization_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "status": "created", "status_detail": { "code": "code", "message": "message", "reason": "unverified", "source": "watchtower" }, "type": "business", "business_profile": { "name": "name", "website": "https://example.com", "address": { "city": "city", "line1": "line1", "postal_code": "21029-1360", "state": "SE", "country": "country", "line2": "line2" }, "description": "description", "industry": { "category": "category", "mcc": "mcc", "sector": "sector" }, "legal_name": "legal_name", "phone": "+46991022", "support_channels": { "email": "dev@stainless.com", "phone": "+46991022", "url": "https://example.com" }, "tax_id": "210297980", "use_case": "use_case" }, "capabilities": { "consent_types": { "internet": { "capability_status": "active" }, "signed_agreement": { "capability_status": "active" } }, "customer_types": { "businesses": { "capability_status": "active" }, "individuals": { "capability_status": "active" } }, "payment_types": { "charges": { "capability_status": "active" }, "payouts": { "capability_status": "active" } } }, "created_at": "2019-12-27T18:11:19.117Z", "external_id": "external_id", "metadata": { "foo": "string" }, "settings": { "charges": { "daily_amount": 0, "funding_time": "immediate", "linked_bank_account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "max_amount": 0, "monthly_amount": 0, "monthly_count": 0 }, "payouts": { "daily_amount": 0, "funding_time": "immediate", "linked_bank_account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "max_amount": 0, "monthly_amount": 0, "monthly_count": 0 } }, "terms_of_service": { "accepted_date": "2019-12-27T18:11:19.117Z", "agreement_type": "embedded", "agreement_url": "agreement_url", "accepted_ip": "accepted_ip", "accepted_user_agent": "accepted_user_agent" }, "updated_at": "2019-12-27T18:11:19.117Z" }, "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z" }, "response_type": "object" } ```