# POST /Indoor/api/setCreditCardPin

**Resource:** [PIN and card security](../resources/PIN-and-card-security.md)
**Service that generates a card PIN**
**Operation ID:** `setCreditCardPin`

Sets or verifies the PIN for a credit card. The SetCreditCardPin method first validates the card status of the customer and throws an exception if the card is in an invalid or problematic state. It then calls the credit PIN management service to set the PIN and returns the encrypted PIN and success flag. The VerifyCreditCardPin method verifies the provided PIN against the credit PIN management service and returns whether it is correct, along with remaining attempt counts and whether the try limit is exceeded.

## Request Body

Set Credit Card Pin Request

**Required:** Yes

**Content Types:** `application/json`

**Schema:** [SetCreditCardPinRequest](../schemas/Set/SetCreditCardPinRequest.md)

## Responses

| Status | Description |
|--------|-------------|
| 200 | Success |
| 400 | (reference) |
| 404 | (reference) |
| 500 | (reference) |

**Success Response Schema:**

[SetCardPinResponse](../schemas/Set/SetCardPinResponse.md)

