> For the complete documentation index, see [llms.txt](https://bleepy.gitbook.io/bleepy-developers/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bleepy.gitbook.io/bleepy-developers/api/auto-payment.md).

# 자동 지급 API

블리피 프로모션 내 기프트 또는 리워드 지급 대상자를 자동으로 처리하기 위한 API 안내 문서입니다. \
해당 API는 지급 대상자인 유저키 정보와 지급 품목 등에 대한 정보를 콜백으로 전달합니다.\
등록 방법은 [API 설정](/bleepy-developers/api/setting.md) 페이지를 참고하세요.

{% hint style="info" %}
프로모션 내에 직접 지급 해야하는 실물 리워드(ex. 자사 쿠폰, 자사 포인트, 배송 상품, 기타)를 설정한 경우, 기프트/리워드 코드가 발급됩니다. \
클라이언트는 콜백으로 전달된 해당 코드를 기반으로 실물 리워드 처리를 진행할 수 있습니다.\
전송 결과에 따라 블리피 시스템 내에서는 기프트/리워드 지급 처리가 완료됩니다.&#x20;

* 기프트/리워드 코드 확인 방법
  * [<mark style="color:orange;">\[Client Admin\]</mark>](https://client-admin.bleepy.io/) 로그인 > 프로모션 상세 페이지 > <mark style="color:blue;">\[개발 정보 확인하기]</mark> 팝업 내에서 확인
    {% endhint %}

***

{% hint style="info" %} <mark style="color:yellow;">해당 API는 블리피 서버 -> 클라이언트 서버로 요청됩니다.</mark>
{% endhint %}

## Request

<table><thead><tr><th width="154">Method</th><th>URL</th></tr></thead><tbody><tr><td><mark style="color:orange;"><code>POST</code></mark></td><td>API 사용 관리 페이지에 등록한 클라이언트별 <mark style="color:blue;">[자동 지급 API]</mark> 주소</td></tr></tbody></table>

### Body

<pre class="language-json"><code class="lang-json"><strong>// Body Example
</strong>list: [ 
  {
    code: "AD3FYTFS", 
    userKey: "2eew35da" 
  }
]
</code></pre>

<table><thead><tr><th width="129">Name</th><th width="235">Type</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:orange;"><code>list</code></mark></td><td>ArrayList&#x3C;AutoPayment></td><td>code, userKey를 전달</td></tr></tbody></table>

### AutoPayment

<table><thead><tr><th width="131">Name</th><th width="234">Type</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:orange;"><code>code</code></mark></td><td>String</td><td>프로모션에 등록된 기프트/리워드 연동 코드</td></tr><tr><td><mark style="color:orange;"><code>userKey</code></mark></td><td>String</td><td>지급 대상 userKey</td></tr></tbody></table>

***

## Response

### 요청 처리 정상

| HTTP status code                        |
| --------------------------------------- |
| <mark style="color:green;">`200`</mark> |

{% hint style="info" %}
참고사항

자동 지급 처리 시 콜백은 list size가 항상 1로 전달 됩니다.&#x20;

지급 처리에 실패해, 지급 처리 메뉴에서 수동으로 재시도 하는 경우 Max 50개까지 전달됩니다.&#x20;

(ex. 70건 지급 처리 재시도 시, 50건 / 20건으로 2번에 걸쳐 전송)
{% endhint %}

{% hint style="info" %}
개발에 대한 추가 설명이 더 필요하신가요?

"[<mark style="color:orange;">\[Client Admin\]</mark>](https://client-admin.bleepy.io/login) 로그인 → 오른쪽 하단 채널톡 위젯" 클릭 후 개발 카테고리에 문의 남겨주시면 기술 개발팀에서 확인 후 연락드리겠습니다.
{% endhint %}
