# Update card status Change a card's status. For more information, Refer to the [Card lifecycle and statuses](doc:card-lifecycle-and-statuses) guide. This endpoint generates a [Card updated](https://developers.pismo.io/events/docs/cards-update-1) event. # OpenAPI definition ```json { "openapi": "3.0.1", "info": { "title": "Card issuing - Cards", "version": "1.4.6", "description": "Card endpoints API", "contact": { "name": "API Support", "url": "https://developers.pismo.io/support/" }, "license": { "name": "Copyright Pismo" } }, "servers": [ { "url": "https://sandbox.pismolabs.io", "description": "Sandbox API server for testing." }, { "url": "https://gw-pci.pismolabs.io", "description": "Sandbox PCI API server for testing" } ], "security": [ { "BearerAuth": [] } ], "tags": [ { "name": "Card status", "description": "Card status endpoints" } ], "components": { "parameters": { "accountIdPath": { "in": "path", "name": "accountId", "schema": { "type": "integer" }, "description": "Pismo account ID", "required": true }, "cardId": { "in": "path", "name": "cardId", "schema": { "type": "string" }, "description": "Pismo card ID", "required": true }, "customerIdPath": { "in": "path", "name": "customerId", "schema": { "type": "string" }, "required": true, "description": "Customer ID" } }, "schemas": { "ABUenabled": { "type": "boolean", "description": "\nThis field is **DEPRECATED**. For more information, refer to the [ABU documentation](https://developers.pismo.io/pismo-docs/docs/cards-overview-1#mastercards-automatic-billing-updater-option) in the Cards overview guide.\n\n\nWhen a card is created or reissued, or its account credentials change, Mastercard is notified if this feaure is enabled. Notification updates are sent to Mastercard on a daily basis. \n\nFor more information, refer to Mastercard's ABU documentation.\n", "example": true, "deprecated": true }, "ATC": { "type": "string", "description": "Application Transaction Counter (ATC). The chip card application maintains the ATC as a counter that the chip increments. It provides a reference for each transaction. A duplicate ATC, a decrease in ATC, or a large jump in ATC values may indicate data copying or other fraud. \n\nThough the ATC is a string, it takes the form of an array of integers containing up to 1000 numbers showing the counter's sequence. \n\nFor more information on how Pismo uses the ATC, refer to the [Application Transaction Counter](https://developers.pismo.io/pismo-docs/docs/application-transaction-counter-atc) guide.\n", "example": "[5, 4, 3, 2, 1]" }, "BIN": { "type": "string", "description": "Bank Identification Number (BIN). A 6 or 8 digit number identitying the card network, issuer, and product.", "example": "87634277" }, "Brand": { "type": "string", "description": "Card network, i.e., Visa, Mastercard, ELO, RuPay, Private", "example": "Visa" }, "CardAlias": { "type": "string", "description": "Card alias name for a `VIRTUAL` card. \n\nThis field is **REQUIRED** to be unique for each `VIRTUAL` card a customer owns.\n\nNo matter what is passed for a `PLASTIC` card, the value is always `PLASTIC`.\n", "minLength": 1, "maxLength": 50, "example": "Vacation card" }, "CardID2": { "type": "integer", "description": "Pismo card ID", "example": 123456 }, "CardStatus": { "type": "string", "description": "Card status enum. Refer to the [Card lifecycle and statuses](https://developers.pismo.io/pismo-docs/docs/card-lifecycle-and-statuses) guide for more information and a complete list.\n", "example": "NORMAL" }, "CardType": { "type": "string", "description": "Card type enum:\n * `PLASTIC` - Physical card - plastic or metal.\n * `VIRTUAL` - Digital card with fixed PAN and dynamic CVV.\n * `TEMPORARY` - Virtual card with a fixed PAN and CVV meant for short-term use, typically 24 hours. For more information, refer to [Configuring temporary cards](https://developers.pismo.io/pismo-docs/docs/cards-overview-1#configuring-temporary-cards) in the Cards management guide.\n * `RECURRING` - Virtual card with a fixed PAN and CVV originally meant for use with recurring subscriptions. This type is being **DEPRECATED** and it is recommended you use `VIRTUAL` instead. \n", "example": "VIRTUAL", "enum": [ "PLASTIC", "VIRTUAL", "RECURRING", "TEMPORARY" ] }, "Contactless": { "type": "boolean", "description": "For physical cards. Is card enabled for contactless transactions? \n \nWith contactless transactions, you hold or tap the card on contactless-enabled card reader to complete a transaction. This requires that both the card and the terminal have Near Field Communication (NFC) technology. Most embossers can create plastic contactless cards.\n\nDefault is `true`.\n", "default": true, "example": false }, "DualMessageDebit": { "type": "boolean", "description": "For Mastercard - if card is DMC, where the debit has authorization and confirmation at different times, base I and base II, respectively. Unlike Mastercard's Maestro debit, where authorization and confirmation take place at the same time (base I). \n\nDefault is `false`.\n" }, "EmbossingCustomField": { "type": "string", "description": "For physical cards. Additional information for embossing company. For example: tracking number or whether the card should be plastic or metal. \n\nYou can use this field for any embossing needs specific to your business. Whatever is sent must be agreed upon with the embosser—what to send, what values to send, what format to send, what size to send for each value, and so on.\n", "example": "Tracking ID = 5859930", "maxLength": 1000 }, "ExpirationDate": { "type": "string", "description": "Card expiration date (format = yymm). If passed, the card expiration date is not calculated using the \"Card expiration (# of months)\" program parameter.\n", "example": "2803" }, "Hash": { "type": "string", "description": "Encrypted Primary Account Number (PAN). This field does not exist until the card PCI data is asynchronously created.\n", "example": "WEPvOQuZvjfYEd0iBmr43bhWyOsylIsW95ebYrLD89App2iEq9IizP+8w73pxKQ4mI47EdhzYHF9RfXjrBOyug==" }, "IssuingDate": { "type": "string", "description": "Date/time when card was issued in RFC3339 format, i.e., 2019-07-03T17:23:18Z", "example": "2019-07-03T17:23:18Z" }, "Last4Digits": { "type": "string", "description": "Last four Primary Account Number (PAN) digits. This field does not exist until the card PCI data is asynchronously created.\n", "example": "4321" }, "Metadata": { "type": "object", "description": "Any key-value object. Max length = 3200 bytes. This **must** be valid JSON data.", "example": { "my-custom-key": "my-custom-value" }, "maxLength": 3200 }, "Mode": { "type": "string", "description": "Mode enum:\n`CREDIT` - Single credit card\n`DEBIT` - Single debit card\n`COMBO` - Card has both a credit and debit *mode*, meaning it is associated with both a credit and debit program and account.\n`MULTIPLE` - Combination card created with the DEPRECATED [Create combo card](https://developers.pismo.io/pismo-docs/reference/post-v1-combocard-relationship) endpoint. \n\nFor more information, refer to the [mode documentation](https://developers.pismo.io/pismo-docs/docs/cards-overview-1#create-a-combination-card-with-card-modes) in the Card management guide.\n", "example": "CREDIT", "enum": [ "CREDIT", "DEBIT", "COMBO", "MULTIPLE" ] }, "NumberOfTransactions": { "type": "integer", "description": "Maximum transactions allowed", "example": 40 }, "PasswordTries": { "type": "integer", "description": "Number of times the password was tried", "example": 1 }, "PreviousStatus": { "type": "string", "description": "Previous card status. \n\nRefer to the [Card lifecycle and statuses](https://developers.pismo.io/pismo-docs/docs/card-lifecycle-and-statuses) guide for more information and a complete list.\n", "example": "NORMAL" }, "PrintedName": { "type": "string", "minLength": 2, "maxLength": 26, "example": "Chester Fields", "description": "Printed/embossed card name.\n\nCurrently, you have 3 ways to populate this field:\n \n 1. During account creation via the `application.applicant.personal.social_name` field.\n 2. During account creation via the `application.applicant.personal.name` field when the field in #1 is not set.\n 3. Passing the `printed_name` field during card creation, updating a card, or when reissuing a card. This takes priority over #1 and #2.\n\nNo letters with accents, numbers, or special characters - only letters (a-z|A-Z) and space, as specified in the ISO EMV tag 5F20 for cardholder name.\n\n**REQUIRED** for an `UNNUMBERED` card (Card created without PIN or PAN that issuer defines at some point in the future.)\n" }, "ReissuedCardID": { "type": "integer", "description": "Last issued card ID", "example": 123456 }, "TemplateID": { "type": "string", "description": "Template ID. Templates are used to implement the BIN override feature. For more information, refer to the [BIN override](https://developers.pismo.io/pismo-docs/docs/bin-override-feature) guide.\n", "example": "EAFA693A-57B2-4029-97F3-D20D6F06D79B" }, "TransactionLimit": { "type": "string", "description": "Optional for virtual cards. Maximum amount allowed per transaction. Set up to the approved limit. If not set, account limit is used.", "example": "500.00" }, "UpdateCardStatus": { "type": "object", "description": "Update card status request body", "properties": { "status": { "$ref": "#/components/schemas/CardStatus" } } }, "UpdateCardStatusResponse": { "type": "object", "description": "Update card status response object", "properties": { "program": { "type": "object", "properties": { "id": { "type": "string", "description": "Program ID" } } }, "account": { "type": "object", "properties": { "id": { "type": "string", "description": "Account ID" } } }, "customer": { "type": "object", "properties": { "id": { "type": "string", "description": "Customer ID" } } }, "org": { "type": "object", "properties": { "id": { "type": "string", "description": "Org ID" } } }, "id": { "$ref": "#/components/schemas/CardID2" }, "hash": { "$ref": "#/components/schemas/Hash" }, "last_4_digits": { "$ref": "#/components/schemas/Last4Digits" }, "first_4_digits": { "type": "string", "description": "First 4 PAN digits. This field is DEPRECATED and it is recommended you use the `bin` field instead.", "deprecated": true }, "brand": { "$ref": "#/components/schemas/Brand" }, "number_of_transactions": { "$ref": "#/components/schemas/NumberOfTransactions" }, "bin": { "$ref": "#/components/schemas/BIN" }, "atc": { "$ref": "#/components/schemas/ATC" }, "status": { "$ref": "#/components/schemas/CardStatus" }, "previous_status": { "$ref": "#/components/schemas/PreviousStatus" }, "issuing_date": { "$ref": "#/components/schemas/IssuingDate" }, "expiration_date": { "$ref": "#/components/schemas/ExpirationDate" }, "printed_name": { "$ref": "#/components/schemas/PrintedName" }, "name": { "$ref": "#/components/schemas/CardAlias" }, "tracking": { "type": "integer", "description": "File sent to embosser tracking ID" }, "track_number": { "type": "integer", "description": "Sequential counter incremented every time card is reissued.", "example": 2 }, "migration_id": { "type": "string", "description": "Migration ID (if card migrated to Pismo)." }, "transaction_limit": { "$ref": "#/components/schemas/TransactionLimit" }, "password_tries": { "$ref": "#/components/schemas/PasswordTries" }, "embossing_custom_field": { "$ref": "#/components/schemas/EmbossingCustomField" }, "contactless_enabled": { "$ref": "#/components/schemas/Contactless" }, "abu_enabled": { "$ref": "#/components/schemas/ABUenabled" }, "reissued_card_id": { "$ref": "#/components/schemas/ReissuedCardID" }, "type": { "$ref": "#/components/schemas/CardType" }, "metadata": { "$ref": "#/components/schemas/Metadata" }, "template_id": { "$ref": "#/components/schemas/TemplateID" }, "valid_until": { "$ref": "#/components/schemas/ValidUntil" }, "bulk_id": { "type": "string", "description": "Noname bulk/batch ID" }, "external_id": { "type": "string", "description": "Client internal tracking ID", "maxLength": 255 }, "mode": { "$ref": "#/components/schemas/Mode" }, "dual_message_debit": { "$ref": "#/components/schemas/DualMessageDebit" } }, "example": { "program": { "id": "8519" }, "account": { "id": "102378693" }, "customer": { "id": "102377856" }, "org": { "id": "TN-f878e4a1-2879-48ba-be16-821e73ac98db" }, "id": 6741322, "hash": "WEPvOQuZvjfYEd0iBmr43bhWyOsylIsW95ebYrLD89App2iEq9IizP+8w73pxKQ4mI47EdhzYHF9RfXjrBOyug==", "last_4_digits": "3598", "first_4_digits": "null", "status": "PENDING", "stage": "UNBLOCKED", "issuing_date": "2022-01-04T17:20:15Z", "expiration_date": "2027-01-04T00:00:00Z", "printed_name": "Mabel Syrup", "name": "Vacation card 2", "tracking": 4859, "track_number": 1, "transaction_limit": "100", "embossing_custom_field": "Emboss it, emboss it good", "contactless_enabled": true, "abu_enabled": true, "reissued_card_id": 38474, "type": "VIRTUAL", "metadata": { "my-custom-key": "my-custom-value" }, "template_id": "null", "valid_until": "null", "bulk_id": "null", "external_id": "null", "mode": "CREDIT", "dual_message_debit": true } }, "ValidUntil": { "type": "string", "description": "Card validation date in UTC time (format:yyyy-MM-ddThh:mm:ssZ). For `TEMPORARY` virtual cards, which have a limited time frame, typically 24 hours (default), or according to the program parameter for this, which is why the date/time here is more granular than `expiration_date`. \n\nFor more information, refer to [Configuring temporary cards](https://developers.pismo.io/pismo-docs/docs/cards-overview-1#configuring-temporary-cards).\n", "example": "2021-07-03T17:23:18Z" } }, "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer", "description": "Account token - an access token encoded with a Pismo account ID. Tokens can expire quickly, which can result in an \"Unauthorized\" error.", "bearerFormat": "JWT" } }, "responses": { "401Unauthorized": { "description": "Access token is missing or invalid" }, "403Forbidden": { "description": "You don't have permission to access this resource" }, "500InternalServer": { "description": "Internal server error" } } }, "paths": { "/wallet/v1/customers/{customerId}/accounts/{accountId}/cards/{cardId}/status": { "put": { "operationId": "put-v1-card-status", "summary": "Update card status", "description": "Change a card's status. For more information, Refer to the [Card lifecycle and statuses](https://developers.pismo.io/pismo-docs/docs/card-lifecycle-and-statuses) guide.\n\nThis endpoint generates a [Card updated](https://developers.pismo.io/events/docs/cards-update-1) event.\n", "tags": [ "Card status" ], "parameters": [ { "$ref": "#/components/parameters/cardId" }, { "$ref": "#/components/parameters/accountIdPath" }, { "$ref": "#/components/parameters/customerIdPath" } ], "requestBody": { "description": "Request body", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateCardStatus" } } } }, "responses": { "200": { "description": "Card information", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateCardStatusResponse" } } } }, "401": { "$ref": "#/components/responses/401Unauthorized" }, "403": { "$ref": "#/components/responses/403Forbidden" }, "500": { "$ref": "#/components/responses/500InternalServer" } } } } } } ```