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.
PWI Initialize Request
POST
https://api.iyzipay.com/payment/pay-with-iyzico/initialize
Request Body
Name | Type | Description |
---|---|---|
price* | Decimal | Total amount of basket. The sum of basket items’ amount must be equal to the price of basket |
contactName(BillingAddress)* | String | Contact name of billing address |
registrationAddress(Buyer)* | String | Registration address of buyer |
ip(Buyer)* | String | IP of buyer |
email(Buyer)* | String | Email of buyer |
country(Buyer)* | String | Country of buyer |
city(Buyer)* | String | City of buyer |
identityNumber(Buyer)* | String | Identity number of buyer. TCKN for Turkish merchants, passport number for foreign merchants |
surname(Buyer)* | String | Surname of buyer |
name(Buyer)* | String | Name of buyer |
id(Buyer)* | String | ID of buyer. |
currency* | String | Currency (default: TRY). Alternatively, you can set USD, EUR, GBP and IRR |
paidPrice* | Decimal | Final amount (including installment fee) that will be charged to customer’s card |
zipCode(BillingAddress) | String | Zip code of billing address |
zipCode(ShippingAddress) | String | Zip code of shipping address |
zipCode(Buyer) | String | Zip code of buyer |
category1(BasketItems) | String | Category 1 for item in the basket |
name(BasketItems) | String | Name of the item in the basket |
price(BasketItems) | Decimal | Price value for each item. Must be greater than zero |
itemType(BasketItems) | String | Item Type. Valid values are PHYSICAL,VIRTUAL |
id(BasketItems) | String | Basket Item ID |
address(ShippingAddress)* | String | Address details of shipping address. If one of the itemType in basket is PHYSICAL, then this parameter will be mandatory |
country(ShippingAddress)* | String | Country name of shipping address. If one of the itemType in basket is PHYSICAL, then this parameter will be mandatory |
city(ShippingAddress)* | String | City name of shipping address. If one of the itemType in basket is PHYSICAL, then this parameter will be mandatory |
contactName(ShippingAddress)* | String | Contact name of shipping address. If one of the itemType in basket is PHYSICAL, then this parameter will be mandatory |
address(BillingAddress)* | String | Address details of billing address |
country(BillingAddress)* | String | Country name of billing address |
city(BillingAddress)* | String | City name of billing address |
paymentGroup | String | Payment group (default: PRODUCT). Valid values are PRODUCT, LISTING, SUBSCRIPTION |
paymentChannel | String | Payment channel. Valid values are WEB, MOBILE, MOBILE_WEB, MOBILE_IOS, MOBILE_ANDROID, MOBILE_WINDOWS, MOBILE_TABLET, MOBILE_PHONE |
basketId | String | Merchant's basket ID |
conversationId | String | Conversation ID to match request and response |
locale | String | Language (default: tr) |
lastLoginDate(Buyer) | String | Last login date of buyer. Format should be “2015-09-17 23:45:06” |
registrationDate(Buyer) | String | Registration date of buyer. Format should be “2015-09-17 23:45:06” |
subMerchantKey(BasketItem) | String | Submerchant ID value. Mandatory value for marketplace solution |
subMerchantPrice(BasketItem) | Decimal | Payout amount to subMerchant of each item. Must be greater than zero. Mandatory value for marketplace solution |
gsmNumber(Buyer) | String | GSM number of buyer |
category2(BasketItems) | String | Category 2 for item in the basket |
paymentSource | String | Payment source. Valid values are SHOPIFY, MAGENTO, PRESTASHOP, WOOCOMMERCE, OPENCART |
callbackUrl | String | Merchant callback URL for payment result notification |
enabledinstallments | Integer | Enabled installments value. it should be set as 1 |
PWI Initialize Response
Parameters to be returned from the service are as follows:
Input Name | Type | Description |
payWithIyzicoPageUrl | String | Unique link of pay with iyzico page. The end user should be directed to this page |
token | String | Unique value created for each pay with iyzico request. This token is also used to access the payment result |
tokenExpireTime | Integer | Expiration time of the token and pay with iyzico page |
status | String | Service response result (success / failure) |
errorCode | String | Error code if service response status is failure |
errorMessage | String | Error message if service response status is failure |
errorGroup | String | Error group if service response status is failure |
locale | String | Language (default: tr) |
systemTime | Integer | Response system timestamp value |
conversationId | String | If set, conversation ID to match request and response |
Last updated