# Query subscription

Endpoint: GET /subscription
Version: 1.0.0
Security: InfiniHmac

## Security:

  - `InfiniHmac` (unknown)
    http basic

## Query parameters:

  - `merchant_sub_id` (string, required)
    商户订阅ID

## Header parameters:

  - `Date` (string)
    GMT server time (e.g. Tue, 21 Jan 2025 12:00:00 GMT). Required for every request.

  - `Authorization` (string)
    HMAC-SHA256 `Signature` header. See the [Authentication](/docs/en/4-authorization) guide.

## Response 200 fields (application/json):

  - `subscription_id` (string)
    系统订阅ID

  - `merchant_sub_id` (string)
    商户订阅ID

  - `plan_name` (string)
    计划名称

  - `trigger_method` (string)
    触发方式

  - `status` (string)
    订阅状态

  - `cancel_reason` (string)
    取消原因

  - `canceled_at` (integer)
    取消时间 (unix timestamp)

  - `currency` (string)
    币种

  - `first_amount` (string)
    首期金额

  - `amount` (string)
    后续每期金额

  - `interval_unit` (string)
    周期单位

  - `interval_count` (integer)
    周期数量

  - `current_period_start` (integer)
    当前周期开始 (unix timestamp)

  - `current_period_end` (integer)
    当前周期结束 (unix timestamp)

  - `subscription_end_at` (integer)
    订阅终止时间 (unix timestamp)

  - `next_invoice_at` (integer)
    下次发送 Invoice 时间 (unix timestamp)

  - `payer_email` (string)
    付款人邮箱

  - `created_at` (integer)
    创建时间 (unix timestamp)

  - `updated_at` (integer)
    更新时间 (unix timestamp)

