콘텐츠로 건너뛰기

개요

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

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

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

요청

모든 반복 정기 결제를 나열합니다.

주의

이 API 메소드는 높은 부하에서는 사용할 수 없습니다. 최대 부하는 분당 20개의 요청입니다.

주의

이 API 호출에는 project_id 경로 매개 변수가 포함되어 있지 않으므로 회사의 모든 프로젝트에서 유효한 API 키를 사용하여 인증을 설정해야 합니다.

보안
basicAuth
경로
merchant_idinteger필수

판매자 ID입니다.

쿼리
offsetinteger

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

limitinteger필수

Limit for the number of elements on the page.

user_idstring

User ID.

project_id[]Array of integers

프로젝트 ID 목록입니다.

plan_id[]Array of integers

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

product_id[]Array of integers

요금제가 연결된 제품 ID 목록입니다.

group_id[]Array of strings

요금제가 연결된 그룹 ID 목록입니다.

status[]Array of strings

Status.

항목 열거형"active""canceled""non_renewing"
datetime_fromstring(datetime)

Sample date. Use this to find subscriptions created later than the request.

datetime_tostring(datetime)

Sample date. Use this to find subscriptions created later than the request.

curl -i -X GET \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/ko/api/subscriptions/merchants/{merchant_id}/subscriptions?offset=0&limit=0&user_id=string&project_id%5B%5D=0&plan_id%5B%5D=0&product_id%5B%5D=0&group_id%5B%5D=string&status%5B%5D=active&datetime_from=string&datetime_to=string'

응답

OK(확인).

본문application/jsonArray [
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, "currency": "USD", "date_create": "2013-09-05T15:27:47+04:00", "date_end": "2014-02-06T11:32:48+04:00", "date_last_charge": null, "date_next_charge": null, "id": 45, "plan": {}, "product": {}, "status": "canceled", "user": {} } ]

요청

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" } }
작업
작업
작업
작업
작업
작업
작업
작업