# Bridge ## Create a Widget session token `BridgeTokenV1 Bridge.Initialize(BridgeInitializeParamsparameters, CancellationTokencancellationToken = default)` **post** `/v1/bridge/initialize` Use this endpoint to generate a session token for use in the Bridge widget. ### Parameters - `BridgeInitializeParams parameters` - `required string customerID` Body param: The Straddle generated unique identifier of the `customer` to create a bridge token for. - `Config config` Body param - `ProcessingMethod ProcessingMethod` - `"inline"Inline` - `"background"Background` - `"skip"Skip` - `SandboxOutcome SandboxOutcome` - `"standard"Standard` - `"active"Active` - `"rejected"Rejected` - `"review"Review` - `string? externalID` Body param: Unique identifier for the paykey in your database, used for cross-referencing between Straddle and your systems. - `string correlationID` Header param: Optional client generated identifier to trace and debug a series of requests. - `string idempotencyKey` Header param: Optional client generated value to use for idempotent requests. - `string requestID` Header param: Optional client generated identifier to trace and debug a request. - `string straddleAccountID` Header param: For use by platforms to specify an account id and set scope of a request. ### Returns - `class BridgeTokenV1:` - `required Data Data` - `required string BridgeToken` JWT Token to use in the bridge widget. - `required ResponseMetadata Meta` Metadata about the API request, including an identifier and timestamp. - `required string ApiRequestID` Unique identifier for this API request, useful for troubleshooting. - `required DateTimeOffset ApiRequestTimestamp` Timestamp for this API request, useful for troubleshooting. - `required ResponseType ResponseType` 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. - `"object"Object` - `"array"Array` - `"error"Error` - `"none"None` ### Example ```csharp BridgeInitializeParams parameters = new() { CustomerID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" }; var bridgeTokenV1 = await client.Bridge.Initialize(parameters); Console.WriteLine(bridgeTokenV1); ``` #### Response ```json { "data": { "bridge_token": "bridge_token" }, "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z" }, "response_type": "object" } ``` ## Domain Types ### Bridge Token V1 - `class BridgeTokenV1:` - `required Data Data` - `required string BridgeToken` JWT Token to use in the bridge widget. - `required ResponseMetadata Meta` Metadata about the API request, including an identifier and timestamp. - `required string ApiRequestID` Unique identifier for this API request, useful for troubleshooting. - `required DateTimeOffset ApiRequestTimestamp` Timestamp for this API request, useful for troubleshooting. - `required ResponseType ResponseType` 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. - `"object"Object` - `"array"Array` - `"error"Error` - `"none"None` # Link ## Bridge a bank account `PaykeyV1 Bridge.Link.BankAccount(LinkBankAccountParamsparameters, CancellationTokencancellationToken = default)` **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 - `LinkBankAccountParams parameters` - `required string accountNumber` Body param: The bank account number. - `required AccountType accountType` Body param - `"checking"Checking` - `"savings"Savings` - `required string customerID` Body param: Unique identifier of the related customer object. - `required string routingNumber` Body param: The routing number of the bank account. - `Config config` Body param - `ProcessingMethod ProcessingMethod` - `"inline"Inline` - `"background"Background` - `"skip"Skip` - `SandboxOutcome SandboxOutcome` - `"standard"Standard` - `"active"Active` - `"rejected"Rejected` - `"review"Review` - `string? externalID` Body param: Unique identifier for the paykey in your database, used for cross-referencing between Straddle and your systems. - `IReadOnlyDictionary? metadata` Body param: Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the paykey in a structured format. - `string correlationID` Header param: Optional client generated identifier to trace and debug a series of requests. - `string idempotencyKey` Header param: Optional client generated value to use for idempotent requests. - `string requestID` Header param: Optional client generated identifier to trace and debug a request. - `string straddleAccountID` Header param: For use by platforms to specify an account id and set scope of a request. ### Returns - `class PaykeyV1:` - `required Data Data` - `required string ID` Unique identifier for the paykey. - `required Config Config` - `ProcessingMethod ProcessingMethod` - `"inline"Inline` - `"background"Background` - `"skip"Skip` - `SandboxOutcome SandboxOutcome` - `"standard"Standard` - `"active"Active` - `"rejected"Rejected` - `"review"Review` - `required DateTimeOffset CreatedAt` Timestamp of when the paykey was created. - `required string Label` Human-readable label used to represent this paykey in a UI. - `required string Paykey` The tokenized paykey value. This value is used to create payments and should be stored securely. - `required Source Source` - `"bank_account"BankAccount` - `"straddle"Straddle` - `"mx"Mx` - `"plaid"Plaid` - `"tan"Tan` - `"quiltt"Quiltt` - `required Status Status` - `"pending"Pending` - `"active"Active` - `"inactive"Inactive` - `"rejected"Rejected` - `"review"Review` - `"blocked"Blocked` - `required DateTimeOffset UpdatedAt` Timestamp of the most recent update to the paykey. - `Balance Balance` - `required Status Status` - `"pending"Pending` - `"completed"Completed` - `"failed"Failed` - `Int? AccountBalance` Account Balance when last retrieved - `DateTimeOffset? UpdatedAt` Last time account balance was updated. - `BankData BankData` - `required string AccountNumber` Bank account number. This value is masked by default for security reasons. Use the /unmask endpoint to access the unmasked value. - `required AccountType AccountType` - `"checking"Checking` - `"savings"Savings` - `required string RoutingNumber` The routing number of the bank account. - `string? CustomerID` Unique identifier of the related customer object. - `DateTimeOffset? ExpiresAt` Expiration date and time of the paykey, if applicable. - `string? ExternalID` Unique identifier for the paykey in your database, used for cross-referencing between Straddle and your systems. - `string? InstitutionName` Name of the financial institution. - `IReadOnlyDictionary? Metadata` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the paykey in a structured format. - `StatusDetails StatusDetails` - `required DateTimeOffset ChangedAt` The time the status change occurred. - `required string Message` A human-readable description of the current status. - `required Reason Reason` - `"insufficient_funds"InsufficientFunds` - `"closed_bank_account"ClosedBankAccount` - `"invalid_bank_account"InvalidBankAccount` - `"invalid_routing"InvalidRouting` - `"disputed"Disputed` - `"payment_stopped"PaymentStopped` - `"owner_deceased"OwnerDeceased` - `"frozen_bank_account"FrozenBankAccount` - `"risk_review"RiskReview` - `"fraudulent"Fraudulent` - `"duplicate_entry"DuplicateEntry` - `"invalid_paykey"InvalidPaykey` - `"payment_blocked"PaymentBlocked` - `"amount_too_large"AmountTooLarge` - `"too_many_attempts"TooManyAttempts` - `"internal_system_error"InternalSystemError` - `"user_request"UserRequest` - `"ok"Ok` - `"other_network_return"OtherNetworkReturn` - `"payout_refused"PayoutRefused` - `"cancel_request"CancelRequest` - `"failed_verification"FailedVerification` - `"require_review"RequireReview` - `"blocked_by_system"BlockedBySystem` - `"watchtower_review"WatchtowerReview` - `"validating"Validating` - `"auto_hold"AutoHold` - `required Source Source` - `"watchtower"Watchtower` - `"bank_decline"BankDecline` - `"customer_dispute"CustomerDispute` - `"user_action"UserAction` - `"system"System` - `string? Code` The status code if applicable. - `Boolean? UnblockEligible` 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. - `required ResponseMetadata Meta` Metadata about the API request, including an identifier and timestamp. - `required string ApiRequestID` Unique identifier for this API request, useful for troubleshooting. - `required DateTimeOffset ApiRequestTimestamp` Timestamp for this API request, useful for troubleshooting. - `required ResponseType ResponseType` 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. - `"object"Object` - `"array"Array` - `"error"Error` - `"none"None` ### Example ```csharp LinkBankAccountParams parameters = new() { AccountNumber = "account_number", AccountType = AccountType.Checking, CustomerID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", RoutingNumber = "xxxxxxxxx", }; var paykeyV1 = await client.Bridge.Link.BankAccount(parameters); Console.WriteLine(paykeyV1); ``` #### 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 `PaykeyV1 Bridge.Link.Plaid(LinkPlaidParamsparameters, CancellationTokencancellationToken = default)` **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 - `LinkPlaidParams parameters` - `required string customerID` Body param: Unique identifier of the related customer object. - `required string plaidToken` Body param: Plaid processor token generated by your application for use with the Straddle API. - `Config config` Body param - `ProcessingMethod ProcessingMethod` - `"inline"Inline` - `"background"Background` - `"skip"Skip` - `SandboxOutcome SandboxOutcome` - `"standard"Standard` - `"active"Active` - `"rejected"Rejected` - `"review"Review` - `string? externalID` Body param: Unique identifier for the paykey in your database, used for cross-referencing between Straddle and your systems. - `IReadOnlyDictionary? metadata` Body param: Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the paykey in a structured format. - `string correlationID` Header param: Optional client generated identifier to trace and debug a series of requests. - `string idempotencyKey` Header param: Optional client generated value to use for idempotent requests. - `string requestID` Header param: Optional client generated identifier to trace and debug a request. - `string straddleAccountID` Header param: For use by platforms to specify an account id and set scope of a request. ### Returns - `class PaykeyV1:` - `required Data Data` - `required string ID` Unique identifier for the paykey. - `required Config Config` - `ProcessingMethod ProcessingMethod` - `"inline"Inline` - `"background"Background` - `"skip"Skip` - `SandboxOutcome SandboxOutcome` - `"standard"Standard` - `"active"Active` - `"rejected"Rejected` - `"review"Review` - `required DateTimeOffset CreatedAt` Timestamp of when the paykey was created. - `required string Label` Human-readable label used to represent this paykey in a UI. - `required string Paykey` The tokenized paykey value. This value is used to create payments and should be stored securely. - `required Source Source` - `"bank_account"BankAccount` - `"straddle"Straddle` - `"mx"Mx` - `"plaid"Plaid` - `"tan"Tan` - `"quiltt"Quiltt` - `required Status Status` - `"pending"Pending` - `"active"Active` - `"inactive"Inactive` - `"rejected"Rejected` - `"review"Review` - `"blocked"Blocked` - `required DateTimeOffset UpdatedAt` Timestamp of the most recent update to the paykey. - `Balance Balance` - `required Status Status` - `"pending"Pending` - `"completed"Completed` - `"failed"Failed` - `Int? AccountBalance` Account Balance when last retrieved - `DateTimeOffset? UpdatedAt` Last time account balance was updated. - `BankData BankData` - `required string AccountNumber` Bank account number. This value is masked by default for security reasons. Use the /unmask endpoint to access the unmasked value. - `required AccountType AccountType` - `"checking"Checking` - `"savings"Savings` - `required string RoutingNumber` The routing number of the bank account. - `string? CustomerID` Unique identifier of the related customer object. - `DateTimeOffset? ExpiresAt` Expiration date and time of the paykey, if applicable. - `string? ExternalID` Unique identifier for the paykey in your database, used for cross-referencing between Straddle and your systems. - `string? InstitutionName` Name of the financial institution. - `IReadOnlyDictionary? Metadata` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the paykey in a structured format. - `StatusDetails StatusDetails` - `required DateTimeOffset ChangedAt` The time the status change occurred. - `required string Message` A human-readable description of the current status. - `required Reason Reason` - `"insufficient_funds"InsufficientFunds` - `"closed_bank_account"ClosedBankAccount` - `"invalid_bank_account"InvalidBankAccount` - `"invalid_routing"InvalidRouting` - `"disputed"Disputed` - `"payment_stopped"PaymentStopped` - `"owner_deceased"OwnerDeceased` - `"frozen_bank_account"FrozenBankAccount` - `"risk_review"RiskReview` - `"fraudulent"Fraudulent` - `"duplicate_entry"DuplicateEntry` - `"invalid_paykey"InvalidPaykey` - `"payment_blocked"PaymentBlocked` - `"amount_too_large"AmountTooLarge` - `"too_many_attempts"TooManyAttempts` - `"internal_system_error"InternalSystemError` - `"user_request"UserRequest` - `"ok"Ok` - `"other_network_return"OtherNetworkReturn` - `"payout_refused"PayoutRefused` - `"cancel_request"CancelRequest` - `"failed_verification"FailedVerification` - `"require_review"RequireReview` - `"blocked_by_system"BlockedBySystem` - `"watchtower_review"WatchtowerReview` - `"validating"Validating` - `"auto_hold"AutoHold` - `required Source Source` - `"watchtower"Watchtower` - `"bank_decline"BankDecline` - `"customer_dispute"CustomerDispute` - `"user_action"UserAction` - `"system"System` - `string? Code` The status code if applicable. - `Boolean? UnblockEligible` 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. - `required ResponseMetadata Meta` Metadata about the API request, including an identifier and timestamp. - `required string ApiRequestID` Unique identifier for this API request, useful for troubleshooting. - `required DateTimeOffset ApiRequestTimestamp` Timestamp for this API request, useful for troubleshooting. - `required ResponseType ResponseType` 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. - `"object"Object` - `"array"Array` - `"error"Error` - `"none"None` ### Example ```csharp LinkPlaidParams parameters = new() { CustomerID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", PlaidToken = "plaid_token", }; var paykeyV1 = await client.Bridge.Link.Plaid(parameters); Console.WriteLine(paykeyV1); ``` #### 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 `LinkCreateTanResponse Bridge.Link.CreateTan(LinkCreateTanParamsparameters, CancellationTokencancellationToken = default)` **post** `/v1/bridge/tan` ### Parameters - `LinkCreateTanParams parameters` - `required AccountType accountType` Body param - `"checking"Checking` - `"savings"Savings` - `required string customerID` Body param: Unique identifier of the related customer object. - `required string routingNumber` Body param: Bank routing number. - `required string tan` Body param: Tokenized account number. - `Config config` Body param - `ProcessingMethod ProcessingMethod` - `"inline"Inline` - `"background"Background` - `"skip"Skip` - `SandboxOutcome SandboxOutcome` - `"standard"Standard` - `"active"Active` - `"rejected"Rejected` - `"review"Review` - `string? externalID` Body param: Unique identifier for the paykey in your database, used for cross-referencing between Straddle and your systems. - `IReadOnlyDictionary? metadata` Body param: Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the paykey in a structured format. - `string correlationID` Header param: Optional client generated identifier to trace and debug a series of requests. - `string idempotencyKey` Header param: Optional client generated value to use for idempotent requests. - `string requestID` Header param: Optional client generated identifier to trace and debug a request. - `string straddleAccountID` Header param: For use by platforms to specify an account id and set scope of a request. ### Returns - `class LinkCreateTanResponse:` - `required Data Data` - `required string ID` Unique identifier for the paykey. - `required Config Config` - `ProcessingMethod ProcessingMethod` - `"inline"Inline` - `"background"Background` - `"skip"Skip` - `SandboxOutcome SandboxOutcome` - `"standard"Standard` - `"active"Active` - `"rejected"Rejected` - `"review"Review` - `required DateTimeOffset CreatedAt` Timestamp of when the paykey was created. - `required string Label` Human-readable label that combines the bank name and masked account number to help easility represent this paykey in a UI - `required string Paykey` The tokenized paykey value. This token is used to create payments and should be stored securely. - `required Source Source` - `"bank_account"BankAccount` - `"straddle"Straddle` - `"mx"Mx` - `"plaid"Plaid` - `"tan"Tan` - `"quiltt"Quiltt` - `required Status Status` - `"pending"Pending` - `"active"Active` - `"inactive"Inactive` - `"rejected"Rejected` - `"review"Review` - `"blocked"Blocked` - `required DateTimeOffset UpdatedAt` Timestamp of the most recent update to the paykey. - `Balance Balance` - `required Status Status` - `"pending"Pending` - `"completed"Completed` - `"failed"Failed` - `Int? AccountBalance` Account Balance when last retrieved - `DateTimeOffset? UpdatedAt` Last time account balance was updated. - `BankData BankData` - `required string AccountNumber` Bank account number. This value is masked by default for security reasons. Use the /unmask endpoint to access the unmasked value. - `required AccountType AccountType` - `"checking"Checking` - `"savings"Savings` - `required string RoutingNumber` The routing number of the bank account. - `string? CustomerID` Unique identifier of the related customer object. - `DateTimeOffset? ExpiresAt` Expiration date and time of the paykey, if applicable. - `string? ExternalID` Unique identifier for the paykey in your database, used for cross-referencing between Straddle and your systems. - `string? InstitutionName` Name of the financial institution. - `IReadOnlyDictionary? Metadata` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the paykey in a structured format. - `StatusDetails StatusDetails` - `required DateTimeOffset ChangedAt` The time the status change occurred. - `required string Message` A human-readable description of the current status. - `required Reason Reason` - `"insufficient_funds"InsufficientFunds` - `"closed_bank_account"ClosedBankAccount` - `"invalid_bank_account"InvalidBankAccount` - `"invalid_routing"InvalidRouting` - `"disputed"Disputed` - `"payment_stopped"PaymentStopped` - `"owner_deceased"OwnerDeceased` - `"frozen_bank_account"FrozenBankAccount` - `"risk_review"RiskReview` - `"fraudulent"Fraudulent` - `"duplicate_entry"DuplicateEntry` - `"invalid_paykey"InvalidPaykey` - `"payment_blocked"PaymentBlocked` - `"amount_too_large"AmountTooLarge` - `"too_many_attempts"TooManyAttempts` - `"internal_system_error"InternalSystemError` - `"user_request"UserRequest` - `"ok"Ok` - `"other_network_return"OtherNetworkReturn` - `"payout_refused"PayoutRefused` - `"cancel_request"CancelRequest` - `"failed_verification"FailedVerification` - `"require_review"RequireReview` - `"blocked_by_system"BlockedBySystem` - `"watchtower_review"WatchtowerReview` - `"validating"Validating` - `"auto_hold"AutoHold` - `required Source Source` - `"watchtower"Watchtower` - `"bank_decline"BankDecline` - `"customer_dispute"CustomerDispute` - `"user_action"UserAction` - `"system"System` - `string? Code` The status code if applicable. - `required ResponseMetadata Meta` Metadata about the API request, including an identifier and timestamp. - `required string ApiRequestID` Unique identifier for this API request, useful for troubleshooting. - `required DateTimeOffset ApiRequestTimestamp` Timestamp for this API request, useful for troubleshooting. - `required ResponseType ResponseType` 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. - `"object"Object` - `"array"Array` - `"error"Error` - `"none"None` ### Example ```csharp LinkCreateTanParams parameters = new() { AccountType = AccountType.Checking, CustomerID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", RoutingNumber = "routing_number", Tan = "tan", }; var response = await client.Bridge.Link.CreateTan(parameters); Console.WriteLine(response); ``` #### 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 `LinkCreatePaykeyResponse Bridge.Link.CreatePaykey(LinkCreatePaykeyParamsparameters, CancellationTokencancellationToken = default)` **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 - `LinkCreatePaykeyParams parameters` - `required string customerID` Body param: Unique identifier of the related customer object. - `required string quilttToken` Body param: Quiltt processor token generated by your application for use with the Straddle API. - `Config config` Body param - `ProcessingMethod ProcessingMethod` - `"inline"Inline` - `"background"Background` - `"skip"Skip` - `SandboxOutcome SandboxOutcome` - `"standard"Standard` - `"active"Active` - `"rejected"Rejected` - `"review"Review` - `string? externalID` Body param: Unique identifier for the paykey in your database, used for cross-referencing between Straddle and your systems. - `IReadOnlyDictionary? metadata` Body param: Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the paykey in a structured format. - `string correlationID` Header param: Optional client generated identifier to trace and debug a series of requests. - `string idempotencyKey` Header param: Optional client generated value to use for idempotent requests. - `string requestID` Header param: Optional client generated identifier to trace and debug a request. - `string straddleAccountID` Header param: For use by platforms to specify an account id and set scope of a request. ### Returns - `class LinkCreatePaykeyResponse:` - `required Data Data` - `required string ID` Unique identifier for the paykey. - `required Config Config` - `ProcessingMethod ProcessingMethod` - `"inline"Inline` - `"background"Background` - `"skip"Skip` - `SandboxOutcome SandboxOutcome` - `"standard"Standard` - `"active"Active` - `"rejected"Rejected` - `"review"Review` - `required DateTimeOffset CreatedAt` Timestamp of when the paykey was created. - `required string Label` Human-readable label that combines the bank name and masked account number to help easility represent this paykey in a UI - `required string Paykey` The tokenized paykey value. This token is used to create payments and should be stored securely. - `required Source Source` - `"bank_account"BankAccount` - `"straddle"Straddle` - `"mx"Mx` - `"plaid"Plaid` - `"tan"Tan` - `"quiltt"Quiltt` - `required Status Status` - `"pending"Pending` - `"active"Active` - `"inactive"Inactive` - `"rejected"Rejected` - `"review"Review` - `"blocked"Blocked` - `required DateTimeOffset UpdatedAt` Timestamp of the most recent update to the paykey. - `Balance Balance` - `required Status Status` - `"pending"Pending` - `"completed"Completed` - `"failed"Failed` - `Int? AccountBalance` Account Balance when last retrieved - `DateTimeOffset? UpdatedAt` Last time account balance was updated. - `BankData BankData` - `required string AccountNumber` Bank account number. This value is masked by default for security reasons. Use the /unmask endpoint to access the unmasked value. - `required AccountType AccountType` - `"checking"Checking` - `"savings"Savings` - `required string RoutingNumber` The routing number of the bank account. - `string? CustomerID` Unique identifier of the related customer object. - `DateTimeOffset? ExpiresAt` Expiration date and time of the paykey, if applicable. - `string? ExternalID` Unique identifier for the paykey in your database, used for cross-referencing between Straddle and your systems. - `string? InstitutionName` Name of the financial institution. - `IReadOnlyDictionary? Metadata` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the paykey in a structured format. - `StatusDetails StatusDetails` - `required DateTimeOffset ChangedAt` The time the status change occurred. - `required string Message` A human-readable description of the current status. - `required Reason Reason` - `"insufficient_funds"InsufficientFunds` - `"closed_bank_account"ClosedBankAccount` - `"invalid_bank_account"InvalidBankAccount` - `"invalid_routing"InvalidRouting` - `"disputed"Disputed` - `"payment_stopped"PaymentStopped` - `"owner_deceased"OwnerDeceased` - `"frozen_bank_account"FrozenBankAccount` - `"risk_review"RiskReview` - `"fraudulent"Fraudulent` - `"duplicate_entry"DuplicateEntry` - `"invalid_paykey"InvalidPaykey` - `"payment_blocked"PaymentBlocked` - `"amount_too_large"AmountTooLarge` - `"too_many_attempts"TooManyAttempts` - `"internal_system_error"InternalSystemError` - `"user_request"UserRequest` - `"ok"Ok` - `"other_network_return"OtherNetworkReturn` - `"payout_refused"PayoutRefused` - `"cancel_request"CancelRequest` - `"failed_verification"FailedVerification` - `"require_review"RequireReview` - `"blocked_by_system"BlockedBySystem` - `"watchtower_review"WatchtowerReview` - `"validating"Validating` - `"auto_hold"AutoHold` - `required Source Source` - `"watchtower"Watchtower` - `"bank_decline"BankDecline` - `"customer_dispute"CustomerDispute` - `"user_action"UserAction` - `"system"System` - `string? Code` The status code if applicable. - `required ResponseMetadata Meta` Metadata about the API request, including an identifier and timestamp. - `required string ApiRequestID` Unique identifier for this API request, useful for troubleshooting. - `required DateTimeOffset ApiRequestTimestamp` Timestamp for this API request, useful for troubleshooting. - `required ResponseType ResponseType` 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. - `"object"Object` - `"array"Array` - `"error"Error` - `"none"None` ### Example ```csharp LinkCreatePaykeyParams parameters = new() { CustomerID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", QuilttToken = "quiltt_token", }; var response = await client.Bridge.Link.CreatePaykey(parameters); Console.WriteLine(response); ``` #### 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" } ```