# Delete Visa CTP customer Delete the customer and all their cards from the Visa Click to Pay service, This endpoint generates a [Click to Pay event generated](https://developers.pismo.io/events/docs/cards-tokenization-click-to-pay-1) event. **Notes**: - This endpoint takes an account token - an access token encoded with a Pismo account ID. - The process is asynchronous, success or failure is indicated in the generated event. - This is a PCI endpoint, use the https://gw-pci.pismolabs.io environment. # OpenAPI definition ```json { "openapi": "3.1.0", "info": { "title": "Card issuing - Tokenization", "description": "API endpoints for card tokenization.", "version": "1.0.0", "contact": { "name": "API Support", "url": "https://developers.pismo.io/support" }, "license": { "name": "Copyright Pismo" } }, "servers": [ { "url": "https://gw-pci.pismolabs.io/cards-tokenization", "description": "PCI API server for testing" }, { "url": "https://pci.pismolabs.io/cards-tokenization", "description": "Sandbox API server for testing" } ], "tags": [ { "name": "Visa Click to Pay", "description": "Visa Click to Pay service endpoints" } ], "components": { "parameters": { "CidHeader": { "name": "x-cid", "in": "header", "schema": { "type": "string" }, "description": "Request correlation ID used for tracking on Pismo platform." }, "CustomerIDheader": { "name": "x-customer-id", "in": "header", "required": true, "schema": { "type": "integer" }, "description": "Customer ID" }, "TenantHeader": { "name": "x-tenant", "in": "header", "schema": { "type": "string" }, "description": "Pismo organization/tenant ID", "required": true } }, "schemas": { "ClickToPayBadRequest": { "type": "object", "properties": { "code": { "type": "number", "description": "HTTP response code", "example": 400 }, "message": { "type": "string", "description": "Error description" }, "details": { "type": "array", "description": "Error details", "items": { "type": "string" } } } }, "ClickToPayDeleteCustomerRequest": { "type": "object", "required": [ "owner_bid" ], "properties": { "owner_bid": { "$ref": "#/components/schemas/OwnerBid" } } }, "ClickToPayInternalServerError": { "type": "object", "description": "Click to Pay internal server error", "properties": { "code": { "type": "number", "description": "HTTP response code", "example": 500 }, "message": { "type": "string", "description": "Error description", "example": "Internal server error" } } }, "OwnerBid": { "type": "string", "description": "Owner business ID. Identifies the issuing entity creating or managing enrollment in Click to Pay.\n", "example": "1000052" } }, "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer", "description": "Account token - token encoded with a Pismo account ID. Tokens can expire quickly, which can result in a \"**401 Unauthorized**\" error.", "bearerFormat": "JWT" } } }, "security": [ { "BearerAuth": [] } ], "paths": { "/v1/clicktopay/visa/delete/customer": { "post": { "summary": "Delete Visa CTP customer", "description": "Delete the customer and all their cards from the Visa Click to Pay service,\n\nThis endpoint generates a [Click to Pay event generated](https://developers.pismo.io/events/docs/cards-tokenization-click-to-pay-1) event.\n\n**Notes**:\n\n- This endpoint takes an account token - an access token encoded with a Pismo account ID.\n\n- The process is asynchronous, success or failure is indicated in the generated event.\n\n- This is a PCI endpoint, use the https://gw-pci.pismolabs.io environment.\n", "operationId": "post-v1-clicktopay-delete_customer", "tags": [ "Visa Click to Pay" ], "parameters": [ { "$ref": "#/components/parameters/TenantHeader" }, { "$ref": "#/components/parameters/CustomerIDheader" }, { "$ref": "#/components/parameters/CidHeader" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClickToPayDeleteCustomerRequest" } } } }, "responses": { "202": { "description": "Accepted" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClickToPayBadRequest" }, "examples": { "bad_request": { "value": { "code": 400, "message": "bad request" } }, "invalid_network": { "value": { "code": 400, "message": "invalid network" } }, "bad_request_detailed": { "value": { "code": 400, "message": "bad request", "details": [ "AccountID: cannot be blank", "CustomerID: cannot be blank", "OrgID: cannot be blank." ] } }, "customer_not_in_click_to_pay": { "value": { "code": 400, "message": "customer not enabled to click to pay" } }, "click_to_pay_not_enabled_to_tenant": { "value": { "code": 400, "message": "click to pay is not enabled to tenant" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClickToPayInternalServerError" }, "examples": { "internal_server_error": { "value": { "code": 500, "message": "internal server error" } } } } } } } } } } } ```