Payment Plan
The subscription system operates by default according to the specified plan. The payment plan is the step where all the necessary features for recurring payments are specified.
Plans have unique names, and one plan can only be associated with one product. If a plan is actively linked to a subscription, it cannot be deleted.
There are five different methods that can be used on plans.
Create Payment Plan
To create a plan, the following details must be provided: product reference number, name, price, currency, payment interval, and other parameters as detailed below.
If a trial period is desired for a subscription, the trialPeriodDays parameter can be used. If this parameter is sent, no subscription will be initiated and no payment will be collected from the card during the specified period.
The Payment Interval parameter specified in the request indicates the payment period. When sending the "WEEKLY" parameter when creating a plan, iyzico will deduct the specified amount from the card every week. Customizing this period is also possible. For example, if you want payments to be collected every 2 weeks, you should send the PaymentInterval value as "WEEKLY" and the paymentIntervalCount value as 2.
Creates a new pricing plan for a specific product.
Reference code of the product the plan will be attached to.
Authorization header, IYZWSv2 ile başlayan ve base64 formatında üretilmiş imzalı hash değeridir.
Format of the request payload.
application/jsonPricing plan name.
Amount to charge on each billing period.
Currency. (For foreign currency, only non-TRY cards are allowed.)
Recurrence interval for the subscription charge.
Subscription type.
Frequency multiplier for the interval. For example, if you set a weekly plan and send 2, the charge occurs every 2 weeks.
2Total number of repeats (e.g., 12 → 12 months). If omitted, it continues until the subscription is canceled.
12Free trial length in days. If provided, the first charge happens after this period.
10Language of the response and error messages.
Custom identifier for request tracking.
Successful response
Error response
Sample Codes
This method allows updating only the name and trialPeriodDays fields. The plan's reference code must be provided as a path parameter. Updates can be performed via API or the iyzico merchant panel. Active subscriptions are not affected.
Reference code of the pricing plan to be updated.
Authorization header, IYZWSv2 ile başlayan ve base64 formatında üretilmiş imzalı hash değeridir.
Format of the request payload.
application/jsonUpdated plan name.
Updated trial period (days).
Successful response
Error response
Sample Codes
Lists all pricing plans for a given product. The response is paginated.
Product reference code.
Page number to list.
Number of records per page.
Authorization header, IYZWSv2 ile başlayan ve base64 formatında üretilmiş imzalı hash değeridir.
Format of the request payload.
application/jsonSuccessful response
Error response
Sample Codes
Returns details of a pricing plan. Merchants can see all details both in the merchant panel and via API.
Pricing plan reference code.
Authorization header, IYZWSv2 ile başlayan ve base64 formatında üretilmiş imzalı hash değeridir.
Format of the request payload.
application/jsonSuccessful response
Error response
Sample Codes
Deletes the specified pricing plan by reference code. Plans with active subscriptions or pending updates cannot be deleted.
Reference code of the pricing plan to delete.
Authorization header, IYZWSv2 ile başlayan ve base64 formatında üretilmiş imzalı hash değeridir.
Format of the request payload.
application/jsonSuccessful response
Error response
Sample Codes
Last updated
