revoke-customer-mandate
Method: POST
Path: /customers/{customer_id}/mandates/{mandate_id}/revoke
Tags: Mandates
Summary
Revoke mandate
Description
Requests a mandate revoke. If debits are pending, returns revoke_requested until they finish; otherwise applies the change immediately.
Storefront SDK Usage
SDK Method: sdk.customer.revokeMandate()
Example:
const { data, error } = await sdk.customer.revokeMandate({
mandate_id: "mandate_456"
});
if (error) {
console.error("Failed to revoke mandate:", error);
return;
}
console.log("Mandate status:", data.mandate.status);TypeScript Definition
"revoke-customer-mandate": {
parameters: {
query?: never;
header?: never;
path: {
/** @description Customer Id */
customer_id: string;
/** @description Mandate Id */
mandate_id: string;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
message: string;
success: boolean;
content: {
mandate: components["schemas"]["CustomerMandate"];
};
};
};
};
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"]["CustomerMandate"] | CustomerMandate |
components["responses"]["BadRequest"] | BadRequest |
components["responses"]["Unauthorized"] | Unauthorized |
components["responses"]["Forbidden"] | Forbidden |
components["responses"]["NotFound"] | NotFound |
components["responses"]["InternalServerError"] | InternalServerError |
components["responses"]["GatewayTimeout"] | GatewayTimeout |
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": [
"Mandates"
],
"operationId": "revoke-customer-mandate",
"summary": "Revoke mandate",
"description": "Requests a mandate revoke. If debits are pending, returns `revoke_requested` until they finish; otherwise applies the change immediately.",
"externalDocs": {
"url": "https://llm-docs.commercengine.io/storefront/operations/revoke-customer-mandate",
"description": "API reference for the revoke-customer-mandate operation"
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"message",
"success",
"content"
],
"properties": {
"message": {
"type": "string"
},
"success": {
"type": "boolean"
},
"content": {
"properties": {
"mandate": {
"$ref": "#/components/schemas/CustomerMandate"
}
},
"required": [
"mandate"
],
"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": "revokeCustomerMandate"
}Auto-generated from OpenAPI spec and TypeScript definitions