Yapı Kredi
Yapı Kredi Posnet integration reference.
Yapı Kredi Posnet uses XML over HTTPS with SHA-256 digest authentication. 3D Secure is delivered as an auto-submitting form to the YKB Payment Service.
Getting your credentials
Posnet credentials come from your Yapı Kredi member-merchant agreement (issued via the YKB POS management portal) — they are not self-service. Obtain from the bank or your integrator:
merchantId,terminalId— your merchant and terminal numbersposnetId— your Posnet idencKey— the encryption key used for the SHA-256 digest
Request a test set for integration and a separate production set for go-live.
Configuration
yapikredi: {
enabled: true,
config: {
merchantId: process.env.YAPIKREDI_MERCHANT_ID!,
terminalId: process.env.YAPIKREDI_TERMINAL_ID!,
posnetId: process.env.YAPIKREDI_POSNET_ID!,
encKey: process.env.YAPIKREDI_ENC_KEY!,
},
}baseUrl defaults to https://setmpos.ykb.com in sandbox and https://posnet.ykb.com in production.
3D Secure
const init = await payment.yapikredi.initThreeDSPayment({
price: '320.00',
currency: 'TRY',
callbackUrl: 'https://yoursite.com/ykb/callback',
paymentCard: { cardHolderName, cardNumber, expireMonth, expireYear, cvc },
buyer: { /* … */ },
basketId: 'order-1',
/* … */
});
const final = await payment.yapikredi.completeThreeDSPayment(req.body);Refund / Cancel / Get
await payment.yapikredi.refund({ paymentId, price: '320.00', currency: 'TRY', ip: '…' });
await payment.yapikredi.cancel({ paymentId, ip: '…' });
await payment.yapikredi.getPayment(paymentId);Testing
Set mode: 'sandbox' and use the bank's test credentials; baseUrl switches to https://setmpos.ykb.com automatically. Run a 3D Secure flow with a Posnet test card from the bank's integration guide and confirm completeThreeDSPayment returns success.