Subscription Product

The subscription primarily built around plans, and plans must be associated with products. To create a product, it is sufficient to provide only the name parameter.

A product can have multiple payment plans, and it is possible to perform all these operations both through the API and the iyzico merchant panel.

The product name is a unique value, and it is possible to create unlimited products that will be distinct from each other.

There are five different methods that can be used on products.

A product can be deleted only if it does not have an associated plan. If a product associated with a plan needs to be deleted, the associated plan must be deleted first.

Create Product

post

Creates a new subscription product. The Subscription API charges on a recurring basis according to pricing plans, and each plan is linked to at least one product. There is no limit on the number of products; a product can be created by providing only a name.

Header parameters
AuthorizationstringRequired

Authorization header; a signed hash value that starts with IYZWSv2 and is generated in Base64 format.

Content-TypestringRequired

Content type of the request body.

Example: application/json
Body
localestringOptional

Language of iyzico response messages. Default en; tr is supported.

Example: en
conversationIdstringOptional

A reference value that can be used to match request and response.

Example: 123456789
namestringRequired

Product name.

Example: Coffee Pack
descriptionstringOptional

Product description.

Example: Turkish Coffee
Responses
post
/v2/subscription/products

Sample Codes

Update Product

post

Updates a subscription product. Product name and description can be edited via API or the iyzico merchant panel. Use the product’s unique reference code for API updates.

Path parameters
productReferenceCodestringRequired

Unique reference code of the product.

Header parameters
AuthorizationstringRequired

Authorization header; a signed hash value that starts with IYZWSv2 and is generated in Base64 format.

Content-TypestringRequired

Content type of the request body.

Example: application/json
Body
localestringOptional

Response language (en/tr).

Example: en
conversationIdstringOptional

Value used for request/response matching.

Example: 123456789
namestringRequired

New product name.

Example: Product Update
descriptionstringOptional

New product description.

Example: New description
Responses
post
/v2/subscription/products/{productReferenceCode}

Sample Codes

Get Product

get

Retrieves details of a single product. Provide the product reference code in the request.

Path parameters
productReferenceCodestringRequired

Unique reference code of the product.

Header parameters
AuthorizationstringRequired

Authorization header; a signed hash value that starts with IYZWSv2 and is generated in Base64 format.

Content-TypestringRequired

Content type of the request body.

Example: application/json
Responses
get
/v2/subscription/products/{productReferenceCode}

Sample Codes

List Products

get

Lists subscription products. Use this to fetch all products and their linked plans. To reduce latency and payload size, pagination is used so you can retrieve the product list page by page.

Header parameters
AuthorizationstringRequired

Authorization header; a signed hash value that starts with IYZWSv2 and is generated in Base64 format.

Content-TypestringRequired

Content type of the request body.

Example: application/json
Body
pageintegerOptional

Returns products for the specified page.

Example: 1
countintegerOptional

Number of products per page.

Example: 20
Responses
get
/v2/subscription/products

Sample Codes

Delete Product

delete

Deletes a subscription product. Products can be deleted via API or the iyzico merchant panel only when there are no plans linked to the product.

Path parameters
productReferenceCodestringRequired

Unique reference code of the product.

Header parameters
AuthorizationstringRequired

Authorization header; a signed hash value that starts with IYZWSv2 and is generated in Base64 format.

Content-TypestringRequired

Content type of the request body.

Example: application/json
Responses
delete
/v2/subscription/products/{productReferenceCode}

Sample Codes

Last updated