> For the complete documentation index, see [llms.txt](https://develop-hotopay.potatosoft.kr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://develop-hotopay.potatosoft.kr/useful-methods-subscriptions.md).

# 유용한 메소드 - 정기결제

### 현재 특정 상품을 구독하고 있는지 확인하는 메소드

`HotopayModel::getActiveSubscriptionsByMemberSrlWithProductSrlAndStatus($member_srl, $product_srl)`

리턴타입 : `Array`

#### 파라메터

<table><thead><tr><th width="176.33333333333331">이름</th><th width="222">설명</th><th>필수여부</th></tr></thead><tbody><tr><td>member_srl</td><td>라이믹스 멤버 고유 번호</td><td>Y</td></tr><tr><td>product_srl</td><td>상품 번호</td><td>Y</td></tr></tbody></table>

입력한 상품을 구독하고 있다면 리턴 Array에 Subscription 데이터가 추가됨.

#### 코드 예시

```
$subscriptions = HotopayModel::getActiveSubscriptionsByMemberSrlWithProductSrlAndStatus(4, 1000);

if (count($subscriptions) > 0) {
    // 4번 유저가 상품번호 1000 상품을 구독중인 상태
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://develop-hotopay.potatosoft.kr/useful-methods-subscriptions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
