LogoLogo
GitHubFeedback Form
EN
EN
  • GETTING STARTED
    • Welcome
    • Preliminaries
      • Sandbox
      • Authentication
        • HMACSHA256 Auth
      • Postman Collections
      • Live vs Sandbox
      • Idempotency
      • Limiters
  • Payment Methods
    • PayWithiyzico (PWI)
      • PWI Implementation
        • PWI-Initialize
        • PWI-Retrieve
        • PWI Sample Imp.
    • Direct Charge
      • Non-3DS
        • NON-3DS Implementation
          • Create Payment
          • Retrieve
      • 3DS
        • 3DS Implementation
          • Init 3DS
          • Auth 3DS
      • Checkout Form (CF)
        • CF Implementation
          • CF-Initialize
          • CF-Retrieve
          • CF Sample Imp.
    • PreAuth & Capture
      • Non-3DS
        • Non-3DS Implementation
          • Create PreAuth Payment
          • Create PostAuth Payment
  • Products
    • Online Payment
    • Marketplace
      • Marketplace Implementation
        • Submerchant
          • Submerchant Update
          • Retrieve Submerchant
          • Submerchant Price / Item Update
        • Online Payment
        • Approval
    • Subscription
      • Subscription Implementation
        • Subscription Product
        • Payment Plan
        • Subscription Transactions
        • Subscriber Transactions
    • Bank Transfer
      • Bank Transfer Implementation
        • Bank Transfer Init
        • Bank Transfer Retrieve
      • Bank Transfer FAQ
    • iyzilink
      • iyzilink API
    • Shopping Credit
      • Shopping Credit Implementation
        • Initialize Shopping Credit
        • Retrieve Shopping Credit
        • Shopping Credit Sample Imp.
  • Advanced
    • Card Storage
    • Reporting Service
    • Refund & Cancel
    • Webhook
    • SFTP
    • Settlement Files
    • Fraud Notifications
    • Installment & BIN Service
    • Refund to Balance
    • Retrieve Payment
    • Response Signature Validation
  • Platforms
    • Woocommerce
    • Opencart
    • Prestashop
    • Magento
    • IdeaSoft
    • Ticimax
    • T-Soft
    • Shopify
    • WIX
  • Add-ons
    • Error Codes
    • Test Cards
    • Integration Checklist
    • iyzico Logo Pack
Powered by GitBook
LogoLogo

Company

  • About
  • Career
  • Social
  • Youtube

Community

  • Github
  • Medium

Integration

  • Brand Guide
  • Solution Partners
  • Open Source

Contact

  • Contact Us
  • Support Center
On this page
  1. Products
  2. Marketplace
  3. Marketplace Implementation
  4. Submerchant

Submerchant Price / Item Update

Marketplace product offers;

  • change the submerchant of the product in an order whose payment has been completed

  • or update the amount to be transferred to the submerchant

with in the help of following API.

Submerchant Item Update

PUT https://api.iyzipay.com/payment/item

Request Body

Name
Type
Description

locale

String

Language (default: tr)

conversationId

String

If set, conversation ID to match request and response

paymentTransactionId*

String

ID of basket item. Merchants should keep payment ID in their system (this ID will be used for cancel requests)

subMerchantPrice*

String

Price that have been plan to transfer submerchant account.

subMerchantKey*

String

Key of submerchant

{
    "status": "success",
    "locale": "tr",
    "systemTime": 1686442628687,
    "conversationId": "123456789",
    "itemId": "BI102",
    "paymentTransactionId": "20947104",
    "transactionStatus": 1,
    "price": 50.00000000,
    "paidPrice": 50.00000000,
    "merchantCommissionRate": 0E-8,
    "merchantCommissionRateAmount": 0E-8,
    "iyziCommissionRateAmount": 2.00000000,
    "iyziCommissionFee": 0.12500000,
    "blockageRate": 0E-8,
    "blockageRateAmountMerchant": 0E-8,
    "blockageRateAmountSubMerchant": 0,
    "blockageResolvedDate": "2023-06-19 00:00:00",
    "subMerchantKey": "favC6OGPAVHb97HwXG5GPKd4KuE=",
    "subMerchantPrice": 11.0,
    "subMerchantPayoutRate": 22.00000000,
    "subMerchantPayoutAmount": 11.0,
    "merchantPayoutAmount": 36.87500000,
    "convertedPayout": {
        "paidPrice": 50.00000000,
        "iyziCommissionRateAmount": 2.00000000,
        "iyziCommissionFee": 0.12500000,
        "blockageRateAmountMerchant": 0E-8,
        "blockageRateAmountSubMerchant": 0E-8,
        "subMerchantPayoutAmount": 11.00000000,
        "merchantPayoutAmount": 36.87500000,
        "iyziConversionRate": 0E-8,
        "iyziConversionRateAmount": 0E-8,
        "currency": "TRY"
    }
}

Submerchant Item Update Sample Requests

$request = new \Iyzipay\Request\SubMerchantPaymentItemUpdateRequest();
$request->setLocale(\Iyzipay\Model\Locale::TR);
$request->setConversationId("123456789");
$request->setPaymentTransactionId("11606407");
$request->setSubMerchantKey("dVNPU4zjThEHTRqlExIhh7VVSBA=");
$request->setSubMerchantPrice(0.2);

$result = \Iyzipay\Model\SubMerchantPaymentItemUpdate::create($request, Config::options());
UpdatePaymentItemRequest request = new UpdatePaymentItemRequest();
request.Locale = Locale.TR.ToString();
request.ConversationId = "123456789";
request.SubMerchantKey = "subMerchantKey";
request.PaymentTransactionId = "transactionId";
request.SubMerchantPrice = "price";

PaymentItem paymentItem = PaymentItem.Update(request, options);
UpdatePaymentItemRequest request = new UpdatePaymentItemRequest();
request.setLocale(Locale.TR.getValue());
request.setConversationId("123456789");
request.setPaymentTransactionId(9999999L);
request.setSubMerchantPrice(new BigDecimal("sub-merchant-price"));
request.setSubMerchantKey("sub-merchant-key");

PaymentItem paymentItem = PaymentItem.update(request, options);
iyzipay.paymentItem.update(
    {
        paymentTransactionId: '12345678',
        subMerchantKey: 'sub merchant key',
        subMerchantPrice: '18.22'
    },
    function(err, result) {
        console.log(err, result);
        done();
    }
);
//Request
{
    "locale": "tr",
    "conversationId": "123456789",
    "paymentTransactionId" : "20947104",
    "subMerchantKey" : "favC6OGPAVHb97HwXG5GPKd4KuE=",
    "subMerchantPrice" : "11.0"
}

//Response
{
    "status": "success",
    "locale": "tr",
    "systemTime": 1686442628687,
    "conversationId": "123456789",
    "itemId": "BI102",
    "paymentTransactionId": "20947104",
    "transactionStatus": 1,
    "price": 50.00000000,
    "paidPrice": 50.00000000,
    "merchantCommissionRate": 0E-8,
    "merchantCommissionRateAmount": 0E-8,
    "iyziCommissionRateAmount": 2.00000000,
    "iyziCommissionFee": 0.12500000,
    "blockageRate": 0E-8,
    "blockageRateAmountMerchant": 0E-8,
    "blockageRateAmountSubMerchant": 0,
    "blockageResolvedDate": "2023-06-19 00:00:00",
    "subMerchantKey": "favC6OGPAVHb97HwXG5GPKd4KuE=",
    "subMerchantPrice": 11.0,
    "subMerchantPayoutRate": 22.00000000,
    "subMerchantPayoutAmount": 11.0,
    "merchantPayoutAmount": 36.87500000,
    "convertedPayout": {
        "paidPrice": 50.00000000,
        "iyziCommissionRateAmount": 2.00000000,
        "iyziCommissionFee": 0.12500000,
        "blockageRateAmountMerchant": 0E-8,
        "blockageRateAmountSubMerchant": 0E-8,
        "subMerchantPayoutAmount": 11.00000000,
        "merchantPayoutAmount": 36.87500000,
        "iyziConversionRate": 0E-8,
        "iyziConversionRateAmount": 0E-8,
        "currency": "TRY"
    }
}
PreviousRetrieve SubmerchantNextOnline Payment

Last updated 6 months ago