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.
The planPaymentType parameter is mandatory and can currently only take the value RECURRING.
Create Payment Plan
POST
https://api.iyzipay.com/v2/subscription/products/{product_reference}/pricing-plans
Request Body
Create Payment Plan Response
Update Payment Plan
This method allows only the updating of the name and trialPeriodDays parameters. To update a plan, the unique reference code associated with that plan must be used. Updating can be done both through the API and the iyzico merchant panel.
Update Payment Plan
POST
https://api.iyzipay.com/v2/subscription/pricing-plans/{pricingPlanReferenceCode}
Request Body
Update Payment Plan Response
Delete Payment Plan
A plan can only be deleted if it has no associated subscriptions. To delete a plan, the merchant must use the plan reference code. The request is responded to as either success or failure. Success means the plan has been successfully deleted.
Delete Payment Plan
DELETE
https://api.iyzipay.com/v2/subscription/pricing-plans/{pricingPlanReferenceCode}
Request Body
Delete Payment Plan Response
Get Payment Plan
Merchant businesses can view all the details of a plan both through the merchant panel and via API requests.
Get Payment Plan
GET
https://api.iyzipay.com/v2/subscription/pricing-plans/{pricingPlanReferenceCode}
Request Body
Get Payment Plan Response
List of Payment Plans
All plans and the products they are associated with can be viewed in the response to this request. The response is sent in pages.
List of Payment Plans
GET
https://api.iyzipay.com/v2/subscription/products/{product_reference}/pricing-plans
Request Body
List of Payment Plan Response
Last updated