> For the complete documentation index, see [llms.txt](https://docs.iyzico.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.iyzico.com/en/getting-started/preliminaries/api-reference-beta/subscription/subscription/subscription-transactions.md).

# Subscription Transactions

## Activate Subscription

> A subscription that was started as pending can be activated via this service.

```json
{"openapi":"3.0.3","info":{"title":"Subscription - Activate Subscription","version":"1.0.1"},"servers":[{"url":"https://api.iyzipay.com","description":"iyzico API"}],"paths":{"/v2/subscription/subscriptions/{subscriptionReferenceCode}/activate":{"post":{"summary":"Activate Subscription","description":"A subscription that was started as pending can be activated via this service.","tags":["Subscription"],"parameters":[{"$ref":"#/components/parameters/AuthHeader"},{"$ref":"#/components/parameters/ContentTypeHeader"},{"name":"subscriptionReferenceCode","in":"path","required":true,"schema":{"type":"string"},"description":"Reference code of the subscription that was started as pending."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateSubscriptionRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateSubscriptionResponse"}}}},"400":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"parameters":{"AuthHeader":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"},"description":"Authorization header; a Base64-encoded signed hash value that begins with IYZWSv2."},"ContentTypeHeader":{"name":"Content-Type","in":"header","required":true,"schema":{"type":"string"},"description":"Request body content type."}},"schemas":{"ActivateSubscriptionRequest":{"type":"object","properties":{"subscriptionReferenceCode":{"type":"string","description":"Reference code of the subscription that was started as pending."}}},"ActivateSubscriptionResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","failure"],"description":"Indicates the result of the request. Returns `success` if the operation succeeds."},"systemTime":{"type":"integer","description":"Unix timestamp (milliseconds) of the response."}}},"ErrorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["failure"],"description":"Indicates the result of the request (failure)."},"errorCode":{"type":"string","description":"Error code."},"errorMessage":{"type":"string","description":"Error message."},"systemTime":{"type":"integer","description":"Unix timestamp (milliseconds) of the response."}}}}}}
```

## Cancel Subscription

> Cancels an active subscription.

```json
{"openapi":"3.0.3","info":{"title":"Subscription - Retry / Cancel / Upgrade / Search / Detail / Card Update","version":"1.0.0"},"servers":[{"url":"https://api.iyzipay.com","description":"iyzico API"}],"paths":{"/v2/subscription/subscriptions/{subscriptionReferenceCode}/cancel":{"post":{"summary":"Cancel Subscription","description":"Cancels an active subscription.","tags":["Subscription"],"parameters":[{"$ref":"#/components/parameters/AuthHeader"},{"$ref":"#/components/parameters/ContentTypeHeader"},{"name":"subscriptionReferenceCode","in":"path","required":true,"schema":{"type":"string"},"description":"Reference code of the subscription to cancel."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelSubscriptionRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelSubscriptionResponse"}}}},"400":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"parameters":{"AuthHeader":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"},"description":"Authorization header, a signed hash value that starts with **IYZWSv2** and is generated in Base64 format."},"ContentTypeHeader":{"name":"Content-Type","in":"header","required":true,"schema":{"type":"string"},"description":"Content format of the request."}},"schemas":{"CancelSubscriptionRequest":{"type":"object","properties":{"subscriptionReferenceCode":{"type":"string","description":"Subscription reference code. Can optionally be sent in the request body."}}},"CancelSubscriptionResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","failure"],"description":"Result of the request. Returns **success** if the operation is successful."},"systemTime":{"type":"integer","description":"Server time of the response (epoch ms)."}}},"ErrorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["failure"],"description":"Indicates a failed request."},"errorCode":{"type":"string","description":"Error code."},"errorMessage":{"type":"string","description":"Error message."},"systemTime":{"type":"integer","description":"Server time of the response (epoch ms)."}}}}}}
```

## Retry Subscription Payment

> If a recurring payment fails for a subscription, use this service to retry the charge and collect the payment.<br>

```json
{"openapi":"3.0.3","info":{"title":"Subscription - Retry / Cancel / Upgrade / Search / Detail / Card Update","version":"1.0.0"},"servers":[{"url":"https://api.iyzipay.com","description":"iyzico API"}],"paths":{"/v2/subscription/operation/retry":{"post":{"summary":"Retry Subscription Payment","description":"If a recurring payment fails for a subscription, use this service to retry the charge and collect the payment.\n","tags":["Subscription"],"parameters":[{"$ref":"#/components/parameters/AuthHeader"},{"$ref":"#/components/parameters/ContentTypeHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetrySubscriptionPaymentRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetrySubscriptionPaymentResponse"}}}},"400":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"parameters":{"AuthHeader":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"},"description":"Authorization header, a signed hash value that starts with **IYZWSv2** and is generated in Base64 format."},"ContentTypeHeader":{"name":"Content-Type","in":"header","required":true,"schema":{"type":"string"},"description":"Content format of the request."}},"schemas":{"RetrySubscriptionPaymentRequest":{"type":"object","required":["referenceCode"],"properties":{"referenceCode":{"type":"string","description":"Reference code of the failed payment. This is the **orderReferenceCode** value provided in the webhook notification for the failed subscription payment.\n"}}},"RetrySubscriptionPaymentResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","failure"],"description":"Result of the request. Returns **success** if the operation is successful."},"systemTime":{"type":"integer","description":"Server time of the response (epoch ms)."}}},"ErrorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["failure"],"description":"Indicates a failed request."},"errorCode":{"type":"string","description":"Error code."},"errorMessage":{"type":"string","description":"Error message."},"systemTime":{"type":"integer","description":"Server time of the response (epoch ms)."}}}}}}
```

{% hint style="warning" %}
A failed payment transaction can be retried within a maximum of 160 days. If this period is exceeded, no further payment attempts can be made for the subscription.
{% endhint %}

{% hint style="info" %}
After the retry operation is successfully triggered, an additional webhook notification is sent for the newly created payment transaction.
{% endhint %}

## Upgrade Subscription

> You can change or upgrade the plan during the subscription, provided that the \*\*new plan belongs to the same product\*\* and the billing interval (\*\*paymentInterval\*\* and \*\*paymentIntervalCount\*\*) remains the same. Use this service for price changes.<br>

```json
{"openapi":"3.0.3","info":{"title":"Subscription - Retry / Cancel / Upgrade / Search / Detail / Card Update","version":"1.0.0"},"servers":[{"url":"https://api.iyzipay.com","description":"iyzico API"}],"paths":{"/v2/subscription/subscriptions/{subscriptionReferenceCode}/upgrade":{"post":{"summary":"Upgrade Subscription","description":"You can change or upgrade the plan during the subscription, provided that the **new plan belongs to the same product** and the billing interval (**paymentInterval** and **paymentIntervalCount**) remains the same. Use this service for price changes.\n","tags":["Subscription"],"parameters":[{"$ref":"#/components/parameters/AuthHeader"},{"$ref":"#/components/parameters/ContentTypeHeader"},{"name":"subscriptionReferenceCode","in":"path","required":true,"schema":{"type":"string"},"description":"Reference code of the subscription to upgrade."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpgradeSubscriptionRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpgradeSubscriptionResponse"}}}},"400":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"parameters":{"AuthHeader":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"},"description":"Authorization header, a signed hash value that starts with **IYZWSv2** and is generated in Base64 format."},"ContentTypeHeader":{"name":"Content-Type","in":"header","required":true,"schema":{"type":"string"},"description":"Content format of the request."}},"schemas":{"UpgradeSubscriptionRequest":{"type":"object","required":["upgradePeriod","newPricingPlanReferenceCode"],"properties":{"upgradePeriod":{"type":"string","enum":["NOW","NEXT_PERIOD"],"description":"When the upgrade will take effect.\nValues:\n- **NOW**: Apply the change immediately.\n- **NEXT_PERIOD**: Apply the change at the next billing period.\n"},"newPricingPlanReferenceCode":{"type":"string","description":"Reference code of the target pricing plan."},"useTrial":{"type":"boolean","description":"If **true**, includes the trial period of the upgraded plan."},"resetRecurrenceCount":{"type":"boolean","description":"- **true**: Recalculates the subscription end date according to the new plan’s **recurrenceCount**.  \n- **false**: Keeps the current plan’s end date and transfers it to the new plan.\n"}}},"UpgradeSubscriptionResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","failure"],"description":"Result of the request. Returns **success** if the operation is successful."},"systemTime":{"type":"integer","description":"Server time of the response (epoch ms)."},"data":{"type":"object","properties":{"referenceCode":{"type":"string","description":"Reference code of the newly created subscription."},"parentReferenceCode":{"type":"string","description":"Reference code used by the merchant to correlate subscription updates."},"pricingPlanReferenceCode":{"type":"string"},"customerReferenceCode":{"type":"string"},"subscriptionStatus":{"type":"string","enum":["ACTIVE","PENDING"],"description":"Subscription status."},"trialDays":{"type":"integer","description":"Trial period of the plan (days)."},"createdDate":{"type":"integer","description":"Creation time (epoch ms)."},"startDate":{"type":"date","description":"Start time (epoch ms)."},"endDate":{"type":"date","description":"End time (epoch ms)."}}}}},"ErrorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["failure"],"description":"Indicates a failed request."},"errorCode":{"type":"string","description":"Error code."},"errorMessage":{"type":"string","description":"Error message."},"systemTime":{"type":"integer","description":"Server time of the response (epoch ms)."}}}}}}
```

## Subscription Card Update (Checkout Form)

> Updates the credit card used in a subscription. In cases like payment failure or card expiry, merchants can prompt customers to update their card. \*\*The update can only be performed through the iyzico Checkout Form.\*\*\
> A \*\*₺1\*\* validation charge is taken and immediately refunded to validate the updated card.<br>

```json
{"openapi":"3.0.3","info":{"title":"Subscription - Retry / Cancel / Upgrade / Search / Detail / Card Update","version":"1.0.0"},"servers":[{"url":"https://api.iyzipay.com","description":"iyzico API"}],"paths":{"/v2/subscription/card-update/checkoutform/initialize":{"post":{"summary":"Subscription Card Update (Checkout Form)","description":"Updates the credit card used in a subscription. In cases like payment failure or card expiry, merchants can prompt customers to update their card. **The update can only be performed through the iyzico Checkout Form.**\nA **₺1** validation charge is taken and immediately refunded to validate the updated card.\n","tags":["Subscription"],"parameters":[{"$ref":"#/components/parameters/AuthHeader"},{"$ref":"#/components/parameters/ContentTypeHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitializeCardUpdateCheckoutFormRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitializeCardUpdateCheckoutFormResponse"}}}},"400":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"parameters":{"AuthHeader":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"},"description":"Authorization header, a signed hash value that starts with **IYZWSv2** and is generated in Base64 format."},"ContentTypeHeader":{"name":"Content-Type","in":"header","required":true,"schema":{"type":"string"},"description":"Content format of the request."}},"schemas":{"InitializeCardUpdateCheckoutFormRequest":{"type":"object","required":["callbackUrl","customerReferenceCode"],"properties":{"callbackUrl":{"type":"string","description":"Callback URL where the update result will be posted."},"customerReferenceCode":{"type":"string","description":"Reference code of the customer whose card will be updated."},"subscriptionReferenceCode":{"type":"string","description":"If updating on a specific subscription, the subscription reference code (optional).\n"},"locale":{"type":"string","enum":["tr","en"],"description":"Response language preference."}}},"InitializeCardUpdateCheckoutFormResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","failure"],"description":"Operation result."},"locale":{"type":"string","enum":["tr","en"],"description":"Response language."},"systemTime":{"type":"integer","description":"Operation time (epoch ms)."},"conversationId":{"type":"string","description":"ID sent for request/response correlation. Echoed back in the response."},"token":{"type":"string","description":"Token of the card update checkout form."},"checkoutFormContent":{"type":"string","description":"HTML content for the checkout form where card information is updated."},"tokenExpireTime":{"type":"integer","description":"Token validity period (seconds)."}}},"ErrorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["failure"],"description":"Indicates a failed request."},"errorCode":{"type":"string","description":"Error code."},"errorMessage":{"type":"string","description":"Error message."},"systemTime":{"type":"integer","description":"Server time of the response (epoch ms)."}}}}}}
```

## Get Subscription Detail

> Returns full details of a subscription by its reference code.

```json
{"openapi":"3.0.3","info":{"title":"Subscription - Retry / Cancel / Upgrade / Search / Detail / Card Update","version":"1.0.0"},"servers":[{"url":"https://api.iyzipay.com","description":"iyzico API"}],"paths":{"/v2/subscription/subscriptions/{subscriptionReferenceCode}":{"get":{"summary":"Get Subscription Detail","description":"Returns full details of a subscription by its reference code.","tags":["Subscription"],"parameters":[{"$ref":"#/components/parameters/AuthHeader"},{"$ref":"#/components/parameters/ContentTypeHeader"},{"name":"subscriptionReferenceCode","in":"path","required":true,"schema":{"type":"string"},"description":"Reference code of the subscription to query."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSubscriptionDetailOptionalRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSubscriptionDetailResponse"}}}}}}}},"components":{"parameters":{"AuthHeader":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"},"description":"Authorization header, a signed hash value that starts with **IYZWSv2** and is generated in Base64 format."},"ContentTypeHeader":{"name":"Content-Type","in":"header","required":true,"schema":{"type":"string"},"description":"Content format of the request."}},"schemas":{"GetSubscriptionDetailOptionalRequest":{"type":"object","properties":{"subscriptionReferenceCode":{"type":"string","description":"Subscription reference code. Can optionally be sent in the request body."}}},"GetSubscriptionDetailResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","failure"],"description":"Result of the request."},"systemTime":{"type":"integer","description":"Server time of the response (epoch ms)."},"data":{"type":"object","description":"Pagination information and subscription records.","properties":{"totalCount":{"type":"integer","description":"Total record count."},"currentPage":{"type":"integer","description":"Current page number."},"pageCount":{"type":"integer","description":"Total page count."},"items":{"type":"array","description":"Detailed subscription records.","items":{"$ref":"#/components/schemas/SubscriptionDetailItem"}}}}}},"SubscriptionDetailItem":{"type":"object","properties":{"referenceCode":{"type":"string","description":"Subscription reference code."},"parentReferenceCode":{"type":"string","description":"Reference used by the merchant to correlate subscription updates."},"pricingPlanName":{"type":"string","description":"Name of the pricing plan linked to the subscription."},"pricingPlanReferenceCode":{"type":"string","description":"Reference code of the pricing plan linked to the subscription."},"productName":{"type":"string","description":"Product name."},"productReferenceCode":{"type":"string","description":"Product reference code."},"customerEmail":{"type":"string","description":"Customer email address."},"customerGsmNumber":{"type":"string","description":"Customer GSM number."},"customerReferenceCode":{"type":"string","description":"Customer reference code."},"subscriptionStatus":{"type":"string","description":"Subscription status.\n\nValues:\n- **ACTIVE**: Subscription is active and payments are being collected regularly.\n- **PENDING**: Subscription is paused.\n- **UNPAID**: Payment could not be collected during the subscription.\n- **UPGRADED**: Subscription has been updated to another plan.\n- **CANCELED**: Subscription is canceled.\n- **EXPIRED**: Subscription period ended; no further charges are attempted.\n","enum":["ACTIVE","PENDING","UNPAID","UPGRADED","CANCELED","EXPIRED"]},"trialDays":{"type":"integer","description":"Trial period (days) of the pricing plan."},"trialStartDate":{"type":"integer","description":"Trial start time (epoch ms)."},"trialEndDate":{"type":"integer","description":"Trial end time (epoch ms)."},"createdDate":{"type":"integer","description":"Subscription creation time (epoch ms)."},"startDate":{"type":"integer","description":"Subscription start time (epoch ms)."},"endDate":{"type":"integer","description":"Subscription end time (epoch ms)."},"orders":{"type":"array","description":"List of periods (orders) within the subscription.","items":{"$ref":"#/components/schemas/SubscriptionOrder"}}}},"SubscriptionOrder":{"type":"object","properties":{"referenceCode":{"type":"string","description":"Reference code of the subscription period (order)."},"price":{"type":"decimal","description":"Period price."},"currencyCode":{"type":"string","enum":["TRY","USD","EUR"],"description":"Currency."},"startPeriod":{"type":"integer","description":"Start time of the period (epoch ms)."},"endPeriod":{"type":"integer","description":"End time of the period (epoch ms)."},"orderStatus":{"type":"string","description":"Period status.","enum":["WAITING","SUCCESS","FAILED"]},"paymentAttempts":{"type":"array","description":"Payment attempts made for this period.","items":{"$ref":"#/components/schemas/SubscriptionPaymentAttempt"}}}},"SubscriptionPaymentAttempt":{"type":"object","description":"A single payment attempt for a subscription period.","properties":{"conversationId":{"type":"string","description":"ID sent for request/response correlation. Echoed back in the response."},"createdDate":{"type":"integer","description":"Creation time of the attempt (epoch ms)."},"paymentStatus":{"type":"string","description":"Result of the payment attempt.","enum":["SUCCESS","FAILED"]},"paymentId":{"type":"integer","description":"Payment ID for a successful payment. Present only when **SUCCESS**."},"errorCode":{"type":"string","description":"Error code for a failed payment. Present only when **FAILED**."},"errorMessage":{"type":"string","description":"Error message for a failed payment. Present only when **FAILED**."}}}}}}
```

## Search Subscriptions

> Retrieve subscription and payment details by filtering with various parameters, or without any parameters. For example, by sending only \*\*subscriptionStatus\*\*, you can list subscriptions with that status.<br>

```json
{"openapi":"3.0.3","info":{"title":"Subscription - Retry / Cancel / Upgrade / Search / Detail / Card Update","version":"1.0.0"},"servers":[{"url":"https://api.iyzipay.com","description":"iyzico API"}],"paths":{"/v2/subscription/subscriptions":{"get":{"summary":"Search Subscriptions","description":"Retrieve subscription and payment details by filtering with various parameters, or without any parameters. For example, by sending only **subscriptionStatus**, you can list subscriptions with that status.\n","tags":["Subscription"],"parameters":[{"$ref":"#/components/parameters/AuthHeader"},{"$ref":"#/components/parameters/ContentTypeHeader"},{"name":"subscriptionReferenceCode","in":"path","required":false,"schema":{"type":"string"},"description":"Reference code of the subscription to query."},{"name":"customerReferenceCode","in":"path","required":false,"schema":{"type":"string"},"description":"Customer reference code."},{"name":"pricingPlanReferenceCode","in":"path","required":false,"schema":{"type":"string"},"description":"Reference code of the pricing plan used in the subscription."},{"name":"parent","in":"path","required":false,"schema":{"type":"string"},"description":"Parent reference code used for matching in subscription updates."},{"name":"subscriptionStatus","in":"path","required":false,"schema":{"type":"string","enum":["ACTIVE","PENDING","UNPAID","UPGRADED","CANCELED","EXPIRED"]},"description":"Subscription status filter."},{"name":"startDate","in":"path","required":false,"schema":{"type":"integer"},"description":"Subscription start date."},{"name":"endDate","in":"path","required":false,"schema":{"type":"integer"},"description":"Subscription end date (epoch ms)."},{"name":"page","in":"path","required":false,"schema":{"type":"integer"},"description":"Page number."},{"name":"count","in":"path","required":false,"schema":{"type":"integer"},"description":"Number of records per page."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchSubscriptionsResponse"}}}},"404":{"description":"Example response for a wrong endpoint (e.g., typo).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}}}}}},"components":{"parameters":{"AuthHeader":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"},"description":"Authorization header, a signed hash value that starts with **IYZWSv2** and is generated in Base64 format."},"ContentTypeHeader":{"name":"Content-Type","in":"header","required":true,"schema":{"type":"string"},"description":"Content format of the request."}},"schemas":{"SearchSubscriptionsResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","failure"],"description":"Result of the request."},"systemTime":{"type":"integer","description":"Server time of the response (epoch ms)."},"data":{"type":"object","description":"Pagination information and subscription records.","properties":{"totalCount":{"type":"integer","description":"Total record count."},"currentPage":{"type":"integer","description":"Current page number."},"pageCount":{"type":"integer","description":"Total page count."},"items":{"type":"array","description":"Detailed subscription records.","items":{"$ref":"#/components/schemas/SubscriptionDetailItem"}}}}}},"SubscriptionDetailItem":{"type":"object","properties":{"referenceCode":{"type":"string","description":"Subscription reference code."},"parentReferenceCode":{"type":"string","description":"Reference used by the merchant to correlate subscription updates."},"pricingPlanName":{"type":"string","description":"Name of the pricing plan linked to the subscription."},"pricingPlanReferenceCode":{"type":"string","description":"Reference code of the pricing plan linked to the subscription."},"productName":{"type":"string","description":"Product name."},"productReferenceCode":{"type":"string","description":"Product reference code."},"customerEmail":{"type":"string","description":"Customer email address."},"customerGsmNumber":{"type":"string","description":"Customer GSM number."},"customerReferenceCode":{"type":"string","description":"Customer reference code."},"subscriptionStatus":{"type":"string","description":"Subscription status.\n\nValues:\n- **ACTIVE**: Subscription is active and payments are being collected regularly.\n- **PENDING**: Subscription is paused.\n- **UNPAID**: Payment could not be collected during the subscription.\n- **UPGRADED**: Subscription has been updated to another plan.\n- **CANCELED**: Subscription is canceled.\n- **EXPIRED**: Subscription period ended; no further charges are attempted.\n","enum":["ACTIVE","PENDING","UNPAID","UPGRADED","CANCELED","EXPIRED"]},"trialDays":{"type":"integer","description":"Trial period (days) of the pricing plan."},"trialStartDate":{"type":"integer","description":"Trial start time (epoch ms)."},"trialEndDate":{"type":"integer","description":"Trial end time (epoch ms)."},"createdDate":{"type":"integer","description":"Subscription creation time (epoch ms)."},"startDate":{"type":"integer","description":"Subscription start time (epoch ms)."},"endDate":{"type":"integer","description":"Subscription end time (epoch ms)."},"orders":{"type":"array","description":"List of periods (orders) within the subscription.","items":{"$ref":"#/components/schemas/SubscriptionOrder"}}}},"SubscriptionOrder":{"type":"object","properties":{"referenceCode":{"type":"string","description":"Reference code of the subscription period (order)."},"price":{"type":"decimal","description":"Period price."},"currencyCode":{"type":"string","enum":["TRY","USD","EUR"],"description":"Currency."},"startPeriod":{"type":"integer","description":"Start time of the period (epoch ms)."},"endPeriod":{"type":"integer","description":"End time of the period (epoch ms)."},"orderStatus":{"type":"string","description":"Period status.","enum":["WAITING","SUCCESS","FAILED"]},"paymentAttempts":{"type":"array","description":"Payment attempts made for this period.","items":{"$ref":"#/components/schemas/SubscriptionPaymentAttempt"}}}},"SubscriptionPaymentAttempt":{"type":"object","description":"A single payment attempt for a subscription period.","properties":{"conversationId":{"type":"string","description":"ID sent for request/response correlation. Echoed back in the response."},"createdDate":{"type":"integer","description":"Creation time of the attempt (epoch ms)."},"paymentStatus":{"type":"string","description":"Result of the payment attempt.","enum":["SUCCESS","FAILED"]},"paymentId":{"type":"integer","description":"Payment ID for a successful payment. Present only when **SUCCESS**."},"errorCode":{"type":"string","description":"Error code for a failed payment. Present only when **FAILED**."},"errorMessage":{"type":"string","description":"Error message for a failed payment. Present only when **FAILED**."}}},"NotFoundErrorResponse":{"type":"object","properties":{"timestamp":{"type":"integer","description":"Server time (epoch ms)."},"status":{"type":"integer","description":"HTTP status code."},"error":{"type":"string","description":"Short error description."},"path":{"type":"string","description":"Requested path."}}}}}}
```
