PWI-Initialize

After making the request mentioned below, you will receive the payWithIyzicoPageUrl value, which is a unique page where your customers will be directed to Pay with iyzico. Your customers will be automatically redirected to the callBackUrl you specified in the Pay-with-iyzico init request after completing the payment process.

You can display the generated link as a button, link, or div on your payment page. The token received with the link can be stored at this stage or when it is posted to callBackUrl if the customer continues the payment process. Please note that the generated link and token values are valid for 30 minutes. If no payment is received during this period, the token will expire.

callBackUrl address should have SSL.

By incorporating these features, you can provide a seamless payment experience for your customers, with real-time feedback on the success or failure of their transactions.

Pay with iyzico (PWI) — Initialize

post

Starts a PWI session; returns the token and page URL for redirection.

Header parameters
AuthorizationstringRequired

Authorization header; starts with IYZWSv2 and is a signed hash in Base64.

Example: IYZWSv2 aXBzaWduYXR1cmU...
Content-TypestringRequiredExample: application/json
Body
localestring · enumOptional

Language code. Default; tr

Example: enPossible values:
conversationIdstringOptional

Request/response correlation ID.

Example: conversationID
pricedecimalRequired

Basket total amount.

Example: 10
basketIdstringRequired

Basket ID.

Example: basketID
paymentGroupstring · enumOptional

Payment group.

Example: PRODUCTPossible values:
callbackUrlstringRequired

URL to redirect after the transaction.

Example: callbackUrl
currencystring · enumRequired

Currency. Default; TRY.

Example: TRYPossible values:
paidPricedecimalRequired

Amount to be collected.

Example: 10
paymentChannelstring · enumOptional

Payment channel.

Example: WEBPossible values:
Responses
200

Successful response (PWI initialized)

application/json
post
/payment/pay-with-iyzico/initialize

Sample Codes

Last updated