BKM Express

*This service is only available in Turkey

BKM Initialize :

BKM Retrieve Result :

BKM Init

Parameters to be sent to the service are as follows:

Input Name Type Mandatory Description
price Decimal Yes Total amount of basket. The sum of basket items’ amount must be equal to the price of basket
callbackUrl String Yes Merchant callback URL for payment result notification
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
ip(Buyer) String Yes IP of buyer
registrationAddress(Buyer) String Yes Registration address of buyer
contactName(BillingAddress) String Yes Contact name of billing address
city(BillingAddress) String Yes City name of billing address
country(BillingAddress) String Yes Country name of billing address
address(BillingAddress) String Yes Address details 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 name of shipping address. If one of the itemType in basket is PHYSICAL, then this parameter will be mandatory
country(ShippingAddress) String Yes Country name of shipping address. If one of the itemType in basket is PHYSICAL, then this parameter will be mandatory
address(ShippingAddress) String Yes Address details of shipping address. If one of the itemType in basket is PHYSICAL, then this parameter will be mandatory
id(BasketItems) String Yes Basket Item ID
itemType(BasketItems) String Yes Item Type. Valid values are PHYSICAL,VIRTUAL
price(BasketItems) Decimal Yes Price value for each item. Must be greater than zero
name(BasketItems) String Yes Name of the item in the basket
category1(BasketItems) String Yes Category 1 for item in the basket
enabledinstallments Integer No Enabled installments value. For single installment payments it should be 1 (valid values: 1, 2, 3, 6, 9, 12)
zipCode(Buyer) String No Zip code of buyer
zipCode(ShippingAddress) String No Zip code of shipping address
zipCode(BillingAddress) String No Zip code of billing address
category2(BasketItems) String No Category 2 for item in the basket
gsmNumber(Buyer) String No GSM number of buyer
subMerchantPrice(BasketItem) Decimal No Payout amount to subMerchant of each item. Must be greater than zero. Mandatory value for marketplace solution
subMerchantKey(BasketItem) String No Submerchant ID value. Mandatory value for marketplace solution
registerCard Integer No Parameter that shows card details will store or not. Default value is 0 and valid values are 0 or 1
cardAlias Integer No If registerCard value is 1 cardAlias can send within request.
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”
locale String No Language (default: tr)
conversationId String No Conversation ID to match request and response
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
paymentSource String No Payment source. Valid values are SHOPIFY, MAGENTO, PRESTASHOP, WOOCOMMERCE, OPENCART

 

Parameters to be returned from the service are as follows:

Parametre İsmi Tip Açıklama
status String Yapılan isteğin sonucunu bildirir. İşlem başarılı ise success, hatalı ise failure döner.
errorCode String İşlem hatalıysa, bu hataya dair belirtilen koddur.
errorMessage String İşlem hatalıysa, bu hataya dair belirtilen mesajdır. Locale parametresine göre dil desteği sunar.
errorGroup String İşlem hatalıysa, bu hataya dair belirtilen gruptur.
locale String İstekte belirtilen locale değeri geri dönülür, varsayılan değeri tr’dir.
systemTime Long Dönen sonucun o anki unix timestamp değeridir.
conversationId String İstek esnasında gönderilmişse, sonuçta aynen geri iletilir.
htmlContent String Render edildiğinde gerekli yönlendirmenin yapılmasını sağlayan içerik.
token String Ödeme isteğine özel, iyzico tarafından oluşturulan değer.
tokenExpireTime String Tokenin geçerlilik süresi.

$request = new \Iyzipay\Request\CreateBkmInitializeRequest();
$request->setLocale(\Iyzipay\Model\Locale::TR);
$request->setConversationId("123456789");
$request->setPrice("1");
$request->setBasketId("B67832");
$request->setPaymentGroup(\Iyzipay\Model\PaymentGroup::PRODUCT);
$request->setCallbackUrl("https://www.merchant.com/callback");
$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);

$bkmInitialize = \Iyzipay\Model\BkmInitialize::create($request, Config::options());
CreateBkmInitializeRequest request = new CreateBkmInitializeRequest();
request.Locale = Locale.TR.ToString();
request.ConversationId = "123456789";
request.Price = "1";
request.BasketId = "B67832";
request.PaymentGroup = PaymentGroup.PRODUCT.ToString();
request.CallbackUrl = "https://www.merchant.com/callback";

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;

BkmInitialize bkmInitialize = BkmInitialize.Create(request, options);
CreateBkmInitializeRequest request = new CreateBkmInitializeRequest();
request.setLocale(Locale.TR.getValue());
request.setConversationId("123456789");
request.setPrice(new BigDecimal("1"));
request.setBasketId("B67832");
request.setPaymentGroup(PaymentGroup.PRODUCT.name());
request.setCallbackUrl("https://www.merchant.com/callback");

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);

BkmInitialize bkmInitialize = BkmInitialize.create(request, options);
var request = {
    locale: Iyzipay.LOCALE.TR,
    conversationId: '123456789',
    price: '1',
    basketId: 'B67832',
    paymentGroup: Iyzipay.PAYMENT_GROUP.PRODUCT,
    callbackUrl: 'https://www.merchant.com/callback',
    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.bkmInitialize.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',
    basketId: 'B67832',
    paymentGroup: Iyzipay::Model::PaymentGroup::PRODUCT,
    callbackUrl: 'https://www.merchant.com/callback',
    buyer: buyer,
    billingAddress: address,
    shippingAddress: address,
    basketItems: [item1, item2, item3]
}
bkm_initialize = Iyzipay::Model::BkmInitialize.new.create(request, @options)
request = dict([('locale', 'tr')])
request['conversationId'] = '123456789'
request['price'] = '1'
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

bkm_initialize = iyzipay.BKMInitialize()
bkm_initialize_response = bkm_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"
}
//Response
{
    "status": "success",
    "locale": "tr",
    "systemTime": 1470729185337,
    "conversationId": "123456789",
    "htmlContent": "PCFkb2N0eXBlIGh0bWw+CjxodG1sPgo8aGVhZD4KICAgIDxtZXRhIGNoYXJzZXQ9IlVURi04Ii8+CiAgICA8dGl0bGU+QktNIEluaXRpYW
xpemVyPC90aXRsZT4KPC9oZWFkPgo8Ym9keT4KPGRpdj4KICAgIDxmb3JtIGlkPSJia21IaWRkZW5Gb3JtIiBtZXRob2Q9InBvc3QiIGFjdGlvbj0iaHR0cHM6Ly9z
YW5kYm94LWFwaS5peXppcGF5LmNvbS9wYXltZW50L2JrbS9tb2NrL2luaXRpYWxpemUiID4KICAgICAgICA8aW5wdXQgdHlwZT0iaGlkZGVuIiBuYW1lPSJ0IiB2YW
x1ZT0ibW9ja1Rva2VuXzE0NzA3MjkxODUyOTkiLz4KICAgICAgICA8aW5wdXQgdHlwZT0iaGlkZGVuIiBuYW1lPSJ0cyIgdmFsdWU9IjE0NzA3MjkxODUyOTkiLz4K
ICAgICAgICA8aW5wdXQgdHlwZT0iaGlkZGVuIiBuYW1lPSJzIiB2YWx1ZT0iYjM0YzRiYTgtNWQ3YS00MThhLWIwZWItMTVkYTQyMWY1MTk2Ii8+CiAgICAgICAgPH
NjcmlwdD5kb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnYmttSGlkZGVuRm9ybScpLnN1Ym1pdCgpOzwvc2NyaXB0PgogICAgPC9mb3JtPgo8L2Rpdj4KPC9ib2R5Pgo8
L2h0bWw+",
    "token": "mockToken_1470729185299"
}

Örnek Kodlar

htmlContent should be rendered for the customer.

At the end of the transaction a "token" posted to callbackUrl to retrieve result.

Parametre İsmi Tip Açıklama
token String Unique value created for each bkm initialize request. This token is used to access the payment result

BKM Retrieve Result

Parameters to be sent to the service are as follows:

Input Name Type Mandatory Description
token String Yes Unique value created for each bkm initialize request. This token is used to access the payment result
locale String No Language (default: tr)
conversationId String No Conversation ID to match request and response

Parameters to be returned from the service are as follows:

Output Name Type Description
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 Long Response system timestamp value
conversationId String If set, conversation ID to match request and response
paymentId String ID of the payment. Merchants should keep payment ID in their system (this ID will be used for cancel requests)
price Decimal Total amount of basket. The sum of basket items’ amount must be equal to the price of basket
paidPrice Decimal Final amount (including installment fee) that will be charged to customer’s card. Merchants should store this value in their system
currency String Currency of request
installment Integer Installment number of payment, for single payments it returns 1. Valid values are 1, 2, 3, 6, 9, 12
basketId String Merchant's basket ID
binNumber String First 6 digit of card
cardAssociation String Valid values are VISA, MASTER_CARD, AMERICAN_EXPRESS, TROY
cardFamily String Valid values are Bonus, Axess, World, Maximum, Paraf, CardFinans, Advantage
cardType String Valid values are CREDIT_CARD, DEBIT_CARD, PREPAID_CARD
fraudStatus Integer Fraud risk status for payment request (0 for review / 1 for accept)
iyziCommissionFee Decimal iyzico commission fee for payment transaction
iyziCommissionRateAmount Decimal iyzico commission rate amount for payment transaction
merchantCommissionRate Decimal Merchant commission rate (e.g. price=100 & paidPrice=110, then merchant commission rate = 10)
merchantCommissionRateAmount Decimal Merchant commission rate amount (e.g. price=100 & paidPrice=110, then merchant commission rate amount = 10)
paymentTransactionId (ItemTransactions) String ID of basket item. Merchants should keep payment ID in their system (this ID will be used for cancel requests)
itemId(ItemTransactions) String Item ID of each item in basket
price(ItemTransactions) Decimal Item price of each item in basket
paidPrice(ItemTransactions) Decimal Captured amount from card based on each item. Merchants should keep paidPrice in their system
transactionStatus (ItemTransactions) Integer Status of a payment transaction. (0 for waiting / -1 for rejected by fraud / 1 for waiting for approval / 2 for approved
blockageRate(ItemTransactions) Decimal Blockage rate based on each item.
blockageRateAmountMerchant(ItemTransactions) Decimal Blockage rate amount for merchant based on each item
blockageResolvedDate(ItemTransactions) String Blockage resolve date based on each item. Date format should be “2015-10-19 14:36:52”
iyziCommissionFee(ItemTransactions) Decimal iyzico commission fee based on each item
iyziCommissionRateAmount(ItemTransactions) Decimal iyzico commission rate amount based on each item
merchantCommissionRate(ItemTransactions) Decimal Merchant commission rate (e.g. price=100 & paidPrice=110, then merchant commission rate = 10)
merchantCommissionRateAmount(ItemTransactions) Decimal Merchant commission rate amount (e.g. price=100 & paidPrice=110, then merchant commission rate amount = 10)
merchantPayoutAmount(ItemTransactions) Decimal Payout amount for each item transaction. This is the amount that remains after after substracting iyzicoCommissionRateAmount, iyzicoCommissionFee and blockageRateAmountMerchant from paidPrice(ItemTransactions)
paidPrice(ItemTransactions)(convertedPayout) Decimal Converted charged amount to card based on each item. Merchants should keep paidPrice in their system.
iyziCommissionFee(ItemTransactions)(convertedPayout) Decimal Converted iyzico commission fee based on each item
iyziCommissionRateAmount(ItemTransactions)(convertedPayout) Decimal Converted iyzico commission rate amount based on each item
blockageRateAmountMerchant(ItemTransactions)(convertedPayout) Decimal Converted blockage rate amount for merchant based on each item
merchantPayoutAmount(ItemTransactions)(convertedPayout) Decimal Converted payout amount for each item transaction. This the amount that remains after substracting iyzicoCommissionRateAmount, iyzicoCommissionFee and blockageRateAmountMerchant from paidPrice(ItemTransactions)
iyziConversationRate(ItemTransactions)(convertedPayout) Decimal iyzico conversation rate
iyziConversationRateAmount(ItemTransactions)(convertedPayout) Decimal iyzico conversation rate amount
currency(ItemTransactions)(convertedPayout) String Currency for payout conversion

$request = new \Iyzipay\Request\RetrieveBkmRequest();
$request->setLocale(\Iyzipay\Model\Locale::TR);
$request->setConversationId("123456789");
$request->setToken("token");

$bkm = \Iyzipay\Model\Bkm::retrieve($request, Config::options());
RetrieveBkmRequest request = new RetrieveBkmRequest();
request.Locale = Locale.TR.ToString();
request.ConversationId = "123456789";
request.Token = "token";

Bkm bkm = Bkm.Retrieve(request, options);
RetrieveBkmRequest request = new RetrieveBkmRequest();
request.setLocale(Locale.TR.getValue());
request.setConversationId("123456789");
request.setToken("token");

Bkm bkm = Bkm.retrieve(request, options);
iyzipay.bkm.retrieve({
    locale: Iyzipay.LOCALE.TR,
    conversationId: '123456789',
    token: 'token'
}, function (err, result) {
    console.log(err, result);
    done();
});
request = {
    locale: 'tr',
    conversationId: '123456789',
    token: '1462280336796'
}
bkm = Iyzipay::Model::Bkm.new.retrieve(request, @options)
request = dict([('locale', 'tr')])
request['conversationId'] = '123456789'
request['token'] = 'token'

bkm_auth = iyzipay.BKMAuth()
bkm_auth_response = bkm_auth.retrieve(request, options)
//Request
 {
    "locale": "tr",
    "conversationId": "123456789",
    "token": "mockToken_1470729185299"
}

//Response
{
    "status": "success",
    "systemTime": 1470729901341,
    "price": 1,
    "paidPrice": 1.01,
    "installment": 2,
    "paymentId": "26134",
    "fraudStatus": 1,
    "merchantCommissionRate": 1,
    "merchantCommissionRateAmount": 0.01,
    "iyziCommissionRateAmount": 0.0429048,
    "iyziCommissionFee": 0.25,
    "cardType": "CREDIT_CARD",
    "cardAssociation": "VISA",
    "cardFamily": "Maximum",
    "binNumber": "469884",
    "basketId": "B67832",
    "currency": "TRY",
    "itemTransactions": [
        {
            "itemId": "BI101",
            "paymentTransactionId": "38216",
            "transactionStatus": 2,
            "price": 0.3,
            "paidPrice": 0.303,
            "merchantCommissionRate": 1,
            "merchantCommissionRateAmount": 0.003,
            "iyziCommissionRateAmount": 0.01287144,
            "iyziCommissionFee": 0.075,
            "blockageRate": 10,
            "blockageRateAmountMerchant": 0.0303,
            "blockageRateAmountSubMerchant": 0,
            "blockageResolvedDate": "2016-08-16 11:03:33",
            "subMerchantPrice": 0,
            "subMerchantPayoutRate": 0,
            "subMerchantPayoutAmount": 0,
            "merchantPayoutAmount": 0.18482856,
            "convertedPayout": {
                "paidPrice": 0.303,
                "iyziCommissionRateAmount": 0.01287144,
                "iyziCommissionFee": 0.075,
                "blockageRateAmountMerchant": 0.0303,
                "blockageRateAmountSubMerchant": 0,
                "subMerchantPayoutAmount": 0,
                "merchantPayoutAmount": 0.18482856,
                "iyziConversionRate": 0,
                "iyziConversionRateAmount": 0,
                "currency": "TRY"
            }
        },
        {
            "itemId": "BI102",
            "paymentTransactionId": "38217",
            "transactionStatus": 2,
            "price": 0.5,
            "paidPrice": 0.505,
            "merchantCommissionRate": 1,
            "merchantCommissionRateAmount": 0.005,
            "iyziCommissionRateAmount": 0.0214524,
            "iyziCommissionFee": 0.125,
            "blockageRate": 10,
            "blockageRateAmountMerchant": 0.0505,
            "blockageRateAmountSubMerchant": 0,
            "blockageResolvedDate": "2016-08-16 11:03:33",
            "subMerchantPrice": 0,
            "subMerchantPayoutRate": 0,
            "subMerchantPayoutAmount": 0,
            "merchantPayoutAmount": 0.3080476,
            "convertedPayout": {
                "paidPrice": 0.505,
                "iyziCommissionRateAmount": 0.0214524,
                "iyziCommissionFee": 0.125,
                "blockageRateAmountMerchant": 0.0505,
                "blockageRateAmountSubMerchant": 0,
                "subMerchantPayoutAmount": 0,
                "merchantPayoutAmount": 0.3080476,
                "iyziConversionRate": 0,
                "iyziConversionRateAmount": 0,
                "currency": "TRY"
            }
        },
        {
            "itemId": "BI103",
            "paymentTransactionId": "38218",
            "transactionStatus": 2,
            "price": 0.2,
            "paidPrice": 0.202,
            "merchantCommissionRate": 1,
            "merchantCommissionRateAmount": 0.002,
            "iyziCommissionRateAmount": 0.00858096,
            "iyziCommissionFee": 0.05,
            "blockageRate": 10,
            "blockageRateAmountMerchant": 0.0202,
            "blockageRateAmountSubMerchant": 0,
            "blockageResolvedDate": "2016-08-16 11:03:33",
            "subMerchantPrice": 0,
            "subMerchantPayoutRate": 0,
            "subMerchantPayoutAmount": 0,
            "merchantPayoutAmount": 0.12321904,
            "convertedPayout": {
                "paidPrice": 0.202,
                "iyziCommissionRateAmount": 0.00858096,
                "iyziCommissionFee": 0.05,
                "blockageRateAmountMerchant": 0.0202,
                "blockageRateAmountSubMerchant": 0,
                "subMerchantPayoutAmount": 0,
                "merchantPayoutAmount": 0.12321904,
                "iyziConversionRate": 0,
                "iyziConversionRateAmount": 0,
                "currency": "TRY"
            }
        }
    ],
    "token": "mockToken_1470729185299",
    "callbackUrl": "https://www.merchant.com/callback",
    "paymentStatus": "SUCCESS"
}

Sample Codes