A subscription ties a customer to a recurring price. Both create and cancel are financial mutations requiring an Idempotency-Key.
GET/api/Subscription— List subscriptions
| Property | Value |
|---|
| Required scope | subscriptions:read |
| Idempotency-Key | Not required |
| Parameter | In | Type | Required |
|---|
page | query | integer (int32) | |
pageSize | query | integer (int32) | |
orderBy | query | string | |
orderDirection | query | string | |
createdFrom | query | string (date-time) | |
createdTo | query | string (date-time) | |
POST/api/Subscription— Create a new subscription (requires Idempotency-Key)
| Property | Value |
|---|
| Required scope | subscriptions:write |
| Idempotency-Key | Required |
| Financial mutation | Yes — moves money |
| Parameter | In | Type | Required |
|---|
customerId | body | string | |
metadata | body | object | |
paymentMethodId | body | string | |
paymentMethodRefId | body | string | |
priceId | body | string | |
GET/api/Subscription/{subscriptionId}— Retrieve a single subscription
| Property | Value |
|---|
| Required scope | subscriptions:read |
| Idempotency-Key | Not required |
| Parameter | In | Type | Required |
|---|
subscriptionId | path | string | Required |
POST/api/Subscription/{subscriptionId}/Cancel— Cancel a subscription (requires Idempotency-Key)
| Property | Value |
|---|
| Required scope | subscriptions:write |
| Idempotency-Key | Required |
| Financial mutation | Yes — moves money |
| Parameter | In | Type | Required |
|---|
subscriptionId | path | string | Required |
immediate | body | boolean | |
GET/api/Subscription/{subscriptionId}/Change— 訂閱:Change。
| Property | Value |
|---|
| Required scope | subscriptions:read |
| Idempotency-Key | Not required |
| Parameter | In | Type | Required |
|---|
subscriptionId | path | string | Required |
page | query | integer (int32) | |
pageSize | query | integer (int32) | |
orderBy | query | string | |
orderDirection | query | string | |
createdFrom | query | string (date-time) | |
createdTo | query | string (date-time) | |
POST/api/Subscription/{subscriptionId}/Command— 訂閱:Command。
| Property | Value |
|---|
| Required scope | subscriptions:write |
| Idempotency-Key | Required |
| Financial mutation | Yes — moves money |
| Parameter | In | Type | Required |
|---|
subscriptionId | path | string | Required |
effectiveAt | body | string (date-time) | |
expectedVersion | body | string | |
priceId | body | string | |
reason | body | string | |
type | body | string | |
POST/api/Subscription/{subscriptionId}/Preview— 訂閱:Preview。
| Property | Value |
|---|
| Required scope | subscriptions:write |
| Idempotency-Key | Not required |
| Parameter | In | Type | Required |
|---|
subscriptionId | path | string | Required |
priceId | body | string | |