Refund & Cancel

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
chevron-right
200

Successful response

application/json
statusstring · enumOptional

Indicates the outcome of the request.

Possible values:
localestring · enumOptional

Response language.

Possible values:
systemTimeintegerOptional

Current epoch ms at the time of response.

conversationIdstringOptional

Echoes the conversationId sent in the request.

paymentIdstringOptional

Payment number.

paymentTransactionIdstringOptional

Refunded payment item identifier.

pricedecimalOptional

Refunded amount.

currencystringOptional

Currency.

authCodestringOptional

Authorization (auth) code returned by the bank.

Example: 591030
hostReferencestringOptional

Reference value provided by the bank for the payment.

Example: mock00007iyzihostrfn
refundHostReferencestringOptional

Reference value provided by the bank for the refund.

Example: mock00007iyzihostrfn
retryableboolean · enumOptional

Indicates whether the operation can be retried.

Example: truePossible values:
signaturestringOptional

Signature value that can be used for verification.

Example: 8202e30aa0f4c690f640ae4f6d4487b92b57a3693e9d560bbaf938638217271b
post
/payment/refund

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
chevron-right
200

Successful response

application/json
statusstring · enumOptional

Indicates the outcome of the request.

Possible values:
localestring · enumOptional

Response language.

Possible values:
systemTimeintegerOptional

Current epoch ms at the time of response.

conversationIdstringOptional

Echoes the conversationId sent in the request.

paymentIdstringOptional

Refunded payment identifier.

pricedecimalOptional

Refunded amount.

currencystringOptional

Currency.

authCodestringOptional

Authorization (auth) code returned by the bank.

Example: 591030
hostReferencestringOptional

Reference value provided by the bank for the payment.

Example: mock00007iyzihostrfn
refundHostReferencestringOptional

Reference value provided by the bank for the refund.

Example: mock00007iyzihostrfn
retryableboolean · enumOptional

Indicates whether the operation can be retried.

Example: truePossible values:
signaturestringOptional

Signature value that can be used for verification.

Example: 8202e30aa0f4c690f640ae4f6d4487b92b57a3693e9d560bbaf938638217271b
post
/v2/payment/refund

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
chevron-right
200

Successful response

application/json
statusstring · enumOptional

Indicates the outcome of the request.

Possible values:
localestring · enumOptional

Response language.

Possible values:
systemTimeintegerOptional

Current epoch ms at the time of response.

conversationIdstringOptional

Echoes the conversationId sent in the request.

paymentIdstringOptional

Canceled payment number.

pricedecimalOptional

Canceled payment amount.

currencystringOptional

Currency (payment currency).

authCodestringOptional

Authorization (auth) code returned by the bank.

Example: 581421
hostReferencestringOptional

Transaction reference value.

Example: mock00007iyzihostrfn
cancelHostReferencestringOptional

Reference value for the cancel transaction.

Example: mock00007iyzihostrfn
post
/payment/cancel

Last updated