---
title: "신용카드"
slug: "ai-application-service-ocr-ocrdocumentocr-creditcard"
updated: 2026-07-23T09:04:22Z
published: 2026-07-23T09:04:22Z
canonical: "api.ncloud-docs.com/ai-application-service-ocr-ocrdocumentocr-creditcard"
---

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

# 신용카드

Classic/VPC 환경에서 이용 가능합니다.

특화 모델 엔진을 사용하여 신용카드의 입력 정보(key-value)를 인식하고 추출합니다.

## 요청

요청 형식을 설명합니다. 요청 형식은 다음과 같습니다.

| 메서드 | URI |
| --- | --- |
| POST | /credit-card |

### 요청 헤더

CLOVA OCR API에서 공통으로 사용하는 헤더에 대한 정보는 [CLOVA OCR 요청 헤더](/docs/ai-application-service-ocr#%EC%9A%94%EC%B2%AD%ED%97%A4%EB%8D%94)를 참조해 주십시오.

### 요청 바디

요청 바디에 대한 설명은 다음과 같습니다.

#### `Content-Type: application/json`인 경우

요청 헤더 `Content-Type`이 `application/json`인 경우의 요청 바디에 대한 설명은 다음과 같습니다.

| 필드 | 타입 | 필수 여부 | 설명 |
| --- | --- | --- | --- |
| `version` | String | Required | 버전 정보 - `V2`만 사용 |
| `requestId` | String | Required | 임의의 API 호출 UUID |
| `timestamp` | Integer | Required | 임의의 API 호출 시각(Timestamp) |
| `images` | Array | Required | images 세부 정보: [images](/docs/ai-application-service-ocr-ocrdocumentocr-creditcard#images1) |

#### `Content-Type: multipart/form-data`인 경우

요청 헤더 `Content-Type`이 `multipart/form-data`인 경우의 요청 바디에 대한 설명은 다음과 같습니다.

| 필드 | 타입 | 필수 여부 | 설명 |
| --- | --- | --- | --- |
| `message` | Object | Required | 요청 데이터 정보 |
| `message.version` | String | Required | 버전 정보 - `V2`만 사용 |
| `message.requestId` | String | Required | 임의의 API 호출 UUID |
| `message.timestamp` | Integer | Required | 임의의 API 호출 시각(Timestamp) |
| `message.images` | Array | Required | images 세부 정보: [images](/docs/ai-application-service-ocr-ocrdocumentocr-creditcard#images1) |
| `file` | File | Required | OCR 인식 이미지 파일 |

#### `images`

`images`에 대한 설명은 다음과 같습니다.

| 필드 | 타입 | 필수 여부 | 설명 |
| --- | --- | --- | --- |
| `format` | String | Required | 이미지 형식 - `jpg` \| `jpeg` \| `png` \| `pdf` \| `tif` \| `tiff` - 이미지: `jpg`, `jpeg`, `png` - 단일 페이지: `pdf`, `tif`, `tiff` - 이미지 형식 중 하나를 선택하여 입력 |
| `name` | String | Required | 임의의 이미지 이름 - 이미지 식별 및 응답 결과 확인 시 사용 |
| `data` | String | Required | Base64 인코딩된 이미지 데이터 - `Content-Type: application/json`일 때 입력 가능 |

### 요청 예시

요청 예시는 다음과 같습니다.

#### `Content-Type: application/json`인 경우

요청 헤더 `Content-Type`이 `application/json`인 경우의 요청 예시는 다음과 같습니다.

```
curl --location --request POST 'https://cbgrx5natw.apigw.ntruss.com/custom/v1/{DomainId}/{InvokeKey}/document/credit-card' \
--header 'Content-Type: application/json' \
--header 'X-OCR-SECRET: {앱 등록 시 발급받은 Secret Key}' \
--data '{
    "version": "V2",
    "requestId": "1234",
    "timestamp": "0",
    "images": [
        {
            "format": "png",
            "data": "{Base64 인코딩된 이미지 데이터}",
            "name": "creaditcard_test2"
    }]
}'
```

#### `Content-Type: multipart/form-data`인 경우

요청 헤더 `Content-Type`이 `multipart/form-data`인 경우의 요청 예시는 다음과 같습니다.

```
curl --location --request POST 'https://cbgrx5natw.apigw.ntruss.com/custom/v1/{DomainId}/{InvokeKey}/document/credit-card' \
--header 'X-OCR-SECRET: {앱 등록 시 발급받은 Secret Key}' \
--header 'Content-Type: multipart/form-data' \
--form 'message="{\"version\": \"V2\", \"requestId\": \"1234\", \"timestamp\": 1724832750462, \"images\": [{\"format\": \"jpg\", \"name\": \"creditcard_test\"}]}"' \
--form '{file}.png"'
```

## 응답

응답 형식을 설명합니다.

### 응답 바디

응답 바디에 대한 설명은 다음과 같습니다.

| 필드 | 타입 | 필수 여부 | 설명 |
| --- | --- | --- | --- |
| `version` | String | - | 버전 정보 - `V2`만 사용 |
| `requestId` | String | - | API 호출 UUID |
| `timestamp` | Integer | - | API 호출 시각(Timestamp) |
| `images` | Array | - | images 세부 정보: [images](/docs/ai-application-service-ocr-ocrdocumentocr-creditcard#images2) |

#### `images`

`images`에 대한 설명은 다음과 같습니다.

| 필드 | 타입 | 필수 여부 | 설명 |
| --- | --- | --- | --- |
| `uid` | String | - | 신용카드 이미지 UID - APi 유효성 검사 시 사용 |
| `name` | String | - | 신용카드 이미지 이름 - 이미지 식별 및 응답 결과 확인 시 사용 |
| `inferResult` | String | - | 신용카드 이미지 인식 결과 - `SUCCESS` \| `FAILURE` \| `ERROR` - `SUCCESS`: 인식 성공 - `FAILURE`: 인식 실패 - `ERROR`: 인식 처리 예외 |
| `message` | String | - | 결과 메시지 |
| `validationResult` | Object | - | 유효성 검사 결과 정보 |
| `validationResult.result` | String | - | 유효성 검사 결과 코드 - `NO_REQUESTED` \| `UNCHECKED` \| `ERROR` \| `VALID` \| `INVALID` - `NO_REQUESTED`: 검증 작업 미요청(유효성 검사 실패) - `UNCHECKED`: 검증 여부 확인 불가 - `ERROR`: 검증 시 에러 발생(유효성 검사 실패) - `VALID`: 검증 결과 유효(유효성 검사 성공) - `INVALID`: 검증 통과 실패 |
| `validationResult.message` | String | - | 유효성 검사 결과 세부 메시지 - 항상 응답되는 값은 아님 |
| `convertedImageInfo` | Object | - | 변환 이미지 정보 - `format`이 `pdf` 또는 `tiff`일 때 - 좌표 값은 호출 이미지 파일을 기준으로 설정 |
| `convertedImageInfo.width` | Integer | - | 변환 이미지 가로 길이 |
| `convertedImageInfo.height` | Integer | - | 변환 이미지 세로 길이 |
| `convertedImageInfo.pageIndex` | Integer | - | 변환 이미지 페이지 인덱스 |
| `creditCard` | Object | - | 신용카드 세부 정보 |
| `creditCard.result` | Object | - | 신용카드 OCR 인식 결과: [result](/docs/ai-application-service-ocr-ocrdocumentocr-creditcard#result) |

#### `result`

`result`에 대한 설명은 다음과 같습니다.

| 필드 | 타입 | 필수 여부 | 설명 |
| --- | --- | --- | --- |
| `name` | Object | - | 카드 소유자 이름 상세 정보 - [공통 객체 정보](/docs/ai-application-service-ocr-ocrdocumentocr-creditcard#%EA%B3%B5%ED%86%B5%EA%B0%9D%EC%B2%B4%EC%A0%95%EB%B3%B4) 참조 |
| `number` | Object | - | 카드 번호 상세 정보 - [공통 객체 정보](/docs/ai-application-service-ocr-ocrdocumentocr-creditcard#%EA%B3%B5%ED%86%B5%EA%B0%9D%EC%B2%B4%EC%A0%95%EB%B3%B4) 참조 |
| `validThru` | Object | - | 카드 유효기간 상세 정보 - [공통 객체 정보](/docs/ai-application-service-ocr-ocrdocumentocr-creditcard#%EA%B3%B5%ED%86%B5%EA%B0%9D%EC%B2%B4%EC%A0%95%EB%B3%B4) 참조 |

#### 공통 객체 정보

공통 객체에 대한 설명은 다음과 같습니다.

| 필드 | 타입 | 필수 여부 | 설명 |
| --- | --- | --- | --- |
| `text` | String | - | 인식된 텍스트 |
| `confidenceScore` | Float | - | 인식된 텍스트 신뢰도 - 0~1 - 신뢰도 값이 클수록 텍스트의 정확도가 높음 |
| `boundingPoly` | Object | - | Bounding Poly 정보 |
| `boudningPoly.vertices` | Array | - | [Bounding Poly Vertices 세부 정보](/docs/ai-application-service-ocr-ocrdocumentocr-creditcard#boundingpolyvertices) |
| `subBoundingPolys` | Array | - | subBoundiongPolys 세부 정보: [subBoundiongPolys](/docs/ai-application-service-ocr-ocrdocumentocr-creditcard#subboundingpolys) |

#### `vertices`

`vertices`에 대한 설명은 다음과 같습니다.

| 필드 | 타입 | 필수 여부 | 설명 |
| --- | --- | --- | --- |
| `x` | Float | - | Bounding Poly X축 좌표 값 |
| `y` | Float | - | Bounding Poly Y축 좌표 값 |

#### `subBoundingPolys`

`subBoundingPolys`에 대한 설명은 다음과 같습니다.

| 필드 | 타입 | 필수 여부 | 설명 |
| --- | --- | --- | --- |
| `x` | Float | - | Sub Bounding Poly X축 좌표 값 |
| `y` | Float | - | Sub Bounding Poly Y축 좌표 값 |

### 응답 상태 코드

CLOVA OCR API에서 공통으로 사용하는 응답 상태 코드에 대한 정보는 [CLOVA OCR 공통 응답 상태 코드](/docs/ai-application-service-ocr#%EC%9D%91%EB%8B%B5%EC%83%81%ED%83%9C%EC%BD%94%EB%93%9C)를 참조해 주십시오.

### 응답 예시

응답 예시는 다음과 같습니다.

#### 성공

호출이 성공한 경우의 응답 예시는 다음과 같습니다.

```
{
    "version": "V2",
    "requestId": "1234",
    "timestamp": 1725005676747,
    "images": [
        {
            "uid": "{uid}",
            "name": "creditcard_test",
            "inferResult": "SUCCESS",
            "message": "SUCCESS",
            "validationResult": {
                "result": "NO_REQUESTED"
            },
            "creditCard": {
                "result": {
                    "name": {
                        "text": "KAIY*** VENY***",
                        "confidence": 0.8576972,
                        "boundingPoly": {
                            "vertices": []
                        },
                        "subBoundingPolys": [
                            {
                                "vertices": [
                                    {
                                        "x": 192.0,
                                        "y": 609.0
                                    },
                                    {
                                        "x": 407.0,
                                        "y": 609.0
                                    },
                                    {
                                        "x": 407.0,
                                        "y": 651.0
                                    },
                                    {
                                        "x": 192.0,
                                        "y": 651.0
                                    }
                                ]
                            } 
                        ]
                    },
                    "number": {
                        "text": "512571781234****",
                        "confidence": 0.999885,
                        "boundingPoly": {
                            "vertices": [
                                {
                                    "x": 187.0,
                                    "y": 450.0
                                },
                                {
                                    "x": 1007.0,
                                    "y": 450.0
                                },
                                {
                                    "x": 1007.0,
                                    "y": 506.0
                                },
                                {
                                    "x": 187.0,
                                    "y": 506.0
                                }
                            ]
                        },
                        "subBoundingPolys": [
                            {
                                "vertices": [
                                    {
                                        "x": 187.0,
                                        "y": 450.0
                                    },
                                    {
                                        "x": 360.0,
                                        "y": 450.0
                                    },
                                    {
                                        "x": 360.0,
                                        "y": 506.0
                                    },
                                    {
                                        "x": 187.0,
                                        "y": 506.0
                                    }
                                ]
                            },
                        ]
                    },
                    "validThru": {
                        "text": "09/23",
                        "confidence": 0.9999175,
                        "boundingPoly": {
                            "vertices": [
                                {
                                    "x": 585.0,
                                    "y": 557.0
                                },
                                {
                                    "x": 735.0,
                                    "y": 557.0
                                },
                                {
                                    "x": 735.0,
                                    "y": 600.0
                                },
                                {
                                    "x": 585.0,
                                    "y": 600.0
                                }
                            ]
                        },
                        "subBoundingPolys": []
                    }
                }
            }
        }
    ]
}
```

#### 실패

호출이 실패한 경우의 응답 예시는 다음과 같습니다.

```
{
    "version": "V2",
    "requestId": "4567",
    "timestamp": 1725003278037,
    "images": [
        {
            "uid": "{uid}",
            "name": "receipt_test2",
            "inferResult": "ERROR",
            "message": "Read page:0 error.",
            "validationResult": {
                "result": "NO_REQUESTED"
            }
        }
    ]
}
```
