verify-bank-account
Method: POST
Path: /customers/{customer_id}/bank-accounts/{account_id}/verify
Tags: Bank accounts
Summary
Verify a bank account
Description
Verify a bank account using a signed-in session for the customer in the path. An already verified account returns 200 with the unchanged account, even when is_verified is false or omitted; this operation cannot unverify an account. For an unverified account, is_verified is required: true marks it verified only for the primary user, while false leaves it unverified and returns 200 for any signed-in user of that customer. A non-primary user sending true, or omitting is_verified for an unverified account, receives 400. Verifying also makes the account the default for its account type if no other default exists. Returns the CustomerBankAccount object. A different customer ID returns 403; an unknown account returns 404.
Storefront SDK Usage
SDK Method: sdk.customer.verifyBankAccount()
Example:
const { data, error } = await sdk.customer.verifyBankAccount(
{ account_id: "acct_789" },
{ is_verified: true }
);
if (error) {
console.error("Failed to verify bank account:", error);
return;
}
console.log("Verification status:", data.bank_account?.is_verified);TypeScript Definition
"verify-bank-account": {
parameters: {
query?: never;
header?: never;
path: {
/** @description Bank account id */
account_id: string;
/** @description Customer id */
customer_id: string;
};
cookie?: never;
};
/** @description Required for an unverified account; may be omitted for an already verified account. */
requestBody?: {
content: {
"application/json": {
/** @description Required for an unverified account. Only the primary user can set true. False leaves an unverified account unchanged. Ignored for an already verified account, which remains verified. */
is_verified?: boolean;
};
};
};
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
message: string;
success: boolean;
content: {
bank_account: components["schemas"]["CustomerBankAccount"];
};
};
};
};
400: components["responses"]["BadRequest"];
401: components["responses"]["Unauthorized"];
403: components["responses"]["Forbidden"];
404: components["responses"]["NotFound"];
500: components["responses"]["InternalServerError"];
504: components["responses"]["GatewayTimeout"];
};
};Component References
| Reference | Resolves To |
|---|---|
components["schemas"]["CustomerBankAccount"] | CustomerBankAccount |
components["responses"]["BadRequest"] | BadRequest |
components["responses"]["Unauthorized"] | Unauthorized |
components["responses"]["Forbidden"] | Forbidden |
components["responses"]["NotFound"] | NotFound |
components["responses"]["InternalServerError"] | InternalServerError |
components["responses"]["GatewayTimeout"] | GatewayTimeout |
Request Body
Required for an unverified account; may be omitted for an already verified account.
Content Types: application/json
Responses
200
OK
400
Bad request
401
Authentication failed. Codes include token-required, token-expired and token_not_valid for an invalid or expired token.
403
Access denied. token-required requires an authenticated session; permission-denied means the caller cannot access this resource. On POS, session-expired requires signing in again.
404
Requested resource not found
500
The request failed because of an unexpected error.
504
The request timed out.
OpenAPI Definition
{
"tags": [
"Bank accounts"
],
"operationId": "verify-bank-account",
"summary": "Verify a bank account",
"description": "Verify a bank account using a signed-in session for the customer in the path. An already verified account returns 200 with the unchanged account, even when is_verified is false or omitted; this operation cannot unverify an account. For an unverified account, is_verified is required: true marks it verified only for the primary user, while false leaves it unverified and returns 200 for any signed-in user of that customer. A non-primary user sending true, or omitting is_verified for an unverified account, receives 400. Verifying also makes the account the default for its account type if no other default exists. Returns the CustomerBankAccount object. A different customer ID returns 403; an unknown account returns 404.",
"externalDocs": {
"url": "https://llm-docs.commercengine.io/storefront/operations/verify-bank-account",
"description": "API reference for the verify-bank-account operation"
},
"requestBody": {
"description": "Required for an unverified account; may be omitted for an already verified account.",
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"is_verified": {
"description": "Required for an unverified account. Only the primary user can set true. False leaves an unverified account unchanged. Ignored for an already verified account, which remains verified.",
"type": "boolean"
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"message",
"success",
"content"
],
"properties": {
"message": {
"type": "string"
},
"success": {
"type": "boolean"
},
"content": {
"properties": {
"bank_account": {
"$ref": "#/components/schemas/CustomerBankAccount"
}
},
"required": [
"bank_account"
],
"type": "object"
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
},
"504": {
"$ref": "#/components/responses/GatewayTimeout"
}
},
"security": [
{
"Authorization": []
}
],
"x-speakeasy-group": "customers",
"x-speakeasy-ignore": false,
"x-speakeasy-name-override": "verifyBankAccount"
}Auto-generated from OpenAPI spec and TypeScript definitions