# Paykeys ## Lookup a paykey `client.paykeys.get(stringid, PaykeyGetParamsparams?, RequestOptionsoptions?): PaykeyV1` **get** `/v1/paykeys/{id}` Retrieves the details of an existing paykey. Supply the unique paykey `id` and Straddle will return the corresponding paykey record , including the `paykey` token value and masked bank account details. ### Parameters - `id: string` - `params: PaykeyGetParams` - `correlationID?: string` Optional client generated identifier to trace and debug a series of requests. - `requestID?: string` Optional client generated identifier to trace and debug a request. - `straddleAccountID?: string` For use by platforms to specify an account id and set scope of a request. ### Returns - `PaykeyV1` - `data: Data` - `id: string` Unique identifier for the paykey. - `config: Config` - `processing_method?: "inline" | "background" | "skip"` - `"inline"` - `"background"` - `"skip"` - `sandbox_outcome?: "standard" | "active" | "rejected" | "review"` - `"standard"` - `"active"` - `"rejected"` - `"review"` - `created_at: string` 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: "bank_account" | "straddle" | "mx" | 3 more` - `"bank_account"` - `"straddle"` - `"mx"` - `"plaid"` - `"tan"` - `"quiltt"` - `status: "pending" | "active" | "inactive" | 3 more` - `"pending"` - `"active"` - `"inactive"` - `"rejected"` - `"review"` - `"blocked"` - `updated_at: string` Timestamp of the most recent update to the paykey. - `balance?: Balance` - `status: "pending" | "completed" | "failed"` - `"pending"` - `"completed"` - `"failed"` - `account_balance?: number | null` Account Balance when last retrieved - `updated_at?: string | null` Last time account balance was updated. - `bank_data?: BankData` - `account_number: string` Bank account number. This value is masked by default for security reasons. Use the /unmask endpoint to access the unmasked value. - `account_type: "checking" | "savings"` - `"checking"` - `"savings"` - `routing_number: string` The routing number of the bank account. - `customer_id?: string | null` Unique identifier of the related customer object. - `expires_at?: string | null` Expiration date and time of the paykey, if applicable. - `external_id?: string | null` Unique identifier for the paykey in your database, used for cross-referencing between Straddle and your systems. - `institution_name?: string | null` Name of the financial institution. - `metadata?: Record | null` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the paykey in a structured format. - `status_details?: StatusDetails` - `changed_at: string` The time the status change occurred. - `message: string` A human-readable description of the current status. - `reason: "insufficient_funds" | "closed_bank_account" | "invalid_bank_account" | 24 more` - `"insufficient_funds"` - `"closed_bank_account"` - `"invalid_bank_account"` - `"invalid_routing"` - `"disputed"` - `"payment_stopped"` - `"owner_deceased"` - `"frozen_bank_account"` - `"risk_review"` - `"fraudulent"` - `"duplicate_entry"` - `"invalid_paykey"` - `"payment_blocked"` - `"amount_too_large"` - `"too_many_attempts"` - `"internal_system_error"` - `"user_request"` - `"ok"` - `"other_network_return"` - `"payout_refused"` - `"cancel_request"` - `"failed_verification"` - `"require_review"` - `"blocked_by_system"` - `"watchtower_review"` - `"validating"` - `"auto_hold"` - `source: "watchtower" | "bank_decline" | "customer_dispute" | 2 more` - `"watchtower"` - `"bank_decline"` - `"customer_dispute"` - `"user_action"` - `"system"` - `code?: string | null` The status code if applicable. - `unblock_eligible?: boolean | null` 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. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `response_type: "object" | "array" | "error" | "none"` 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"` - `"array"` - `"error"` - `"none"` ### Example ```typescript import Straddle from '@straddlecom/straddle'; const client = new Straddle({ apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted }); const paykeyV1 = await client.paykeys.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'); console.log(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" } ``` ## Unmask a paykey `client.paykeys.unmasked(stringid, PaykeyUnmaskedParamsparams?, RequestOptionsoptions?): PaykeyUnmaskedV1` **get** `/v1/paykeys/{id}/unmasked` Retrieves the unmasked details of an existing paykey. Supply the unique paykey `id` and Straddle will return the corresponding paykey record, including the unmasked bank account details. This endpoint needs to be enabled by Straddle for your account and should only be used when absolutely necessary. ### Parameters - `id: string` - `params: PaykeyUnmaskedParams` - `correlationID?: string` Optional client generated identifier to trace and debug a series of requests. - `requestID?: string` Optional client generated identifier to trace and debug a request. - `straddleAccountID?: string` For use by platforms to specify an account id and set scope of a request. ### Returns - `PaykeyUnmaskedV1` - `data: Data` - `id: string` Unique identifier for the paykey. - `config: Config` - `processing_method?: "inline" | "background" | "skip"` - `"inline"` - `"background"` - `"skip"` - `sandbox_outcome?: "standard" | "active" | "rejected" | "review"` - `"standard"` - `"active"` - `"rejected"` - `"review"` - `created_at: string` 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: "bank_account" | "straddle" | "mx" | 3 more` - `"bank_account"` - `"straddle"` - `"mx"` - `"plaid"` - `"tan"` - `"quiltt"` - `status: "pending" | "active" | "inactive" | 3 more` - `"pending"` - `"active"` - `"inactive"` - `"rejected"` - `"review"` - `"blocked"` - `updated_at: string` Timestamp of the most recent update to the paykey. - `balance?: Balance` - `status: "pending" | "completed" | "failed"` - `"pending"` - `"completed"` - `"failed"` - `account_balance?: number | null` Account Balance when last retrieved - `updated_at?: string | null` Last time account balance was updated. - `bank_data?: BankData` - `account_number: string` The bank account number - `account_type: "checking" | "savings"` - `"checking"` - `"savings"` - `routing_number: string` The routing number of the bank account. - `customer_id?: string | null` Unique identifier of the related customer object. - `expires_at?: string | null` Expiration date and time of the paykey, if applicable. - `external_id?: string | null` Unique identifier for the paykey in your database, used for cross-referencing between Straddle and your systems. - `institution_name?: string | null` Name of the financial institution. - `metadata?: Record | null` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the paykey in a structured format. - `status_details?: StatusDetails` - `changed_at: string` The time the status change occurred. - `message: string` A human-readable description of the current status. - `reason: "insufficient_funds" | "closed_bank_account" | "invalid_bank_account" | 24 more` - `"insufficient_funds"` - `"closed_bank_account"` - `"invalid_bank_account"` - `"invalid_routing"` - `"disputed"` - `"payment_stopped"` - `"owner_deceased"` - `"frozen_bank_account"` - `"risk_review"` - `"fraudulent"` - `"duplicate_entry"` - `"invalid_paykey"` - `"payment_blocked"` - `"amount_too_large"` - `"too_many_attempts"` - `"internal_system_error"` - `"user_request"` - `"ok"` - `"other_network_return"` - `"payout_refused"` - `"cancel_request"` - `"failed_verification"` - `"require_review"` - `"blocked_by_system"` - `"watchtower_review"` - `"validating"` - `"auto_hold"` - `source: "watchtower" | "bank_decline" | "customer_dispute" | 2 more` - `"watchtower"` - `"bank_decline"` - `"customer_dispute"` - `"user_action"` - `"system"` - `code?: string | null` The status code if applicable. - `meta: ResponseMetadata` Metadata about the API request, including an identifier and timestamp. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `response_type: "object" | "array" | "error" | "none"` 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"` - `"array"` - `"error"` - `"none"` ### Example ```typescript import Straddle from '@straddlecom/straddle'; const client = new Straddle({ apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted }); const paykeyUnmaskedV1 = await client.paykeys.unmasked('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'); console.log(paykeyUnmaskedV1.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": "123456789", "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" } ``` ## List paykeys `client.paykeys.list(PaykeyListParamsparams?, RequestOptionsoptions?): PageNumberSchema` **get** `/v1/paykeys` Returns a list of paykeys associated with a Straddle account. This endpoint supports advanced sorting and filtering options. ### Parameters - `params: PaykeyListParams` - `customer_id?: string` Query param: Filter paykeys by related customer ID. - `page_number?: number` Query param: Page number for paginated results. Starts at 1. - `page_size?: number` Query param: Number of results per page. Maximum: 1000. - `search_text?: string` Query param: General search term to filter paykeys. - `sort_by?: "institution_name" | "expires_at" | "created_at"` Query param - `"institution_name"` - `"expires_at"` - `"created_at"` - `sort_order?: "asc" | "desc"` Query param - `"asc"` - `"desc"` - `source?: Array<"bank_account" | "straddle" | "mx" | 3 more>` Query param: Filter paykeys by their source. - `"bank_account"` - `"straddle"` - `"mx"` - `"plaid"` - `"tan"` - `"quiltt"` - `status?: Array<"pending" | "active" | "inactive" | 3 more>` Query param: Filter paykeys by their current status. - `"pending"` - `"active"` - `"inactive"` - `"rejected"` - `"review"` - `"blocked"` - `unblock_eligible?: boolean` Query param: Filter paykeys by unblock eligibility. When true, returns only blocked paykeys eligible for client-initiated unblocking (blocked due to R29 returns and not previously unblocked). When false, returns only blocked paykeys that are not eligible for unblocking. - `correlationID?: string` Header param: Optional client generated identifier to trace and debug a series of requests. - `requestID?: string` Header param: Optional client generated identifier to trace and debug a request. - `straddleAccountID?: string` Header param: For use by platforms to specify an account id and set scope of a request. ### Returns - `Data` - `id: string` Unique identifier for the paykey. - `config: Config` - `processing_method?: "inline" | "background" | "skip"` - `"inline"` - `"background"` - `"skip"` - `sandbox_outcome?: "standard" | "active" | "rejected" | "review"` - `"standard"` - `"active"` - `"rejected"` - `"review"` - `created_at: string` 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 value is used to create payments and should be stored securely. - `source: "bank_account" | "straddle" | "mx" | 3 more` - `"bank_account"` - `"straddle"` - `"mx"` - `"plaid"` - `"tan"` - `"quiltt"` - `status: "pending" | "active" | "inactive" | 3 more` - `"pending"` - `"active"` - `"inactive"` - `"rejected"` - `"review"` - `"blocked"` - `updated_at: string` Timestamp of the most recent update to the paykey. - `bank_data?: BankData` - `account_number: string` Bank account number. This value is masked by default for security reasons. Use the /unmask endpoint to access the unmasked value. - `account_type: "checking" | "savings"` - `"checking"` - `"savings"` - `routing_number: string` The routing number of the bank account. - `customer_id?: string | null` Unique identifier of the related customer object. - `expires_at?: string | null` Expiration date and time of the paykey, if applicable. - `external_id?: string | null` Unique identifier for the paykey in your database, used for cross-referencing between Straddle and your systems. - `institution_name?: string | null` Name of the financial institution. - `status_details?: StatusDetails` - `changed_at: string` The time the status change occurred. - `message: string` A human-readable description of the current status. - `reason: "insufficient_funds" | "closed_bank_account" | "invalid_bank_account" | 24 more` - `"insufficient_funds"` - `"closed_bank_account"` - `"invalid_bank_account"` - `"invalid_routing"` - `"disputed"` - `"payment_stopped"` - `"owner_deceased"` - `"frozen_bank_account"` - `"risk_review"` - `"fraudulent"` - `"duplicate_entry"` - `"invalid_paykey"` - `"payment_blocked"` - `"amount_too_large"` - `"too_many_attempts"` - `"internal_system_error"` - `"user_request"` - `"ok"` - `"other_network_return"` - `"payout_refused"` - `"cancel_request"` - `"failed_verification"` - `"require_review"` - `"blocked_by_system"` - `"watchtower_review"` - `"validating"` - `"auto_hold"` - `source: "watchtower" | "bank_decline" | "customer_dispute" | 2 more` - `"watchtower"` - `"bank_decline"` - `"customer_dispute"` - `"user_action"` - `"system"` - `code?: string | null` The status code if applicable. - `unblock_eligible?: boolean | null` 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. ### Example ```typescript import Straddle from '@straddlecom/straddle'; const client = new Straddle({ apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const paykey of client.paykeys.list()) { console.log(paykey.id); } ``` #### 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": "bank_account", "status": "pending", "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", "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", "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 an unmasked paykey token `client.paykeys.reveal(stringid, PaykeyRevealParamsparams?, RequestOptionsoptions?): PaykeyRevealResponse` **get** `/v1/paykeys/{id}/reveal` Retrieves the details of a paykey that has previously been created. Supply the unique paykey ID that was returned from your previous request, and Straddle will return the corresponding paykey information including the unmasked token. ### Parameters - `id: string` - `params: PaykeyRevealParams` - `correlationID?: string` Optional client generated identifier to trace and debug a series of requests. - `requestID?: string` Optional client generated identifier to trace and debug a request. - `straddleAccountID?: string` For use by platforms to specify an account id and set scope of a request. ### Returns - `PaykeyRevealResponse` - `data: Data` - `id: string` Unique identifier for the paykey. - `config: Config` - `processing_method?: "inline" | "background" | "skip"` - `"inline"` - `"background"` - `"skip"` - `sandbox_outcome?: "standard" | "active" | "rejected" | "review"` - `"standard"` - `"active"` - `"rejected"` - `"review"` - `created_at: string` 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: "bank_account" | "straddle" | "mx" | 3 more` - `"bank_account"` - `"straddle"` - `"mx"` - `"plaid"` - `"tan"` - `"quiltt"` - `status: "pending" | "active" | "inactive" | 3 more` - `"pending"` - `"active"` - `"inactive"` - `"rejected"` - `"review"` - `"blocked"` - `updated_at: string` Timestamp of the most recent update to the paykey. - `balance?: Balance` - `status: "pending" | "completed" | "failed"` - `"pending"` - `"completed"` - `"failed"` - `account_balance?: number | null` Account Balance when last retrieved - `updated_at?: string | null` Last time account balance was updated. - `bank_data?: BankData` - `account_number: string` Bank account number. This value is masked by default for security reasons. Use the /unmask endpoint to access the unmasked value. - `account_type: "checking" | "savings"` - `"checking"` - `"savings"` - `routing_number: string` The routing number of the bank account. - `customer_id?: string | null` Unique identifier of the related customer object. - `expires_at?: string | null` Expiration date and time of the paykey, if applicable. - `external_id?: string | null` Unique identifier for the paykey in your database, used for cross-referencing between Straddle and your systems. - `institution_name?: string | null` Name of the financial institution. - `metadata?: Record | null` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the paykey in a structured format. - `status_details?: StatusDetails` - `changed_at: string` The time the status change occurred. - `message: string` A human-readable description of the current status. - `reason: "insufficient_funds" | "closed_bank_account" | "invalid_bank_account" | 24 more` - `"insufficient_funds"` - `"closed_bank_account"` - `"invalid_bank_account"` - `"invalid_routing"` - `"disputed"` - `"payment_stopped"` - `"owner_deceased"` - `"frozen_bank_account"` - `"risk_review"` - `"fraudulent"` - `"duplicate_entry"` - `"invalid_paykey"` - `"payment_blocked"` - `"amount_too_large"` - `"too_many_attempts"` - `"internal_system_error"` - `"user_request"` - `"ok"` - `"other_network_return"` - `"payout_refused"` - `"cancel_request"` - `"failed_verification"` - `"require_review"` - `"blocked_by_system"` - `"watchtower_review"` - `"validating"` - `"auto_hold"` - `source: "watchtower" | "bank_decline" | "customer_dispute" | 2 more` - `"watchtower"` - `"bank_decline"` - `"customer_dispute"` - `"user_action"` - `"system"` - `code?: string | null` The status code if applicable. - `meta: ResponseMetadata` Metadata about the API request, including an identifier and timestamp. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `response_type: "object" | "array" | "error" | "none"` 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"` - `"array"` - `"error"` - `"none"` ### Example ```typescript import Straddle from '@straddlecom/straddle'; const client = new Straddle({ apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted }); const response = await client.paykeys.reveal('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'); console.log(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" } ``` ## Cancel `client.paykeys.cancel(stringid, PaykeyCancelParamsparams?, RequestOptionsoptions?): PaykeyV1` **put** `/v1/paykeys/{id}/cancel` ### Parameters - `id: string` - `params: PaykeyCancelParams` - `reason?: string | null` Body param - `correlationID?: string` Header param: Optional client generated identifier to trace and debug a series of requests. - `idempotencyKey?: string` Header param: Optional client generated value to use for idempotent requests. - `requestID?: string` Header param: Optional client generated identifier to trace and debug a request. - `straddleAccountID?: string` Header param: For use by platforms to specify an account id and set scope of a request. ### Returns - `PaykeyV1` - `data: Data` - `id: string` Unique identifier for the paykey. - `config: Config` - `processing_method?: "inline" | "background" | "skip"` - `"inline"` - `"background"` - `"skip"` - `sandbox_outcome?: "standard" | "active" | "rejected" | "review"` - `"standard"` - `"active"` - `"rejected"` - `"review"` - `created_at: string` 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: "bank_account" | "straddle" | "mx" | 3 more` - `"bank_account"` - `"straddle"` - `"mx"` - `"plaid"` - `"tan"` - `"quiltt"` - `status: "pending" | "active" | "inactive" | 3 more` - `"pending"` - `"active"` - `"inactive"` - `"rejected"` - `"review"` - `"blocked"` - `updated_at: string` Timestamp of the most recent update to the paykey. - `balance?: Balance` - `status: "pending" | "completed" | "failed"` - `"pending"` - `"completed"` - `"failed"` - `account_balance?: number | null` Account Balance when last retrieved - `updated_at?: string | null` Last time account balance was updated. - `bank_data?: BankData` - `account_number: string` Bank account number. This value is masked by default for security reasons. Use the /unmask endpoint to access the unmasked value. - `account_type: "checking" | "savings"` - `"checking"` - `"savings"` - `routing_number: string` The routing number of the bank account. - `customer_id?: string | null` Unique identifier of the related customer object. - `expires_at?: string | null` Expiration date and time of the paykey, if applicable. - `external_id?: string | null` Unique identifier for the paykey in your database, used for cross-referencing between Straddle and your systems. - `institution_name?: string | null` Name of the financial institution. - `metadata?: Record | null` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the paykey in a structured format. - `status_details?: StatusDetails` - `changed_at: string` The time the status change occurred. - `message: string` A human-readable description of the current status. - `reason: "insufficient_funds" | "closed_bank_account" | "invalid_bank_account" | 24 more` - `"insufficient_funds"` - `"closed_bank_account"` - `"invalid_bank_account"` - `"invalid_routing"` - `"disputed"` - `"payment_stopped"` - `"owner_deceased"` - `"frozen_bank_account"` - `"risk_review"` - `"fraudulent"` - `"duplicate_entry"` - `"invalid_paykey"` - `"payment_blocked"` - `"amount_too_large"` - `"too_many_attempts"` - `"internal_system_error"` - `"user_request"` - `"ok"` - `"other_network_return"` - `"payout_refused"` - `"cancel_request"` - `"failed_verification"` - `"require_review"` - `"blocked_by_system"` - `"watchtower_review"` - `"validating"` - `"auto_hold"` - `source: "watchtower" | "bank_decline" | "customer_dispute" | 2 more` - `"watchtower"` - `"bank_decline"` - `"customer_dispute"` - `"user_action"` - `"system"` - `code?: string | null` The status code if applicable. - `unblock_eligible?: boolean | null` 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. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `response_type: "object" | "array" | "error" | "none"` 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"` - `"array"` - `"error"` - `"none"` ### Example ```typescript import Straddle from '@straddlecom/straddle'; const client = new Straddle({ apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted }); const paykeyV1 = await client.paykeys.cancel('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'); console.log(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" } ``` ## Update a paykey's balance `client.paykeys.updateBalance(stringid, PaykeyUpdateBalanceParamsparams?, RequestOptionsoptions?): PaykeyV1` **put** `/v1/paykeys/{id}/refresh_balance` Updates the balance of a paykey. This endpoint allows you to refresh the balance of a paykey. ### Parameters - `id: string` - `params: PaykeyUpdateBalanceParams` - `correlationID?: string` Optional client generated identifier to trace and debug a series of requests. - `idempotencyKey?: string` Optional client generated value to use for idempotent requests. - `requestID?: string` Optional client generated identifier to trace and debug a request. - `straddleAccountID?: string` For use by platforms to specify an account id and set scope of a request. ### Returns - `PaykeyV1` - `data: Data` - `id: string` Unique identifier for the paykey. - `config: Config` - `processing_method?: "inline" | "background" | "skip"` - `"inline"` - `"background"` - `"skip"` - `sandbox_outcome?: "standard" | "active" | "rejected" | "review"` - `"standard"` - `"active"` - `"rejected"` - `"review"` - `created_at: string` 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: "bank_account" | "straddle" | "mx" | 3 more` - `"bank_account"` - `"straddle"` - `"mx"` - `"plaid"` - `"tan"` - `"quiltt"` - `status: "pending" | "active" | "inactive" | 3 more` - `"pending"` - `"active"` - `"inactive"` - `"rejected"` - `"review"` - `"blocked"` - `updated_at: string` Timestamp of the most recent update to the paykey. - `balance?: Balance` - `status: "pending" | "completed" | "failed"` - `"pending"` - `"completed"` - `"failed"` - `account_balance?: number | null` Account Balance when last retrieved - `updated_at?: string | null` Last time account balance was updated. - `bank_data?: BankData` - `account_number: string` Bank account number. This value is masked by default for security reasons. Use the /unmask endpoint to access the unmasked value. - `account_type: "checking" | "savings"` - `"checking"` - `"savings"` - `routing_number: string` The routing number of the bank account. - `customer_id?: string | null` Unique identifier of the related customer object. - `expires_at?: string | null` Expiration date and time of the paykey, if applicable. - `external_id?: string | null` Unique identifier for the paykey in your database, used for cross-referencing between Straddle and your systems. - `institution_name?: string | null` Name of the financial institution. - `metadata?: Record | null` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the paykey in a structured format. - `status_details?: StatusDetails` - `changed_at: string` The time the status change occurred. - `message: string` A human-readable description of the current status. - `reason: "insufficient_funds" | "closed_bank_account" | "invalid_bank_account" | 24 more` - `"insufficient_funds"` - `"closed_bank_account"` - `"invalid_bank_account"` - `"invalid_routing"` - `"disputed"` - `"payment_stopped"` - `"owner_deceased"` - `"frozen_bank_account"` - `"risk_review"` - `"fraudulent"` - `"duplicate_entry"` - `"invalid_paykey"` - `"payment_blocked"` - `"amount_too_large"` - `"too_many_attempts"` - `"internal_system_error"` - `"user_request"` - `"ok"` - `"other_network_return"` - `"payout_refused"` - `"cancel_request"` - `"failed_verification"` - `"require_review"` - `"blocked_by_system"` - `"watchtower_review"` - `"validating"` - `"auto_hold"` - `source: "watchtower" | "bank_decline" | "customer_dispute" | 2 more` - `"watchtower"` - `"bank_decline"` - `"customer_dispute"` - `"user_action"` - `"system"` - `code?: string | null` The status code if applicable. - `unblock_eligible?: boolean | null` 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. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `response_type: "object" | "array" | "error" | "none"` 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"` - `"array"` - `"error"` - `"none"` ### Example ```typescript import Straddle from '@straddlecom/straddle'; const client = new Straddle({ apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted }); const paykeyV1 = await client.paykeys.updateBalance('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'); console.log(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" } ``` ## Domain Types ### Paykey Summary Paged V1 - `PaykeySummaryPagedV1` - `data: Array` - `id: string` Unique identifier for the paykey. - `config: Config` - `processing_method?: "inline" | "background" | "skip"` - `"inline"` - `"background"` - `"skip"` - `sandbox_outcome?: "standard" | "active" | "rejected" | "review"` - `"standard"` - `"active"` - `"rejected"` - `"review"` - `created_at: string` 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 value is used to create payments and should be stored securely. - `source: "bank_account" | "straddle" | "mx" | 3 more` - `"bank_account"` - `"straddle"` - `"mx"` - `"plaid"` - `"tan"` - `"quiltt"` - `status: "pending" | "active" | "inactive" | 3 more` - `"pending"` - `"active"` - `"inactive"` - `"rejected"` - `"review"` - `"blocked"` - `updated_at: string` Timestamp of the most recent update to the paykey. - `bank_data?: BankData` - `account_number: string` Bank account number. This value is masked by default for security reasons. Use the /unmask endpoint to access the unmasked value. - `account_type: "checking" | "savings"` - `"checking"` - `"savings"` - `routing_number: string` The routing number of the bank account. - `customer_id?: string | null` Unique identifier of the related customer object. - `expires_at?: string | null` Expiration date and time of the paykey, if applicable. - `external_id?: string | null` Unique identifier for the paykey in your database, used for cross-referencing between Straddle and your systems. - `institution_name?: string | null` Name of the financial institution. - `status_details?: StatusDetails` - `changed_at: string` The time the status change occurred. - `message: string` A human-readable description of the current status. - `reason: "insufficient_funds" | "closed_bank_account" | "invalid_bank_account" | 24 more` - `"insufficient_funds"` - `"closed_bank_account"` - `"invalid_bank_account"` - `"invalid_routing"` - `"disputed"` - `"payment_stopped"` - `"owner_deceased"` - `"frozen_bank_account"` - `"risk_review"` - `"fraudulent"` - `"duplicate_entry"` - `"invalid_paykey"` - `"payment_blocked"` - `"amount_too_large"` - `"too_many_attempts"` - `"internal_system_error"` - `"user_request"` - `"ok"` - `"other_network_return"` - `"payout_refused"` - `"cancel_request"` - `"failed_verification"` - `"require_review"` - `"blocked_by_system"` - `"watchtower_review"` - `"validating"` - `"auto_hold"` - `source: "watchtower" | "bank_decline" | "customer_dispute" | 2 more` - `"watchtower"` - `"bank_decline"` - `"customer_dispute"` - `"user_action"` - `"system"` - `code?: string | null` The status code if applicable. - `unblock_eligible?: boolean | null` 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: Meta` - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `max_page_size: number` Maximum allowed page size for this endpoint. - `page_number: number` Page number for paginated results. - `page_size: number` Number of items per page in this response. - `sort_by: string` The field that the results were sorted by. - `sort_order: "asc" | "desc"` - `"asc"` - `"desc"` - `total_items: number` - `total_pages: number` The number of pages available. - `response_type: "object" | "array" | "error" | "none"` 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"` - `"array"` - `"error"` - `"none"` ### Paykey Unmasked V1 - `PaykeyUnmaskedV1` - `data: Data` - `id: string` Unique identifier for the paykey. - `config: Config` - `processing_method?: "inline" | "background" | "skip"` - `"inline"` - `"background"` - `"skip"` - `sandbox_outcome?: "standard" | "active" | "rejected" | "review"` - `"standard"` - `"active"` - `"rejected"` - `"review"` - `created_at: string` 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: "bank_account" | "straddle" | "mx" | 3 more` - `"bank_account"` - `"straddle"` - `"mx"` - `"plaid"` - `"tan"` - `"quiltt"` - `status: "pending" | "active" | "inactive" | 3 more` - `"pending"` - `"active"` - `"inactive"` - `"rejected"` - `"review"` - `"blocked"` - `updated_at: string` Timestamp of the most recent update to the paykey. - `balance?: Balance` - `status: "pending" | "completed" | "failed"` - `"pending"` - `"completed"` - `"failed"` - `account_balance?: number | null` Account Balance when last retrieved - `updated_at?: string | null` Last time account balance was updated. - `bank_data?: BankData` - `account_number: string` The bank account number - `account_type: "checking" | "savings"` - `"checking"` - `"savings"` - `routing_number: string` The routing number of the bank account. - `customer_id?: string | null` Unique identifier of the related customer object. - `expires_at?: string | null` Expiration date and time of the paykey, if applicable. - `external_id?: string | null` Unique identifier for the paykey in your database, used for cross-referencing between Straddle and your systems. - `institution_name?: string | null` Name of the financial institution. - `metadata?: Record | null` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the paykey in a structured format. - `status_details?: StatusDetails` - `changed_at: string` The time the status change occurred. - `message: string` A human-readable description of the current status. - `reason: "insufficient_funds" | "closed_bank_account" | "invalid_bank_account" | 24 more` - `"insufficient_funds"` - `"closed_bank_account"` - `"invalid_bank_account"` - `"invalid_routing"` - `"disputed"` - `"payment_stopped"` - `"owner_deceased"` - `"frozen_bank_account"` - `"risk_review"` - `"fraudulent"` - `"duplicate_entry"` - `"invalid_paykey"` - `"payment_blocked"` - `"amount_too_large"` - `"too_many_attempts"` - `"internal_system_error"` - `"user_request"` - `"ok"` - `"other_network_return"` - `"payout_refused"` - `"cancel_request"` - `"failed_verification"` - `"require_review"` - `"blocked_by_system"` - `"watchtower_review"` - `"validating"` - `"auto_hold"` - `source: "watchtower" | "bank_decline" | "customer_dispute" | 2 more` - `"watchtower"` - `"bank_decline"` - `"customer_dispute"` - `"user_action"` - `"system"` - `code?: string | null` The status code if applicable. - `meta: ResponseMetadata` Metadata about the API request, including an identifier and timestamp. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `response_type: "object" | "array" | "error" | "none"` 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"` - `"array"` - `"error"` - `"none"` ### Paykey V1 - `PaykeyV1` - `data: Data` - `id: string` Unique identifier for the paykey. - `config: Config` - `processing_method?: "inline" | "background" | "skip"` - `"inline"` - `"background"` - `"skip"` - `sandbox_outcome?: "standard" | "active" | "rejected" | "review"` - `"standard"` - `"active"` - `"rejected"` - `"review"` - `created_at: string` 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: "bank_account" | "straddle" | "mx" | 3 more` - `"bank_account"` - `"straddle"` - `"mx"` - `"plaid"` - `"tan"` - `"quiltt"` - `status: "pending" | "active" | "inactive" | 3 more` - `"pending"` - `"active"` - `"inactive"` - `"rejected"` - `"review"` - `"blocked"` - `updated_at: string` Timestamp of the most recent update to the paykey. - `balance?: Balance` - `status: "pending" | "completed" | "failed"` - `"pending"` - `"completed"` - `"failed"` - `account_balance?: number | null` Account Balance when last retrieved - `updated_at?: string | null` Last time account balance was updated. - `bank_data?: BankData` - `account_number: string` Bank account number. This value is masked by default for security reasons. Use the /unmask endpoint to access the unmasked value. - `account_type: "checking" | "savings"` - `"checking"` - `"savings"` - `routing_number: string` The routing number of the bank account. - `customer_id?: string | null` Unique identifier of the related customer object. - `expires_at?: string | null` Expiration date and time of the paykey, if applicable. - `external_id?: string | null` Unique identifier for the paykey in your database, used for cross-referencing between Straddle and your systems. - `institution_name?: string | null` Name of the financial institution. - `metadata?: Record | null` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the paykey in a structured format. - `status_details?: StatusDetails` - `changed_at: string` The time the status change occurred. - `message: string` A human-readable description of the current status. - `reason: "insufficient_funds" | "closed_bank_account" | "invalid_bank_account" | 24 more` - `"insufficient_funds"` - `"closed_bank_account"` - `"invalid_bank_account"` - `"invalid_routing"` - `"disputed"` - `"payment_stopped"` - `"owner_deceased"` - `"frozen_bank_account"` - `"risk_review"` - `"fraudulent"` - `"duplicate_entry"` - `"invalid_paykey"` - `"payment_blocked"` - `"amount_too_large"` - `"too_many_attempts"` - `"internal_system_error"` - `"user_request"` - `"ok"` - `"other_network_return"` - `"payout_refused"` - `"cancel_request"` - `"failed_verification"` - `"require_review"` - `"blocked_by_system"` - `"watchtower_review"` - `"validating"` - `"auto_hold"` - `source: "watchtower" | "bank_decline" | "customer_dispute" | 2 more` - `"watchtower"` - `"bank_decline"` - `"customer_dispute"` - `"user_action"` - `"system"` - `code?: string | null` The status code if applicable. - `unblock_eligible?: boolean | null` 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. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `response_type: "object" | "array" | "error" | "none"` 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"` - `"array"` - `"error"` - `"none"` ### Paykey Reveal Response - `PaykeyRevealResponse` - `data: Data` - `id: string` Unique identifier for the paykey. - `config: Config` - `processing_method?: "inline" | "background" | "skip"` - `"inline"` - `"background"` - `"skip"` - `sandbox_outcome?: "standard" | "active" | "rejected" | "review"` - `"standard"` - `"active"` - `"rejected"` - `"review"` - `created_at: string` 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: "bank_account" | "straddle" | "mx" | 3 more` - `"bank_account"` - `"straddle"` - `"mx"` - `"plaid"` - `"tan"` - `"quiltt"` - `status: "pending" | "active" | "inactive" | 3 more` - `"pending"` - `"active"` - `"inactive"` - `"rejected"` - `"review"` - `"blocked"` - `updated_at: string` Timestamp of the most recent update to the paykey. - `balance?: Balance` - `status: "pending" | "completed" | "failed"` - `"pending"` - `"completed"` - `"failed"` - `account_balance?: number | null` Account Balance when last retrieved - `updated_at?: string | null` Last time account balance was updated. - `bank_data?: BankData` - `account_number: string` Bank account number. This value is masked by default for security reasons. Use the /unmask endpoint to access the unmasked value. - `account_type: "checking" | "savings"` - `"checking"` - `"savings"` - `routing_number: string` The routing number of the bank account. - `customer_id?: string | null` Unique identifier of the related customer object. - `expires_at?: string | null` Expiration date and time of the paykey, if applicable. - `external_id?: string | null` Unique identifier for the paykey in your database, used for cross-referencing between Straddle and your systems. - `institution_name?: string | null` Name of the financial institution. - `metadata?: Record | null` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the paykey in a structured format. - `status_details?: StatusDetails` - `changed_at: string` The time the status change occurred. - `message: string` A human-readable description of the current status. - `reason: "insufficient_funds" | "closed_bank_account" | "invalid_bank_account" | 24 more` - `"insufficient_funds"` - `"closed_bank_account"` - `"invalid_bank_account"` - `"invalid_routing"` - `"disputed"` - `"payment_stopped"` - `"owner_deceased"` - `"frozen_bank_account"` - `"risk_review"` - `"fraudulent"` - `"duplicate_entry"` - `"invalid_paykey"` - `"payment_blocked"` - `"amount_too_large"` - `"too_many_attempts"` - `"internal_system_error"` - `"user_request"` - `"ok"` - `"other_network_return"` - `"payout_refused"` - `"cancel_request"` - `"failed_verification"` - `"require_review"` - `"blocked_by_system"` - `"watchtower_review"` - `"validating"` - `"auto_hold"` - `source: "watchtower" | "bank_decline" | "customer_dispute" | 2 more` - `"watchtower"` - `"bank_decline"` - `"customer_dispute"` - `"user_action"` - `"system"` - `code?: string | null` The status code if applicable. - `meta: ResponseMetadata` Metadata about the API request, including an identifier and timestamp. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `response_type: "object" | "array" | "error" | "none"` 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"` - `"array"` - `"error"` - `"none"` # Review ## Update a paykey's status `client.paykeys.review.decision(stringid, ReviewDecisionParamsparams, RequestOptionsoptions?): PaykeyV1` **patch** `/v1/paykeys/{id}/review` Update the status of a paykey when in review status ### Parameters - `id: string` - `params: ReviewDecisionParams` - `status: "active" | "rejected"` Body param - `"active"` - `"rejected"` - `correlationID?: string` Header param: Optional client generated identifier to trace and debug a series of requests. - `idempotencyKey?: string` Header param: Optional client generated value to use for idempotent requests. - `requestID?: string` Header param: Optional client generated identifier to trace and debug a request. - `straddleAccountID?: string` Header param: For use by platforms to specify an account id and set scope of a request. ### Returns - `PaykeyV1` - `data: Data` - `id: string` Unique identifier for the paykey. - `config: Config` - `processing_method?: "inline" | "background" | "skip"` - `"inline"` - `"background"` - `"skip"` - `sandbox_outcome?: "standard" | "active" | "rejected" | "review"` - `"standard"` - `"active"` - `"rejected"` - `"review"` - `created_at: string` 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: "bank_account" | "straddle" | "mx" | 3 more` - `"bank_account"` - `"straddle"` - `"mx"` - `"plaid"` - `"tan"` - `"quiltt"` - `status: "pending" | "active" | "inactive" | 3 more` - `"pending"` - `"active"` - `"inactive"` - `"rejected"` - `"review"` - `"blocked"` - `updated_at: string` Timestamp of the most recent update to the paykey. - `balance?: Balance` - `status: "pending" | "completed" | "failed"` - `"pending"` - `"completed"` - `"failed"` - `account_balance?: number | null` Account Balance when last retrieved - `updated_at?: string | null` Last time account balance was updated. - `bank_data?: BankData` - `account_number: string` Bank account number. This value is masked by default for security reasons. Use the /unmask endpoint to access the unmasked value. - `account_type: "checking" | "savings"` - `"checking"` - `"savings"` - `routing_number: string` The routing number of the bank account. - `customer_id?: string | null` Unique identifier of the related customer object. - `expires_at?: string | null` Expiration date and time of the paykey, if applicable. - `external_id?: string | null` Unique identifier for the paykey in your database, used for cross-referencing between Straddle and your systems. - `institution_name?: string | null` Name of the financial institution. - `metadata?: Record | null` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the paykey in a structured format. - `status_details?: StatusDetails` - `changed_at: string` The time the status change occurred. - `message: string` A human-readable description of the current status. - `reason: "insufficient_funds" | "closed_bank_account" | "invalid_bank_account" | 24 more` - `"insufficient_funds"` - `"closed_bank_account"` - `"invalid_bank_account"` - `"invalid_routing"` - `"disputed"` - `"payment_stopped"` - `"owner_deceased"` - `"frozen_bank_account"` - `"risk_review"` - `"fraudulent"` - `"duplicate_entry"` - `"invalid_paykey"` - `"payment_blocked"` - `"amount_too_large"` - `"too_many_attempts"` - `"internal_system_error"` - `"user_request"` - `"ok"` - `"other_network_return"` - `"payout_refused"` - `"cancel_request"` - `"failed_verification"` - `"require_review"` - `"blocked_by_system"` - `"watchtower_review"` - `"validating"` - `"auto_hold"` - `source: "watchtower" | "bank_decline" | "customer_dispute" | 2 more` - `"watchtower"` - `"bank_decline"` - `"customer_dispute"` - `"user_action"` - `"system"` - `code?: string | null` The status code if applicable. - `unblock_eligible?: boolean | null` 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. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `response_type: "object" | "array" | "error" | "none"` 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"` - `"array"` - `"error"` - `"none"` ### Example ```typescript import Straddle from '@straddlecom/straddle'; const client = new Straddle({ apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted }); const paykeyV1 = await client.paykeys.review.decision('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { status: 'active', }); console.log(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" } ``` ## Get paykey review details `client.paykeys.review.get(stringid, ReviewGetParamsparams?, RequestOptionsoptions?): ReviewGetResponse` **get** `/v1/paykeys/{id}/review` Get additional details about a paykey. ### Parameters - `id: string` - `params: ReviewGetParams` - `correlationID?: string` Optional client generated identifier to trace and debug a series of requests. - `requestID?: string` Optional client generated identifier to trace and debug a request. - `straddleAccountID?: string` For use by platforms to specify an account id and set scope of a request. ### Returns - `ReviewGetResponse` - `data: Data` - `paykey_details: PaykeyDetails` - `id: string` Unique identifier for the paykey. - `config: Config` - `processing_method?: "inline" | "background" | "skip"` - `"inline"` - `"background"` - `"skip"` - `sandbox_outcome?: "standard" | "active" | "rejected" | "review"` - `"standard"` - `"active"` - `"rejected"` - `"review"` - `created_at: string` 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: "bank_account" | "straddle" | "mx" | 3 more` - `"bank_account"` - `"straddle"` - `"mx"` - `"plaid"` - `"tan"` - `"quiltt"` - `status: "pending" | "active" | "inactive" | 3 more` - `"pending"` - `"active"` - `"inactive"` - `"rejected"` - `"review"` - `"blocked"` - `updated_at: string` Timestamp of the most recent update to the paykey. - `balance?: Balance` - `status: "pending" | "completed" | "failed"` - `"pending"` - `"completed"` - `"failed"` - `account_balance?: number | null` Account Balance when last retrieved - `updated_at?: string | null` Last time account balance was updated. - `bank_data?: BankData` - `account_number: string` Bank account number. This value is masked by default for security reasons. Use the /unmask endpoint to access the unmasked value. - `account_type: "checking" | "savings"` - `"checking"` - `"savings"` - `routing_number: string` The routing number of the bank account. - `customer_id?: string | null` Unique identifier of the related customer object. - `expires_at?: string | null` Expiration date and time of the paykey, if applicable. - `external_id?: string | null` Unique identifier for the paykey in your database, used for cross-referencing between Straddle and your systems. - `institution_name?: string | null` Name of the financial institution. - `metadata?: Record | null` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the paykey in a structured format. - `status_details?: StatusDetails` - `changed_at: string` The time the status change occurred. - `message: string` A human-readable description of the current status. - `reason: "insufficient_funds" | "closed_bank_account" | "invalid_bank_account" | 24 more` - `"insufficient_funds"` - `"closed_bank_account"` - `"invalid_bank_account"` - `"invalid_routing"` - `"disputed"` - `"payment_stopped"` - `"owner_deceased"` - `"frozen_bank_account"` - `"risk_review"` - `"fraudulent"` - `"duplicate_entry"` - `"invalid_paykey"` - `"payment_blocked"` - `"amount_too_large"` - `"too_many_attempts"` - `"internal_system_error"` - `"user_request"` - `"ok"` - `"other_network_return"` - `"payout_refused"` - `"cancel_request"` - `"failed_verification"` - `"require_review"` - `"blocked_by_system"` - `"watchtower_review"` - `"validating"` - `"auto_hold"` - `source: "watchtower" | "bank_decline" | "customer_dispute" | 2 more` - `"watchtower"` - `"bank_decline"` - `"customer_dispute"` - `"user_action"` - `"system"` - `code?: string | null` The status code if applicable. - `unblock_eligible?: boolean | null` 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. - `verification_details?: VerificationDetails` - `id: string` Unique identifier for the verification details. - `breakdown: Breakdown` - `account_validation?: AccountValidation` - `codes: Array` - `decision: "accept" | "reject" | "review"` - `"accept"` - `"reject"` - `"review"` - `reason?: string | null` - `name_match?: NameMatch` - `codes: Array` - `decision: "accept" | "reject" | "review"` - `"accept"` - `"reject"` - `"review"` - `correlation_score?: number | null` - `customer_name?: string | null` - `matched_name?: string | null` - `names_on_account?: Array | null` - `reason?: string | null` - `created_at: string` Timestamp of when the verification was initiated. - `decision: "accept" | "reject" | "review"` - `"accept"` - `"reject"` - `"review"` - `messages: Record` Dictionary of all messages from the paykey verification process. - `updated_at: string` Timestamp of the most recent update to the verification details. - `meta: ResponseMetadata` Metadata about the API request, including an identifier and timestamp. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `response_type: "object" | "array" | "error" | "none"` 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"` - `"array"` - `"error"` - `"none"` ### Example ```typescript import Straddle from '@straddlecom/straddle'; const client = new Straddle({ apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted }); const review = await client.paykeys.review.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'); console.log(review.data); ``` #### Response ```json { "data": { "paykey_details": { "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 }, "verification_details": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "breakdown": { "account_validation": { "codes": [ "string" ], "decision": "accept", "reason": "reason" }, "name_match": { "codes": [ "string" ], "decision": "accept", "correlation_score": 0, "customer_name": "customer_name", "matched_name": "matched_name", "names_on_account": [ "string" ], "reason": "reason" } }, "created_at": "2019-12-27T18:11:19.117Z", "decision": "accept", "messages": { "foo": "string" }, "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 a paykey's identity review decision `client.paykeys.review.refreshReview(stringid, ReviewRefreshReviewParamsparams?, RequestOptionsoptions?): PaykeyV1` **put** `/v1/paykeys/{id}/refresh_review` Updates the decision of a paykey's review validation. This endpoint allows you to refresh the outcome of a paykey's decision and is useful for correcting or updating the status of a paykey's verification. ### Parameters - `id: string` - `params: ReviewRefreshReviewParams` - `correlationID?: string` Optional client generated identifier to trace and debug a series of requests. - `idempotencyKey?: string` Optional client generated value to use for idempotent requests. - `requestID?: string` Optional client generated identifier to trace and debug a request. - `straddleAccountID?: string` For use by platforms to specify an account id and set scope of a request. ### Returns - `PaykeyV1` - `data: Data` - `id: string` Unique identifier for the paykey. - `config: Config` - `processing_method?: "inline" | "background" | "skip"` - `"inline"` - `"background"` - `"skip"` - `sandbox_outcome?: "standard" | "active" | "rejected" | "review"` - `"standard"` - `"active"` - `"rejected"` - `"review"` - `created_at: string` 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: "bank_account" | "straddle" | "mx" | 3 more` - `"bank_account"` - `"straddle"` - `"mx"` - `"plaid"` - `"tan"` - `"quiltt"` - `status: "pending" | "active" | "inactive" | 3 more` - `"pending"` - `"active"` - `"inactive"` - `"rejected"` - `"review"` - `"blocked"` - `updated_at: string` Timestamp of the most recent update to the paykey. - `balance?: Balance` - `status: "pending" | "completed" | "failed"` - `"pending"` - `"completed"` - `"failed"` - `account_balance?: number | null` Account Balance when last retrieved - `updated_at?: string | null` Last time account balance was updated. - `bank_data?: BankData` - `account_number: string` Bank account number. This value is masked by default for security reasons. Use the /unmask endpoint to access the unmasked value. - `account_type: "checking" | "savings"` - `"checking"` - `"savings"` - `routing_number: string` The routing number of the bank account. - `customer_id?: string | null` Unique identifier of the related customer object. - `expires_at?: string | null` Expiration date and time of the paykey, if applicable. - `external_id?: string | null` Unique identifier for the paykey in your database, used for cross-referencing between Straddle and your systems. - `institution_name?: string | null` Name of the financial institution. - `metadata?: Record | null` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the paykey in a structured format. - `status_details?: StatusDetails` - `changed_at: string` The time the status change occurred. - `message: string` A human-readable description of the current status. - `reason: "insufficient_funds" | "closed_bank_account" | "invalid_bank_account" | 24 more` - `"insufficient_funds"` - `"closed_bank_account"` - `"invalid_bank_account"` - `"invalid_routing"` - `"disputed"` - `"payment_stopped"` - `"owner_deceased"` - `"frozen_bank_account"` - `"risk_review"` - `"fraudulent"` - `"duplicate_entry"` - `"invalid_paykey"` - `"payment_blocked"` - `"amount_too_large"` - `"too_many_attempts"` - `"internal_system_error"` - `"user_request"` - `"ok"` - `"other_network_return"` - `"payout_refused"` - `"cancel_request"` - `"failed_verification"` - `"require_review"` - `"blocked_by_system"` - `"watchtower_review"` - `"validating"` - `"auto_hold"` - `source: "watchtower" | "bank_decline" | "customer_dispute" | 2 more` - `"watchtower"` - `"bank_decline"` - `"customer_dispute"` - `"user_action"` - `"system"` - `code?: string | null` The status code if applicable. - `unblock_eligible?: boolean | null` 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. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `response_type: "object" | "array" | "error" | "none"` 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"` - `"array"` - `"error"` - `"none"` ### Example ```typescript import Straddle from '@straddlecom/straddle'; const client = new Straddle({ apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted }); const paykeyV1 = await client.paykeys.review.refreshReview('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'); console.log(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" } ``` ## Domain Types ### Review Get Response - `ReviewGetResponse` - `data: Data` - `paykey_details: PaykeyDetails` - `id: string` Unique identifier for the paykey. - `config: Config` - `processing_method?: "inline" | "background" | "skip"` - `"inline"` - `"background"` - `"skip"` - `sandbox_outcome?: "standard" | "active" | "rejected" | "review"` - `"standard"` - `"active"` - `"rejected"` - `"review"` - `created_at: string` 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: "bank_account" | "straddle" | "mx" | 3 more` - `"bank_account"` - `"straddle"` - `"mx"` - `"plaid"` - `"tan"` - `"quiltt"` - `status: "pending" | "active" | "inactive" | 3 more` - `"pending"` - `"active"` - `"inactive"` - `"rejected"` - `"review"` - `"blocked"` - `updated_at: string` Timestamp of the most recent update to the paykey. - `balance?: Balance` - `status: "pending" | "completed" | "failed"` - `"pending"` - `"completed"` - `"failed"` - `account_balance?: number | null` Account Balance when last retrieved - `updated_at?: string | null` Last time account balance was updated. - `bank_data?: BankData` - `account_number: string` Bank account number. This value is masked by default for security reasons. Use the /unmask endpoint to access the unmasked value. - `account_type: "checking" | "savings"` - `"checking"` - `"savings"` - `routing_number: string` The routing number of the bank account. - `customer_id?: string | null` Unique identifier of the related customer object. - `expires_at?: string | null` Expiration date and time of the paykey, if applicable. - `external_id?: string | null` Unique identifier for the paykey in your database, used for cross-referencing between Straddle and your systems. - `institution_name?: string | null` Name of the financial institution. - `metadata?: Record | null` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the paykey in a structured format. - `status_details?: StatusDetails` - `changed_at: string` The time the status change occurred. - `message: string` A human-readable description of the current status. - `reason: "insufficient_funds" | "closed_bank_account" | "invalid_bank_account" | 24 more` - `"insufficient_funds"` - `"closed_bank_account"` - `"invalid_bank_account"` - `"invalid_routing"` - `"disputed"` - `"payment_stopped"` - `"owner_deceased"` - `"frozen_bank_account"` - `"risk_review"` - `"fraudulent"` - `"duplicate_entry"` - `"invalid_paykey"` - `"payment_blocked"` - `"amount_too_large"` - `"too_many_attempts"` - `"internal_system_error"` - `"user_request"` - `"ok"` - `"other_network_return"` - `"payout_refused"` - `"cancel_request"` - `"failed_verification"` - `"require_review"` - `"blocked_by_system"` - `"watchtower_review"` - `"validating"` - `"auto_hold"` - `source: "watchtower" | "bank_decline" | "customer_dispute" | 2 more` - `"watchtower"` - `"bank_decline"` - `"customer_dispute"` - `"user_action"` - `"system"` - `code?: string | null` The status code if applicable. - `unblock_eligible?: boolean | null` 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. - `verification_details?: VerificationDetails` - `id: string` Unique identifier for the verification details. - `breakdown: Breakdown` - `account_validation?: AccountValidation` - `codes: Array` - `decision: "accept" | "reject" | "review"` - `"accept"` - `"reject"` - `"review"` - `reason?: string | null` - `name_match?: NameMatch` - `codes: Array` - `decision: "accept" | "reject" | "review"` - `"accept"` - `"reject"` - `"review"` - `correlation_score?: number | null` - `customer_name?: string | null` - `matched_name?: string | null` - `names_on_account?: Array | null` - `reason?: string | null` - `created_at: string` Timestamp of when the verification was initiated. - `decision: "accept" | "reject" | "review"` - `"accept"` - `"reject"` - `"review"` - `messages: Record` Dictionary of all messages from the paykey verification process. - `updated_at: string` Timestamp of the most recent update to the verification details. - `meta: ResponseMetadata` Metadata about the API request, including an identifier and timestamp. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `response_type: "object" | "array" | "error" | "none"` 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"` - `"array"` - `"error"` - `"none"`