payfyio
Banks

Ziraat Bankası

Ziraat Bankası NestPay integration reference.

Ziraat Bankası uses NestPay/CC5 (same Asseco platform as İş Bankası) with HMAC-SHA512 v3 hash authentication. 3D Secure is delivered as an auto-submitting form in 3d_pay_hosting mode.

Configuration

ziraat: {
  enabled: true,
  config: {
    clientId: process.env.ZIRAAT_CLIENT_ID!,
    username: process.env.ZIRAAT_USERNAME!,
    password: process.env.ZIRAAT_PASSWORD!,
    storeKey: process.env.ZIRAAT_STORE_KEY!,
  },
}

baseUrl defaults to https://preprod.ziraatpay.com.tr in sandbox and https://sanalpos2.ziraatbank.com.tr in production.

3D Secure

const init = await payment.ziraat.initThreeDSPayment({
  price: '75.00',
  currency: 'TRY',
  callbackUrl: 'https://yoursite.com/ziraat/callback',
  paymentCard: { cardHolderName, cardNumber, expireMonth, expireYear, cvc },
  buyer: { /* … */ },
  basketId: 'order-1',
  /* … */
});

const final = await payment.ziraat.completeThreeDSPayment(req.body);

Refund / Cancel / Get

await payment.ziraat.refund({ paymentId, price: '75.00', currency: 'TRY', ip: '…' });
await payment.ziraat.cancel({ paymentId, ip: '…' });
await payment.ziraat.getPayment(paymentId);

On this page