payfyio
Banks

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.

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

On this page