콘텐츠로 건너뛰기

개요

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

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

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

요청

보안
subscriptionsManagementJwtAuth
경로
subscription_idinteger\d+필수
project_idinteger\d+필수
쿼리
localestring
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/ko/api/subscriptions/api/user/v1/management/projects/{project_id}/subscriptions/{subscription_id}?locale=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

응답

Get subscription info

본문application/json
chargeobject(Charge)필수
charge.​amountnumber(float)필수
예제: "4.99"
charge.​amount_with_promotionnumber or null(float)
기본값 null
예제: "3.99"
charge.​currencystring필수
예제: "USD"
date_createstring(date-time)필수
예제: "2031-04-11T13:51:02+03:00"
date_endstring or null(date-time)
예제: "2031-04-11T13:51:02+03:00"
date_last_chargestring or null(date-time)
예제: "2031-04-11T13:51:02+03:00"
date_next_chargestring or null(date-time)
예제: "2031-04-11T13:51:02+03:00"
idinteger필수
예제: "12345"
is_change_plan_allowedboolean필수
예제: "false"
is_change_to_non_renew_possibleboolean필수
예제: "true"
is_in_trialboolean필수
예제: "false"
is_renew_possibleboolean필수
예제: "true"
last_successful_charge(LastSuccessfulCharge (object or null))
(LastSuccessfulCharge (object or null))
payment_account(PaymentRecurrentAccountResponse2 (object or null))
(PaymentRecurrentAccountResponse2 (object or null))
periodobject(Period)필수
period.​unitstring or null
기본값 null
예제: "month"
period.​valueinteger or null
기본값 null
예제: "1"
plan_descriptionstring필수
예제: "Localized plan description"
plan_namestring필수
예제: "Localized plan name"
product_descriptionstring or null
예제: "Localized product description"
product_namestring or null
예제: "Product name"
statusstring필수
예제: "active"
trial_periodinteger or null
예제: "0"
응답
application/json
{ "charge": { "amount": "4.99", "amount_with_promotion": "3.99", "currency": "USD" }, "date_create": "2031-04-11T13:51:02+03:00", "date_end": "2031-04-11T13:51:02+03:00", "date_last_charge": "2031-04-11T13:51:02+03:00", "date_next_charge": "2031-04-11T13:51:02+03:00", "id": "12345", "is_change_plan_allowed": "false", "is_change_to_non_renew_possible": "true", "is_in_trial": "false", "is_renew_possible": "true", "last_successful_charge": { "amount": "3.99", "currency": "USD", "date": "2031-04-11T13:51:02+03:00" }, "payment_account": { "card_expiry_date": {}, "id": "123", "name": "** 7398", "ps_name": "Mastercard", "switch_icon_name": "mastercard.svg", "type": "card" }, "period": { "unit": "month", "value": "1" }, "plan_description": "Localized plan description", "plan_name": "Localized plan name", "product_description": "Localized product description", "product_name": "Product name", "status": "active", "trial_period": "0" }

요청

보안
subscriptionsManagementJwtAuth
경로
subscription_idinteger\d+필수
project_idinteger\d+필수
curl -i -X PUT \
  'https://xsolla.redocly.app/_mock/ko/api/subscriptions/api/user/v1/management/projects/{project_id}/subscriptions/{subscription_id}/activate' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

응답

Move subscription from non-renew to active

본문application/json
응답
application/json
{ "status": "successful" }

요청

보안
subscriptionsManagementJwtAuth
경로
subscription_idinteger\d+필수
project_idinteger\d+필수
curl -i -X PUT \
  'https://xsolla.redocly.app/_mock/ko/api/subscriptions/api/user/v1/management/projects/{project_id}/subscriptions/{subscription_id}/cancel' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

응답

Make subscription non-renewable

본문application/json
응답
application/json
null