For activating protected bank transfer in sandbox environment please send an email to integration@iyzico.com.
After activation is completed, sending "create checkout form" request will be enough to get a link or checkoutForm content.
The response contains below parameters
paymentPageUrl: This value can be assigned to a link/button or a div etc. It redirects customers to protected bank transfer page. This screen requests an email and mobile number(if you send these parameters at the time of init request, they appear as predefined). Customer selects the bank and clicks continue button. At this time, iyzico sends an informative email and sms(Price, IBAN, reference number) to the customer. Also a transaction is created on iyzico side. Because there is no payment yet,the status of payment is marked as init_bank_transfer(means that the payment is not completed yet). The bank transfer interface shows a complete transaction button. As soon as it is clicked, customer returns back an URL given by merchant at the time of init bank transfer request.
checkoutFormContent: This value contains a javascript code that loads iyzico checkout form elements to your web page. The checkout form will appear in the place where you add the mentioned "div" elements below. Checkout form contains a tab named "Protected Bank Transfer". As soon as it is clicked, the bank transfer interface appears and it asks customer an email and mobile number(if you send these parameters at the time of init request, they appear as predefined). Customer selects the bank and clicks continue button. At this time, iyzico sends an informative email and sms(Price, IBAN, reference number) to the customer. Also a transaction is created on iyzico side. Because there is no payment yet,the status of payment is marked as init_bank_transfer(means that the payment is not completed yet). The bank transfer interface shows a complete transaction button. As soon as it is clicked, customer returns back an URL given by merchant at the time of init bank transfer request.
Responsive usage
<div id="iyzipay-checkout-form" class="responsive"></div>
Pop-up usage
<div id="iyzipay-checkout-form" class="popup"></div>
After redirection to callBackUrl, you can show a message like "Order has been received" to your customers.
It is important for your customers to pay attention below points
iyzico checks every transaction in every 15 minutes. If a bank transfer matches with a transaction, the status of transaction is changed to SUCCESS. iyzico informs the merchant and customer that the payment is successful. In addition, a notification is sent to webhookURL.
The notification sample that is sent to WebhookURL
{
"iyziEventTime": "1569325868970",
"iyziEventType": "BANK_TRANSFER_AUTH",
"iyziReferenceCode": "028246012345",
"status": "SUCCESS",
"token": "04de1234-32b9-6907-bf06-0987ae260e35"
}
PROTECTED BANK TRANSFER OPENING PAGE
PROTECTED BANK TRANSFER COMPLETION PAGE
All transactions are reachable on iyzico's merchant panel. To reflect the payments to your system, you can check the transaction by using the token returns from bank transfer init request or you can listen webhookURL and update payment's status as soon as you get a notification of related payment.
Parameters to be sent to the service are as follows:
Parametre ismi | Tip | Zorunluluk | Açıklama |
---|---|---|---|
locale | String | No | Language (default: tr) |
conversationId | String | No | Conversation ID to match request and response |
price | Decimal | Yes | Total amount of basket. The sum of basket items’ amount must be equal to the price of basket. |
paidPrice | Decimal | Yes | Final amount (including installment fee) that will be charged to customer’s card |
currency | String | Yes | Currency (default: TRY). Alternatively, you can set USD, EUR, GBP |
installment | Integer | Yes | It is not possible to make installment for bank transfers. For payment with cards it can be sent as 1, 2, 3, 6, 9, 12 |
basketId | String | No | Merchant's basket ID |
paymentChannel | String | No | Payment channel. Valid values are: WEB, MOBILE, MOBILE_WEB, MOBILE_IOS, MOBILE_ANDROID, MOBILE_WINDOWS, MOBILE_TABLET, MOBILE_PHONE |
paymentGroup | String | No | Payment group (default: PRODUCT). Valid values are PRODUCT, LISTING, SUBSCRIPTION |
callbackUrl | String | Yes | The URL address that informs the Merchant of the checkoutform token value and to which the end user is directed in the Bank Transfer flow. |
id(Buyer) | String | Yes | ID of buyer. |
name(Buyer) | String | Yes | Name of buyer |
surname(Buyer) | String | Yes | Surname of buyer |
identityNumber(Buyer) | String | Yes | Identity number of buyer. TCKN for Turkish merchants, passport number for foreign merchants |
city(Buyer) | String | Yes | City of buyer |
country(Buyer) | String | Yes | Country of buyer |
email(Buyer) | String | Yes | Email of buyer |
gsmNumber(Buyer) | String | No | GSM number of buyer |
ip(Buyer) | String | Yes | IP of buyer |
registrationAddress(Buyer) | String | Yes | Registration address of buyer |
zipCode(Buyer) | String | No | Zip code of buyer |
registrationDate(Buyer) | String | No | Registration date of buyer. Format should be “2015-09-17 23:45:06” |
lastLoginDate(Buyer) | String | No | Last login date of buyer. Format should be “2015-09-17 23:45:06” |
contactName(BillingAddress) | String | Yes | Contact name of billing address |
city(BillingAddress) | String | Yes | City of billing address |
country(BillingAddress) | String | Yes | Country of billing address |
address(BillingAddress) | String | Yes | Address name of billing address |
zipCode(BillingAddress) | String | No | Zip code of billing address |
contactName(ShippingAddress) | String | Yes | Contact name of shipping adress. If one of the itemType in basket is PHYSICAL, then this parameter will be mandatory |
city(ShippingAddress) | String | Yes | City of shipping adress. If one of the itemType in basket is PHYSICAL, then this parameter will be mandatory |
country(ShippingAddress) | String | Yes | Country of shipping adress. If one of the itemType in basket is PHYSICAL, then this parameter will be mandatory |
address(ShippingAddress) | String | Yes | Address of shipping adress. If one of the itemType in basket is PHYSICAL, then this parameter will be mandatory |
zipCode(ShippingAddress) | String | No | Zip code of shipping adress |
id(BasketItem) | String | Yes | Basket Item ID. Note. Basket items cannot be more than 500 |
itemType(BasketItem) | String | Yes | Item Type. Valid values are PHYSICAL,VIRTUAL |
name(BasketItem) | String | Yes | Name of the item in the basket |
category1(BasketItem) | String | Yes | Category 1 for item in the basket. |
category2(BasketItem) | String | No | Category 2 for item in the basket. |
price(BasketItem) | Decimal | Yes | Price value for each item. Must be greater than zero. |
Parametre ismi | Tip | Açıklama |
---|---|---|
checkoutFormContent | string | HTML code of checkout form. |
paymentPageUrl | string | URL of protected bank transfer page. |
token | string | Unique value created for each checkout form / protected bank transfer request. This token is used to access the payment result. After payment matches, this token returns payment details. Before payment matches, requesting this token will return a status INIT_BANK_TRANSFER |
tokenExpireTime | Integer | Expiration time of the token |
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 |
$request = new \Iyzipay\Request\CreateCheckoutFormInitializeRequest();
$request->setLocale(\Iyzipay\Model\Locale::TR);
$request->setConversationId("123456789");
$request->setPrice("1");
$request->setPaidPrice("1.2");
$request->setCurrency(\Iyzipay\Model\Currency::TL);
$request->setBasketId("B67832");
$request->setPaymentGroup(\Iyzipay\Model\PaymentGroup::PRODUCT);
$request->setCallbackUrl("https://www.merchant.com/callback");
$request->setEnabledInstallments(array(2, 3, 6, 9));
$buyer = new \Iyzipay\Model\Buyer();
$buyer->setId("BY789");
$buyer->setName("John");
$buyer->setSurname("Doe");
$buyer->setGsmNumber("+905350000000");
$buyer->setEmail("email@email.com");
$buyer->setIdentityNumber("74300864791");
$buyer->setLastLoginDate("2015-10-05 12:43:35");
$buyer->setRegistrationDate("2013-04-21 15:12:09");
$buyer->setRegistrationAddress("Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1");
$buyer->setIp("85.34.78.112");
$buyer->setCity("Istanbul");
$buyer->setCountry("Turkey");
$buyer->setZipCode("34732");
$request->setBuyer($buyer);
$shippingAddress = new \Iyzipay\Model\Address();
$shippingAddress->setContactName("Jane Doe");
$shippingAddress->setCity("Istanbul");
$shippingAddress->setCountry("Turkey");
$shippingAddress->setAddress("Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1");
$shippingAddress->setZipCode("34742");
$request->setShippingAddress($shippingAddress);
$billingAddress = new \Iyzipay\Model\Address();
$billingAddress->setContactName("Jane Doe");
$billingAddress->setCity("Istanbul");
$billingAddress->setCountry("Turkey");
$billingAddress->setAddress("Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1");
$billingAddress->setZipCode("34742");
$request->setBillingAddress($billingAddress);
$basketItems = array();
$firstBasketItem = new \Iyzipay\Model\BasketItem();
$firstBasketItem->setId("BI101");
$firstBasketItem->setName("Binocular");
$firstBasketItem->setCategory1("Collectibles");
$firstBasketItem->setCategory2("Accessories");
$firstBasketItem->setItemType(\Iyzipay\Model\BasketItemType::PHYSICAL);
$firstBasketItem->setPrice("0.3");
$basketItems[0] = $firstBasketItem;
$secondBasketItem = new \Iyzipay\Model\BasketItem();
$secondBasketItem->setId("BI102");
$secondBasketItem->setName("Game code");
$secondBasketItem->setCategory1("Game");
$secondBasketItem->setCategory2("Online Game Items");
$secondBasketItem->setItemType(\Iyzipay\Model\BasketItemType::VIRTUAL);
$secondBasketItem->setPrice("0.5");
$basketItems[1] = $secondBasketItem;
$thirdBasketItem = new \Iyzipay\Model\BasketItem();
$thirdBasketItem->setId("BI103");
$thirdBasketItem->setName("Usb");
$thirdBasketItem->setCategory1("Electronics");
$thirdBasketItem->setCategory2("Usb / Cable");
$thirdBasketItem->setItemType(\Iyzipay\Model\BasketItemType::PHYSICAL);
$thirdBasketItem->setPrice("0.2");
$basketItems[2] = $thirdBasketItem;
$request->setBasketItems($basketItems);
$checkoutFormInitialize = \Iyzipay\Model\CheckoutFormInitialize::create($request, Config::options());
CreateCheckoutFormInitializeRequest request = new CreateCheckoutFormInitializeRequest();
request.Locale = Locale.TR.ToString();
request.ConversationId = "123456789";
request.Price = "1";
request.PaidPrice = "1.2";
request.Currency = Currency.TRY.ToString();
request.BasketId = "B67832";
request.PaymentGroup = PaymentGroup.PRODUCT.ToString();
request.CallbackUrl = "https://www.merchant.com/callback";
List<int> enabledInstallments = new List<int>();
enabledInstallments.Add(2);
enabledInstallments.Add(3);
enabledInstallments.Add(6);
enabledInstallments.Add(9);
request.EnabledInstallments = enabledInstallments;
Buyer buyer = new Buyer();
buyer.Id = "BY789";
buyer.Name = "John";
buyer.Surname = "Doe";
buyer.GsmNumber = "+905350000000";
buyer.Email = "email@email.com";
buyer.IdentityNumber = "74300864791";
buyer.LastLoginDate = "2015-10-05 12:43:35";
buyer.RegistrationDate = "2013-04-21 15:12:09";
buyer.RegistrationAddress = "Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1";
buyer.Ip = "85.34.78.112";
buyer.City = "Istanbul";
buyer.Country = "Turkey";
buyer.ZipCode = "34732";
request.Buyer = buyer;
Address shippingAddress = new Address();
shippingAddress.ContactName = "Jane Doe";
shippingAddress.City = "Istanbul";
shippingAddress.Country = "Turkey";
shippingAddress.Description = "Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1";
shippingAddress.ZipCode = "34742";
request.ShippingAddress = shippingAddress;
Address billingAddress = new Address();
billingAddress.ContactName = "Jane Doe";
billingAddress.City = "Istanbul";
billingAddress.Country = "Turkey";
billingAddress.Description = "Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1";
billingAddress.ZipCode = "34742";
request.BillingAddress = billingAddress;
List<BasketItem> basketItems = new List<BasketItem>();
BasketItem firstBasketItem = new BasketItem();
firstBasketItem.Id = "BI101";
firstBasketItem.Name = "Binocular";
firstBasketItem.Category1 = "Collectibles";
firstBasketItem.Category2 = "Accessories";
firstBasketItem.ItemType = BasketItemType.PHYSICAL.ToString();
firstBasketItem.Price = "0.3";
basketItems.Add(firstBasketItem);
BasketItem secondBasketItem = new BasketItem();
secondBasketItem.Id = "BI102";
secondBasketItem.Name = "Game code";
secondBasketItem.Category1 = "Game";
secondBasketItem.Category2 = "Online Game Items";
secondBasketItem.ItemType = BasketItemType.VIRTUAL.ToString();
secondBasketItem.Price = "0.5";
basketItems.Add(secondBasketItem);
BasketItem thirdBasketItem = new BasketItem();
thirdBasketItem.Id = "BI103";
thirdBasketItem.Name = "Usb";
thirdBasketItem.Category1 = "Electronics";
thirdBasketItem.Category2 = "Usb / Cable";
thirdBasketItem.ItemType = BasketItemType.PHYSICAL.ToString();
thirdBasketItem.Price = "0.2";
basketItems.Add(thirdBasketItem);
request.BasketItems = basketItems;
CheckoutFormInitialize checkoutFormInitialize = CheckoutFormInitialize.Create(request, options);
CreateCheckoutFormInitializeRequest request = new CreateCheckoutFormInitializeRequest();
request.setLocale(Locale.TR.getValue());
request.setConversationId("123456789");
request.setPrice(new BigDecimal("1"));
request.setPaidPrice(new BigDecimal("1.2"));
request.setCurrency(Currency.TRY.name());
request.setBasketId("B67832");
request.setPaymentGroup(PaymentGroup.PRODUCT.name());
request.setCallbackUrl("https://www.merchant.com/callback");
List<Integer> enabledInstallments = new ArrayList<Integer>();
enabledInstallments.add(2);
enabledInstallments.add(3);
enabledInstallments.add(6);
enabledInstallments.add(9);
request.setEnabledInstallments(enabledInstallments);
Buyer buyer = new Buyer();
buyer.setId("BY789");
buyer.setName("John");
buyer.setSurname("Doe");
buyer.setGsmNumber("+905350000000");
buyer.setEmail("email@email.com");
buyer.setIdentityNumber("74300864791");
buyer.setLastLoginDate("2015-10-05 12:43:35");
buyer.setRegistrationDate("2013-04-21 15:12:09");
buyer.setRegistrationAddress("Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1");
buyer.setIp("85.34.78.112");
buyer.setCity("Istanbul");
buyer.setCountry("Turkey");
buyer.setZipCode("34732");
request.setBuyer(buyer);
Address shippingAddress = new Address();
shippingAddress.setContactName("Jane Doe");
shippingAddress.setCity("Istanbul");
shippingAddress.setCountry("Turkey");
shippingAddress.setAddress("Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1");
shippingAddress.setZipCode("34742");
request.setShippingAddress(shippingAddress);
Address billingAddress = new Address();
billingAddress.setContactName("Jane Doe");
billingAddress.setCity("Istanbul");
billingAddress.setCountry("Turkey");
billingAddress.setAddress("Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1");
billingAddress.setZipCode("34742");
request.setBillingAddress(billingAddress);
List<BasketItem> basketItems = new ArrayList<BasketItem>();
BasketItem firstBasketItem = new BasketItem();
firstBasketItem.setId("BI101");
firstBasketItem.setName("Binocular");
firstBasketItem.setCategory1("Collectibles");
firstBasketItem.setCategory2("Accessories");
firstBasketItem.setItemType(BasketItemType.PHYSICAL.name());
firstBasketItem.setPrice(new BigDecimal("0.3"));
basketItems.add(firstBasketItem);
BasketItem secondBasketItem = new BasketItem();
secondBasketItem.setId("BI102");
secondBasketItem.setName("Game code");
secondBasketItem.setCategory1("Game");
secondBasketItem.setCategory2("Online Game Items");
secondBasketItem.setItemType(BasketItemType.VIRTUAL.name());
secondBasketItem.setPrice(new BigDecimal("0.5"));
basketItems.add(secondBasketItem);
BasketItem thirdBasketItem = new BasketItem();
thirdBasketItem.setId("BI103");
thirdBasketItem.setName("Usb");
thirdBasketItem.setCategory1("Electronics");
thirdBasketItem.setCategory2("Usb / Cable");
thirdBasketItem.setItemType(BasketItemType.PHYSICAL.name());
thirdBasketItem.setPrice(new BigDecimal("0.2"));
basketItems.add(thirdBasketItem);
request.setBasketItems(basketItems);
CheckoutFormInitialize checkoutFormInitialize = CheckoutFormInitialize.create(request, options);
var request = {
locale: Iyzipay.LOCALE.TR,
conversationId: '123456789',
price: '1',
paidPrice: '1.2',
currency: Iyzipay.CURRENCY.TRY,
basketId: 'B67832',
paymentGroup: Iyzipay.PAYMENT_GROUP.PRODUCT,
callbackUrl: 'https://www.merchant.com/callback',
enabledInstallments: [2, 3, 6, 9],
buyer: {
id: 'BY789',
name: 'John',
surname: 'Doe',
gsmNumber: '+905350000000',
email: 'email@email.com',
identityNumber: '74300864791',
lastLoginDate: '2015-10-05 12:43:35',
registrationDate: '2013-04-21 15:12:09',
registrationAddress: 'Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1',
ip: '85.34.78.112',
city: 'Istanbul',
country: 'Turkey',
zipCode: '34732'
},
shippingAddress: {
contactName: 'Jane Doe',
city: 'Istanbul',
country: 'Turkey',
address: 'Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1',
zipCode: '34742'
},
billingAddress: {
contactName: 'Jane Doe',
city: 'Istanbul',
country: 'Turkey',
address: 'Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1',
zipCode: '34742'
},
basketItems: [
{
id: 'BI101',
name: 'Binocular',
category1: 'Collectibles',
category2: 'Accessories',
itemType: Iyzipay.BASKET_ITEM_TYPE.PHYSICAL,
price: '0.3'
},
{
id: 'BI102',
name: 'Game code',
category1: 'Game',
category2: 'Online Game Items',
itemType: Iyzipay.BASKET_ITEM_TYPE.VIRTUAL,
price: '0.5'
},
{
id: 'BI103',
name: 'Usb',
category1: 'Electronics',
category2: 'Usb / Cable',
itemType: Iyzipay.BASKET_ITEM_TYPE.PHYSICAL,
price: '0.2'
}
]
};
iyzipay.checkoutFormInitialize.create(request, function (err, result) {
console.log(err, result);
done();
});
buyer = {
id: 'BY789',
name: 'John',
surname: 'Doe',
identityNumber: '74300864791',
email: 'email@email.com',
gsmNumber: '+905350000000',
registrationDate: '2013-04-21 15:12:09',
lastLoginDate: '2015-10-05 12:43:35',
registrationAddress: 'Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1',
city: 'Istanbul',
country: 'Turkey',
zipCode: '34732',
ip: '85.34.78.112'
}
address = {
address: 'Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1',
zipCode: '34732',
contactName: 'John Doe',
city: 'Istanbul',
country: 'Turkey'
}
item1 = {
id: 'BI101',
name: 'Binocular',
category1: 'Collectibles',
category2: 'Accessories',
itemType: Iyzipay::Model::BasketItemType::PHYSICAL,
price: '0.3',
subMerchantKey: 'sub merchant key',
subMerchantPrice: '0.27'
}
item2 = {
id: 'BI102',
name: 'Game code',
category1: 'Game',
category2: 'Online Game Items',
itemType: Iyzipay::Model::BasketItemType::VIRTUAL,
price: '0.5',
subMerchantKey: 'sub merchant key',
subMerchantPrice: '0.42'
}
item3 = {
id: 'BI103',
name: 'Usb',
category1: 'Electronics',
category2: 'Usb / Cable',
itemType: Iyzipay::Model::BasketItemType::PHYSICAL,
price: '0.2',
subMerchantKey: 'sub merchant key',
subMerchantPrice: '0.18'
}
request = {
locale: 'tr',
conversationId: '123456789',
price: '1.0',
paidPrice: '1.0',
basketId: 'B67832',
paymentGroup: Iyzipay::Model::PaymentGroup::PRODUCT,
callbackUrl: 'https://www.merchant.com/callback',
enabledInstallments: [2,3,6,9],
currency: Iyzipay::Model::Currency::TRY,
buyer: buyer,
billingAddress: address,
shippingAddress: address,
basketItems: [item1, item2, item3]
}
checkout_form_initialize = Iyzipay::Model::CheckoutFormInitialize.new.create(request, @options)
request = dict([('locale', 'tr')])
request['conversationId'] = '123456789'
request['price'] = '1'
request['paidPrice'] = '1.2'
request['basketId'] = 'B67832'
request['paymentGroup'] = 'PRODUCT'
request['callbackUrl'] = 'https://www.merchant.com/callback'
buyer = dict([('id', 'BY789')])
buyer['name'] = 'John'
buyer['surname'] = 'Doe'
buyer['gsmNumber'] = '+905350000000'
buyer['email'] = 'email@email.com'
buyer['identityNumber'] = '74300864791'
buyer['lastLoginDate'] = '2015-10-05 12:43:35'
buyer['registrationDate'] = '2013-04-21 15:12:09'
buyer['registrationAddress'] = 'Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1'
buyer['ip'] = '85.34.78.112'
buyer['city'] = 'Istanbul'
buyer['country'] = 'Turkey'
buyer['zipCode'] = '34732'
request['buyer'] = buyer
address = dict([('address', 'Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1')])
address['zipCode'] = '34732'
address['contactName'] = 'Jane Doe'
address['city'] = 'Istanbul'
address['country'] = 'Turkey'
request['shippingAddress'] = address
request['billingAddress'] = address
basket_items = []
basket_item_first = dict([('id', 'BI101')])
basket_item_first['name'] = 'Binocular'
basket_item_first['category1'] = 'Collectibles'
basket_item_first['category2'] = 'Accessories'
basket_item_first['itemType'] = 'PHYSICAL'
basket_item_first['price'] = '0.3'
basket_item_first['subMerchantKey'] = 'sub merchant key'
basket_item_first['subMerchantPrice'] = '0.27'
basket_items.append(basket_item_first)
basket_item_second = dict([('id', 'BI102')])
basket_item_second['name'] = 'Game code'
basket_item_second['category1'] = 'Game'
basket_item_second['category2'] = 'Online Game Items'
basket_item_second['itemType'] = 'VIRTUAL'
basket_item_second['price'] = '0.5'
basket_item_second['subMerchantKey'] = 'sub merchant key'
basket_item_second['subMerchantPrice'] = '0.42'
basket_items.append(basket_item_second)
basket_item_third = dict([('id', 'BI103')])
basket_item_third['name'] = 'Usb'
basket_item_third['category1'] = 'Electronics'
basket_item_third['category2'] = 'Usb / Cable'
basket_item_third['itemType'] = 'PHYSICAL'
basket_item_third['price'] = '0.2'
basket_item_third['subMerchantKey'] = 'sub merchant key'
basket_item_third['subMerchantPrice'] = '0.18'
basket_items.append(basket_item_third)
request['basketItems'] = basket_items
checkout_form_initialize = iyzipay.CheckoutFormInitialize()
checkout_form_initialize_response = checkout_form_initialize.create(request, options)
//Request
{
"locale": "tr",
"conversationId": "123456789",
"price": "1.0",
"basketId": "B67832",
"paymentGroup": "PRODUCT",
"buyer": {
"id": "BY789",
"name": "John",
"surname": "Doe",
"identityNumber": "74300864791",
"email": "email@email.com",
"gsmNumber": "+905350000000",
"registrationDate": "2013-04-21 15:12:09",
"lastLoginDate": "2015-10-05 12:43:35",
"registrationAddress": "Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1",
"city": "Istanbul",
"country": "Turkey",
"zipCode": "34732",
"ip": "85.34.78.112"
},
"shippingAddress": {
"address": "Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1",
"zipCode": "34742",
"contactName": "Jane Doe",
"city": "Istanbul",
"country": "Turkey"
},
"billingAddress": {
"address": "Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1",
"zipCode": "34742",
"contactName": "Jane Doe",
"city": "Istanbul",
"country": "Turkey"
},
"basketItems": [
{
"id": "BI101",
"price": "0.3",
"name": "Binocular",
"category1": "Collectibles",
"category2": "Accessories",
"itemType": "PHYSICAL"
},
{
"id": "BI102",
"price": "0.5",
"name": "Game code",
"category1": "Game",
"category2": "Online Game Items",
"itemType": "VIRTUAL"
},
{
"id": "BI103",
"price": "0.2",
"name": "Usb",
"category1": "Electronics",
"category2": "Usb / Cable",
"itemType": "PHYSICAL"
}
],
"callbackUrl": "https://www.merchant.com/callback",
"currency": "TRY",
"paidPrice": "1.2",
"enabledInstallments": [
1,
2,
3,
6,
9
]
}
//Response
{
"status": "success",
"locale": "tr",
"systemTime": 1470731039071,
"conversationId": "123456789",
"token": "d9a1d90e-7cfb-4ead-a6ec-34237bac04f0",
"checkoutFormContent": "<script type=\"text/javascript\">if (typeof iyziInit == 'undefined') {var iyziInit = {currency:'TRY',token:'d9a1d90e-7cfb-4ead-a6ec-34237bac04f0',price:1.20,locale:'tr',baseUrl:'https://sandbox-api.iyzipay.com',registerCardEnabled:true,bkmEnabled:true,userCards:[],force3Ds:false, isSandbox:true, createTag:function(){var iyziCSSTag = document.createElement('link');iyziCSSTag.setAttribute('rel','stylesheet');iyziCSSTag.setAttribute('type','text/css');iyziCSSTag.setAttribute('href','https://sandbox-static.iyzipay.com/checkoutform/css/main.min.css?v=1470731039031');document.head.appendChild(iyziCSSTag);var iyziJSTag = document.createElement('script');iyziJSTag.setAttribute('src','https://sandbox-static.iyzipay.com/checkoutform/js/iyziCheckout.min.js?v=1470731039031');document.head.appendChild(iyziJSTag);}};iyziInit.createTag();}</script>",
"tokenExpireTime": 1800,
"paymentPageUrl": "https://sandbox-cpp.iyzipay.com?token=d9a1d90e-7cfb-4ead-a6ec-34237bac04f0&lang=tr"
}
Sample Codes
Protected Bank Transfer Woocommerce beta plugin can be downloaded from the link.