Pre-authorization (/payment/preauth): blocks the amount without charging it
Capture of a pre-authorization (/payment/postauth). amount becomes the
charged paidPrice; a lower amount is a partial capture.
Completes a 3D Secure payment.
The callback POST is not signed, so its values are untrusted: only the
response of /payment/3dsecure/auth decides the result. paymentId and
conversationId are set from iyzico's response of a successful payment
only; a failure never carries ids taken from the request, so a forged
callback cannot name an existing order.
Direct payment (without 3D Secure)
Deletes a saved card (DELETE /cardstorage/card)
Initialize Checkout Form
Initialize a PWI payment
Initializes a protected bank transfer. The customer sees an IBAN and payment details. After the customer makes the transfer, the funds are sent to the merchant once approved.
PWI payment request parameters
PWI initialization response (HTML content, token, payment page URL)
const result = await iyzico.initPWIPayment({
price: '100.00',
paidPrice: '100.00',
currency: Currency.TRY,
basketId: 'B67832',
callbackUrl: 'https://your-site.com/payment/callback',
buyer: { ... },
shippingAddress: { ... },
billingAddress: { ... },
basketItems: [ ... ]
});
if (result.status === 'success') {
// Option 1: Display the HTML content
document.body.innerHTML = result.htmlContent;
// Option 2: Redirect to the payment page
window.location.href = result.paymentPageUrl;
}
3D Secure pre-authorization (/payment/3dsecure/initialize/preauth).
Complete it with completeThreeDSPayment() as usual.
Initialize a 3D Secure payment
Query installment options
Queries available installment options for a given BIN and amount. Shows installment rates and total amounts for each bank.
Installment query request (BIN and amount)
Installment options and details
const result = await iyzico.installmentInfo({
binNumber: '552879',
price: '100.00'
});
if (result.status === 'success' && result.installmentDetails) {
result.installmentDetails.forEach(detail => {
console.log(`Bank: ${detail.bankName}`);
console.log(`Card family: ${detail.cardFamilyName}`);
detail.installmentPrices.forEach(installment => {
console.log(`${installment.installmentNumber} installments: ${installment.totalPrice} TL (Per installment: ${installment.installmentPrice} TL)`);
});
});
}
Refund. With paymentId alone, refunds an amount of the whole payment
(/v2/payment/refund). With paymentTransactionId, refunds that basket
item (/payment/refund).
Query the Checkout Form result
OptionalconversationId: stringQuery a PWI payment
Queries the status of an initialized PWI payment. Returns payment details if the transfer was made, otherwise the IBAN and bank details.
PWI payment token (returned by initPWIPayment)
OptionalconversationId: string
Optional conversation ID
PWI payment status and details
const result = await iyzico.retrievePWIPayment(token);
if (result.status === 'success') {
if (result.paymentStatus === 'SUCCESS') {
console.log('Payment succeeded:', result.paymentId);
} else if (result.paymentStatus === 'WAITING') {
console.log('Awaiting bank transfer');
console.log('IBAN:', result.iban);
console.log('Bank:', result.bankName);
}
}
Saves a card without charging it (/cardstorage/card). Omit
customerToken to create a new customer (cardUserKey).
Releases a pre-authorization: iyzico voids it with /payment/cancel
iyzico payment provider