콘텐츠로 건너뛰기

개요

  • 버전: 2.0
  • 서버: https://api.xsolla.com/merchant/v2/

본 API 참조는 정기 결제, 쿠폰 및 프로모션 관리 엔드포인트에 관하여 기술하고 있습니다. 정기 결제에 대한 더 자세한 내용은 제품 가이드용어집을 참조하십시오.

OpenAPI 설명 다운로드
언어
서버
Mock server
https://xsolla.redocly.app/_mock/ko/api/subscriptions/
작업
작업
작업

요청

Gets a specific subscription details by ID.

보안
basicAuth
경로
project_idinteger필수

Project ID.

subscription_idinteger필수

Subscription ID.

curl -i -X GET \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/ko/api/subscriptions/projects/{project_id}/subscriptions/{subscription_id}'

응답

OK(확인).

본문application/json
charge_amountnumber(float)

Billing amount.

commentstring

정기 결제 상태를 변경하는 이유

currencystring

구매 통화입니다. ISO 4217에 따른 3자리 통화 코드입니다.

date_createstring(datetime)

ISO 8601에 따라 YYYY-MM-DD’T’HH:MM:SS 형식으로 되어 있는 정기 결제 생성 날짜입니다.

date_endstring(datetime)

ISO 8601에 따라 YYYY-MM-DD’T’HH:MM:SS 형식으로 되어 있는 정기 결제 종료 날짜입니다.

date_last_chargestring or null(datetime)

ISO 8601에 따라 YYYY-MM-DD’T’HH:MM:SS 형식으로 되어 있는 마지막 정기 결제 요금 청구 날짜입니다.

date_next_chargestring or null(datetime)

ISO 8601에 따라 YYYY-MM-DD’T’HH:MM:SS 형식으로 되어 있는 다음 정기 결제 요금 청구 날짜입니다.

idinteger

정기 결제 ID

planobject
plan.​billing_retryobject

청구 재시도 세부 정보입니다.

plan.​billing_retry.​valueinteger필수

청구 재시도 횟수입니다.

plan.​chargeobject

청구 세부 정보입니다.

plan.​charge.​amountnumber(float)

Billing amount.

plan.​charge.​currencystring

구매 통화입니다. ISO 4217에 따른 3자릿수 통화 코드입니다.

plan.​charge.​periodobject필수

청구 기간입니다.

plan.​charge.​period.​typestring필수

시간 단위입니다. day, month 혹은 lifetime일 수 있습니다.

열거형"day""month""lifetime"
plan.​charge.​period.​valueinteger필수

시간 단위 수입니다. 값은 유형 매개 변수에 따라 달라지며 다음이 될 수 있습니다:
typeday인 경우 1~366,
typemonth인 경우 1~12,
typelifetime인 경우 0

plan.​charge.​pricesArray of objects

다양한 통화로 되어 있는 가격 목록입니다.

plan.​charge.​prices[].​amountnumber(float)필수

Billing amount.

plan.​charge.​prices[].​currencystring필수

구매 통화입니다. ISO 4217에 따른 3자릿수 통화 코드입니다.

plan.​charge.​prices[].​setup_feenumber(float)

첫 청구서의 일부로 청구되는 일회성 설정 수수료입니다.

plan.​descriptionobject

요금제 설명입니다. "localization":"plan description" 쌍으로 구성된 값입니다.

plan.​description.​arstring

아랍어.

plan.​description.​bgstring

불가리아어.

plan.​description.​cnstring

중국어(간체).

plan.​description.​csstring

체코어.

plan.​description.​destring

독일어.

plan.​description.​enstring

영어.

plan.​description.​esstring

스페인어.

plan.​description.​frstring

프랑스어.

plan.​description.​hestring

히브리어.

plan.​description.​itstring

이탈리아어.

plan.​description.​jastring

일본어.

plan.​description.​kostring

한국어.

plan.​description.​plstring

폴란드어.

plan.​description.​ptstring

포르투갈어.

plan.​description.​rostring

루마니아어.

plan.​description.​rustring

러시아어.

plan.​description.​thstring

태국어.

plan.​description.​trstring

터키어.

plan.​description.​twstring

중국어(번체).

plan.​description.​vistring

베트남어.

plan.​expirationobject

정기 결제 만료 세부 정보입니다.

plan.​expiration.​typestring필수

시간 단위입니다. day 혹은 month일 수 있습니다.

열거형"day""month"
plan.​expiration.​valueinteger or null필수

만료 전 남은 기간입니다.

plan.​external_idstring

Plan external ID (32 characters).

plan.​grace_periodobject

Grace period details.

plan.​grace_period.​typestring필수

시간 단위입니다. day일 수 있습니다.

"day"
plan.​grace_period.​valueinteger필수

Number of time units.

plan.​group_idstring or null

이러한 요금제가 연결된 그룹의 ID입니다.

plan.​idinteger

정기 결제 요금제 ID입니다.

plan.​nameobject

요금제 이름입니다. "localization":"plan name" 쌍으로 구성된 값입니다.

plan.​name.​arstring

아랍어.

plan.​name.​bgstring

불가리아어.

plan.​name.​cnstring

중국어(간체).

plan.​name.​csstring

체코어.

plan.​name.​destring

독일어.

plan.​name.​enstring

영어.

plan.​name.​esstring

스페인어.

plan.​name.​frstring

프랑스어.

plan.​name.​hestring

히브리어.

plan.​name.​itstring

이탈리아어.

plan.​name.​jastring

일본어.

plan.​name.​kostring

한국어.

plan.​name.​plstring

폴란드어.

plan.​name.​ptstring

포르투갈어.

plan.​name.​rostring

루마니아어.

plan.​name.​rustring

러시아어.

plan.​name.​thstring

태국어.

plan.​name.​trstring

터키어.

plan.​name.​twstring

중국어(번체).

plan.​name.​vistring

베트남어.

plan.​project_idinteger

Project ID.

plan.​refund_periodinteger or null

사용자가 정기 결제 요금제 지급금을 환불할 수 있는 기간(일 단위)입니다.

plan.​statusobject
plan.​status.​valuestring

정기 결제 요금제 상태입니다.

열거형"active""disabled"
plan.​tagsArray of strings

Plan tags.

plan.​trialobject

무료체험 기간 세부 정보입니다.

plan.​trial.​typestring필수

시간 단위입니다. day일 수 있습니다.

"day"
plan.​trial.​valueinteger필수

Number of time units.

productobject or null
product.​idinteger or null

Product ID the plans are linked to.

product.​descriptionobject

현지화된 아이템 설명입니다.

product.​description.​arstring

아랍어.

product.​description.​bgstring

불가리아어.

product.​description.​cnstring

중국어(간체).

product.​description.​csstring

체코어.

product.​description.​destring

독일어.

product.​description.​enstring

영어.

product.​description.​esstring

스페인어.

product.​description.​frstring

프랑스어.

product.​description.​hestring

히브리어.

product.​description.​itstring

이탈리아어.

product.​description.​jastring

일본어.

product.​description.​kostring

한국어.

product.​description.​plstring

폴란드어.

product.​description.​ptstring

포르투갈어.

product.​description.​rostring

루마니아어.

product.​description.​rustring

러시아어.

product.​description.​thstring

태국어.

product.​description.​trstring

터키어.

product.​description.​twstring

중국어(번체).

product.​description.​vistring

베트남어.

product.​group_idstring

제품이 연결된 그룹의 ID입니다.

product.​namestring

제품 이름입니다.

statusstring

상태

열거형"new""active""canceled""non_renewing""freeze"
userobject
user.​idstring

사용자 ID

user.​namestring

사용자 이름

응답
application/json
{ "charge_amount": 0.03, "comment": "The subscription was not extended in due time", "currency": "USD", "date_create": "2018-09-21T16:54:59+03:00", "date_end": "2019-02-06T12:43:04+03:00", "date_last_charge": "2018-09-21T16:55:05+03:00", "date_next_charge": "2018-09-21T16:55:05+03:00", "id": 249579, "plan": { "external_id": "lowcost", "id": 601 }, "product": { "id": 123456 }, "status": "canceled", "user": { "id": "user1", "name": "John Smith" } }

요청

상태를 변경(active, canceled, 혹은 non_renewing)하거나 다음 청구 날짜를 연기하여 정기 결제를 업데이트합니다.

보안
basicAuth
경로
project_idinteger필수

Project ID.

user_idstring필수

User ID.

subscription_idinteger필수

Subscription ID.

본문application/json필수
cancel_subscription_paymentboolean

true로 설정하면 본 정기 결제 최종 결제 금액이 환불됩니다. 이 옵션은 상태가 canceled로 설정된 경우에만 작동합니다.

statusstring

Status.

열거형"active""canceled""non_renewing"
timeshiftobject

Billing postponement.

timeshift.​typestring

청구 기간 단위입니다. day 또는 month일 수 있습니다.

열거형"day""month"
timeshift.​valuestring

청구를 연기할 시간 단위 수입니다. 값은 유형 매개 변수에 따라 달라지며 다음이 될 수 있습니다:
- typeday인 경우 1~366,
typemonth인 경우 1~12

xsolla_networkobject
xsolla_network.​collaborator_idstring

협력자 ID - 인플루언서 혹은 제휴 네트워크 식별자입니다. 이는 관리자 페이지 > 파트너 네트워크 > 인플루언서 섹션에서 찾을 수 있습니다.

curl -i -X PUT \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/ko/api/subscriptions/projects/{project_id}/users/{user_id}/subscriptions/{subscription_id}' \
  -H 'Content-Type: application/json' \
  -d '{
    "status": "active"
  }'

응답

OK(확인).

본문application/json
응답
application/json
{ "charge_amount": 0.03, "currency": "USD", "date_create": "2018-09-21T16:54:59+03:00", "date_end": null, "date_last_charge": "2018-09-21T16:55:05+03:00", "date_next_charge": "2018-09-21T16:55:05+03:00", "id": 24953579, "plan": { "billing_retry": {}, "charge": {}, "description": null, "expiration": {}, "external_id": "lowcost", "grace_period": {}, "group_id": "newPlans", "id": 66001, "localized_name": null, "name": null, "project_id": 18404, "refund_period": null, "status": {}, "tags": null, "trial": {}, "type": "all" }, "product": null, "status": "active", "user": { "id": "jb1", "name": "J.Black" } }
작업
작업
작업
작업
작업
작업
작업
작업