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
      • Bank 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
  • Approve
  • Approve Request
  • Disapprove
  • Disapprove Request
  1. Products
  2. Marketplace
  3. Marketplace Implementation

Approval

PreviousOnline PaymentNextSubscription

Last updated 1 year ago

In the marketplace solution, once the payment has been processed by iyzico, the funds are securely held in a protected pool until the submerchant grants approval for the payment breakdown or specific product. During this period, the submerchant has the flexibility to cancel the payment, issue a refund for a particular item, or provide approval for the fund transfer if the product has been successfully delivered to the buyer and the transaction has been completed without any issues. Additionally, the submerchant can withdraw their approval for the transaction if necessary.

For such usages iyzico offers 2 ways of finalize the payment;

Please note that iyzico does not have the capability to grant product approvals. Since there is no corresponding function available in the control panel, these approvals must be sent programmatically at the code level.

Approve

To provide approve for a product, you must provide the payment breakdown ID (paymentTransactionId). The service will return the ID of the approved payment breakdown (paymentTransactionId).

Approve Request

POST https://api.iyzipay.com/payment/iyzipos/item/approve

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 that comes in payment responses

{
    "status":"success",
    "locale":"tr",
    "systemTime":1686434789050,
    "conversationId":"123456789",
    "paymentTransactionId":"20947103"
}

Approve Response

Parameters to be returned from the service are as follows:

Output Name
Type
Description

paymentTransactionId

String

ID of basket item. Merchants should keep payment ID in their system

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

Approve Sample Codes

$request = new \Iyzipay\Request\CreateApprovalRequest();
$request->setLocale(\Iyzipay\Model\Locale::TR);
$request->setConversationId("123456789");
$request->setPaymentTransactionId("1");

$approval = \Iyzipay\Model\Approval::create($request, Config::options());
CreateApprovalRequest request = new CreateApprovalRequest();
request.Locale = Locale.TR.ToString();
request.ConversationId = "123456789";
request.PaymentTransactionId = "1";

Approval approval = Approval.Create(request, options);
CreateApprovalRequest request = new CreateApprovalRequest();
request.setLocale(Locale.TR.getValue());
request.setConversationId("123456789");
request.setPaymentTransactionId("1");

Approval approval = Approval.create(request, options);
iyzipay.approval.create({
    locale: Iyzipay.LOCALE.TR,
    conversationId: "123456789",
    paymentTransactionId: "1"
}, function (err, result) {
    console.log(err, result);
    done();
});
request = dict([('locale', 'tr')])
request['conversationId'] = '123456789'
request['paymentTransactionId'] = '1'

approval = iyzipay.Approval()
approval_response = approval.create(request, options)
request = {
    locale: 'tr',
    conversationId: '123456789',
    paymentTransactionId: '699'
}
approval = Iyzipay::Model::Approval.new.create(request, @options)
//Request
{
    "locale": "tr",
    "conversationId": "123456789",
    "paymentTransactionId": "38248"
}

//Response
{
    "status": "success",
    "locale": "tr",
    "systemTime": 1470733388749,
    "conversationId": "123456789",
    "paymentTransactionId": "38248"
}

Disapprove

To withdraw the approval for a product, please provide the payment breakdown ID (paymentTransactionId). The service will return the ID of the revoked approval for the payment breakdown (paymentTransactionId).

Disapprove Request

POST https://api.iyzipay.com/payment/iyzipos/item/disapprove

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

{
    "status":"success",
    "locale":"tr",
    "systemTime":1686434789050,
    "conversationId":"123456789",
    "paymentTransactionId":"20947103"
}

Disapprove Response

Parameters to be returned from the service are as follows:

Output Name
Type
Description

paymentTransactionId

String

ID of basket item. Merchants should keep payment ID in their system

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

Disapprove Sample Codes

$request = new \Iyzipay\Request\CreateApprovalRequest();
$request->setLocale(\Iyzipay\Model\Locale::TR);
$request->setConversationId("123456789");
$request->setPaymentTransactionId("1");

$disapproval = \Iyzipay\Model\Disapproval::create($request, Config::options());
CreateApprovalRequest request = new CreateApprovalRequest();
request.Locale = Locale.TR.ToString();
request.ConversationId = "123456789";
request.PaymentTransactionId = "1";

Disapproval disapproval = Disapproval.Create(request, options);
CreateApprovalRequest request = new CreateApprovalRequest();
request.setLocale(Locale.TR.getValue());
request.setConversationId("123456789");
request.setPaymentTransactionId("1");

Disapproval disapproval = Disapproval.create(request, options);
iyzipay.disapproval.create({
    locale: Iyzipay.LOCALE.TR,
    conversationId: '123456789',
    paymentTransactionId: '1'
}, function (err, result) {
    console.log(err, result);
    done();
});
request = dict([('locale', 'tr')])
request['conversationId'] = '123456789'
request['paymentTransactionId'] = '1'

disapproval = iyzipay.Disapproval()
disapproval_response = disapproval.create(request, options)
request = {
    locale: 'tr',
    conversationId: '123456789',
    paymentTransactionId: '699'
}
disapproval = Iyzipay::Model::Disapproval.new.create(request, @options)
//Request
{
    "locale": "tr",
    "conversationId": "123456789",
    "paymentTransactionId": "38248"
}

//Response
{
    "status": "success",
    "locale": "tr",
    "systemTime": 1470733437268,
    "conversationId": "123456789",
    "paymentTransactionId": "38248"
}

Approve
Disapprove