Approval

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

NameTypeDescription

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 NameTypeDescription

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

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

NameTypeDescription

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 NameTypeDescription

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

Last updated