GET
/
api
/
v1
/
server-to-server-interface
/
subscription
/
{subscription_id}
curl --request GET \
  --url https://api-dev.paymentoptions.com/api/v1/api/v1/server-to-server-interface/subscription/{subscription_id} \
  --header 'Authorization: <api-key>' \
  --header 'x-api-key: <api-key>'
{
  "success": true,
  "status_code": 200,
  "is_live": false,
  "subscription_details": {
    "id": "664dc930-88bd-4696-8807-5e0f1fedba0b",
    "type": "CYCLE",
    "max_cycle_count": 10,
    "status": "ACTIVE",
    "completed_payment_cycle": 1,
    "last_payment_status": "SUCCESSFUL",
    "next_payment_date": "2024-11-28T01:31:29.154Z",
    "next_payment_cycle": 2,
    "subscription_plan_details": {
      "name": "Three weeks plan",
      "desc": "Billed every two days",
      "billing_cycle_type": "DAYS",
      "billing_cycle_interval": 2,
      "amount": 1000,
      "ccy": "JPY",
      "trial_period_duration": "",
      "trial_period_duration_type": "NONE",
      "plan_discount_percentage": 10,
      "plan_discount_duration": 2
    },
    "subscription_transaction_details": [
      {
        "id": "359f39bd-673a-47b3-b9ec-cbd6cd313b8e",
        "ref": 74860,
        "cycle": 1,
        "status": "SUCCESSFUL",
        "transaction_date": "2024-11-26T01:31:29.000Z",
        "amount": 900,
        "ccy": "JPY",
        "event": "CAPTURED"
      }
    ]
  }
}

重要なポイント

詳細なサブスクリプションデータを取得:

  • このAPIは、個別のサブスクリプションに関する包括的な情報を提供します。例えば:

  • サブスクリプションID

  • プラン名と説明

  • ステータス(アクティブ、期限切れ、キャンセル済み)

  • 開始日、終了日、および次の請求日

  • サイクル間隔(例:月次、2日ごとなど)

  • 試用期間および割引情報

  • 請求履歴:過去の支払いの詳細(金額と日付を含む)

サブスクリプションID

  • サブスクリプションIDは、特定のサブスクリプションの詳細を取得するためにURLに提供する必要があります。

Authorizations

Authorization
string
header
required

認証のためのAPIキー。形式:'Basic YOUR_API_KEY_HERE'

x-api-key
string
header
required

x-api-key専用のAPIキー。

Path Parameters

subscription_id
string
required

サブスクリプションのサブスクリプションID。例: 664dc930-88bd-4696-8807-5e0f1fedba0b。

Maximum length: 36

Response

200 - application/json
サブスクリプションの詳細を含む成功した応答。
success
boolean

取引が成功したかどうかを示します。

Example:

true

status_code
integer

応答のHTTPステータスコード。

Example:

200

is_live
boolean

取引が本番環境かテスト環境かを示します。

Example:

false

subscription_details
object

サブスクリプションの詳細。