Refund & Cancel

Overview

A payment processed through iyzico can be refunded within a period of 365 days, 24/7.

Operation covers under two headlines;

  • Refund

  • Cancel

While It is important to note that the refund transaction will be reflected in the statement, the timing of the refund appearing on the card may vary depending on the respective banks typically taking a few days to complete.

Majority of banks’ are able to cancel any payment within the same day that payment was received (before banks perform their own reconciliation) where the payment will not appear in the credit card statement.

Refund or Cancel a payment only after the payment is charged.

Refund

Refund request processes on a transactional level, means that it can be refund either the entire payment or a partial of it.

To process a refund;

  • the payment transaction ID (paymentTransactionId)

  • and the amount to be refunded (price) must be provided.

If the refund process is successful, the refunded amount (price) will be returned from the service. The refund amount (price) should be less than or equal to the original transaction amount (itemTransaction.paidPrice) and the remaining refundable amount. As long as this rule is followed, multiple refunds can be made consecutively.

Refund

post

Used to refund a payment. The refund is executed over paymentTransactionId (per basket item). You can perform a full or partial refund for the payment amount.

Header parameters
AuthorizationstringRequired

Authorization header; a signed hash value that starts with IYZWSv2 and is generated in Base64 format.

Example: IYZWSv2 YXBpS2V5OnNhbmRib....E0OGI1MTE=
Content-TypestringRequired

Content type of the request body.

Example: application/json
Body
paymentTransactionIdstringRequired

Basket item (payment breakdown) identifier (paymentTransactionId) to be refunded.

Example: 27169345
conversationIdstringOptional

Unique ID for request/response correlation.

Example: 123456789
ipstringOptional

IP address the request is sent from.

Example: 1.1.1.1
localestring · enumOptional

Response language.

Possible values:
pricedecimalRequired

Amount to refund. Must not exceed the item price.

Example: 5
currencystringOptional

Payment currency.

Example: TRY
Responses
post
/payment/refund

Sample Codes

Refund V2

Similar to Refund operation, iyzico offers Refund V2 which built upon paymentId instead of paymentTransactionId.

To process a refund v2;

  • the paymentID (paymentId)

  • and the amount to be refunded (price) must be provided.

Refund V2

post

Enables refunds over paymentId. No item breakdown is required; the system determines the basket item to refund. You can perform a full or partial refund for the payment amount.

Header parameters
AuthorizationstringRequired

Authorization header; a signed hash value that starts with IYZWSv2 and is generated in Base64 format.

Example: IYZWSv2 YXBpS2V5OnNhbmRib....E0OGI1MTE=
Content-TypestringRequired

Content type of the request body.

Example: application/json
Body
paymentIdstringRequired

Payment identifier to be refunded.

Example: 25180208
conversationIdstringOptional

Unique ID for request/response correlation.

Example: 123456789
ipstringOptional

IP address the request is sent from.

Example: 1.1.1.1
localestring · enumOptional

Response language.

Example: enPossible values:
pricedecimalRequired

Amount to refund. Must not exceed the payment total.

Example: 5
currencystringOptional

Payment currency.

Example: TRY
Responses
post
/v2/payment/refund

Sample Codes

Cancel

Similar to refunds, merchant may cancel their transaction with iyzico services.

Important notes that the key distinctions between a cancel and a refund are;

  • Cancel can be processed on the same day as the payment and does not create any input/output entries on the card statement.

  • And cancel are not supporting partial amounts.

To initiate a cancellation, it is necessary to provide the payment ID (paymentId) associated with the transaction. If the cancellation process is successful, the canceled amount (price) will be returned from the service.

Cancel

post

Used to cancel a payment.

Header parameters
AuthorizationstringRequired

Authorization header; a signed hash value that starts with IYZWSv2 and is generated in Base64 format.

Example: IYZWSv2 YXBpS2V5OnNhbmRib....E0OGI1MTE=
Content-TypestringRequired

Content type of the request body.

Example: application/json
Body
paymentIdstringRequired

The unique payment number assigned by iyzico for the payment you want to cancel.

Example: 25180158
conversationIdstringOptional

Unique ID for request/response correlation. Returned as-is in the response.

Example: 123456789
ipstringOptional

IP address the request is sent from.

Example: 1.1.1.1
localestring · enumOptional

Response language for iyzico messages.

Example: enPossible values:
Responses
post
/payment/cancel

Sample Codes

Last updated