Initialize Subscription

Initialize Subscription (iyzico Checkout Form)

post

Used to start a subscription with iyzico Checkout Form. Returns the form content and token.

Header parameters
AuthorizationstringRequired

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

Content-TypestringRequired

The request content type.

Example: application/json
Body
localestring · enumOptional

Language code. Default is tr. Send "en" to create the checkout form in English.

Example: enPossible values:
callbackUrlstringRequired

Callback URL to which the payment result will be sent.

Example: https://callbackUrl.com
pricingPlanReferenceCodestringRequired

Reference code of the plan to start the subscription.

Example: 7515f763-5da3-4a35-8f7f-d425ae44ac04
subscriptionInitialStatusstring · enumRequired

Initial status. If PENDING, subscription will not start until activated.

Example: ACTIVEPossible values:
conversationIdstringOptional

Optional correlation value to match request/response pairs.

Example: 123456789
Responses
200

Successful response

application/json
post
/v2/subscription/checkoutform/initialize

Retrieve Checkout Form Result

get

After the checkout form flow completes, query the subscription creation result with the returned token.

Path parameters
tokenstringRequired

Token returned by checkout form initialize for this operation.

Query parameters
conversationIdstringOptional

Optional correlation value you send in the request to match with the response.

Header parameters
AuthorizationstringRequired

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

Content-TypestringRequired

The request content type.

Example: application/json
Responses
200

Successful response

application/json
get
/v2/subscription/checkoutform/{token}

Initialize Subscription (NON3D)

post

Start a subscription without the hosted checkout form, using your own payment form via NON3D service.

Header parameters
AuthorizationstringRequired

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

Content-TypestringRequired

The request content type.

Example: application/json
Body
pricingPlanReferenceCodestringRequired

Reference code of the plan to start the subscription.

Example: 7515f763-5da3-4a35-8f7f-d425ae44ac04
conversationIdstringOptional

Optional correlation value to match request/response pairs.

Example: 123456789
subscriptionInitialStatusstring · enumRequired

Initial status. If PENDING, subscription will not start until activated.

Example: ACTIVEPossible values:
Responses
200

Successful response

application/json
post
/v2/subscription/initialize

Initialize Subscription (Existing Customer)

post

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.

Header parameters
AuthorizationstringRequired

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

Content-TypestringRequired

The request content type.

Example: application/json
Body
subscriptionInitialStatusstring · enumRequired

Initial status. If PENDING, subscription will not start until activated.

Example: ACTIVEPossible values:
pricingPlanReferenceCodestringRequired

Reference code of the plan to start the subscription.

Example: 7515f763-5da3-4a35-8f7f-d425ae44ac04
customerReferenceCodestringRequired

Reference code of the existing customer. Must already have an active subscription to start a new one with this flow.

Example: 279bb493-6fda-45e9-9368-2373ea43ff8d
Responses
200

Successful response

application/json
post
/v2/subscription/initialize/with-customer

Last updated