파트너 대시보드의 모든 기능을 API 키를 사용해 HTTP로 이용할 수 있어요. 기본 URL은 https://flarestore.vip이에요. 모든 응답은 JSON이며 success를 포함해요. 금액은 항상 센트 단위의 정수예요.

인증

API 키

모든 요청에 키를 bearer 토큰으로 보내세요. 대시보드의 API 액세스에서 확인할 수 있어요. 키는 fs_pk_... 형식이에요.

# 모든 요청은 이런 형식이에요 curl https://flarestore.vip/api/partner/me \ -H "Authorization: Bearer fs_pk_your_key_here"

키는 암호처럼 다루세요 — 잔액을 사용할 수 있어요. 유출되면 대시보드에서 교체하세요. 이전 키는 즉시 작동을 멈춰요. 웹 대시보드는 대신 세션 쿠키를 사용하므로 키를 교체해도 로그아웃되지 않아요.

요청 한도: 분당 GET 120회, POST 60회이며, 로그인과 슬롯 사용에는 더 엄격한 한도(분당 30회)가 적용돼요. 한도를 넘으면 429가 반환돼요 — 잠시 기다린 후 다시 시도하세요.

계정

내 정보

GET /api/partner/me API 키 또는 세션

내 계정: slug, 표시 이름, 계정 유형, 잔액, 추천 URL.

{ "success": true, "partner": { "slug": "yourname", "display_name": "Your Name", "account_type": "wholesale", "balance": 4250, "referral_url": "https://flarestore.vip/p/yourname" } }
POST /api/partner/me/api-key/rotate API 키 또는 세션

새 API 키를 발급해요. 응답이 오는 즉시 이전 키는 작동을 멈추므로, 호출하기 전에 연동을 업데이트하세요.

카탈로그

판매할 수 있는 상품과 가격

GET /api/partner/me/catalog API 키 또는 세션

계정에 활성화된 모든 플랜과 확정된 가격이에요. 자체 스토어를 만들 때 사용할 엔드포인트이며, 계정에 적용된 가격 모델이 이미 반영되어 있어요.

도매 계정은 your_price를 받아요:

{ "account_type": "wholesale", "plans": [ { "plan_id": "standard", "name": "Standard", "your_price": 600, "orderable": true }, { "plan_id": "ios_6m", "name": "iOS 6M Protection", "your_price": 1200, "orderable": true } ] }

제휴 계정은 대신 customer_price와 your_commission을 받아요:

{ "account_type": "affiliate", "plans": [ { "plan_id": "standard", "name": "Standard", "customer_price": 900, "your_commission": 135 } ] }

orderable: false는 플랜이 목록에는 있지만 현재 사용할 수 없다는 뜻이에요. true로 바뀔 때까지 고객에게 제공하지 마세요.

리포트

판매, 수익 및 인증서

GET /api/partner/me/stats API 키 또는 세션

합계와 플랜별 상세 내역. 제휴 파트너는 획득·지급·미지급 수수료를, 도매 파트너는 총 지출과 현재 잔액을 받아요.

GET /api/partner/me/sales API 키 또는 세션

내 주문, 최신순. ?limit=(1–200, 기본값 50)와 ?offset=을 사용할 수 있어요. 고객 이메일과 결제 정보는 절대 포함되지 않아요.

GET /api/partner/me/payouts API 키 또는 세션

제휴 전용. 지급 내역과 현재 미지급 잔액.

GET /api/partner/me/certificates API 키 또는 세션

내 주문으로 발급된 모든 인증서, 최신순. ?limit=(1–200, 기본값 100), ?offset=, ?include_revoked=true를 사용할 수 있어요.

반환되는 내용은 트랙에 따라 달라요. 도매 계정은 직접 고객에게 제공하므로 각 행에 p12 암호와 다운로드 URL이 포함돼요:

{ "cert_id": "a1b2c3d4e5f6", "cert_type": "distribution", "status": "active", "udid": "00008030-001A2B3C4D5E6F70", "plan_name": "Standard", "order_id": "A1B2C3D4", "p12_password": "...", "p12_url": "/api/cert/a1b2c3d4e5f6/p12?udid=...", "provision_urls": ["/api/cert/a1b2c3d4e5f6/provision/0?udid=..."] }

제휴 계정은 p12_password, p12_url, provision_urls가 없는 같은 행을 받아요. 해당 고객은 FlareStore에서 직접 구매했으므로 키 자료는 고객의 것이에요. 인증서의 존재, 플랜, 활성 또는 취소 여부는 여전히 확인할 수 있어요.

도매

슬롯 구매 및 사용

이 엔드포인트는 도매 전용이에요. 제휴 계정에서는 403을 반환해요.

GET /api/partner/me/balance API 키 또는 세션

현재 잔액(센트 단위).

GET /api/partner/me/ledger API 키 또는 세션

충전, 슬롯 차감, 환불, 조정 등 모든 잔액 변동과 각 변동 후 잔액.

POST /api/partner/me/orders API 키 또는 세션

슬롯 하나를 사용해요. 단가가 차감되고, 기기가 등록되며, 프로비저닝이 시작돼요.

curl -X POST https://flarestore.vip/api/partner/me/orders \ -H "Authorization: Bearer fs_pk_your_key_here" \ -H "Content-Type: application/json" \ -d '{"plan_id": "standard", "udid": "00008030-001A2B3C4D5E6F70"}'
curl -X POST https://flarestore.vip/api/partner/me/orders \ -H "Authorization: Bearer fs_pk_your_key_here" \ -H "Content-Type: application/json" \ -d '{"plan_id": "watch", "udid": "00008030-001A2B3C4D5E6F70", "watch_udid": "00008310-000F45D03A7A601E"}'

iPhone + Apple Watch (베타): watch 플랜은 watch_udid(페어링된 Apple Watch)도 필요해요. 두 기기는 하나의 인증서에 함께 등록되며, udid는 iPhone이에요. 페어의 UDID는 나중에 변경할 수 없어요. 새 iPhone이나 Watch는 새 슬롯이 필요해요. 주문 조회에 watch_udid가 포함돼요.

주문, 청구 금액, 새 잔액, 그리고 고객이 인증서를 받을 때 사용하는 액세스 토큰을 반환해요:

{ "success": true, "order_id": "A1B2C3D4", "charged": 600, "balance": 3650, "access_token": "...", "status_url": "https://flarestore.vip/api/order-status?token=..." }

프로비저닝은 비동기로 진행돼요. 인증서가 준비될 때까지 status_url 또는 /me/orders/{order_id}를 폴링하세요. 프로비저닝을 시작할 수 없으면 잔액이 자동으로 환불되므로 받지 못한 슬롯에 대해서는 절대 청구되지 않아요.

재시도와 중복 주문. Idempotency-Key 헤더(1–200자의 출력 가능한 문자, 공백 없음, 주문마다 고유, 예: UUID)를 보내면 재시도한 요청이 슬롯을 두 번 구매하지 않아요. 같은 키와 같은 본문으로 반복하면 원래 응답이 변경 없이 다시 반환되고 다시 청구되지 않으며, Idempotent-Replayed: true 헤더가 붙어요. 같은 키에 다른 본문을 보내면 422로 거부되고, 첫 요청이 아직 처리 중일 때 반복하면 409를 받아요. 실패한 요청은 키를 해제해요. 키는 7일 동안 보관돼요.

키 없이 10분 이내에 같은 플랜으로 같은 UDID를 다시 사용하면 새 주문 대신 기존 주문이 반환돼요: charged는 0이고, duplicate_of에 해당 주문이 표시되며, Idempotent-Replayed: true가 설정돼요. 환불되었거나 실패한 주문은 포함되지 않아요. 같은 기기를 의도적으로 빠르게 다시 사용해야 한다면 계정에서 이 기능을 꺼 달라고 요청하세요.

POST /api/partner/me/signing-settings API 키 또는 세션

UDID를 다시 서명하기 전에 확인해요. 기본값은 꺼짐으로, UDID를 몇 번이든 서명할 수 있어요. 켜면 POST /me/orders가 이미 서명한 UDID(플랜, 날짜 무관, 환불·실패 주문 제외)를 409와 "error": "already_signed"로 거부하며 청구하지 않아요. 그래도 서명하려면 "confirm_resign": true로 같은 요청을 다시 보내세요. 리셀러 패널의 계정 › 같은 UDID 다시 서명하기와 같은 설정이에요.

curl -X POST https://flarestore.vip/api/partner/me/signing-settings \ -H "Authorization: Bearer fs_pk_your_key_here" \ -H "Content-Type: application/json" \ -d '{"ask_before_resign": true}'

GET은 현재 값을 반환해요. 도매 계정 전용.

409 응답에는 해당 UDID의 이전 주문이 최신순으로 표시돼요:

{ "success": false, "error": "already_signed", "detail": "You already signed this UDID (order A1B2C3D4). You were not charged. ...", "count": 1, "orders": [{ "order_id": "A1B2C3D4", "plan_id": "basic", "created_at": "2026-11-22T15:28:00Z", "seconds_ago": 120 }] }

위의 10분 중복 방지가 여전히 먼저 실행되므로, 10분 이내의 동일한 재시도는 confirm_resign이 있어도 기존 주문을 반환해요(청구 없음).

GET /api/partner/me/orders/{order_id} API 키 또는 세션

내 주문 하나의 상태(기기 및 프로비저닝 상태 포함). 다른 파트너의 주문은 404를 반환해요.

WHOLESALE

Notes on orders, UDIDs and certificates

Keep your own reference (customer name, your order number…) with each slot. A note is plain text, up to 500 characters, private to your account: your customer never sees it. It belongs to the order, so it covers that UDID and every certificate issued on it. It is returned as note in /me/sales, /me/orders/{order_id}, /me/certificates and /me/recent-redeems. Control and invisible characters are removed; an empty note clears it. Wholesale accounts only; an order that isn't yours is a 404.

POST /api/partner/me/orders API KEY OR SESSION

Add "note" when you redeem. A note that is too long is refused with 400 before anything is charged.

curl -X POST https://flarestore.vip/api/partner/me/orders \ -H "Authorization: Bearer fs_pk_your_key_here" \ -H "Content-Type: application/json" \ -d '{"plan_id": "standard", "udid": "00008030-001A2B3C4D5E6F70", "note": "Ali K. / shop order 5521"}'
PUT /api/partner/me/notes API KEY OR SESSION

Set or change a note later. Name the slot with exactly one of order_id, cert_id or udid. A UDID you redeemed more than once answers 409 several_orders with the order ids: send one of them, or "all": true to note every order of that UDID.

curl -X PUT https://flarestore.vip/api/partner/me/notes \ -H "Authorization: Bearer fs_pk_your_key_here" \ -H "Content-Type: application/json" \ -d '{"cert_id": "c36f52ee-d31", "note": "replacement sent 30 Nov"}'

GET /api/partner/me/notes?udid=… (or ?order_id= / ?cert_id=) reads them back:

{ "success": true, "count": 1, "notes": [{ "order_id": "A1B2C3D4", "receipt_number": "FSW1234-5678", "udid": "00008030-001A2B3C4D5E6F70", "cert_ids": ["c36f52ee-d31"], "note": "replacement sent 30 Nov", "note_updated_at": "2026-11-30T12:00:00Z" }] }

Per order: GET, PUT ({"note": "..."}) and DELETE /api/partner/me/orders/{order_id}/note.

WHOLESALE

Sign an app from an IPA URL

Sign any IPA with one of your certificates without downloading or uploading anything: send the link, get an install link back.

POST /api/partner/me/sign API KEY OR SESSION

Body: ipa_url plus cert_id (or order_id: its active distribution certificate is used first). Optional bundle_id, app_name. The certificate must be an active one of yours.

curl -X POST https://flarestore.vip/api/partner/me/sign \ -H "Authorization: Bearer fs_pk_your_key_here" \ -H "Content-Type: application/json" \ -d '{"cert_id": "c36f52ee-d31", "ipa_url": "https://example.com/MyApp.ipa"}'
{ "success": true, "install_url": "https://flarestore.app/i/abc123", "cert_id": "c36f52ee-d31", "order_id": "A1B2C3D4" }

The link must be https:// on port 443, publicly reachable, and lead (after at most 5 redirects) to the .ipa itself; max 500 MB, downloaded within 10 minutes. Links to private, internal or cloud-metadata addresses, links with a user name or password, archives that unpack to more than 8 GB, have more than 200,000 files, look like zip bombs or contain unsafe paths are refused with 400 (too large: 413). One signing at a time per account and 30 per hour (429 above that). The install link stays valid for 48 hours.

오류

상태 코드

코드의미해결 방법
400잘못된 요청 — 필드가 없거나 형식이 잘못됨본문을 확인하세요. 메시지에 문제가 표시돼요
401인증 정보 없음Authorization 헤더를 보내세요
402잔액 부족충전하세요. 메시지에 부족한 금액이 표시돼요
403잘못된 키 또는 엔드포인트에 맞지 않는 계정 유형키와 트랙을 확인하세요
404찾을 수 없거나 내 것이 아님ID가 내 계정의 것인지 확인하세요
409현재 사용할 수 없는 플랜나중에 다시 시도하거나 다른 플랜을 선택하세요
409이미 서명한 UDID(다시 서명 전 확인 켜짐) — already_signed의도한 것이라면 "confirm_resign": true로 다시 보내세요
429요청 한도 초과잠시 기다린 후 다시 시도
500서버 측 오류청구되지 않았어요. 다시 시도한 후 알려 주세요

오류에는 사람이 읽을 수 있는 detail이 포함돼요 — 기록해 두세요. 보통 무엇이 잘못됐는지 정확히 알려 줘요.