# Embed # Accounts ## 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" } ``` ## Update an account `client.Embed.Accounts.Update(ctx, accountID, params) (*AccountV1, error)` **put** `/v1/accounts/{account_id}` Updates an existing account's information. This endpoint allows you to update various account details during onboarding or after the account has been created. ### Parameters - `accountID string` - `params EmbedAccountUpdateParams` - `BusinessProfile param.Field[BusinessProfileV1]` Body param - `ExternalID param.Field[string]` Body param: Unique identifier for the account in your database, used for cross-referencing between Straddle and your systems. - `Metadata param.Field[map[string, string]]` Body param: Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the 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 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.Update( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", straddle.EmbedAccountUpdateParams{ BusinessProfile: straddle.BusinessProfileV1Param{ Name: "name", Website: "https://example.com", }, }, ) 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" } ``` ## Create an account `client.Embed.Accounts.New(ctx, params) (*AccountV1, error)` **post** `/v1/accounts` Creates a new account associated with your Straddle platform integration. This endpoint allows you to set up an account with specified details, including business information and access levels. ### Parameters - `params EmbedAccountNewParams` - `AccessLevel param.Field[EmbedAccountNewParamsAccessLevel]` Body param: The access level granted to the account. This is determined by your platform configuration. Use `standard` unless instructed otherwise by Straddle. - `const EmbedAccountNewParamsAccessLevelStandard EmbedAccountNewParamsAccessLevel = "standard"` - `const EmbedAccountNewParamsAccessLevelManaged EmbedAccountNewParamsAccessLevel = "managed"` - `AccountType param.Field[EmbedAccountNewParamsAccountType]` Body param: The type of account to be created. Currently, only `business` is supported. - `const EmbedAccountNewParamsAccountTypeBusiness EmbedAccountNewParamsAccountType = "business"` - `BusinessProfile param.Field[BusinessProfileV1]` Body param - `OrganizationID param.Field[string]` Body param: The unique identifier of the organization related to this account. - `ExternalID param.Field[string]` Body param: Unique identifier for the account in your database, used for cross-referencing between Straddle and your systems. - `Metadata param.Field[map[string, string]]` Body param: Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the 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 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.New(context.TODO(), straddle.EmbedAccountNewParams{ AccessLevel: straddle.EmbedAccountNewParamsAccessLevelStandard, AccountType: straddle.EmbedAccountNewParamsAccountTypeBusiness, BusinessProfile: straddle.BusinessProfileV1Param{ Name: "name", Website: "https://example.com", }, OrganizationID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }) 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" } ``` ## List accounts `client.Embed.Accounts.List(ctx, params) (*PageNumberSchema[AccountPagedV1Data], error)` **get** `/v1/accounts` Returns a list of accounts associated with your Straddle platform integration. The accounts are returned sorted by creation date, with the most recently created accounts appearing first. This endpoint supports advanced sorting and filtering options. ### Parameters - `params EmbedAccountListParams` - `PageNumber param.Field[int64]` Query param: Results page number. Starts at page 1. Default value: 1 - `PageSize param.Field[int64]` Query param: Page size. Default value: 100. Max value: 1000 - `SearchText param.Field[string]` Query param - `SortBy param.Field[string]` Query param: Sort By. Default value: 'id'. - `SortOrder param.Field[EmbedAccountListParamsSortOrder]` Query param: Sort Order. Default value: 'asc'. - `const EmbedAccountListParamsSortOrderAsc EmbedAccountListParamsSortOrder = "asc"` - `const EmbedAccountListParamsSortOrderDesc EmbedAccountListParamsSortOrder = "desc"` - `Status param.Field[EmbedAccountListParamsStatus]` Query param - `const EmbedAccountListParamsStatusCreated EmbedAccountListParamsStatus = "created"` - `const EmbedAccountListParamsStatusOnboarding EmbedAccountListParamsStatus = "onboarding"` - `const EmbedAccountListParamsStatusActive EmbedAccountListParamsStatus = "active"` - `const EmbedAccountListParamsStatusRejected EmbedAccountListParamsStatus = "rejected"` - `const EmbedAccountListParamsStatusInactive EmbedAccountListParamsStatus = "inactive"` - `Type param.Field[EmbedAccountListParamsType]` Query param - `const EmbedAccountListParamsTypeBusiness EmbedAccountListParamsType = "business"` - `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 AccountPagedV1Data struct{…}` - `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 AccountPagedV1DataAccessLevelStandard AccountPagedV1DataAccessLevel = "standard"` - `const AccountPagedV1DataAccessLevelManaged AccountPagedV1DataAccessLevel = "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 AccountPagedV1DataStatusCreated AccountPagedV1DataStatus = "created"` - `const AccountPagedV1DataStatusOnboarding AccountPagedV1DataStatus = "onboarding"` - `const AccountPagedV1DataStatusActive AccountPagedV1DataStatus = "active"` - `const AccountPagedV1DataStatusRejected AccountPagedV1DataStatus = "rejected"` - `const AccountPagedV1DataStatusInactive AccountPagedV1DataStatus = "inactive"` - `StatusDetail AccountPagedV1DataStatusDetail` - `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 AccountPagedV1DataStatusDetailReasonUnverified AccountPagedV1DataStatusDetailReason = "unverified"` - `const AccountPagedV1DataStatusDetailReasonInReview AccountPagedV1DataStatusDetailReason = "in_review"` - `const AccountPagedV1DataStatusDetailReasonPending AccountPagedV1DataStatusDetailReason = "pending"` - `const AccountPagedV1DataStatusDetailReasonStuck AccountPagedV1DataStatusDetailReason = "stuck"` - `const AccountPagedV1DataStatusDetailReasonVerified AccountPagedV1DataStatusDetailReason = "verified"` - `const AccountPagedV1DataStatusDetailReasonFailedVerification AccountPagedV1DataStatusDetailReason = "failed_verification"` - `const AccountPagedV1DataStatusDetailReasonDisabled AccountPagedV1DataStatusDetailReason = "disabled"` - `const AccountPagedV1DataStatusDetailReasonTerminated AccountPagedV1DataStatusDetailReason = "terminated"` - `const AccountPagedV1DataStatusDetailReasonNew AccountPagedV1DataStatusDetailReason = "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 AccountPagedV1DataStatusDetailSourceWatchtower AccountPagedV1DataStatusDetailSource = "watchtower"` - `Type string` The type of account (e.g., 'individual', 'business'). - `const AccountPagedV1DataTypeBusiness AccountPagedV1DataType = "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 AccountPagedV1DataCapabilities` - `ConsentTypes AccountPagedV1DataCapabilitiesConsentTypes` - `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 AccountPagedV1DataCapabilitiesCustomerTypes` - `Businesses CapabilityV1` - `Individuals CapabilityV1` - `PaymentTypes AccountPagedV1DataCapabilitiesPaymentTypes` - `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 AccountPagedV1DataSettings` - `Charges AccountPagedV1DataSettingsCharges` - `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 AccountPagedV1DataSettingsChargesFundingTimeImmediate AccountPagedV1DataSettingsChargesFundingTime = "immediate"` - `const AccountPagedV1DataSettingsChargesFundingTimeNextDay AccountPagedV1DataSettingsChargesFundingTime = "next_day"` - `const AccountPagedV1DataSettingsChargesFundingTimeOneDay AccountPagedV1DataSettingsChargesFundingTime = "one_day"` - `const AccountPagedV1DataSettingsChargesFundingTimeTwoDay AccountPagedV1DataSettingsChargesFundingTime = "two_day"` - `const AccountPagedV1DataSettingsChargesFundingTimeThreeDay AccountPagedV1DataSettingsChargesFundingTime = "three_day"` - `const AccountPagedV1DataSettingsChargesFundingTimeFourDay AccountPagedV1DataSettingsChargesFundingTime = "four_day"` - `const AccountPagedV1DataSettingsChargesFundingTimeFiveDay AccountPagedV1DataSettingsChargesFundingTime = "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 AccountPagedV1DataSettingsPayouts` - `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 AccountPagedV1DataSettingsPayoutsFundingTimeImmediate AccountPagedV1DataSettingsPayoutsFundingTime = "immediate"` - `const AccountPagedV1DataSettingsPayoutsFundingTimeNextDay AccountPagedV1DataSettingsPayoutsFundingTime = "next_day"` - `const AccountPagedV1DataSettingsPayoutsFundingTimeOneDay AccountPagedV1DataSettingsPayoutsFundingTime = "one_day"` - `const AccountPagedV1DataSettingsPayoutsFundingTimeTwoDay AccountPagedV1DataSettingsPayoutsFundingTime = "two_day"` - `const AccountPagedV1DataSettingsPayoutsFundingTimeThreeDay AccountPagedV1DataSettingsPayoutsFundingTime = "three_day"` - `const AccountPagedV1DataSettingsPayoutsFundingTimeFourDay AccountPagedV1DataSettingsPayoutsFundingTime = "four_day"` - `const AccountPagedV1DataSettingsPayoutsFundingTimeFiveDay AccountPagedV1DataSettingsPayoutsFundingTime = "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. ### 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.Accounts.List(context.TODO(), straddle.EmbedAccountListParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", page) } ``` #### 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", "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" } ``` ## Onboard an account `client.Embed.Accounts.Onboard(ctx, accountID, params) (*AccountV1, error)` **post** `/v1/accounts/{account_id}/onboard` Initiates the onboarding process for a new account. This endpoint can only be used for accounts where at least one representative and one bank account have already been created. ### Parameters - `accountID string` - `params EmbedAccountOnboardParams` - `TermsOfService param.Field[TermsOfServiceV1]` Body param - `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 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" "time" "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.Onboard( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", straddle.EmbedAccountOnboardParams{ TermsOfService: straddle.TermsOfServiceV1Param{ AcceptedDate: time.Now(), AgreementType: straddle.TermsOfServiceV1AgreementTypeEmbedded, AgreementURL: straddle.String("agreement_url"), }, }, ) 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" } ``` ## Simulate status transitions for a sandbox account `client.Embed.Accounts.Simulate(ctx, accountID, params) (*AccountV1, error)` **post** `/v1/accounts/{account_id}/simulate` Simulate the status transitions for sandbox accounts. This endpoint can only be used for sandbox accounts. ### Parameters - `accountID string` - `params EmbedAccountSimulateParams` - `FinalStatus param.Field[EmbedAccountSimulateParamsFinalStatus]` Query param - `const EmbedAccountSimulateParamsFinalStatusOnboarding EmbedAccountSimulateParamsFinalStatus = "onboarding"` - `const EmbedAccountSimulateParamsFinalStatusActive EmbedAccountSimulateParamsFinalStatus = "active"` - `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 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.Simulate( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", straddle.EmbedAccountSimulateParams{ }, ) 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" } ``` ## Domain Types ### Account Paged V1 - `type AccountPagedV1 struct{…}` - `Data []AccountPagedV1Data` - `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 AccountPagedV1DataAccessLevelStandard AccountPagedV1DataAccessLevel = "standard"` - `const AccountPagedV1DataAccessLevelManaged AccountPagedV1DataAccessLevel = "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 AccountPagedV1DataStatusCreated AccountPagedV1DataStatus = "created"` - `const AccountPagedV1DataStatusOnboarding AccountPagedV1DataStatus = "onboarding"` - `const AccountPagedV1DataStatusActive AccountPagedV1DataStatus = "active"` - `const AccountPagedV1DataStatusRejected AccountPagedV1DataStatus = "rejected"` - `const AccountPagedV1DataStatusInactive AccountPagedV1DataStatus = "inactive"` - `StatusDetail AccountPagedV1DataStatusDetail` - `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 AccountPagedV1DataStatusDetailReasonUnverified AccountPagedV1DataStatusDetailReason = "unverified"` - `const AccountPagedV1DataStatusDetailReasonInReview AccountPagedV1DataStatusDetailReason = "in_review"` - `const AccountPagedV1DataStatusDetailReasonPending AccountPagedV1DataStatusDetailReason = "pending"` - `const AccountPagedV1DataStatusDetailReasonStuck AccountPagedV1DataStatusDetailReason = "stuck"` - `const AccountPagedV1DataStatusDetailReasonVerified AccountPagedV1DataStatusDetailReason = "verified"` - `const AccountPagedV1DataStatusDetailReasonFailedVerification AccountPagedV1DataStatusDetailReason = "failed_verification"` - `const AccountPagedV1DataStatusDetailReasonDisabled AccountPagedV1DataStatusDetailReason = "disabled"` - `const AccountPagedV1DataStatusDetailReasonTerminated AccountPagedV1DataStatusDetailReason = "terminated"` - `const AccountPagedV1DataStatusDetailReasonNew AccountPagedV1DataStatusDetailReason = "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 AccountPagedV1DataStatusDetailSourceWatchtower AccountPagedV1DataStatusDetailSource = "watchtower"` - `Type string` The type of account (e.g., 'individual', 'business'). - `const AccountPagedV1DataTypeBusiness AccountPagedV1DataType = "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 AccountPagedV1DataCapabilities` - `ConsentTypes AccountPagedV1DataCapabilitiesConsentTypes` - `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 AccountPagedV1DataCapabilitiesCustomerTypes` - `Businesses CapabilityV1` - `Individuals CapabilityV1` - `PaymentTypes AccountPagedV1DataCapabilitiesPaymentTypes` - `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 AccountPagedV1DataSettings` - `Charges AccountPagedV1DataSettingsCharges` - `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 AccountPagedV1DataSettingsChargesFundingTimeImmediate AccountPagedV1DataSettingsChargesFundingTime = "immediate"` - `const AccountPagedV1DataSettingsChargesFundingTimeNextDay AccountPagedV1DataSettingsChargesFundingTime = "next_day"` - `const AccountPagedV1DataSettingsChargesFundingTimeOneDay AccountPagedV1DataSettingsChargesFundingTime = "one_day"` - `const AccountPagedV1DataSettingsChargesFundingTimeTwoDay AccountPagedV1DataSettingsChargesFundingTime = "two_day"` - `const AccountPagedV1DataSettingsChargesFundingTimeThreeDay AccountPagedV1DataSettingsChargesFundingTime = "three_day"` - `const AccountPagedV1DataSettingsChargesFundingTimeFourDay AccountPagedV1DataSettingsChargesFundingTime = "four_day"` - `const AccountPagedV1DataSettingsChargesFundingTimeFiveDay AccountPagedV1DataSettingsChargesFundingTime = "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 AccountPagedV1DataSettingsPayouts` - `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 AccountPagedV1DataSettingsPayoutsFundingTimeImmediate AccountPagedV1DataSettingsPayoutsFundingTime = "immediate"` - `const AccountPagedV1DataSettingsPayoutsFundingTimeNextDay AccountPagedV1DataSettingsPayoutsFundingTime = "next_day"` - `const AccountPagedV1DataSettingsPayoutsFundingTimeOneDay AccountPagedV1DataSettingsPayoutsFundingTime = "one_day"` - `const AccountPagedV1DataSettingsPayoutsFundingTimeTwoDay AccountPagedV1DataSettingsPayoutsFundingTime = "two_day"` - `const AccountPagedV1DataSettingsPayoutsFundingTimeThreeDay AccountPagedV1DataSettingsPayoutsFundingTime = "three_day"` - `const AccountPagedV1DataSettingsPayoutsFundingTimeFourDay AccountPagedV1DataSettingsPayoutsFundingTime = "four_day"` - `const AccountPagedV1DataSettingsPayoutsFundingTimeFiveDay AccountPagedV1DataSettingsPayoutsFundingTime = "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 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 AccountPagedV1ResponseType` 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 AccountPagedV1ResponseTypeObject AccountPagedV1ResponseType = "object"` - `const AccountPagedV1ResponseTypeArray AccountPagedV1ResponseType = "array"` - `const AccountPagedV1ResponseTypeError AccountPagedV1ResponseType = "error"` - `const AccountPagedV1ResponseTypeNone AccountPagedV1ResponseType = "none"` ### Account V1 - `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"` ### Address V1 - `type AddressV1 struct{…}` 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). ### Business Profile V1 - `type BusinessProfileV1 struct{…}` - `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. ### Capability V1 - `type CapabilityV1 struct{…}` - `CapabilityStatus CapabilityV1CapabilityStatus` - `const CapabilityV1CapabilityStatusActive CapabilityV1CapabilityStatus = "active"` - `const CapabilityV1CapabilityStatusInactive CapabilityV1CapabilityStatus = "inactive"` ### Industry V1 - `type IndustryV1 struct{…}` - `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. ### Support Channels V1 - `type SupportChannelsV1 struct{…}` - `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. ### Terms Of Service V1 - `type TermsOfServiceV1 struct{…}` - `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. # Capability Requests ## Request a capability `client.Embed.Accounts.CapabilityRequests.New(ctx, accountID, params) (*CapabilityRequestPagedV1, error)` **post** `/v1/accounts/{account_id}/capability_requests` Submits a request to enable a specific capability for an account. Use this endpoint to request additional features or services for an account. ### Parameters - `accountID string` - `params EmbedAccountCapabilityRequestNewParams` - `Businesses param.Field[EmbedAccountCapabilityRequestNewParamsBusinesses]` Body param: Allows the account to accept payments from businesses. - `Enable bool` - `Charges param.Field[EmbedAccountCapabilityRequestNewParamsCharges]` Body param: The charges capability settings for the account. - `DailyAmount float64` The maximum dollar amount of charges in a calendar day. - `Enable bool` Determines whether `charges` are enabled for the account. - `MaxAmount float64` The maximum amount of a single charge. - `MonthlyAmount float64` The maximum dollar amount of charges in a calendar month. - `MonthlyCount int64` The maximum number of charges in a calendar month. - `Individuals param.Field[EmbedAccountCapabilityRequestNewParamsIndividuals]` Body param: Allows the account to accept payments from individuals. - `Enable bool` - `Internet param.Field[EmbedAccountCapabilityRequestNewParamsInternet]` Body param: Allows the account to accept payments authorized via the internet or mobile applications. - `Enable bool` - `Payouts param.Field[EmbedAccountCapabilityRequestNewParamsPayouts]` Body param: The payouts capability settings for the account. - `DailyAmount float64` The maximum dollar amount of payouts in a day. - `Enable bool` Determines whether `payouts` are enabled for the account. - `MaxAmount float64` The maximum amount of a single payout. - `MonthlyAmount float64` The maximum dollar amount of payouts in a month. - `MonthlyCount int64` The maximum number of payouts in a month. - `SignedAgreement param.Field[EmbedAccountCapabilityRequestNewParamsSignedAgreement]` Body param: Allows the account to accept payments authorized by signed agreements or contracts. - `Enable bool` - `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 CapabilityRequestPagedV1 struct{…}` - `Data []CapabilityRequestPagedV1Data` - `ID string` Unique identifier for the capability request. - `AccountID string` The unique identifier of the account associated with this capability request. - `Category string` The category of the requested capability. Use `payment_type` for charges and payouts, `customer_type` to define `individuals` or `businesses`, and `consent_type` for `signed_agreement` or `internet` payment authorization. - `const CapabilityRequestPagedV1DataCategoryPaymentType CapabilityRequestPagedV1DataCategory = "payment_type"` - `const CapabilityRequestPagedV1DataCategoryCustomerType CapabilityRequestPagedV1DataCategory = "customer_type"` - `const CapabilityRequestPagedV1DataCategoryConsentType CapabilityRequestPagedV1DataCategory = "consent_type"` - `CreatedAt Time` Timestamp of when the capability request was created. - `Enable bool` Whether this capability request is to enable or disable the capability. - `Status string` The current status of the capability request. - `const CapabilityRequestPagedV1DataStatusActive CapabilityRequestPagedV1DataStatus = "active"` - `const CapabilityRequestPagedV1DataStatusInactive CapabilityRequestPagedV1DataStatus = "inactive"` - `const CapabilityRequestPagedV1DataStatusInReview CapabilityRequestPagedV1DataStatus = "in_review"` - `const CapabilityRequestPagedV1DataStatusRejected CapabilityRequestPagedV1DataStatus = "rejected"` - `const CapabilityRequestPagedV1DataStatusApproved CapabilityRequestPagedV1DataStatus = "approved"` - `const CapabilityRequestPagedV1DataStatusReviewing CapabilityRequestPagedV1DataStatus = "reviewing"` - `Type string` The specific type of capability being requested within the category. - `const CapabilityRequestPagedV1DataTypeCharges CapabilityRequestPagedV1DataType = "charges"` - `const CapabilityRequestPagedV1DataTypePayouts CapabilityRequestPagedV1DataType = "payouts"` - `const CapabilityRequestPagedV1DataTypeIndividuals CapabilityRequestPagedV1DataType = "individuals"` - `const CapabilityRequestPagedV1DataTypeBusinesses CapabilityRequestPagedV1DataType = "businesses"` - `const CapabilityRequestPagedV1DataTypeSignedAgreement CapabilityRequestPagedV1DataType = "signed_agreement"` - `const CapabilityRequestPagedV1DataTypeInternet CapabilityRequestPagedV1DataType = "internet"` - `UpdatedAt Time` Timestamp of the most recent update to the capability request. - `Settings map[string, any]` Any specific settings or configurations related to the requested capability. - `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 CapabilityRequestPagedV1ResponseType` 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 CapabilityRequestPagedV1ResponseTypeObject CapabilityRequestPagedV1ResponseType = "object"` - `const CapabilityRequestPagedV1ResponseTypeArray CapabilityRequestPagedV1ResponseType = "array"` - `const CapabilityRequestPagedV1ResponseTypeError CapabilityRequestPagedV1ResponseType = "error"` - `const CapabilityRequestPagedV1ResponseTypeNone CapabilityRequestPagedV1ResponseType = "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"), ) capabilityRequestPagedV1, err := client.Embed.Accounts.CapabilityRequests.New( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", straddle.EmbedAccountCapabilityRequestNewParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", capabilityRequestPagedV1.Data) } ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "category": "payment_type", "created_at": "2019-12-27T18:11:19.117Z", "enable": true, "status": "active", "type": "charges", "updated_at": "2019-12-27T18:11:19.117Z", "settings": { "foo": "bar" } } ], "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" } ``` ## List capability requests `client.Embed.Accounts.CapabilityRequests.List(ctx, accountID, params) (*PageNumberSchema[CapabilityRequestPagedV1Data], error)` **get** `/v1/accounts/{account_id}/capability_requests` Retrieves a list of capability requests associated with an account. The requests are returned sorted by creation date, with the most recent requests appearing first. This endpoint supports advanced sorting and filtering options. ### Parameters - `accountID string` - `params EmbedAccountCapabilityRequestListParams` - `Category param.Field[EmbedAccountCapabilityRequestListParamsCategory]` Query param: Filter capability requests by category. - `const EmbedAccountCapabilityRequestListParamsCategoryPaymentType EmbedAccountCapabilityRequestListParamsCategory = "payment_type"` - `const EmbedAccountCapabilityRequestListParamsCategoryCustomerType EmbedAccountCapabilityRequestListParamsCategory = "customer_type"` - `const EmbedAccountCapabilityRequestListParamsCategoryConsentType EmbedAccountCapabilityRequestListParamsCategory = "consent_type"` - `PageNumber param.Field[int64]` Query param: Results page number. Starts at page 1. - `PageSize param.Field[int64]` Query param: Page size.Max value: 1000 - `SortBy param.Field[string]` Query param: Sort By. - `SortOrder param.Field[EmbedAccountCapabilityRequestListParamsSortOrder]` Query param: Sort Order. - `const EmbedAccountCapabilityRequestListParamsSortOrderAsc EmbedAccountCapabilityRequestListParamsSortOrder = "asc"` - `const EmbedAccountCapabilityRequestListParamsSortOrderDesc EmbedAccountCapabilityRequestListParamsSortOrder = "desc"` - `Status param.Field[EmbedAccountCapabilityRequestListParamsStatus]` Query param: Filter capability requests by their current status. - `const EmbedAccountCapabilityRequestListParamsStatusActive EmbedAccountCapabilityRequestListParamsStatus = "active"` - `const EmbedAccountCapabilityRequestListParamsStatusInactive EmbedAccountCapabilityRequestListParamsStatus = "inactive"` - `const EmbedAccountCapabilityRequestListParamsStatusInReview EmbedAccountCapabilityRequestListParamsStatus = "in_review"` - `const EmbedAccountCapabilityRequestListParamsStatusRejected EmbedAccountCapabilityRequestListParamsStatus = "rejected"` - `Type param.Field[EmbedAccountCapabilityRequestListParamsType]` Query param: Filter capability requests by the specific type of capability. - `const EmbedAccountCapabilityRequestListParamsTypeCharges EmbedAccountCapabilityRequestListParamsType = "charges"` - `const EmbedAccountCapabilityRequestListParamsTypePayouts EmbedAccountCapabilityRequestListParamsType = "payouts"` - `const EmbedAccountCapabilityRequestListParamsTypeIndividuals EmbedAccountCapabilityRequestListParamsType = "individuals"` - `const EmbedAccountCapabilityRequestListParamsTypeBusinesses EmbedAccountCapabilityRequestListParamsType = "businesses"` - `const EmbedAccountCapabilityRequestListParamsTypeSignedAgreement EmbedAccountCapabilityRequestListParamsType = "signed_agreement"` - `const EmbedAccountCapabilityRequestListParamsTypeInternet EmbedAccountCapabilityRequestListParamsType = "internet"` - `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 CapabilityRequestPagedV1Data struct{…}` - `ID string` Unique identifier for the capability request. - `AccountID string` The unique identifier of the account associated with this capability request. - `Category string` The category of the requested capability. Use `payment_type` for charges and payouts, `customer_type` to define `individuals` or `businesses`, and `consent_type` for `signed_agreement` or `internet` payment authorization. - `const CapabilityRequestPagedV1DataCategoryPaymentType CapabilityRequestPagedV1DataCategory = "payment_type"` - `const CapabilityRequestPagedV1DataCategoryCustomerType CapabilityRequestPagedV1DataCategory = "customer_type"` - `const CapabilityRequestPagedV1DataCategoryConsentType CapabilityRequestPagedV1DataCategory = "consent_type"` - `CreatedAt Time` Timestamp of when the capability request was created. - `Enable bool` Whether this capability request is to enable or disable the capability. - `Status string` The current status of the capability request. - `const CapabilityRequestPagedV1DataStatusActive CapabilityRequestPagedV1DataStatus = "active"` - `const CapabilityRequestPagedV1DataStatusInactive CapabilityRequestPagedV1DataStatus = "inactive"` - `const CapabilityRequestPagedV1DataStatusInReview CapabilityRequestPagedV1DataStatus = "in_review"` - `const CapabilityRequestPagedV1DataStatusRejected CapabilityRequestPagedV1DataStatus = "rejected"` - `const CapabilityRequestPagedV1DataStatusApproved CapabilityRequestPagedV1DataStatus = "approved"` - `const CapabilityRequestPagedV1DataStatusReviewing CapabilityRequestPagedV1DataStatus = "reviewing"` - `Type string` The specific type of capability being requested within the category. - `const CapabilityRequestPagedV1DataTypeCharges CapabilityRequestPagedV1DataType = "charges"` - `const CapabilityRequestPagedV1DataTypePayouts CapabilityRequestPagedV1DataType = "payouts"` - `const CapabilityRequestPagedV1DataTypeIndividuals CapabilityRequestPagedV1DataType = "individuals"` - `const CapabilityRequestPagedV1DataTypeBusinesses CapabilityRequestPagedV1DataType = "businesses"` - `const CapabilityRequestPagedV1DataTypeSignedAgreement CapabilityRequestPagedV1DataType = "signed_agreement"` - `const CapabilityRequestPagedV1DataTypeInternet CapabilityRequestPagedV1DataType = "internet"` - `UpdatedAt Time` Timestamp of the most recent update to the capability request. - `Settings map[string, any]` Any specific settings or configurations related to the requested capability. ### 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.Accounts.CapabilityRequests.List( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", straddle.EmbedAccountCapabilityRequestListParams{ }, ) 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", "category": "payment_type", "created_at": "2019-12-27T18:11:19.117Z", "enable": true, "status": "active", "type": "charges", "updated_at": "2019-12-27T18:11:19.117Z", "settings": { "foo": "bar" } } ], "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" } ``` ## Domain Types ### Capability Request Paged V1 - `type CapabilityRequestPagedV1 struct{…}` - `Data []CapabilityRequestPagedV1Data` - `ID string` Unique identifier for the capability request. - `AccountID string` The unique identifier of the account associated with this capability request. - `Category string` The category of the requested capability. Use `payment_type` for charges and payouts, `customer_type` to define `individuals` or `businesses`, and `consent_type` for `signed_agreement` or `internet` payment authorization. - `const CapabilityRequestPagedV1DataCategoryPaymentType CapabilityRequestPagedV1DataCategory = "payment_type"` - `const CapabilityRequestPagedV1DataCategoryCustomerType CapabilityRequestPagedV1DataCategory = "customer_type"` - `const CapabilityRequestPagedV1DataCategoryConsentType CapabilityRequestPagedV1DataCategory = "consent_type"` - `CreatedAt Time` Timestamp of when the capability request was created. - `Enable bool` Whether this capability request is to enable or disable the capability. - `Status string` The current status of the capability request. - `const CapabilityRequestPagedV1DataStatusActive CapabilityRequestPagedV1DataStatus = "active"` - `const CapabilityRequestPagedV1DataStatusInactive CapabilityRequestPagedV1DataStatus = "inactive"` - `const CapabilityRequestPagedV1DataStatusInReview CapabilityRequestPagedV1DataStatus = "in_review"` - `const CapabilityRequestPagedV1DataStatusRejected CapabilityRequestPagedV1DataStatus = "rejected"` - `const CapabilityRequestPagedV1DataStatusApproved CapabilityRequestPagedV1DataStatus = "approved"` - `const CapabilityRequestPagedV1DataStatusReviewing CapabilityRequestPagedV1DataStatus = "reviewing"` - `Type string` The specific type of capability being requested within the category. - `const CapabilityRequestPagedV1DataTypeCharges CapabilityRequestPagedV1DataType = "charges"` - `const CapabilityRequestPagedV1DataTypePayouts CapabilityRequestPagedV1DataType = "payouts"` - `const CapabilityRequestPagedV1DataTypeIndividuals CapabilityRequestPagedV1DataType = "individuals"` - `const CapabilityRequestPagedV1DataTypeBusinesses CapabilityRequestPagedV1DataType = "businesses"` - `const CapabilityRequestPagedV1DataTypeSignedAgreement CapabilityRequestPagedV1DataType = "signed_agreement"` - `const CapabilityRequestPagedV1DataTypeInternet CapabilityRequestPagedV1DataType = "internet"` - `UpdatedAt Time` Timestamp of the most recent update to the capability request. - `Settings map[string, any]` Any specific settings or configurations related to the requested capability. - `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 CapabilityRequestPagedV1ResponseType` 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 CapabilityRequestPagedV1ResponseTypeObject CapabilityRequestPagedV1ResponseType = "object"` - `const CapabilityRequestPagedV1ResponseTypeArray CapabilityRequestPagedV1ResponseType = "array"` - `const CapabilityRequestPagedV1ResponseTypeError CapabilityRequestPagedV1ResponseType = "error"` - `const CapabilityRequestPagedV1ResponseTypeNone CapabilityRequestPagedV1ResponseType = "none"` # 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"` # Organizations ## Create an organization `client.Embed.Organizations.New(ctx, params) (*OrganizationV1, error)` **post** `/v1/organizations` Creates a new organization related to your Straddle integration. Organizations can be used to group related accounts and manage permissions across multiple users. ### Parameters - `params EmbedOrganizationNewParams` - `Name param.Field[string]` Body param: The name of the organization. - `ExternalID param.Field[string]` Body param: Unique identifier for the organization in your database, used for cross-referencing between Straddle and your systems. - `Metadata param.Field[map[string, string]]` Body param: Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the organization 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 OrganizationV1 struct{…}` - `Data OrganizationV1Data` - `ID string` Straddle's unique identifier for the organization. - `CreatedAt Time` Timestamp of when the organization was created. - `Name string` The name of the organization. - `UpdatedAt Time` Timestamp of the most recent update to the organization. - `ExternalID string` Unique identifier for the organization 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 organization in a structured format. - `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 OrganizationV1ResponseType` 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 OrganizationV1ResponseTypeObject OrganizationV1ResponseType = "object"` - `const OrganizationV1ResponseTypeArray OrganizationV1ResponseType = "array"` - `const OrganizationV1ResponseTypeError OrganizationV1ResponseType = "error"` - `const OrganizationV1ResponseTypeNone OrganizationV1ResponseType = "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"), ) organizationV1, err := client.Embed.Organizations.New(context.TODO(), straddle.EmbedOrganizationNewParams{ Name: "name", }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", organizationV1.Data) } ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "name": "name", "updated_at": "2019-12-27T18:11:19.117Z", "external_id": "external_id", "metadata": { "foo": "string" } }, "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z" }, "response_type": "object" } ``` ## List organizations `client.Embed.Organizations.List(ctx, params) (*PageNumberSchema[OrganizationPagedV1Data], error)` **get** `/v1/organizations` Retrieves a list of organizations associated with your Straddle integration. The organizations are returned sorted by creation date, with the most recently created organizations appearing first. This endpoint supports advanced sorting and filtering options to help you find specific organizations. ### Parameters - `params EmbedOrganizationListParams` - `ExternalID param.Field[string]` Query param: List organizations by their external ID. - `Name param.Field[string]` Query param: List organizations by name (partial match supported). - `PageNumber param.Field[int64]` Query param: Results page number. Starts at page 1. - `PageSize param.Field[int64]` Query param: Page size. Max value: 1000 - `SortBy param.Field[string]` Query param: Sort By. - `SortOrder param.Field[EmbedOrganizationListParamsSortOrder]` Query param: Sort Order. - `const EmbedOrganizationListParamsSortOrderAsc EmbedOrganizationListParamsSortOrder = "asc"` - `const EmbedOrganizationListParamsSortOrderDesc EmbedOrganizationListParamsSortOrder = "desc"` - `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 OrganizationPagedV1Data struct{…}` - `ID string` Straddle's unique identifier for the organization. - `CreatedAt Time` Timestamp of when the organization was created. - `Name string` The name of the organization. - `UpdatedAt Time` Timestamp of the most recent update to the organization. - `ExternalID string` Unique identifier for the organization 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 organization in a structured format. ### 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.Organizations.List(context.TODO(), straddle.EmbedOrganizationListParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", page) } ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "name": "name", "updated_at": "2019-12-27T18:11:19.117Z", "external_id": "external_id", "metadata": { "foo": "string" } } ], "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" } ``` ## Retrieve organization details `client.Embed.Organizations.Get(ctx, organizationID, query) (*OrganizationV1, error)` **get** `/v1/organizations/{organization_id}` Retrieves the details of an Organization that has previously been created. Supply the unique organization ID that was returned from your previous request, and Straddle will return the corresponding organization information. ### Parameters - `organizationID string` - `query EmbedOrganizationGetParams` - `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 OrganizationV1 struct{…}` - `Data OrganizationV1Data` - `ID string` Straddle's unique identifier for the organization. - `CreatedAt Time` Timestamp of when the organization was created. - `Name string` The name of the organization. - `UpdatedAt Time` Timestamp of the most recent update to the organization. - `ExternalID string` Unique identifier for the organization 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 organization in a structured format. - `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 OrganizationV1ResponseType` 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 OrganizationV1ResponseTypeObject OrganizationV1ResponseType = "object"` - `const OrganizationV1ResponseTypeArray OrganizationV1ResponseType = "array"` - `const OrganizationV1ResponseTypeError OrganizationV1ResponseType = "error"` - `const OrganizationV1ResponseTypeNone OrganizationV1ResponseType = "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"), ) organizationV1, err := client.Embed.Organizations.Get( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", straddle.EmbedOrganizationGetParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", organizationV1.Data) } ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "name": "name", "updated_at": "2019-12-27T18:11:19.117Z", "external_id": "external_id", "metadata": { "foo": "string" } }, "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z" }, "response_type": "object" } ``` ## Domain Types ### Organization Paged V1 - `type OrganizationPagedV1 struct{…}` - `Data []OrganizationPagedV1Data` - `ID string` Straddle's unique identifier for the organization. - `CreatedAt Time` Timestamp of when the organization was created. - `Name string` The name of the organization. - `UpdatedAt Time` Timestamp of the most recent update to the organization. - `ExternalID string` Unique identifier for the organization 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 organization in a structured format. - `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 OrganizationPagedV1ResponseType` 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 OrganizationPagedV1ResponseTypeObject OrganizationPagedV1ResponseType = "object"` - `const OrganizationPagedV1ResponseTypeArray OrganizationPagedV1ResponseType = "array"` - `const OrganizationPagedV1ResponseTypeError OrganizationPagedV1ResponseType = "error"` - `const OrganizationPagedV1ResponseTypeNone OrganizationPagedV1ResponseType = "none"` ### Organization V1 - `type OrganizationV1 struct{…}` - `Data OrganizationV1Data` - `ID string` Straddle's unique identifier for the organization. - `CreatedAt Time` Timestamp of when the organization was created. - `Name string` The name of the organization. - `UpdatedAt Time` Timestamp of the most recent update to the organization. - `ExternalID string` Unique identifier for the organization 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 organization in a structured format. - `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 OrganizationV1ResponseType` 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 OrganizationV1ResponseTypeObject OrganizationV1ResponseType = "object"` - `const OrganizationV1ResponseTypeArray OrganizationV1ResponseType = "array"` - `const OrganizationV1ResponseTypeError OrganizationV1ResponseType = "error"` - `const OrganizationV1ResponseTypeNone OrganizationV1ResponseType = "none"` # Representatives ## Create a representative `client.Embed.Representatives.New(ctx, params) (*Representative, error)` **post** `/v1/representatives` Creates a new representative associated with an account. Representatives are individuals who have legal authority or significant responsibility within the business. ### Parameters - `params EmbedRepresentativeNewParams` - `AccountID param.Field[string]` Body param: The unique identifier of the account this representative is associated with. - `Dob param.Field[Time]` Body param: Date of birth for the representative in ISO 8601 format (YYYY-MM-DD). - `Email param.Field[string]` Body param: The company email address of the representative. - `FirstName param.Field[string]` Body param: The first name of the representative. - `LastName param.Field[string]` Body param: The last name of the representative. - `MobileNumber param.Field[string]` Body param: The mobile phone number of the representative. - `Relationship param.Field[EmbedRepresentativeNewParamsRelationship]` Body param - `Control bool` Whether the representative has significant responsibility to control, manage, or direct the organization. One representative must be identified under the control prong for each legal entity. - `Owner bool` Whether the representative owns any percentage of of the equity interests of the legal entity. - `Primary bool` Whether the person is authorized as the primary representative of the account. This is the person chosen by the business to provide information about themselves, general information about the account, and who consented to the services agreement. There can be only one primary representative for an account at a time. - `PercentOwnership float64` The percentage of ownership the representative has. Required if 'Owner' is true. - `Title string` The job title of the representative. - `SsnLast4 param.Field[string]` Body param: The last 4 digits of the representative's Social Security Number. - `ExternalID param.Field[string]` Body param: Unique identifier for the representative in your database, used for cross-referencing between Straddle and your systems. - `Metadata param.Field[map[string, string]]` Body param: Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the represetative 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 Representative struct{…}` - `Data RepresentativeData` - `ID string` Unique identifier for the representative. - `AccountID string` The unique identifier of the account this representative is associated with. - `CreatedAt Time` Timestamp of when the representative was created. - `Dob Time` The date of birth of the representative, in ISO 8601 format (YYYY-MM-DD). - `Email string` The email address of the representative. - `FirstName string` The first name of the representative. - `LastName string` The last name of the representative. - `MobileNumber string` The mobile phone number of the representative. - `Name string` - `Relationship RepresentativeDataRelationship` - `Control bool` Whether the representative has significant responsibility to control, manage, or direct the organization. One representative must be identified under the control prong for each legal entity. - `Owner bool` Whether the representative owns any percentage of of the equity interests of the legal entity. - `Primary bool` Whether the person is authorized as the primary representative of the account. This is the person chosen by the business to provide information about themselves, general information about the account, and who consented to the services agreement. There can be only one primary representative for an account at a time. - `PercentOwnership float64` The percentage of ownership the representative has. Required if 'Owner' is true. - `Title string` The job title of the representative. - `SsnLast4 string` The last 4 digits of the representative's Social Security Number. - `Status string` The current status of the representative. - `const RepresentativeDataStatusCreated RepresentativeDataStatus = "created"` - `const RepresentativeDataStatusOnboarding RepresentativeDataStatus = "onboarding"` - `const RepresentativeDataStatusActive RepresentativeDataStatus = "active"` - `const RepresentativeDataStatusRejected RepresentativeDataStatus = "rejected"` - `const RepresentativeDataStatusInactive RepresentativeDataStatus = "inactive"` - `StatusDetail RepresentativeDataStatusDetail` - `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 RepresentativeDataStatusDetailReasonUnverified RepresentativeDataStatusDetailReason = "unverified"` - `const RepresentativeDataStatusDetailReasonInReview RepresentativeDataStatusDetailReason = "in_review"` - `const RepresentativeDataStatusDetailReasonPending RepresentativeDataStatusDetailReason = "pending"` - `const RepresentativeDataStatusDetailReasonStuck RepresentativeDataStatusDetailReason = "stuck"` - `const RepresentativeDataStatusDetailReasonVerified RepresentativeDataStatusDetailReason = "verified"` - `const RepresentativeDataStatusDetailReasonFailedVerification RepresentativeDataStatusDetailReason = "failed_verification"` - `const RepresentativeDataStatusDetailReasonDisabled RepresentativeDataStatusDetailReason = "disabled"` - `const RepresentativeDataStatusDetailReasonNew RepresentativeDataStatusDetailReason = "new"` - `Source string` Identifies the origin of the status change (e.g., `watchtower`). This helps in tracking the cause of status updates. - `const RepresentativeDataStatusDetailSourceWatchtower RepresentativeDataStatusDetailSource = "watchtower"` - `UpdatedAt Time` Timestamp of the most recent update to the representative. - `ExternalID string` Unique identifier for the representative 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 represetative in a structured format. - `Phone string` - `UserID string` The unique identifier of the user account associated with this representative, if applicable. - `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 RepresentativeResponseType` 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 RepresentativeResponseTypeObject RepresentativeResponseType = "object"` - `const RepresentativeResponseTypeArray RepresentativeResponseType = "array"` - `const RepresentativeResponseTypeError RepresentativeResponseType = "error"` - `const RepresentativeResponseTypeNone RepresentativeResponseType = "none"` ### Example ```go package main import ( "context" "fmt" "time" "github.com/straddleio/straddle-go" "github.com/straddleio/straddle-go/option" ) func main() { client := straddle.NewClient( option.WithAPIKey("My API Key"), ) representative, err := client.Embed.Representatives.New(context.TODO(), straddle.EmbedRepresentativeNewParams{ AccountID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", Dob: time.Now(), Email: "ron.swanson@pawnee.com", FirstName: "first_name", LastName: "last_name", MobileNumber: "+12128675309", Relationship: straddle.EmbedRepresentativeNewParamsRelationship{ Control: true, Owner: true, Primary: true, }, SsnLast4: "1234", }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", representative.Data) } ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "dob": "1980-01-01", "email": "ron.swanson@pawnee.com", "first_name": "Ron", "last_name": "Swanson", "mobile_number": "+12128675309", "name": "name", "relationship": { "control": true, "owner": true, "primary": true, "percent_ownership": 0, "title": "title" }, "ssn_last4": "1234", "status": "created", "status_detail": { "code": "code", "message": "message", "reason": "unverified", "source": "watchtower" }, "updated_at": "2019-12-27T18:11:19.117Z", "external_id": "external_id", "metadata": { "foo": "string" }, "phone": "phone", "user_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 representatives `client.Embed.Representatives.List(ctx, params) (*PageNumberSchema[RepresentativePagedData], error)` **get** `/v1/representatives` Returns a list of representatives associated with a specific account or organization. The representatives are returned sorted by creation date, with the most recently created representatives appearing first. This endpoint supports advanced sorting and filtering options. ### Parameters - `params EmbedRepresentativeListParams` - `AccountID param.Field[string]` Query param: The unique identifier of the account to list representatives for. - `Level param.Field[EmbedRepresentativeListParamsLevel]` Query param - `const EmbedRepresentativeListParamsLevelAccount EmbedRepresentativeListParamsLevel = "account"` - `const EmbedRepresentativeListParamsLevelPlatform EmbedRepresentativeListParamsLevel = "platform"` - `OrganizationID param.Field[string]` Query param - `PageNumber param.Field[int64]` Query param: Results page number. Starts at page 1. - `PageSize param.Field[int64]` Query param: Page size. Max value: 1000 - `PlatformID param.Field[string]` Query param - `SortBy param.Field[string]` Query param: Sort By. - `SortOrder param.Field[EmbedRepresentativeListParamsSortOrder]` Query param: Sort Order. - `const EmbedRepresentativeListParamsSortOrderAsc EmbedRepresentativeListParamsSortOrder = "asc"` - `const EmbedRepresentativeListParamsSortOrderDesc EmbedRepresentativeListParamsSortOrder = "desc"` - `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 RepresentativePagedData struct{…}` - `ID string` Unique identifier for the representative. - `AccountID string` The unique identifier of the account this representative is associated with. - `CreatedAt Time` Timestamp of when the representative was created. - `Dob Time` The date of birth of the representative, in ISO 8601 format (YYYY-MM-DD). - `Email string` The email address of the representative. - `FirstName string` The first name of the representative. - `LastName string` The last name of the representative. - `MobileNumber string` The mobile phone number of the representative. - `Name string` - `Relationship RepresentativePagedDataRelationship` - `Control bool` Whether the representative has significant responsibility to control, manage, or direct the organization. One representative must be identified under the control prong for each legal entity. - `Owner bool` Whether the representative owns any percentage of of the equity interests of the legal entity. - `Primary bool` Whether the person is authorized as the primary representative of the account. This is the person chosen by the business to provide information about themselves, general information about the account, and who consented to the services agreement. There can be only one primary representative for an account at a time. - `PercentOwnership float64` The percentage of ownership the representative has. Required if 'Owner' is true. - `Title string` The job title of the representative. - `SsnLast4 string` The last 4 digits of the representative's Social Security Number. - `Status string` The current status of the representative. - `const RepresentativePagedDataStatusCreated RepresentativePagedDataStatus = "created"` - `const RepresentativePagedDataStatusOnboarding RepresentativePagedDataStatus = "onboarding"` - `const RepresentativePagedDataStatusActive RepresentativePagedDataStatus = "active"` - `const RepresentativePagedDataStatusRejected RepresentativePagedDataStatus = "rejected"` - `const RepresentativePagedDataStatusInactive RepresentativePagedDataStatus = "inactive"` - `StatusDetail RepresentativePagedDataStatusDetail` - `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 RepresentativePagedDataStatusDetailReasonUnverified RepresentativePagedDataStatusDetailReason = "unverified"` - `const RepresentativePagedDataStatusDetailReasonInReview RepresentativePagedDataStatusDetailReason = "in_review"` - `const RepresentativePagedDataStatusDetailReasonPending RepresentativePagedDataStatusDetailReason = "pending"` - `const RepresentativePagedDataStatusDetailReasonStuck RepresentativePagedDataStatusDetailReason = "stuck"` - `const RepresentativePagedDataStatusDetailReasonVerified RepresentativePagedDataStatusDetailReason = "verified"` - `const RepresentativePagedDataStatusDetailReasonFailedVerification RepresentativePagedDataStatusDetailReason = "failed_verification"` - `const RepresentativePagedDataStatusDetailReasonDisabled RepresentativePagedDataStatusDetailReason = "disabled"` - `const RepresentativePagedDataStatusDetailReasonNew RepresentativePagedDataStatusDetailReason = "new"` - `Source string` Identifies the origin of the status change (e.g., `watchtower`). This helps in tracking the cause of status updates. - `const RepresentativePagedDataStatusDetailSourceWatchtower RepresentativePagedDataStatusDetailSource = "watchtower"` - `UpdatedAt Time` Timestamp of the most recent update to the representative. - `ExternalID string` Unique identifier for the representative 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 represetative in a structured format. - `Phone string` - `UserID string` The unique identifier of the user account associated with this representative, if applicable. ### 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.Representatives.List(context.TODO(), straddle.EmbedRepresentativeListParams{ }) 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", "created_at": "2019-12-27T18:11:19.117Z", "dob": "1980-01-01", "email": "ron.swanson@pawnee.com", "first_name": "Ron", "last_name": "Swanson", "mobile_number": "+12128675309", "name": "name", "relationship": { "control": true, "owner": true, "primary": true, "percent_ownership": 0, "title": "title" }, "ssn_last4": "1234", "status": "created", "status_detail": { "code": "code", "message": "message", "reason": "unverified", "source": "watchtower" }, "updated_at": "2019-12-27T18:11:19.117Z", "external_id": "external_id", "metadata": { "foo": "string" }, "phone": "phone", "user_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 representative `client.Embed.Representatives.Update(ctx, representativeID, params) (*Representative, error)` **put** `/v1/representatives/{representative_id}` Updates an existing representative's information. This can be used to update personal details, contact information, or the relationship to the account or organization. ### Parameters - `representativeID string` - `params EmbedRepresentativeUpdateParams` - `Dob param.Field[Time]` Body param: The date of birth of the representative, in ISO 8601 format (YYYY-MM-DD). - `Email param.Field[string]` Body param: The email address of the representative. - `FirstName param.Field[string]` Body param: The first name of the representative. - `LastName param.Field[string]` Body param: The last name of the representative. - `MobileNumber param.Field[string]` Body param: The mobile phone number of the representative. - `Relationship param.Field[EmbedRepresentativeUpdateParamsRelationship]` Body param - `Control bool` Whether the representative has significant responsibility to control, manage, or direct the organization. One representative must be identified under the control prong for each legal entity. - `Owner bool` Whether the representative owns any percentage of of the equity interests of the legal entity. - `Primary bool` Whether the person is authorized as the primary representative of the account. This is the person chosen by the business to provide information about themselves, general information about the account, and who consented to the services agreement. There can be only one primary representative for an account at a time. - `PercentOwnership float64` The percentage of ownership the representative has. Required if 'Owner' is true. - `Title string` The job title of the representative. - `SsnLast4 param.Field[string]` Body param: The last 4 digits of the representative's Social Security Number. - `ExternalID param.Field[string]` Body param: Unique identifier for the representative in your database, used for cross-referencing between Straddle and your systems. - `Metadata param.Field[map[string, string]]` Body param: Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the represetative 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 Representative struct{…}` - `Data RepresentativeData` - `ID string` Unique identifier for the representative. - `AccountID string` The unique identifier of the account this representative is associated with. - `CreatedAt Time` Timestamp of when the representative was created. - `Dob Time` The date of birth of the representative, in ISO 8601 format (YYYY-MM-DD). - `Email string` The email address of the representative. - `FirstName string` The first name of the representative. - `LastName string` The last name of the representative. - `MobileNumber string` The mobile phone number of the representative. - `Name string` - `Relationship RepresentativeDataRelationship` - `Control bool` Whether the representative has significant responsibility to control, manage, or direct the organization. One representative must be identified under the control prong for each legal entity. - `Owner bool` Whether the representative owns any percentage of of the equity interests of the legal entity. - `Primary bool` Whether the person is authorized as the primary representative of the account. This is the person chosen by the business to provide information about themselves, general information about the account, and who consented to the services agreement. There can be only one primary representative for an account at a time. - `PercentOwnership float64` The percentage of ownership the representative has. Required if 'Owner' is true. - `Title string` The job title of the representative. - `SsnLast4 string` The last 4 digits of the representative's Social Security Number. - `Status string` The current status of the representative. - `const RepresentativeDataStatusCreated RepresentativeDataStatus = "created"` - `const RepresentativeDataStatusOnboarding RepresentativeDataStatus = "onboarding"` - `const RepresentativeDataStatusActive RepresentativeDataStatus = "active"` - `const RepresentativeDataStatusRejected RepresentativeDataStatus = "rejected"` - `const RepresentativeDataStatusInactive RepresentativeDataStatus = "inactive"` - `StatusDetail RepresentativeDataStatusDetail` - `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 RepresentativeDataStatusDetailReasonUnverified RepresentativeDataStatusDetailReason = "unverified"` - `const RepresentativeDataStatusDetailReasonInReview RepresentativeDataStatusDetailReason = "in_review"` - `const RepresentativeDataStatusDetailReasonPending RepresentativeDataStatusDetailReason = "pending"` - `const RepresentativeDataStatusDetailReasonStuck RepresentativeDataStatusDetailReason = "stuck"` - `const RepresentativeDataStatusDetailReasonVerified RepresentativeDataStatusDetailReason = "verified"` - `const RepresentativeDataStatusDetailReasonFailedVerification RepresentativeDataStatusDetailReason = "failed_verification"` - `const RepresentativeDataStatusDetailReasonDisabled RepresentativeDataStatusDetailReason = "disabled"` - `const RepresentativeDataStatusDetailReasonNew RepresentativeDataStatusDetailReason = "new"` - `Source string` Identifies the origin of the status change (e.g., `watchtower`). This helps in tracking the cause of status updates. - `const RepresentativeDataStatusDetailSourceWatchtower RepresentativeDataStatusDetailSource = "watchtower"` - `UpdatedAt Time` Timestamp of the most recent update to the representative. - `ExternalID string` Unique identifier for the representative 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 represetative in a structured format. - `Phone string` - `UserID string` The unique identifier of the user account associated with this representative, if applicable. - `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 RepresentativeResponseType` 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 RepresentativeResponseTypeObject RepresentativeResponseType = "object"` - `const RepresentativeResponseTypeArray RepresentativeResponseType = "array"` - `const RepresentativeResponseTypeError RepresentativeResponseType = "error"` - `const RepresentativeResponseTypeNone RepresentativeResponseType = "none"` ### Example ```go package main import ( "context" "fmt" "time" "github.com/straddleio/straddle-go" "github.com/straddleio/straddle-go/option" ) func main() { client := straddle.NewClient( option.WithAPIKey("My API Key"), ) representative, err := client.Embed.Representatives.Update( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", straddle.EmbedRepresentativeUpdateParams{ Dob: time.Now(), Email: "ron.swanson@pawnee.com", FirstName: "Ron", LastName: "Swanson", MobileNumber: "+12128675309", Relationship: straddle.EmbedRepresentativeUpdateParamsRelationship{ Control: true, Owner: true, Primary: true, }, SsnLast4: "1234", }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", representative.Data) } ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "dob": "1980-01-01", "email": "ron.swanson@pawnee.com", "first_name": "Ron", "last_name": "Swanson", "mobile_number": "+12128675309", "name": "name", "relationship": { "control": true, "owner": true, "primary": true, "percent_ownership": 0, "title": "title" }, "ssn_last4": "1234", "status": "created", "status_detail": { "code": "code", "message": "message", "reason": "unverified", "source": "watchtower" }, "updated_at": "2019-12-27T18:11:19.117Z", "external_id": "external_id", "metadata": { "foo": "string" }, "phone": "phone", "user_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 representative `client.Embed.Representatives.Get(ctx, representativeID, query) (*Representative, error)` **get** `/v1/representatives/{representative_id}` Retrieves the details of an existing representative. Supply the unique representative ID, and Straddle will return the corresponding representative information. ### Parameters - `representativeID string` - `query EmbedRepresentativeGetParams` - `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 Representative struct{…}` - `Data RepresentativeData` - `ID string` Unique identifier for the representative. - `AccountID string` The unique identifier of the account this representative is associated with. - `CreatedAt Time` Timestamp of when the representative was created. - `Dob Time` The date of birth of the representative, in ISO 8601 format (YYYY-MM-DD). - `Email string` The email address of the representative. - `FirstName string` The first name of the representative. - `LastName string` The last name of the representative. - `MobileNumber string` The mobile phone number of the representative. - `Name string` - `Relationship RepresentativeDataRelationship` - `Control bool` Whether the representative has significant responsibility to control, manage, or direct the organization. One representative must be identified under the control prong for each legal entity. - `Owner bool` Whether the representative owns any percentage of of the equity interests of the legal entity. - `Primary bool` Whether the person is authorized as the primary representative of the account. This is the person chosen by the business to provide information about themselves, general information about the account, and who consented to the services agreement. There can be only one primary representative for an account at a time. - `PercentOwnership float64` The percentage of ownership the representative has. Required if 'Owner' is true. - `Title string` The job title of the representative. - `SsnLast4 string` The last 4 digits of the representative's Social Security Number. - `Status string` The current status of the representative. - `const RepresentativeDataStatusCreated RepresentativeDataStatus = "created"` - `const RepresentativeDataStatusOnboarding RepresentativeDataStatus = "onboarding"` - `const RepresentativeDataStatusActive RepresentativeDataStatus = "active"` - `const RepresentativeDataStatusRejected RepresentativeDataStatus = "rejected"` - `const RepresentativeDataStatusInactive RepresentativeDataStatus = "inactive"` - `StatusDetail RepresentativeDataStatusDetail` - `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 RepresentativeDataStatusDetailReasonUnverified RepresentativeDataStatusDetailReason = "unverified"` - `const RepresentativeDataStatusDetailReasonInReview RepresentativeDataStatusDetailReason = "in_review"` - `const RepresentativeDataStatusDetailReasonPending RepresentativeDataStatusDetailReason = "pending"` - `const RepresentativeDataStatusDetailReasonStuck RepresentativeDataStatusDetailReason = "stuck"` - `const RepresentativeDataStatusDetailReasonVerified RepresentativeDataStatusDetailReason = "verified"` - `const RepresentativeDataStatusDetailReasonFailedVerification RepresentativeDataStatusDetailReason = "failed_verification"` - `const RepresentativeDataStatusDetailReasonDisabled RepresentativeDataStatusDetailReason = "disabled"` - `const RepresentativeDataStatusDetailReasonNew RepresentativeDataStatusDetailReason = "new"` - `Source string` Identifies the origin of the status change (e.g., `watchtower`). This helps in tracking the cause of status updates. - `const RepresentativeDataStatusDetailSourceWatchtower RepresentativeDataStatusDetailSource = "watchtower"` - `UpdatedAt Time` Timestamp of the most recent update to the representative. - `ExternalID string` Unique identifier for the representative 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 represetative in a structured format. - `Phone string` - `UserID string` The unique identifier of the user account associated with this representative, if applicable. - `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 RepresentativeResponseType` 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 RepresentativeResponseTypeObject RepresentativeResponseType = "object"` - `const RepresentativeResponseTypeArray RepresentativeResponseType = "array"` - `const RepresentativeResponseTypeError RepresentativeResponseType = "error"` - `const RepresentativeResponseTypeNone RepresentativeResponseType = "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"), ) representative, err := client.Embed.Representatives.Get( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", straddle.EmbedRepresentativeGetParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", representative.Data) } ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "dob": "1980-01-01", "email": "ron.swanson@pawnee.com", "first_name": "Ron", "last_name": "Swanson", "mobile_number": "+12128675309", "name": "name", "relationship": { "control": true, "owner": true, "primary": true, "percent_ownership": 0, "title": "title" }, "ssn_last4": "1234", "status": "created", "status_detail": { "code": "code", "message": "message", "reason": "unverified", "source": "watchtower" }, "updated_at": "2019-12-27T18:11:19.117Z", "external_id": "external_id", "metadata": { "foo": "string" }, "phone": "phone", "user_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" } ``` ## Retrieve unmasked representative details `client.Embed.Representatives.Unmask(ctx, representativeID, query) (*Representative, error)` **get** `/v1/representatives/{representative_id}/unmask` Retrieves the unmasked details of a representative that has previously been created. Supply the unique representative ID, and Straddle will return the corresponding representative information, including sensitive details. This endpoint requires additional authentication and should be used with caution. ### Parameters - `representativeID string` - `query EmbedRepresentativeUnmaskParams` - `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 Representative struct{…}` - `Data RepresentativeData` - `ID string` Unique identifier for the representative. - `AccountID string` The unique identifier of the account this representative is associated with. - `CreatedAt Time` Timestamp of when the representative was created. - `Dob Time` The date of birth of the representative, in ISO 8601 format (YYYY-MM-DD). - `Email string` The email address of the representative. - `FirstName string` The first name of the representative. - `LastName string` The last name of the representative. - `MobileNumber string` The mobile phone number of the representative. - `Name string` - `Relationship RepresentativeDataRelationship` - `Control bool` Whether the representative has significant responsibility to control, manage, or direct the organization. One representative must be identified under the control prong for each legal entity. - `Owner bool` Whether the representative owns any percentage of of the equity interests of the legal entity. - `Primary bool` Whether the person is authorized as the primary representative of the account. This is the person chosen by the business to provide information about themselves, general information about the account, and who consented to the services agreement. There can be only one primary representative for an account at a time. - `PercentOwnership float64` The percentage of ownership the representative has. Required if 'Owner' is true. - `Title string` The job title of the representative. - `SsnLast4 string` The last 4 digits of the representative's Social Security Number. - `Status string` The current status of the representative. - `const RepresentativeDataStatusCreated RepresentativeDataStatus = "created"` - `const RepresentativeDataStatusOnboarding RepresentativeDataStatus = "onboarding"` - `const RepresentativeDataStatusActive RepresentativeDataStatus = "active"` - `const RepresentativeDataStatusRejected RepresentativeDataStatus = "rejected"` - `const RepresentativeDataStatusInactive RepresentativeDataStatus = "inactive"` - `StatusDetail RepresentativeDataStatusDetail` - `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 RepresentativeDataStatusDetailReasonUnverified RepresentativeDataStatusDetailReason = "unverified"` - `const RepresentativeDataStatusDetailReasonInReview RepresentativeDataStatusDetailReason = "in_review"` - `const RepresentativeDataStatusDetailReasonPending RepresentativeDataStatusDetailReason = "pending"` - `const RepresentativeDataStatusDetailReasonStuck RepresentativeDataStatusDetailReason = "stuck"` - `const RepresentativeDataStatusDetailReasonVerified RepresentativeDataStatusDetailReason = "verified"` - `const RepresentativeDataStatusDetailReasonFailedVerification RepresentativeDataStatusDetailReason = "failed_verification"` - `const RepresentativeDataStatusDetailReasonDisabled RepresentativeDataStatusDetailReason = "disabled"` - `const RepresentativeDataStatusDetailReasonNew RepresentativeDataStatusDetailReason = "new"` - `Source string` Identifies the origin of the status change (e.g., `watchtower`). This helps in tracking the cause of status updates. - `const RepresentativeDataStatusDetailSourceWatchtower RepresentativeDataStatusDetailSource = "watchtower"` - `UpdatedAt Time` Timestamp of the most recent update to the representative. - `ExternalID string` Unique identifier for the representative 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 represetative in a structured format. - `Phone string` - `UserID string` The unique identifier of the user account associated with this representative, if applicable. - `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 RepresentativeResponseType` 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 RepresentativeResponseTypeObject RepresentativeResponseType = "object"` - `const RepresentativeResponseTypeArray RepresentativeResponseType = "array"` - `const RepresentativeResponseTypeError RepresentativeResponseType = "error"` - `const RepresentativeResponseTypeNone RepresentativeResponseType = "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"), ) representative, err := client.Embed.Representatives.Unmask( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", straddle.EmbedRepresentativeUnmaskParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", representative.Data) } ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "dob": "1980-01-01", "email": "ron.swanson@pawnee.com", "first_name": "Ron", "last_name": "Swanson", "mobile_number": "+12128675309", "name": "name", "relationship": { "control": true, "owner": true, "primary": true, "percent_ownership": 0, "title": "title" }, "ssn_last4": "1234", "status": "created", "status_detail": { "code": "code", "message": "message", "reason": "unverified", "source": "watchtower" }, "updated_at": "2019-12-27T18:11:19.117Z", "external_id": "external_id", "metadata": { "foo": "string" }, "phone": "phone", "user_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 ### Representative - `type Representative struct{…}` - `Data RepresentativeData` - `ID string` Unique identifier for the representative. - `AccountID string` The unique identifier of the account this representative is associated with. - `CreatedAt Time` Timestamp of when the representative was created. - `Dob Time` The date of birth of the representative, in ISO 8601 format (YYYY-MM-DD). - `Email string` The email address of the representative. - `FirstName string` The first name of the representative. - `LastName string` The last name of the representative. - `MobileNumber string` The mobile phone number of the representative. - `Name string` - `Relationship RepresentativeDataRelationship` - `Control bool` Whether the representative has significant responsibility to control, manage, or direct the organization. One representative must be identified under the control prong for each legal entity. - `Owner bool` Whether the representative owns any percentage of of the equity interests of the legal entity. - `Primary bool` Whether the person is authorized as the primary representative of the account. This is the person chosen by the business to provide information about themselves, general information about the account, and who consented to the services agreement. There can be only one primary representative for an account at a time. - `PercentOwnership float64` The percentage of ownership the representative has. Required if 'Owner' is true. - `Title string` The job title of the representative. - `SsnLast4 string` The last 4 digits of the representative's Social Security Number. - `Status string` The current status of the representative. - `const RepresentativeDataStatusCreated RepresentativeDataStatus = "created"` - `const RepresentativeDataStatusOnboarding RepresentativeDataStatus = "onboarding"` - `const RepresentativeDataStatusActive RepresentativeDataStatus = "active"` - `const RepresentativeDataStatusRejected RepresentativeDataStatus = "rejected"` - `const RepresentativeDataStatusInactive RepresentativeDataStatus = "inactive"` - `StatusDetail RepresentativeDataStatusDetail` - `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 RepresentativeDataStatusDetailReasonUnverified RepresentativeDataStatusDetailReason = "unverified"` - `const RepresentativeDataStatusDetailReasonInReview RepresentativeDataStatusDetailReason = "in_review"` - `const RepresentativeDataStatusDetailReasonPending RepresentativeDataStatusDetailReason = "pending"` - `const RepresentativeDataStatusDetailReasonStuck RepresentativeDataStatusDetailReason = "stuck"` - `const RepresentativeDataStatusDetailReasonVerified RepresentativeDataStatusDetailReason = "verified"` - `const RepresentativeDataStatusDetailReasonFailedVerification RepresentativeDataStatusDetailReason = "failed_verification"` - `const RepresentativeDataStatusDetailReasonDisabled RepresentativeDataStatusDetailReason = "disabled"` - `const RepresentativeDataStatusDetailReasonNew RepresentativeDataStatusDetailReason = "new"` - `Source string` Identifies the origin of the status change (e.g., `watchtower`). This helps in tracking the cause of status updates. - `const RepresentativeDataStatusDetailSourceWatchtower RepresentativeDataStatusDetailSource = "watchtower"` - `UpdatedAt Time` Timestamp of the most recent update to the representative. - `ExternalID string` Unique identifier for the representative 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 represetative in a structured format. - `Phone string` - `UserID string` The unique identifier of the user account associated with this representative, if applicable. - `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 RepresentativeResponseType` 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 RepresentativeResponseTypeObject RepresentativeResponseType = "object"` - `const RepresentativeResponseTypeArray RepresentativeResponseType = "array"` - `const RepresentativeResponseTypeError RepresentativeResponseType = "error"` - `const RepresentativeResponseTypeNone RepresentativeResponseType = "none"` ### Representative Paged - `type RepresentativePaged struct{…}` - `Data []RepresentativePagedData` - `ID string` Unique identifier for the representative. - `AccountID string` The unique identifier of the account this representative is associated with. - `CreatedAt Time` Timestamp of when the representative was created. - `Dob Time` The date of birth of the representative, in ISO 8601 format (YYYY-MM-DD). - `Email string` The email address of the representative. - `FirstName string` The first name of the representative. - `LastName string` The last name of the representative. - `MobileNumber string` The mobile phone number of the representative. - `Name string` - `Relationship RepresentativePagedDataRelationship` - `Control bool` Whether the representative has significant responsibility to control, manage, or direct the organization. One representative must be identified under the control prong for each legal entity. - `Owner bool` Whether the representative owns any percentage of of the equity interests of the legal entity. - `Primary bool` Whether the person is authorized as the primary representative of the account. This is the person chosen by the business to provide information about themselves, general information about the account, and who consented to the services agreement. There can be only one primary representative for an account at a time. - `PercentOwnership float64` The percentage of ownership the representative has. Required if 'Owner' is true. - `Title string` The job title of the representative. - `SsnLast4 string` The last 4 digits of the representative's Social Security Number. - `Status string` The current status of the representative. - `const RepresentativePagedDataStatusCreated RepresentativePagedDataStatus = "created"` - `const RepresentativePagedDataStatusOnboarding RepresentativePagedDataStatus = "onboarding"` - `const RepresentativePagedDataStatusActive RepresentativePagedDataStatus = "active"` - `const RepresentativePagedDataStatusRejected RepresentativePagedDataStatus = "rejected"` - `const RepresentativePagedDataStatusInactive RepresentativePagedDataStatus = "inactive"` - `StatusDetail RepresentativePagedDataStatusDetail` - `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 RepresentativePagedDataStatusDetailReasonUnverified RepresentativePagedDataStatusDetailReason = "unverified"` - `const RepresentativePagedDataStatusDetailReasonInReview RepresentativePagedDataStatusDetailReason = "in_review"` - `const RepresentativePagedDataStatusDetailReasonPending RepresentativePagedDataStatusDetailReason = "pending"` - `const RepresentativePagedDataStatusDetailReasonStuck RepresentativePagedDataStatusDetailReason = "stuck"` - `const RepresentativePagedDataStatusDetailReasonVerified RepresentativePagedDataStatusDetailReason = "verified"` - `const RepresentativePagedDataStatusDetailReasonFailedVerification RepresentativePagedDataStatusDetailReason = "failed_verification"` - `const RepresentativePagedDataStatusDetailReasonDisabled RepresentativePagedDataStatusDetailReason = "disabled"` - `const RepresentativePagedDataStatusDetailReasonNew RepresentativePagedDataStatusDetailReason = "new"` - `Source string` Identifies the origin of the status change (e.g., `watchtower`). This helps in tracking the cause of status updates. - `const RepresentativePagedDataStatusDetailSourceWatchtower RepresentativePagedDataStatusDetailSource = "watchtower"` - `UpdatedAt Time` Timestamp of the most recent update to the representative. - `ExternalID string` Unique identifier for the representative 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 represetative in a structured format. - `Phone string` - `UserID string` The unique identifier of the user account associated with this representative, if applicable. - `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 RepresentativePagedResponseType` 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 RepresentativePagedResponseTypeObject RepresentativePagedResponseType = "object"` - `const RepresentativePagedResponseTypeArray RepresentativePagedResponseType = "array"` - `const RepresentativePagedResponseTypeError RepresentativePagedResponseType = "error"` - `const RepresentativePagedResponseTypeNone RepresentativePagedResponseType = "none"`