콘텐츠로 건너뛰기

개요

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

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

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

요청

Lists all subscription plans.

보안
basicAuth
경로
project_idinteger필수

Project ID.

쿼리
plan_idinteger

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

limitinteger필수

Limit for the number of elements on the page.

offsetinteger

Number of the element from which the list is generated (the count starts from 0).

external_idstring

Plan external ID (32 characters).

group_idstring

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

product_idinteger

Product ID the plans are linked to.

querystring

쿼리 검색(name.en(기본 로케일) 검색)입니다.

curl -i -X GET \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/ko/api/subscriptions/projects/{project_id}/subscriptions/plans?plan_id=0&limit=0&offset=0&external_id=string&group_id=string&product_id=0&query=string'

응답

OK(확인).

본문application/jsonArray [
billing_retryobject

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

chargeobject

청구 세부 정보입니다.

descriptionobject

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

expirationobject

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

external_idstring

Plan external ID (32 characters).

grace_periodobject

Grace period details.

group_idstring or null

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

idinteger

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

nameobject

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

project_idinteger

Project ID.

refund_periodinteger or null

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

statusobject
tagsArray of strings

Plan tags.

trialobject

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

localized_namestring

기본 언어(영어)로 표기된 요금제 명칭, name.en 값을 복제합니다.

]
응답
application/json
[ { "billing_retry": {}, "charge": {}, "description": {}, "expiration": {}, "external_id": "3b355320", "grace_period": {}, "group_id": null, "id": 241037, "localized_name": "Platinum VIP", "name": {}, "project_id": 40797, "refund_period": null, "status": {}, "tags": [], "trial": {} }, { "billing_retry": {}, "charge": {}, "description": {}, "expiration": {}, "external_id": "0fe1b6fc", "grace_period": {}, "group_id": null, "id": 241038, "localized_name": "Gold Status", "name": {}, "project_id": 40797, "refund_period": null, "status": {}, "tags": [], "trial": {} } ]

요청

Creates a subscription plan.

보안
basicAuth
경로
project_idinteger필수

Project ID.

본문application/json필수
billing_retryobject

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

chargeobject필수

청구 세부 정보입니다.

charge.​amountnumber(float)

Billing amount.

charge.​currencystring

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

charge.​periodobject필수

청구 기간입니다.

charge.​period.​typestring필수

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

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

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

charge.​pricesArray of objects

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

descriptionobject

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

expirationobject

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

external_idstring

Plan external ID (32 characters).

grace_periodobject

Grace period details.

group_idstring or null

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

idinteger

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

nameobject필수

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

name.​arstring

아랍어.

name.​bgstring

불가리아어.

name.​cnstring

중국어(간체).

name.​csstring

체코어.

name.​destring

독일어.

name.​enstring

영어.

name.​esstring

스페인어.

name.​frstring

프랑스어.

name.​hestring

히브리어.

name.​itstring

이탈리아어.

name.​jastring

일본어.

name.​kostring

한국어.

name.​plstring

폴란드어.

name.​ptstring

포르투갈어.

name.​rostring

루마니아어.

name.​rustring

러시아어.

name.​thstring

태국어.

name.​trstring

터키어.

name.​twstring

중국어(번체).

name.​vistring

베트남어.

project_idinteger

Project ID.

refund_periodinteger or null

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

statusobject
tagsArray of strings

Plan tags.

trialobject

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

curl -i -X POST \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/ko/api/subscriptions/projects/{project_id}/subscriptions/plans' \
  -H 'Content-Type: application/json' \
  -d '{
    "billing_retry": {
      "value": 1
    },
    "charge": {
      "amount": 10,
      "currency": "USD",
      "period": {
        "type": "month",
        "value": 1
      },
      "prices": [
        {
          "amount": 8,
          "currency": "EUR",
          "setup_fee": 1.5
        },
        {
          "amount": 1000,
          "currency": "JPY",
          "setup_fee": 2.5
        }
      ]
    },
    "description": {
      "en": "2x more experience!"
    },
    "expiration": {
      "type": "day",
      "value": null
    },
    "external_id": "exp",
    "grace_period": {
      "type": "day",
      "value": 2
    },
    "name": {
      "en": "Experience boost"
    },
    "refund_period": null,
    "status": {
      "value": "active"
    },
    "trial": {
      "type": "day",
      "value": 7
    }
  }'

응답

생성됨.

본문application/json
external_idstring
plan_idinteger
응답
application/json
{ "external_id": "exp", "plan_id": 241082 }

요청

Disables a subscription plan.

보안
basicAuth
경로
project_idinteger필수

Project ID.

plan_idinteger필수

요금제 ID입니다.

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

응답

콘텐츠가 없습니다.

작업
작업
작업
작업
작업
작업