> ## Documentation Index
> Fetch the complete documentation index at: https://docs.swervpay.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Set Card PIN

> Set or update the PIN for an NGN Verve card

Set or update the four-digit PIN for an active NGN Verve card. Call this endpoint after the `card.created` webhook confirms that issuance completed successfully.

<RequestExample>
  ```bash cURL theme={null}
  curl -X PATCH https://api.swervpay.co/api/v1/cards/card_123/pin \
    -H "Authorization: Bearer <TOKEN>" \
    -H "Content-Type: application/json" \
    -d '{
      "pin": "1234"
    }'
  ```
</RequestExample>

<Note>
  The PIN must contain exactly four digits. Swerv does not return the PIN in API responses or card webhooks.
</Note>


## OpenAPI

````yaml PATCH /cards/{id}/pin
openapi: 3.0.0
info:
  title: Swervpay Developer API Specification
  version: 0.0.0
servers:
  - url: https://api.swervpay.co/api/v1
    description: Production API
  - url: https://sandbox.swervpay.co/api/v1
    description: Sandbox API
security:
  - bearerAuth: []
paths:
  /cards/{id}/pin:
    patch:
      tags:
        - card.pin
      description: Set or update the PIN for an NGN Verve card
      operationId: setCardPin
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OpenapiSetCardPinRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseSuccessResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsererrorError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsererrorError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsererrorError'
components:
  schemas:
    OpenapiSetCardPinRequest:
      properties:
        pin:
          type: string
      type: object
    ResponseSuccessResponse:
      type: object
      properties:
        message:
          type: string
    UsererrorError:
      type: object
      properties:
        message:
          type: string
        values:
          type: object
          additionalProperties: {}
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````