# Link ## Bridge a bank account `client.Bridge.Link.BankAccount(ctx, params) (*PaykeyV1, error)` **post** `/v1/bridge/bank_account` Use Bridge to create a new paykey using a bank routing and account number as the source. This endpoint allows you to create a secure payment token linked to a specific bank account. ### Parameters - `params BridgeLinkBankAccountParams` - `AccountNumber param.Field[string]` Body param: The bank account number. - `AccountType param.Field[BridgeLinkBankAccountParamsAccountType]` Body param - `const BridgeLinkBankAccountParamsAccountTypeChecking BridgeLinkBankAccountParamsAccountType = "checking"` - `const BridgeLinkBankAccountParamsAccountTypeSavings BridgeLinkBankAccountParamsAccountType = "savings"` - `CustomerID param.Field[string]` Body param: Unique identifier of the related customer object. - `RoutingNumber param.Field[string]` Body param: The routing number of the bank account. - `Config param.Field[BridgeLinkBankAccountParamsConfig]` Body param - `ProcessingMethod string` - `const BridgeLinkBankAccountParamsConfigProcessingMethodInline BridgeLinkBankAccountParamsConfigProcessingMethod = "inline"` - `const BridgeLinkBankAccountParamsConfigProcessingMethodBackground BridgeLinkBankAccountParamsConfigProcessingMethod = "background"` - `const BridgeLinkBankAccountParamsConfigProcessingMethodSkip BridgeLinkBankAccountParamsConfigProcessingMethod = "skip"` - `SandboxOutcome string` - `const BridgeLinkBankAccountParamsConfigSandboxOutcomeStandard BridgeLinkBankAccountParamsConfigSandboxOutcome = "standard"` - `const BridgeLinkBankAccountParamsConfigSandboxOutcomeActive BridgeLinkBankAccountParamsConfigSandboxOutcome = "active"` - `const BridgeLinkBankAccountParamsConfigSandboxOutcomeRejected BridgeLinkBankAccountParamsConfigSandboxOutcome = "rejected"` - `const BridgeLinkBankAccountParamsConfigSandboxOutcomeReview BridgeLinkBankAccountParamsConfigSandboxOutcome = "review"` - `ExternalID param.Field[string]` Body param: Unique identifier for the paykey 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 paykey 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. - `StraddleAccountID param.Field[string]` Header param: For use by platforms to specify an account id and set scope of a request. ### Returns - `type PaykeyV1 struct{…}` - `Data PaykeyV1Data` - `ID string` Unique identifier for the paykey. - `Config PaykeyV1DataConfig` - `ProcessingMethod string` - `const PaykeyV1DataConfigProcessingMethodInline PaykeyV1DataConfigProcessingMethod = "inline"` - `const PaykeyV1DataConfigProcessingMethodBackground PaykeyV1DataConfigProcessingMethod = "background"` - `const PaykeyV1DataConfigProcessingMethodSkip PaykeyV1DataConfigProcessingMethod = "skip"` - `SandboxOutcome string` - `const PaykeyV1DataConfigSandboxOutcomeStandard PaykeyV1DataConfigSandboxOutcome = "standard"` - `const PaykeyV1DataConfigSandboxOutcomeActive PaykeyV1DataConfigSandboxOutcome = "active"` - `const PaykeyV1DataConfigSandboxOutcomeRejected PaykeyV1DataConfigSandboxOutcome = "rejected"` - `const PaykeyV1DataConfigSandboxOutcomeReview PaykeyV1DataConfigSandboxOutcome = "review"` - `CreatedAt Time` Timestamp of when the paykey was created. - `Label string` Human-readable label used to represent this paykey in a UI. - `Paykey string` The tokenized paykey value. This value is used to create payments and should be stored securely. - `Source string` - `const PaykeyV1DataSourceBankAccount PaykeyV1DataSource = "bank_account"` - `const PaykeyV1DataSourceStraddle PaykeyV1DataSource = "straddle"` - `const PaykeyV1DataSourceMx PaykeyV1DataSource = "mx"` - `const PaykeyV1DataSourcePlaid PaykeyV1DataSource = "plaid"` - `const PaykeyV1DataSourceTan PaykeyV1DataSource = "tan"` - `const PaykeyV1DataSourceQuiltt PaykeyV1DataSource = "quiltt"` - `Status string` - `const PaykeyV1DataStatusPending PaykeyV1DataStatus = "pending"` - `const PaykeyV1DataStatusActive PaykeyV1DataStatus = "active"` - `const PaykeyV1DataStatusInactive PaykeyV1DataStatus = "inactive"` - `const PaykeyV1DataStatusRejected PaykeyV1DataStatus = "rejected"` - `const PaykeyV1DataStatusReview PaykeyV1DataStatus = "review"` - `const PaykeyV1DataStatusBlocked PaykeyV1DataStatus = "blocked"` - `UpdatedAt Time` Timestamp of the most recent update to the paykey. - `Balance PaykeyV1DataBalance` - `Status string` - `const PaykeyV1DataBalanceStatusPending PaykeyV1DataBalanceStatus = "pending"` - `const PaykeyV1DataBalanceStatusCompleted PaykeyV1DataBalanceStatus = "completed"` - `const PaykeyV1DataBalanceStatusFailed PaykeyV1DataBalanceStatus = "failed"` - `AccountBalance int64` Account Balance when last retrieved - `UpdatedAt Time` Last time account balance was updated. - `BankData PaykeyV1DataBankData` - `AccountNumber string` Bank account number. This value is masked by default for security reasons. Use the /unmask endpoint to access the unmasked value. - `AccountType string` - `const PaykeyV1DataBankDataAccountTypeChecking PaykeyV1DataBankDataAccountType = "checking"` - `const PaykeyV1DataBankDataAccountTypeSavings PaykeyV1DataBankDataAccountType = "savings"` - `RoutingNumber string` The routing number of the bank account. - `CustomerID string` Unique identifier of the related customer object. - `ExpiresAt Time` Expiration date and time of the paykey, if applicable. - `ExternalID string` Unique identifier for the paykey in your database, used for cross-referencing between Straddle and your systems. - `InstitutionName string` Name of the financial institution. - `Metadata map[string, string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the paykey in a structured format. - `StatusDetails PaykeyV1DataStatusDetails` - `ChangedAt Time` The time the status change occurred. - `Message string` A human-readable description of the current status. - `Reason string` - `const PaykeyV1DataStatusDetailsReasonInsufficientFunds PaykeyV1DataStatusDetailsReason = "insufficient_funds"` - `const PaykeyV1DataStatusDetailsReasonClosedBankAccount PaykeyV1DataStatusDetailsReason = "closed_bank_account"` - `const PaykeyV1DataStatusDetailsReasonInvalidBankAccount PaykeyV1DataStatusDetailsReason = "invalid_bank_account"` - `const PaykeyV1DataStatusDetailsReasonInvalidRouting PaykeyV1DataStatusDetailsReason = "invalid_routing"` - `const PaykeyV1DataStatusDetailsReasonDisputed PaykeyV1DataStatusDetailsReason = "disputed"` - `const PaykeyV1DataStatusDetailsReasonPaymentStopped PaykeyV1DataStatusDetailsReason = "payment_stopped"` - `const PaykeyV1DataStatusDetailsReasonOwnerDeceased PaykeyV1DataStatusDetailsReason = "owner_deceased"` - `const PaykeyV1DataStatusDetailsReasonFrozenBankAccount PaykeyV1DataStatusDetailsReason = "frozen_bank_account"` - `const PaykeyV1DataStatusDetailsReasonRiskReview PaykeyV1DataStatusDetailsReason = "risk_review"` - `const PaykeyV1DataStatusDetailsReasonFraudulent PaykeyV1DataStatusDetailsReason = "fraudulent"` - `const PaykeyV1DataStatusDetailsReasonDuplicateEntry PaykeyV1DataStatusDetailsReason = "duplicate_entry"` - `const PaykeyV1DataStatusDetailsReasonInvalidPaykey PaykeyV1DataStatusDetailsReason = "invalid_paykey"` - `const PaykeyV1DataStatusDetailsReasonPaymentBlocked PaykeyV1DataStatusDetailsReason = "payment_blocked"` - `const PaykeyV1DataStatusDetailsReasonAmountTooLarge PaykeyV1DataStatusDetailsReason = "amount_too_large"` - `const PaykeyV1DataStatusDetailsReasonTooManyAttempts PaykeyV1DataStatusDetailsReason = "too_many_attempts"` - `const PaykeyV1DataStatusDetailsReasonInternalSystemError PaykeyV1DataStatusDetailsReason = "internal_system_error"` - `const PaykeyV1DataStatusDetailsReasonUserRequest PaykeyV1DataStatusDetailsReason = "user_request"` - `const PaykeyV1DataStatusDetailsReasonOk PaykeyV1DataStatusDetailsReason = "ok"` - `const PaykeyV1DataStatusDetailsReasonOtherNetworkReturn PaykeyV1DataStatusDetailsReason = "other_network_return"` - `const PaykeyV1DataStatusDetailsReasonPayoutRefused PaykeyV1DataStatusDetailsReason = "payout_refused"` - `const PaykeyV1DataStatusDetailsReasonCancelRequest PaykeyV1DataStatusDetailsReason = "cancel_request"` - `const PaykeyV1DataStatusDetailsReasonFailedVerification PaykeyV1DataStatusDetailsReason = "failed_verification"` - `const PaykeyV1DataStatusDetailsReasonRequireReview PaykeyV1DataStatusDetailsReason = "require_review"` - `const PaykeyV1DataStatusDetailsReasonBlockedBySystem PaykeyV1DataStatusDetailsReason = "blocked_by_system"` - `const PaykeyV1DataStatusDetailsReasonWatchtowerReview PaykeyV1DataStatusDetailsReason = "watchtower_review"` - `const PaykeyV1DataStatusDetailsReasonValidating PaykeyV1DataStatusDetailsReason = "validating"` - `const PaykeyV1DataStatusDetailsReasonAutoHold PaykeyV1DataStatusDetailsReason = "auto_hold"` - `Source string` - `const PaykeyV1DataStatusDetailsSourceWatchtower PaykeyV1DataStatusDetailsSource = "watchtower"` - `const PaykeyV1DataStatusDetailsSourceBankDecline PaykeyV1DataStatusDetailsSource = "bank_decline"` - `const PaykeyV1DataStatusDetailsSourceCustomerDispute PaykeyV1DataStatusDetailsSource = "customer_dispute"` - `const PaykeyV1DataStatusDetailsSourceUserAction PaykeyV1DataStatusDetailsSource = "user_action"` - `const PaykeyV1DataStatusDetailsSourceSystem PaykeyV1DataStatusDetailsSource = "system"` - `Code string` The status code if applicable. - `UnblockEligible bool` Indicates whether this paykey is eligible for client-initiated unblocking. Only present for blocked paykeys. True when blocked due to R29 returns and not previously unblocked, false otherwise. Null when paykey is not blocked. - `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 PaykeyV1ResponseType` 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 PaykeyV1ResponseTypeObject PaykeyV1ResponseType = "object"` - `const PaykeyV1ResponseTypeArray PaykeyV1ResponseType = "array"` - `const PaykeyV1ResponseTypeError PaykeyV1ResponseType = "error"` - `const PaykeyV1ResponseTypeNone PaykeyV1ResponseType = "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"), ) paykeyV1, err := client.Bridge.Link.BankAccount(context.TODO(), straddle.BridgeLinkBankAccountParams{ AccountNumber: "account_number", AccountType: straddle.BridgeLinkBankAccountParamsAccountTypeChecking, CustomerID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", RoutingNumber: "xxxxxxxxx", }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", paykeyV1.Data) } ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "config": { "processing_method": "inline", "sandbox_outcome": "standard" }, "created_at": "2019-12-27T18:11:19.117Z", "label": "label", "paykey": "paykey", "source": "bank_account", "status": "pending", "updated_at": "2019-12-27T18:11:19.117Z", "balance": { "status": "pending", "account_balance": 0, "updated_at": "2019-12-27T18:11:19.117Z" }, "bank_data": { "account_number": "****1234", "account_type": "checking", "routing_number": "021000021" }, "customer_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "expires_at": "2019-12-27T18:11:19.117Z", "external_id": "external_id", "institution_name": "Bank of America", "metadata": { "foo": "string" }, "status_details": { "changed_at": "2019-12-27T18:11:19.117Z", "message": "Bank account sucesfully validated", "reason": "insufficient_funds", "source": "watchtower", "code": "code" }, "unblock_eligible": true }, "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z" }, "response_type": "object" } ``` ## Bridge a Plaid token `client.Bridge.Link.Plaid(ctx, params) (*PaykeyV1, error)` **post** `/v1/bridge/plaid` Use Bridge to create a new paykey using a Plaid token as the source. This endpoint allows you to create a secure payment token linked to a bank account authenticated through Plaid. ### Parameters - `params BridgeLinkPlaidParams` - `CustomerID param.Field[string]` Body param: Unique identifier of the related customer object. - `PlaidToken param.Field[string]` Body param: Plaid processor token generated by your application for use with the Straddle API. - `Config param.Field[BridgeLinkPlaidParamsConfig]` Body param - `ProcessingMethod string` - `const BridgeLinkPlaidParamsConfigProcessingMethodInline BridgeLinkPlaidParamsConfigProcessingMethod = "inline"` - `const BridgeLinkPlaidParamsConfigProcessingMethodBackground BridgeLinkPlaidParamsConfigProcessingMethod = "background"` - `const BridgeLinkPlaidParamsConfigProcessingMethodSkip BridgeLinkPlaidParamsConfigProcessingMethod = "skip"` - `SandboxOutcome string` - `const BridgeLinkPlaidParamsConfigSandboxOutcomeStandard BridgeLinkPlaidParamsConfigSandboxOutcome = "standard"` - `const BridgeLinkPlaidParamsConfigSandboxOutcomeActive BridgeLinkPlaidParamsConfigSandboxOutcome = "active"` - `const BridgeLinkPlaidParamsConfigSandboxOutcomeRejected BridgeLinkPlaidParamsConfigSandboxOutcome = "rejected"` - `const BridgeLinkPlaidParamsConfigSandboxOutcomeReview BridgeLinkPlaidParamsConfigSandboxOutcome = "review"` - `ExternalID param.Field[string]` Body param: Unique identifier for the paykey 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 paykey 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. - `StraddleAccountID param.Field[string]` Header param: For use by platforms to specify an account id and set scope of a request. ### Returns - `type PaykeyV1 struct{…}` - `Data PaykeyV1Data` - `ID string` Unique identifier for the paykey. - `Config PaykeyV1DataConfig` - `ProcessingMethod string` - `const PaykeyV1DataConfigProcessingMethodInline PaykeyV1DataConfigProcessingMethod = "inline"` - `const PaykeyV1DataConfigProcessingMethodBackground PaykeyV1DataConfigProcessingMethod = "background"` - `const PaykeyV1DataConfigProcessingMethodSkip PaykeyV1DataConfigProcessingMethod = "skip"` - `SandboxOutcome string` - `const PaykeyV1DataConfigSandboxOutcomeStandard PaykeyV1DataConfigSandboxOutcome = "standard"` - `const PaykeyV1DataConfigSandboxOutcomeActive PaykeyV1DataConfigSandboxOutcome = "active"` - `const PaykeyV1DataConfigSandboxOutcomeRejected PaykeyV1DataConfigSandboxOutcome = "rejected"` - `const PaykeyV1DataConfigSandboxOutcomeReview PaykeyV1DataConfigSandboxOutcome = "review"` - `CreatedAt Time` Timestamp of when the paykey was created. - `Label string` Human-readable label used to represent this paykey in a UI. - `Paykey string` The tokenized paykey value. This value is used to create payments and should be stored securely. - `Source string` - `const PaykeyV1DataSourceBankAccount PaykeyV1DataSource = "bank_account"` - `const PaykeyV1DataSourceStraddle PaykeyV1DataSource = "straddle"` - `const PaykeyV1DataSourceMx PaykeyV1DataSource = "mx"` - `const PaykeyV1DataSourcePlaid PaykeyV1DataSource = "plaid"` - `const PaykeyV1DataSourceTan PaykeyV1DataSource = "tan"` - `const PaykeyV1DataSourceQuiltt PaykeyV1DataSource = "quiltt"` - `Status string` - `const PaykeyV1DataStatusPending PaykeyV1DataStatus = "pending"` - `const PaykeyV1DataStatusActive PaykeyV1DataStatus = "active"` - `const PaykeyV1DataStatusInactive PaykeyV1DataStatus = "inactive"` - `const PaykeyV1DataStatusRejected PaykeyV1DataStatus = "rejected"` - `const PaykeyV1DataStatusReview PaykeyV1DataStatus = "review"` - `const PaykeyV1DataStatusBlocked PaykeyV1DataStatus = "blocked"` - `UpdatedAt Time` Timestamp of the most recent update to the paykey. - `Balance PaykeyV1DataBalance` - `Status string` - `const PaykeyV1DataBalanceStatusPending PaykeyV1DataBalanceStatus = "pending"` - `const PaykeyV1DataBalanceStatusCompleted PaykeyV1DataBalanceStatus = "completed"` - `const PaykeyV1DataBalanceStatusFailed PaykeyV1DataBalanceStatus = "failed"` - `AccountBalance int64` Account Balance when last retrieved - `UpdatedAt Time` Last time account balance was updated. - `BankData PaykeyV1DataBankData` - `AccountNumber string` Bank account number. This value is masked by default for security reasons. Use the /unmask endpoint to access the unmasked value. - `AccountType string` - `const PaykeyV1DataBankDataAccountTypeChecking PaykeyV1DataBankDataAccountType = "checking"` - `const PaykeyV1DataBankDataAccountTypeSavings PaykeyV1DataBankDataAccountType = "savings"` - `RoutingNumber string` The routing number of the bank account. - `CustomerID string` Unique identifier of the related customer object. - `ExpiresAt Time` Expiration date and time of the paykey, if applicable. - `ExternalID string` Unique identifier for the paykey in your database, used for cross-referencing between Straddle and your systems. - `InstitutionName string` Name of the financial institution. - `Metadata map[string, string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the paykey in a structured format. - `StatusDetails PaykeyV1DataStatusDetails` - `ChangedAt Time` The time the status change occurred. - `Message string` A human-readable description of the current status. - `Reason string` - `const PaykeyV1DataStatusDetailsReasonInsufficientFunds PaykeyV1DataStatusDetailsReason = "insufficient_funds"` - `const PaykeyV1DataStatusDetailsReasonClosedBankAccount PaykeyV1DataStatusDetailsReason = "closed_bank_account"` - `const PaykeyV1DataStatusDetailsReasonInvalidBankAccount PaykeyV1DataStatusDetailsReason = "invalid_bank_account"` - `const PaykeyV1DataStatusDetailsReasonInvalidRouting PaykeyV1DataStatusDetailsReason = "invalid_routing"` - `const PaykeyV1DataStatusDetailsReasonDisputed PaykeyV1DataStatusDetailsReason = "disputed"` - `const PaykeyV1DataStatusDetailsReasonPaymentStopped PaykeyV1DataStatusDetailsReason = "payment_stopped"` - `const PaykeyV1DataStatusDetailsReasonOwnerDeceased PaykeyV1DataStatusDetailsReason = "owner_deceased"` - `const PaykeyV1DataStatusDetailsReasonFrozenBankAccount PaykeyV1DataStatusDetailsReason = "frozen_bank_account"` - `const PaykeyV1DataStatusDetailsReasonRiskReview PaykeyV1DataStatusDetailsReason = "risk_review"` - `const PaykeyV1DataStatusDetailsReasonFraudulent PaykeyV1DataStatusDetailsReason = "fraudulent"` - `const PaykeyV1DataStatusDetailsReasonDuplicateEntry PaykeyV1DataStatusDetailsReason = "duplicate_entry"` - `const PaykeyV1DataStatusDetailsReasonInvalidPaykey PaykeyV1DataStatusDetailsReason = "invalid_paykey"` - `const PaykeyV1DataStatusDetailsReasonPaymentBlocked PaykeyV1DataStatusDetailsReason = "payment_blocked"` - `const PaykeyV1DataStatusDetailsReasonAmountTooLarge PaykeyV1DataStatusDetailsReason = "amount_too_large"` - `const PaykeyV1DataStatusDetailsReasonTooManyAttempts PaykeyV1DataStatusDetailsReason = "too_many_attempts"` - `const PaykeyV1DataStatusDetailsReasonInternalSystemError PaykeyV1DataStatusDetailsReason = "internal_system_error"` - `const PaykeyV1DataStatusDetailsReasonUserRequest PaykeyV1DataStatusDetailsReason = "user_request"` - `const PaykeyV1DataStatusDetailsReasonOk PaykeyV1DataStatusDetailsReason = "ok"` - `const PaykeyV1DataStatusDetailsReasonOtherNetworkReturn PaykeyV1DataStatusDetailsReason = "other_network_return"` - `const PaykeyV1DataStatusDetailsReasonPayoutRefused PaykeyV1DataStatusDetailsReason = "payout_refused"` - `const PaykeyV1DataStatusDetailsReasonCancelRequest PaykeyV1DataStatusDetailsReason = "cancel_request"` - `const PaykeyV1DataStatusDetailsReasonFailedVerification PaykeyV1DataStatusDetailsReason = "failed_verification"` - `const PaykeyV1DataStatusDetailsReasonRequireReview PaykeyV1DataStatusDetailsReason = "require_review"` - `const PaykeyV1DataStatusDetailsReasonBlockedBySystem PaykeyV1DataStatusDetailsReason = "blocked_by_system"` - `const PaykeyV1DataStatusDetailsReasonWatchtowerReview PaykeyV1DataStatusDetailsReason = "watchtower_review"` - `const PaykeyV1DataStatusDetailsReasonValidating PaykeyV1DataStatusDetailsReason = "validating"` - `const PaykeyV1DataStatusDetailsReasonAutoHold PaykeyV1DataStatusDetailsReason = "auto_hold"` - `Source string` - `const PaykeyV1DataStatusDetailsSourceWatchtower PaykeyV1DataStatusDetailsSource = "watchtower"` - `const PaykeyV1DataStatusDetailsSourceBankDecline PaykeyV1DataStatusDetailsSource = "bank_decline"` - `const PaykeyV1DataStatusDetailsSourceCustomerDispute PaykeyV1DataStatusDetailsSource = "customer_dispute"` - `const PaykeyV1DataStatusDetailsSourceUserAction PaykeyV1DataStatusDetailsSource = "user_action"` - `const PaykeyV1DataStatusDetailsSourceSystem PaykeyV1DataStatusDetailsSource = "system"` - `Code string` The status code if applicable. - `UnblockEligible bool` Indicates whether this paykey is eligible for client-initiated unblocking. Only present for blocked paykeys. True when blocked due to R29 returns and not previously unblocked, false otherwise. Null when paykey is not blocked. - `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 PaykeyV1ResponseType` 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 PaykeyV1ResponseTypeObject PaykeyV1ResponseType = "object"` - `const PaykeyV1ResponseTypeArray PaykeyV1ResponseType = "array"` - `const PaykeyV1ResponseTypeError PaykeyV1ResponseType = "error"` - `const PaykeyV1ResponseTypeNone PaykeyV1ResponseType = "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"), ) paykeyV1, err := client.Bridge.Link.Plaid(context.TODO(), straddle.BridgeLinkPlaidParams{ CustomerID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", PlaidToken: "plaid_token", }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", paykeyV1.Data) } ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "config": { "processing_method": "inline", "sandbox_outcome": "standard" }, "created_at": "2019-12-27T18:11:19.117Z", "label": "label", "paykey": "paykey", "source": "bank_account", "status": "pending", "updated_at": "2019-12-27T18:11:19.117Z", "balance": { "status": "pending", "account_balance": 0, "updated_at": "2019-12-27T18:11:19.117Z" }, "bank_data": { "account_number": "****1234", "account_type": "checking", "routing_number": "021000021" }, "customer_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "expires_at": "2019-12-27T18:11:19.117Z", "external_id": "external_id", "institution_name": "Bank of America", "metadata": { "foo": "string" }, "status_details": { "changed_at": "2019-12-27T18:11:19.117Z", "message": "Bank account sucesfully validated", "reason": "insufficient_funds", "source": "watchtower", "code": "code" }, "unblock_eligible": true }, "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z" }, "response_type": "object" } ``` ## Create Tan `client.Bridge.Link.NewTan(ctx, params) (*BridgeLinkNewTanResponse, error)` **post** `/v1/bridge/tan` ### Parameters - `params BridgeLinkNewTanParams` - `AccountType param.Field[BridgeLinkNewTanParamsAccountType]` Body param - `const BridgeLinkNewTanParamsAccountTypeChecking BridgeLinkNewTanParamsAccountType = "checking"` - `const BridgeLinkNewTanParamsAccountTypeSavings BridgeLinkNewTanParamsAccountType = "savings"` - `CustomerID param.Field[string]` Body param: Unique identifier of the related customer object. - `RoutingNumber param.Field[string]` Body param: Bank routing number. - `Tan param.Field[string]` Body param: Tokenized account number. - `Config param.Field[BridgeLinkNewTanParamsConfig]` Body param - `ProcessingMethod string` - `const BridgeLinkNewTanParamsConfigProcessingMethodInline BridgeLinkNewTanParamsConfigProcessingMethod = "inline"` - `const BridgeLinkNewTanParamsConfigProcessingMethodBackground BridgeLinkNewTanParamsConfigProcessingMethod = "background"` - `const BridgeLinkNewTanParamsConfigProcessingMethodSkip BridgeLinkNewTanParamsConfigProcessingMethod = "skip"` - `SandboxOutcome string` - `const BridgeLinkNewTanParamsConfigSandboxOutcomeStandard BridgeLinkNewTanParamsConfigSandboxOutcome = "standard"` - `const BridgeLinkNewTanParamsConfigSandboxOutcomeActive BridgeLinkNewTanParamsConfigSandboxOutcome = "active"` - `const BridgeLinkNewTanParamsConfigSandboxOutcomeRejected BridgeLinkNewTanParamsConfigSandboxOutcome = "rejected"` - `const BridgeLinkNewTanParamsConfigSandboxOutcomeReview BridgeLinkNewTanParamsConfigSandboxOutcome = "review"` - `ExternalID param.Field[string]` Body param: Unique identifier for the paykey 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 paykey 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. - `StraddleAccountID param.Field[string]` Header param: For use by platforms to specify an account id and set scope of a request. ### Returns - `type BridgeLinkNewTanResponse struct{…}` - `Data BridgeLinkNewTanResponseData` - `ID string` Unique identifier for the paykey. - `Config BridgeLinkNewTanResponseDataConfig` - `ProcessingMethod string` - `const BridgeLinkNewTanResponseDataConfigProcessingMethodInline BridgeLinkNewTanResponseDataConfigProcessingMethod = "inline"` - `const BridgeLinkNewTanResponseDataConfigProcessingMethodBackground BridgeLinkNewTanResponseDataConfigProcessingMethod = "background"` - `const BridgeLinkNewTanResponseDataConfigProcessingMethodSkip BridgeLinkNewTanResponseDataConfigProcessingMethod = "skip"` - `SandboxOutcome string` - `const BridgeLinkNewTanResponseDataConfigSandboxOutcomeStandard BridgeLinkNewTanResponseDataConfigSandboxOutcome = "standard"` - `const BridgeLinkNewTanResponseDataConfigSandboxOutcomeActive BridgeLinkNewTanResponseDataConfigSandboxOutcome = "active"` - `const BridgeLinkNewTanResponseDataConfigSandboxOutcomeRejected BridgeLinkNewTanResponseDataConfigSandboxOutcome = "rejected"` - `const BridgeLinkNewTanResponseDataConfigSandboxOutcomeReview BridgeLinkNewTanResponseDataConfigSandboxOutcome = "review"` - `CreatedAt Time` Timestamp of when the paykey was created. - `Label string` Human-readable label that combines the bank name and masked account number to help easility represent this paykey in a UI - `Paykey string` The tokenized paykey value. This token is used to create payments and should be stored securely. - `Source string` - `const BridgeLinkNewTanResponseDataSourceBankAccount BridgeLinkNewTanResponseDataSource = "bank_account"` - `const BridgeLinkNewTanResponseDataSourceStraddle BridgeLinkNewTanResponseDataSource = "straddle"` - `const BridgeLinkNewTanResponseDataSourceMx BridgeLinkNewTanResponseDataSource = "mx"` - `const BridgeLinkNewTanResponseDataSourcePlaid BridgeLinkNewTanResponseDataSource = "plaid"` - `const BridgeLinkNewTanResponseDataSourceTan BridgeLinkNewTanResponseDataSource = "tan"` - `const BridgeLinkNewTanResponseDataSourceQuiltt BridgeLinkNewTanResponseDataSource = "quiltt"` - `Status string` - `const BridgeLinkNewTanResponseDataStatusPending BridgeLinkNewTanResponseDataStatus = "pending"` - `const BridgeLinkNewTanResponseDataStatusActive BridgeLinkNewTanResponseDataStatus = "active"` - `const BridgeLinkNewTanResponseDataStatusInactive BridgeLinkNewTanResponseDataStatus = "inactive"` - `const BridgeLinkNewTanResponseDataStatusRejected BridgeLinkNewTanResponseDataStatus = "rejected"` - `const BridgeLinkNewTanResponseDataStatusReview BridgeLinkNewTanResponseDataStatus = "review"` - `const BridgeLinkNewTanResponseDataStatusBlocked BridgeLinkNewTanResponseDataStatus = "blocked"` - `UpdatedAt Time` Timestamp of the most recent update to the paykey. - `Balance BridgeLinkNewTanResponseDataBalance` - `Status string` - `const BridgeLinkNewTanResponseDataBalanceStatusPending BridgeLinkNewTanResponseDataBalanceStatus = "pending"` - `const BridgeLinkNewTanResponseDataBalanceStatusCompleted BridgeLinkNewTanResponseDataBalanceStatus = "completed"` - `const BridgeLinkNewTanResponseDataBalanceStatusFailed BridgeLinkNewTanResponseDataBalanceStatus = "failed"` - `AccountBalance int64` Account Balance when last retrieved - `UpdatedAt Time` Last time account balance was updated. - `BankData BridgeLinkNewTanResponseDataBankData` - `AccountNumber string` Bank account number. This value is masked by default for security reasons. Use the /unmask endpoint to access the unmasked value. - `AccountType string` - `const BridgeLinkNewTanResponseDataBankDataAccountTypeChecking BridgeLinkNewTanResponseDataBankDataAccountType = "checking"` - `const BridgeLinkNewTanResponseDataBankDataAccountTypeSavings BridgeLinkNewTanResponseDataBankDataAccountType = "savings"` - `RoutingNumber string` The routing number of the bank account. - `CustomerID string` Unique identifier of the related customer object. - `ExpiresAt Time` Expiration date and time of the paykey, if applicable. - `ExternalID string` Unique identifier for the paykey in your database, used for cross-referencing between Straddle and your systems. - `InstitutionName string` Name of the financial institution. - `Metadata map[string, string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the paykey in a structured format. - `StatusDetails BridgeLinkNewTanResponseDataStatusDetails` - `ChangedAt Time` The time the status change occurred. - `Message string` A human-readable description of the current status. - `Reason string` - `const BridgeLinkNewTanResponseDataStatusDetailsReasonInsufficientFunds BridgeLinkNewTanResponseDataStatusDetailsReason = "insufficient_funds"` - `const BridgeLinkNewTanResponseDataStatusDetailsReasonClosedBankAccount BridgeLinkNewTanResponseDataStatusDetailsReason = "closed_bank_account"` - `const BridgeLinkNewTanResponseDataStatusDetailsReasonInvalidBankAccount BridgeLinkNewTanResponseDataStatusDetailsReason = "invalid_bank_account"` - `const BridgeLinkNewTanResponseDataStatusDetailsReasonInvalidRouting BridgeLinkNewTanResponseDataStatusDetailsReason = "invalid_routing"` - `const BridgeLinkNewTanResponseDataStatusDetailsReasonDisputed BridgeLinkNewTanResponseDataStatusDetailsReason = "disputed"` - `const BridgeLinkNewTanResponseDataStatusDetailsReasonPaymentStopped BridgeLinkNewTanResponseDataStatusDetailsReason = "payment_stopped"` - `const BridgeLinkNewTanResponseDataStatusDetailsReasonOwnerDeceased BridgeLinkNewTanResponseDataStatusDetailsReason = "owner_deceased"` - `const BridgeLinkNewTanResponseDataStatusDetailsReasonFrozenBankAccount BridgeLinkNewTanResponseDataStatusDetailsReason = "frozen_bank_account"` - `const BridgeLinkNewTanResponseDataStatusDetailsReasonRiskReview BridgeLinkNewTanResponseDataStatusDetailsReason = "risk_review"` - `const BridgeLinkNewTanResponseDataStatusDetailsReasonFraudulent BridgeLinkNewTanResponseDataStatusDetailsReason = "fraudulent"` - `const BridgeLinkNewTanResponseDataStatusDetailsReasonDuplicateEntry BridgeLinkNewTanResponseDataStatusDetailsReason = "duplicate_entry"` - `const BridgeLinkNewTanResponseDataStatusDetailsReasonInvalidPaykey BridgeLinkNewTanResponseDataStatusDetailsReason = "invalid_paykey"` - `const BridgeLinkNewTanResponseDataStatusDetailsReasonPaymentBlocked BridgeLinkNewTanResponseDataStatusDetailsReason = "payment_blocked"` - `const BridgeLinkNewTanResponseDataStatusDetailsReasonAmountTooLarge BridgeLinkNewTanResponseDataStatusDetailsReason = "amount_too_large"` - `const BridgeLinkNewTanResponseDataStatusDetailsReasonTooManyAttempts BridgeLinkNewTanResponseDataStatusDetailsReason = "too_many_attempts"` - `const BridgeLinkNewTanResponseDataStatusDetailsReasonInternalSystemError BridgeLinkNewTanResponseDataStatusDetailsReason = "internal_system_error"` - `const BridgeLinkNewTanResponseDataStatusDetailsReasonUserRequest BridgeLinkNewTanResponseDataStatusDetailsReason = "user_request"` - `const BridgeLinkNewTanResponseDataStatusDetailsReasonOk BridgeLinkNewTanResponseDataStatusDetailsReason = "ok"` - `const BridgeLinkNewTanResponseDataStatusDetailsReasonOtherNetworkReturn BridgeLinkNewTanResponseDataStatusDetailsReason = "other_network_return"` - `const BridgeLinkNewTanResponseDataStatusDetailsReasonPayoutRefused BridgeLinkNewTanResponseDataStatusDetailsReason = "payout_refused"` - `const BridgeLinkNewTanResponseDataStatusDetailsReasonCancelRequest BridgeLinkNewTanResponseDataStatusDetailsReason = "cancel_request"` - `const BridgeLinkNewTanResponseDataStatusDetailsReasonFailedVerification BridgeLinkNewTanResponseDataStatusDetailsReason = "failed_verification"` - `const BridgeLinkNewTanResponseDataStatusDetailsReasonRequireReview BridgeLinkNewTanResponseDataStatusDetailsReason = "require_review"` - `const BridgeLinkNewTanResponseDataStatusDetailsReasonBlockedBySystem BridgeLinkNewTanResponseDataStatusDetailsReason = "blocked_by_system"` - `const BridgeLinkNewTanResponseDataStatusDetailsReasonWatchtowerReview BridgeLinkNewTanResponseDataStatusDetailsReason = "watchtower_review"` - `const BridgeLinkNewTanResponseDataStatusDetailsReasonValidating BridgeLinkNewTanResponseDataStatusDetailsReason = "validating"` - `const BridgeLinkNewTanResponseDataStatusDetailsReasonAutoHold BridgeLinkNewTanResponseDataStatusDetailsReason = "auto_hold"` - `Source string` - `const BridgeLinkNewTanResponseDataStatusDetailsSourceWatchtower BridgeLinkNewTanResponseDataStatusDetailsSource = "watchtower"` - `const BridgeLinkNewTanResponseDataStatusDetailsSourceBankDecline BridgeLinkNewTanResponseDataStatusDetailsSource = "bank_decline"` - `const BridgeLinkNewTanResponseDataStatusDetailsSourceCustomerDispute BridgeLinkNewTanResponseDataStatusDetailsSource = "customer_dispute"` - `const BridgeLinkNewTanResponseDataStatusDetailsSourceUserAction BridgeLinkNewTanResponseDataStatusDetailsSource = "user_action"` - `const BridgeLinkNewTanResponseDataStatusDetailsSourceSystem BridgeLinkNewTanResponseDataStatusDetailsSource = "system"` - `Code string` The status code 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 BridgeLinkNewTanResponseResponseType` 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 BridgeLinkNewTanResponseResponseTypeObject BridgeLinkNewTanResponseResponseType = "object"` - `const BridgeLinkNewTanResponseResponseTypeArray BridgeLinkNewTanResponseResponseType = "array"` - `const BridgeLinkNewTanResponseResponseTypeError BridgeLinkNewTanResponseResponseType = "error"` - `const BridgeLinkNewTanResponseResponseTypeNone BridgeLinkNewTanResponseResponseType = "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"), ) response, err := client.Bridge.Link.NewTan(context.TODO(), straddle.BridgeLinkNewTanParams{ AccountType: straddle.BridgeLinkNewTanParamsAccountTypeChecking, CustomerID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", RoutingNumber: "routing_number", Tan: "tan", }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "config": { "processing_method": "inline", "sandbox_outcome": "standard" }, "created_at": "2019-12-27T18:11:19.117Z", "label": "Bank of America ****1234", "paykey": "paykey", "source": "straddle", "status": "pending", "updated_at": "2019-12-27T18:11:19.117Z", "balance": { "status": "pending", "account_balance": 0, "updated_at": "2019-12-27T18:11:19.117Z" }, "bank_data": { "account_number": "****1234", "account_type": "checking", "routing_number": "021000021" }, "customer_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "expires_at": "2019-12-27T18:11:19.117Z", "external_id": "external_id", "institution_name": "Bank of America", "metadata": { "foo": "string" }, "status_details": { "changed_at": "2019-12-27T18:11:19.117Z", "message": "Bank account sucesfully validated", "reason": "insufficient_funds", "source": "watchtower", "code": "code" } }, "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z" }, "response_type": "object" } ``` ## Create a paykey from a Quiltt token `client.Bridge.Link.NewPaykey(ctx, params) (*BridgeLinkNewPaykeyResponse, error)` **post** `/v1/bridge/quiltt` Creates a new paykey using a Quiltt token as the source. This endpoint allows you to create a secure payment token linked to a bank account authenticated through Quiltt. ### Parameters - `params BridgeLinkNewPaykeyParams` - `CustomerID param.Field[string]` Body param: Unique identifier of the related customer object. - `QuilttToken param.Field[string]` Body param: Quiltt processor token generated by your application for use with the Straddle API. - `Config param.Field[BridgeLinkNewPaykeyParamsConfig]` Body param - `ProcessingMethod string` - `const BridgeLinkNewPaykeyParamsConfigProcessingMethodInline BridgeLinkNewPaykeyParamsConfigProcessingMethod = "inline"` - `const BridgeLinkNewPaykeyParamsConfigProcessingMethodBackground BridgeLinkNewPaykeyParamsConfigProcessingMethod = "background"` - `const BridgeLinkNewPaykeyParamsConfigProcessingMethodSkip BridgeLinkNewPaykeyParamsConfigProcessingMethod = "skip"` - `SandboxOutcome string` - `const BridgeLinkNewPaykeyParamsConfigSandboxOutcomeStandard BridgeLinkNewPaykeyParamsConfigSandboxOutcome = "standard"` - `const BridgeLinkNewPaykeyParamsConfigSandboxOutcomeActive BridgeLinkNewPaykeyParamsConfigSandboxOutcome = "active"` - `const BridgeLinkNewPaykeyParamsConfigSandboxOutcomeRejected BridgeLinkNewPaykeyParamsConfigSandboxOutcome = "rejected"` - `const BridgeLinkNewPaykeyParamsConfigSandboxOutcomeReview BridgeLinkNewPaykeyParamsConfigSandboxOutcome = "review"` - `ExternalID param.Field[string]` Body param: Unique identifier for the paykey 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 paykey 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. - `StraddleAccountID param.Field[string]` Header param: For use by platforms to specify an account id and set scope of a request. ### Returns - `type BridgeLinkNewPaykeyResponse struct{…}` - `Data BridgeLinkNewPaykeyResponseData` - `ID string` Unique identifier for the paykey. - `Config BridgeLinkNewPaykeyResponseDataConfig` - `ProcessingMethod string` - `const BridgeLinkNewPaykeyResponseDataConfigProcessingMethodInline BridgeLinkNewPaykeyResponseDataConfigProcessingMethod = "inline"` - `const BridgeLinkNewPaykeyResponseDataConfigProcessingMethodBackground BridgeLinkNewPaykeyResponseDataConfigProcessingMethod = "background"` - `const BridgeLinkNewPaykeyResponseDataConfigProcessingMethodSkip BridgeLinkNewPaykeyResponseDataConfigProcessingMethod = "skip"` - `SandboxOutcome string` - `const BridgeLinkNewPaykeyResponseDataConfigSandboxOutcomeStandard BridgeLinkNewPaykeyResponseDataConfigSandboxOutcome = "standard"` - `const BridgeLinkNewPaykeyResponseDataConfigSandboxOutcomeActive BridgeLinkNewPaykeyResponseDataConfigSandboxOutcome = "active"` - `const BridgeLinkNewPaykeyResponseDataConfigSandboxOutcomeRejected BridgeLinkNewPaykeyResponseDataConfigSandboxOutcome = "rejected"` - `const BridgeLinkNewPaykeyResponseDataConfigSandboxOutcomeReview BridgeLinkNewPaykeyResponseDataConfigSandboxOutcome = "review"` - `CreatedAt Time` Timestamp of when the paykey was created. - `Label string` Human-readable label that combines the bank name and masked account number to help easility represent this paykey in a UI - `Paykey string` The tokenized paykey value. This token is used to create payments and should be stored securely. - `Source string` - `const BridgeLinkNewPaykeyResponseDataSourceBankAccount BridgeLinkNewPaykeyResponseDataSource = "bank_account"` - `const BridgeLinkNewPaykeyResponseDataSourceStraddle BridgeLinkNewPaykeyResponseDataSource = "straddle"` - `const BridgeLinkNewPaykeyResponseDataSourceMx BridgeLinkNewPaykeyResponseDataSource = "mx"` - `const BridgeLinkNewPaykeyResponseDataSourcePlaid BridgeLinkNewPaykeyResponseDataSource = "plaid"` - `const BridgeLinkNewPaykeyResponseDataSourceTan BridgeLinkNewPaykeyResponseDataSource = "tan"` - `const BridgeLinkNewPaykeyResponseDataSourceQuiltt BridgeLinkNewPaykeyResponseDataSource = "quiltt"` - `Status string` - `const BridgeLinkNewPaykeyResponseDataStatusPending BridgeLinkNewPaykeyResponseDataStatus = "pending"` - `const BridgeLinkNewPaykeyResponseDataStatusActive BridgeLinkNewPaykeyResponseDataStatus = "active"` - `const BridgeLinkNewPaykeyResponseDataStatusInactive BridgeLinkNewPaykeyResponseDataStatus = "inactive"` - `const BridgeLinkNewPaykeyResponseDataStatusRejected BridgeLinkNewPaykeyResponseDataStatus = "rejected"` - `const BridgeLinkNewPaykeyResponseDataStatusReview BridgeLinkNewPaykeyResponseDataStatus = "review"` - `const BridgeLinkNewPaykeyResponseDataStatusBlocked BridgeLinkNewPaykeyResponseDataStatus = "blocked"` - `UpdatedAt Time` Timestamp of the most recent update to the paykey. - `Balance BridgeLinkNewPaykeyResponseDataBalance` - `Status string` - `const BridgeLinkNewPaykeyResponseDataBalanceStatusPending BridgeLinkNewPaykeyResponseDataBalanceStatus = "pending"` - `const BridgeLinkNewPaykeyResponseDataBalanceStatusCompleted BridgeLinkNewPaykeyResponseDataBalanceStatus = "completed"` - `const BridgeLinkNewPaykeyResponseDataBalanceStatusFailed BridgeLinkNewPaykeyResponseDataBalanceStatus = "failed"` - `AccountBalance int64` Account Balance when last retrieved - `UpdatedAt Time` Last time account balance was updated. - `BankData BridgeLinkNewPaykeyResponseDataBankData` - `AccountNumber string` Bank account number. This value is masked by default for security reasons. Use the /unmask endpoint to access the unmasked value. - `AccountType string` - `const BridgeLinkNewPaykeyResponseDataBankDataAccountTypeChecking BridgeLinkNewPaykeyResponseDataBankDataAccountType = "checking"` - `const BridgeLinkNewPaykeyResponseDataBankDataAccountTypeSavings BridgeLinkNewPaykeyResponseDataBankDataAccountType = "savings"` - `RoutingNumber string` The routing number of the bank account. - `CustomerID string` Unique identifier of the related customer object. - `ExpiresAt Time` Expiration date and time of the paykey, if applicable. - `ExternalID string` Unique identifier for the paykey in your database, used for cross-referencing between Straddle and your systems. - `InstitutionName string` Name of the financial institution. - `Metadata map[string, string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the paykey in a structured format. - `StatusDetails BridgeLinkNewPaykeyResponseDataStatusDetails` - `ChangedAt Time` The time the status change occurred. - `Message string` A human-readable description of the current status. - `Reason string` - `const BridgeLinkNewPaykeyResponseDataStatusDetailsReasonInsufficientFunds BridgeLinkNewPaykeyResponseDataStatusDetailsReason = "insufficient_funds"` - `const BridgeLinkNewPaykeyResponseDataStatusDetailsReasonClosedBankAccount BridgeLinkNewPaykeyResponseDataStatusDetailsReason = "closed_bank_account"` - `const BridgeLinkNewPaykeyResponseDataStatusDetailsReasonInvalidBankAccount BridgeLinkNewPaykeyResponseDataStatusDetailsReason = "invalid_bank_account"` - `const BridgeLinkNewPaykeyResponseDataStatusDetailsReasonInvalidRouting BridgeLinkNewPaykeyResponseDataStatusDetailsReason = "invalid_routing"` - `const BridgeLinkNewPaykeyResponseDataStatusDetailsReasonDisputed BridgeLinkNewPaykeyResponseDataStatusDetailsReason = "disputed"` - `const BridgeLinkNewPaykeyResponseDataStatusDetailsReasonPaymentStopped BridgeLinkNewPaykeyResponseDataStatusDetailsReason = "payment_stopped"` - `const BridgeLinkNewPaykeyResponseDataStatusDetailsReasonOwnerDeceased BridgeLinkNewPaykeyResponseDataStatusDetailsReason = "owner_deceased"` - `const BridgeLinkNewPaykeyResponseDataStatusDetailsReasonFrozenBankAccount BridgeLinkNewPaykeyResponseDataStatusDetailsReason = "frozen_bank_account"` - `const BridgeLinkNewPaykeyResponseDataStatusDetailsReasonRiskReview BridgeLinkNewPaykeyResponseDataStatusDetailsReason = "risk_review"` - `const BridgeLinkNewPaykeyResponseDataStatusDetailsReasonFraudulent BridgeLinkNewPaykeyResponseDataStatusDetailsReason = "fraudulent"` - `const BridgeLinkNewPaykeyResponseDataStatusDetailsReasonDuplicateEntry BridgeLinkNewPaykeyResponseDataStatusDetailsReason = "duplicate_entry"` - `const BridgeLinkNewPaykeyResponseDataStatusDetailsReasonInvalidPaykey BridgeLinkNewPaykeyResponseDataStatusDetailsReason = "invalid_paykey"` - `const BridgeLinkNewPaykeyResponseDataStatusDetailsReasonPaymentBlocked BridgeLinkNewPaykeyResponseDataStatusDetailsReason = "payment_blocked"` - `const BridgeLinkNewPaykeyResponseDataStatusDetailsReasonAmountTooLarge BridgeLinkNewPaykeyResponseDataStatusDetailsReason = "amount_too_large"` - `const BridgeLinkNewPaykeyResponseDataStatusDetailsReasonTooManyAttempts BridgeLinkNewPaykeyResponseDataStatusDetailsReason = "too_many_attempts"` - `const BridgeLinkNewPaykeyResponseDataStatusDetailsReasonInternalSystemError BridgeLinkNewPaykeyResponseDataStatusDetailsReason = "internal_system_error"` - `const BridgeLinkNewPaykeyResponseDataStatusDetailsReasonUserRequest BridgeLinkNewPaykeyResponseDataStatusDetailsReason = "user_request"` - `const BridgeLinkNewPaykeyResponseDataStatusDetailsReasonOk BridgeLinkNewPaykeyResponseDataStatusDetailsReason = "ok"` - `const BridgeLinkNewPaykeyResponseDataStatusDetailsReasonOtherNetworkReturn BridgeLinkNewPaykeyResponseDataStatusDetailsReason = "other_network_return"` - `const BridgeLinkNewPaykeyResponseDataStatusDetailsReasonPayoutRefused BridgeLinkNewPaykeyResponseDataStatusDetailsReason = "payout_refused"` - `const BridgeLinkNewPaykeyResponseDataStatusDetailsReasonCancelRequest BridgeLinkNewPaykeyResponseDataStatusDetailsReason = "cancel_request"` - `const BridgeLinkNewPaykeyResponseDataStatusDetailsReasonFailedVerification BridgeLinkNewPaykeyResponseDataStatusDetailsReason = "failed_verification"` - `const BridgeLinkNewPaykeyResponseDataStatusDetailsReasonRequireReview BridgeLinkNewPaykeyResponseDataStatusDetailsReason = "require_review"` - `const BridgeLinkNewPaykeyResponseDataStatusDetailsReasonBlockedBySystem BridgeLinkNewPaykeyResponseDataStatusDetailsReason = "blocked_by_system"` - `const BridgeLinkNewPaykeyResponseDataStatusDetailsReasonWatchtowerReview BridgeLinkNewPaykeyResponseDataStatusDetailsReason = "watchtower_review"` - `const BridgeLinkNewPaykeyResponseDataStatusDetailsReasonValidating BridgeLinkNewPaykeyResponseDataStatusDetailsReason = "validating"` - `const BridgeLinkNewPaykeyResponseDataStatusDetailsReasonAutoHold BridgeLinkNewPaykeyResponseDataStatusDetailsReason = "auto_hold"` - `Source string` - `const BridgeLinkNewPaykeyResponseDataStatusDetailsSourceWatchtower BridgeLinkNewPaykeyResponseDataStatusDetailsSource = "watchtower"` - `const BridgeLinkNewPaykeyResponseDataStatusDetailsSourceBankDecline BridgeLinkNewPaykeyResponseDataStatusDetailsSource = "bank_decline"` - `const BridgeLinkNewPaykeyResponseDataStatusDetailsSourceCustomerDispute BridgeLinkNewPaykeyResponseDataStatusDetailsSource = "customer_dispute"` - `const BridgeLinkNewPaykeyResponseDataStatusDetailsSourceUserAction BridgeLinkNewPaykeyResponseDataStatusDetailsSource = "user_action"` - `const BridgeLinkNewPaykeyResponseDataStatusDetailsSourceSystem BridgeLinkNewPaykeyResponseDataStatusDetailsSource = "system"` - `Code string` The status code 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 BridgeLinkNewPaykeyResponseResponseType` 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 BridgeLinkNewPaykeyResponseResponseTypeObject BridgeLinkNewPaykeyResponseResponseType = "object"` - `const BridgeLinkNewPaykeyResponseResponseTypeArray BridgeLinkNewPaykeyResponseResponseType = "array"` - `const BridgeLinkNewPaykeyResponseResponseTypeError BridgeLinkNewPaykeyResponseResponseType = "error"` - `const BridgeLinkNewPaykeyResponseResponseTypeNone BridgeLinkNewPaykeyResponseResponseType = "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"), ) response, err := client.Bridge.Link.NewPaykey(context.TODO(), straddle.BridgeLinkNewPaykeyParams{ CustomerID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", QuilttToken: "quiltt_token", }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "config": { "processing_method": "inline", "sandbox_outcome": "standard" }, "created_at": "2019-12-27T18:11:19.117Z", "label": "Bank of America ****1234", "paykey": "paykey", "source": "straddle", "status": "pending", "updated_at": "2019-12-27T18:11:19.117Z", "balance": { "status": "pending", "account_balance": 0, "updated_at": "2019-12-27T18:11:19.117Z" }, "bank_data": { "account_number": "****1234", "account_type": "checking", "routing_number": "021000021" }, "customer_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "expires_at": "2019-12-27T18:11:19.117Z", "external_id": "external_id", "institution_name": "Bank of America", "metadata": { "foo": "string" }, "status_details": { "changed_at": "2019-12-27T18:11:19.117Z", "message": "Bank account sucesfully validated", "reason": "insufficient_funds", "source": "watchtower", "code": "code" } }, "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z" }, "response_type": "object" } ```