콘텐츠로 건너뛰기

개요

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

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

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

요청

프로모션과 관련된 보상 목록을 가져옵니다.

주의

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

보안
basicAuth
경로
merchant_idinteger필수

판매자 ID입니다.

promotion_idinteger필수

프로모션 ID입니다.

curl -i -X GET \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/ko/api/subscriptions/merchants/{merchant_id}/promotions/{promotion_id}/rewards'

응답

OK(확인).

본문application/json
idinteger
itemobject

Set the reward for specific virtual items.

packageobject

Set the reward for a virtual currency package.

purchaseobject

전체 구매에 대한 보상을 설정합니다.

subscriptionobject

Sets the reward for a subscription.

응답
application/json
{ "id": 17840, "item": { "bonus": [], "discount": [] }, "package": { "bonus_amount": 5, "bonus_percent": 5 }, "purchase": { "discount_percent": 10 }, "subscription": { "trial_days": 30 } }

요청

프로모션에 대한 보상을 설정합니다. 프로모션이 읽기 전용(read_only = true)인 경우 보상을 업데이트할 수 없습니다.

주의

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

보안
basicAuth
경로
merchant_idinteger필수

판매자 ID입니다.

promotion_idinteger필수

프로모션 ID입니다.

본문application/json필수
itemobject

Set the reward for specific virtual items.

packageobject

Set the reward for a virtual currency package.

purchaseobject

전체 구매에 대한 보상을 설정합니다.

subscriptionobject

Sets the reward for a subscription.

curl -i -X PUT \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/ko/api/subscriptions/merchants/{merchant_id}/promotions/{promotion_id}/rewards' \
  -H 'Content-Type: application/json' \
  -d '{
    "item": {
      "bonus": [
        {
          "quantity": 2,
          "sku": "1234"
        }
      ],
      "discount": [
        {
          "discount_percent": 5,
          "max_amount": 10,
          "sku": "1234"
        }
      ]
    },
    "package": {
      "bonus_amount": 5,
      "bonus_percent": 5
    },
    "purchase": {
      "discount_percent": 10
    },
    "subscription": {
      "trial_days": 30
    }
  }'

응답

콘텐츠가 없습니다.

요청

프로모션 대상에 대한 정보를 얻습니다.

주의

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

보안
basicAuth
경로
merchant_idinteger필수

판매자 ID입니다.

promotion_idinteger필수

프로모션 ID입니다.

curl -i -X GET \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/ko/api/subscriptions/merchants/{merchant_id}/promotions/{promotion_id}/subject'

응답

OK(확인).

본문application/json
digital_contentsobject or null
itemsArray of objects

Array of virtual items that the promotion applies to.

packagesArray of objects or null

Array of virtual currency packages that the promotion applies to.

purchaseboolean

Whether the promotion applies to the whole purchase.

subscriptionsobject or null

Subscription plans or products that the promotion applies to.

idinteger
응답
application/json
{ "digital_contents": null, "id": 178, "items": [ {} ], "packages": null, "purchase": false, "subscriptions": null }
작업
작업