Subscription Transactions
The services included in the subscription transactions are listed below.
Initialize Subscription
If you have completed all the steps, you can now start the subscription process.
Subscription can be started in 2 different ways.
Both methods above give the same result, but there is a difference in the way they are used.
The subscription process always starts with an ACTIVE or PENDING status. If the status is PENDING or the status is ACTIVE but a trial period is specified in the payment plan, iyzico only validates the card in the subscription request. Card validation takes place with a 1 TL withdrawal and subsequent refund. Apart from this, no transaction or payment takes place.
If the subscription status is ACTIVE and no trial period is specified in the planning, the payment specified in the plan is taken from the card and the subscription is started.
Each subscription requires a card information. Your customers can start a subscription with the cards they have stored in the iyzico environment or with a new card. When requesting a card update, the subscriptionReferenceCode of the relevant subscription must be sent. In this case, only the card information of the relevant subscription will be updated.
Table of Subscription Status
ACTIVE
Bir abonelik aktif ise ve ödemeler düzenli olarak alınıyorsa status active olur.
PENDING
Bir abonelik durdurulmuşsa status pending olur.
UNPAID
Abonelik sırasında ödeme alınamamış ise status unpaid olur.
UPGRADED
Abonelik başka bir plan ile güncellenmişse status upgraded olur.
CANCELED
Abonelik iptal edilmişse status cancelled olur.
EXPIRED
Abonelik periyodu bitmişse status expired olur. Karttan başka bir ödeme alınmaz.
Initializing Subscription via Checkout Form
To create a checkout form, merchants must submit the following information.
Payment Plan Reference Code
Customer information
Subscription Status
CallBackURL (the address where the Checkout Form result will be posted)
CallBackUrl is given by member merchants during the request and determines the page to which the end user will be directed after payment. Redirection occurs as soon as the customer makes the payment. At this point, the payment request was sent to the bank and the result was processed by iyzico. The member business must check whether the payment has been received with a separate request. If the card validation or first payment is successful, all other processes are carried out by iyzico.
Via iyzico Checkout Form, an htmlContent parameter is returned as a result of the form creation request. When this javascript code snippet is printed on the page, the iyzico library is ready to be loaded into any of the “divs” mentioned below. The checkout form will appear when the page is completely loaded.
The divs where the checkout form will be loaded can be responsive or popup. Examples are given below.
Used to start a subscription with iyzico Checkout Form. Returns the form content and token.
Authorization header, a signed hash value that starts with IYZWSv2 and is produced in Base64 format.
The request content type.
application/jsonLanguage code. Default is tr. Send "en" to create the checkout form in English.
enPossible values: Callback URL to which the payment result will be sent.
https://callbackUrl.comReference code of the plan to start the subscription.
7515f763-5da3-4a35-8f7f-d425ae44ac04Initial status. If PENDING, subscription will not start until activated.
ACTIVEPossible values: Optional correlation value to match request/response pairs.
123456789Successful response
Error response
Sample Codes
Start a subscription without the hosted checkout form, using your own payment form via NON3D service.
Authorization header, a signed hash value that starts with IYZWSv2 and is produced in Base64 format.
The request content type.
application/jsonReference code of the plan to start the subscription.
7515f763-5da3-4a35-8f7f-d425ae44ac04Optional correlation value to match request/response pairs.
123456789Initial status. If PENDING, subscription will not start until activated.
ACTIVEPossible values: Successful response
Error response
Sample Codes
After the checkout form flow completes, query the subscription creation result with the returned token.
Token returned by checkout form initialize for this operation.
Optional correlation value you send in the request to match with the response.
Authorization header, a signed hash value that starts with IYZWSv2 and is produced in Base64 format.
The request content type.
application/jsonSuccessful response
Error response
Sample Codes
If the user already has an active subscription, you can start a new one with customerReferenceCode. If the user does not have an active subscription, no new subscription is started with customerReferenceCode.
Authorization header, a signed hash value that starts with IYZWSv2 and is produced in Base64 format.
The request content type.
application/jsonInitial status. If PENDING, subscription will not start until activated.
ACTIVEPossible values: Reference code of the plan to start the subscription.
7515f763-5da3-4a35-8f7f-d425ae44ac04Reference code of the existing customer. Must already have an active subscription to start a new one with this flow.
279bb493-6fda-45e9-9368-2373ea43ff8dSuccessful response
Error response
Sample Codes
A subscription that was started as pending can be activated via this service.
Reference code of the subscription that was started as pending.
a2077643-bab7-4b73-85a5-7676c78d7c66Authorization header; a Base64-encoded signed hash value that begins with IYZWSv2.
Request body content type.
application/jsonReference code of the subscription that was started as pending.
a2077643-bab7-4b73-85a5-7676c78d7c66Successful response
Error response
Sample Codes
If a recurring payment fails for a subscription, use this service to retry the charge and collect the payment.
Authorization header, a signed hash value that starts with IYZWSv2 and is generated in Base64 format.
Content format of the request.
application/jsonReference code of the failed payment. This is the orderReferenceCode value provided in the webhook notification for the failed subscription payment.
009dac1a-00dc-41e8-a92f-2c24b18e27b9Successful response
Error response
Sample Codes
Cancels an active subscription.
Reference code of the subscription to cancel.
009dac1a-00dc-41e8-a92f-2c24b18e27b9Authorization header, a signed hash value that starts with IYZWSv2 and is generated in Base64 format.
Content format of the request.
application/jsonSubscription reference code. Can optionally be sent in the request body.
a2077643-bab7-4b73-85a5-7676c78d7c66Successful response
Error response
Sample Codes
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.
Reference code of the subscription to upgrade.
97fb885d-69e3-49ac-8590-9d05c9c6016eAuthorization header, a signed hash value that starts with IYZWSv2 and is generated in Base64 format.
Content format of the request.
application/jsonWhen the upgrade will take effect. Values:
- NOW: Apply the change immediately.
- NEXT_PERIOD: Apply the change at the next billing period.
NOWPossible values: Reference code of the target pricing plan.
dbffa857-40f5-48d1-9179-e9326ffb942dIf true, includes the trial period of the upgraded plan.
false- true: Recalculates the subscription end date according to the new plan’s recurrenceCount.
- false: Keeps the current plan’s end date and transfers it to the new plan.
trueSuccessful response
Error response
Sample Codes
Returns full details of a subscription by its reference code.
Reference code of the subscription to query.
732a16cc-2ec4-4399-9aab-656cb6f5249eAuthorization header, a signed hash value that starts with IYZWSv2 and is generated in Base64 format.
Content format of the request.
application/jsonSubscription reference code. Can optionally be sent in the request body.
732a16cc-2ec4-4399-9aab-656cb6f5249eSuccessful response
Successful response
Sample Codes
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.
Reference code of the subscription to query.
97fb885d-69e3-49ac-8590-9d05c9c6016eCustomer reference code.
279bb493-6fda-45e9-9368-2373ea43ff8dReference code of the pricing plan used in the subscription.
dbffa857-40f5-48d1-9179-e9326ffb942dParent reference code used for matching in subscription updates.
670489f2-9224-4a71-af6c-7044d22f5d73Subscription status filter.
ACTIVEPossible values: Subscription start date.
2025-08-24 14:30:26Subscription end date (epoch ms).
2025-08-24 14:30:26Page number.
1Number of records per page.
20Authorization header, a signed hash value that starts with IYZWSv2 and is generated in Base64 format.
Content format of the request.
application/jsonSuccessful response
Example response for a wrong endpoint (e.g., typo).
Sample Codes
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.
Authorization header, a signed hash value that starts with IYZWSv2 and is generated in Base64 format.
Content format of the request.
application/jsonCallback URL where the update result will be posted.
https://www.merchant.com/callbackReference code of the customer whose card will be updated.
279bb493-6fda-45e9-9368-2373ea43ff8dIf updating on a specific subscription, the subscription reference code (optional).
52c732ba-b449-460b-b553-ab21f9074300Response language preference.
enPossible values: Successful response
Error response
Sample Codes
With this request, a checkout form is created and when the customer makes the payment, token information is sent to the specified callBackUrl address. In this case, the card has been updated successfully.
Last updated
