All Projects → iyzico → Iyzipay Node

iyzico / Iyzipay Node

Licence: mit
iyzipay api node.js client

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Iyzipay Node

iyzipay-ruby
iyzipay api ruby client
Stars: ✭ 37 (-68.1%)
Mutual labels:  fintech, client-library
Iyzipay Php
iyzipay api php client
Stars: ✭ 205 (+76.72%)
Mutual labels:  client-library, fintech
Chainode
Fast, Highly Scalable, and Lightweight Private Blockchain Network based on node.js
Stars: ✭ 55 (-52.59%)
Mutual labels:  fintech
Ably Js
Javascript, Node, Typescript client library SDK for Ably realtime messaging service
Stars: ✭ 99 (-14.66%)
Mutual labels:  client-library
Libnsq
async C client library for NSQ
Stars: ✭ 75 (-35.34%)
Mutual labels:  client-library
Symphonyelectron
A desktop client for the Symphony Collaboration Platform built using Electron
Stars: ✭ 58 (-50%)
Mutual labels:  fintech
Livechart
Android library to draw beautiful and rich line charts.
Stars: ✭ 78 (-32.76%)
Mutual labels:  fintech
Recruitment
Overall recruitment process of iyzico Engineering
Stars: ✭ 52 (-55.17%)
Mutual labels:  fintech
Mangopay2 Php Sdk
PHP SDK for MANGOPAY
Stars: ✭ 108 (-6.9%)
Mutual labels:  fintech
Core
Glue42 Core is a web application integration platform
Stars: ✭ 70 (-39.66%)
Mutual labels:  fintech
Google Api Nodejs Client
Google's officially supported Node.js client library for accessing Google APIs. Support for authorization and authentication with OAuth 2.0, API Keys and JWT (Service Tokens) is included.
Stars: ✭ 9,722 (+8281.03%)
Mutual labels:  client-library
Monzoweb
💰 View your Monzo account from your browser and view all your transactions on an interactive map!
Stars: ✭ 67 (-42.24%)
Mutual labels:  fintech
Korea Startups
🌟 국내 스타트업 목록 및 설명 🌟
Stars: ✭ 63 (-45.69%)
Mutual labels:  fintech
Openfintech
Opensource FinTech standards & payment provider data
Stars: ✭ 87 (-25%)
Mutual labels:  fintech
Open Banking Gateway
Provides RESTful API, tools, adapters, and connectors for transparent access to open banking API's (for banks that support PSD2 and XS2A as well as HBCI/FinTS)
Stars: ✭ 58 (-50%)
Mutual labels:  fintech
Google Maps Services Java
Java client library for Google Maps API Web Services
Stars: ✭ 1,497 (+1190.52%)
Mutual labels:  client-library
Objectlabkit
Date Calculators for Business /FX, FX Rate Calculator and Utils
Stars: ✭ 53 (-54.31%)
Mutual labels:  fintech
Alpaca Rn Mobile
An example React native mobile app to help you get started with Alpaca
Stars: ✭ 67 (-42.24%)
Mutual labels:  fintech
Mariadbpp
C++ client library for MariaDB.
Stars: ✭ 76 (-34.48%)
Mutual labels:  client-library
Zvt
modular quant framework.
Stars: ✭ 1,801 (+1452.59%)
Mutual labels:  fintech

iyzipay-node

Build Status NPM version

You can sign up for an iyzico account at https://iyzico.com

Requirements

Node.js v0.10.0 or later

Installation

npm install iyzipay

Usage

Initialization

var Iyzipay = require('iyzipay');

var iyzipay = new Iyzipay({
    apiKey: 'your api key',
    secretKey: 'your secret key',
    uri: 'https://sandbox-api.iyzipay.com'
});

As you can see, credentials information provided while creating new instance of Iyzipay class. If you do not provide iyzipay credentials, default values will be fetched from environment variables by following names.

   IYZIPAY_URI
   IYZIPAY_API_KEY
   IYZIPAY_SECRET_KEY

In other words, you can initialize Iyzipay object like following:

var iyzipay = new Iyzipay();

Sample Usage

var Iyzipay = require('iyzipay');

var iyzipay = new Iyzipay({
    apiKey: 'your api key',
    secretKey: 'your secret key',
    uri: 'https://sandbox-api.iyzipay.com'
});

var request = {
    locale: Iyzipay.LOCALE.TR,
    conversationId: '123456789',
    price: '1',
    paidPrice: '1.2',
    currency: Iyzipay.CURRENCY.TRY,
    installment: '1',
    basketId: 'B67832',
    paymentChannel: Iyzipay.PAYMENT_CHANNEL.WEB,
    paymentGroup: Iyzipay.PAYMENT_GROUP.PRODUCT,
    paymentCard: {
        cardHolderName: 'John Doe',
        cardNumber: '5528790000000008',
        expireMonth: '12',
        expireYear: '2030',
        cvc: '123',
        registerCard: '0'
    },
    buyer: {
        id: 'BY789',
        name: 'John',
        surname: 'Doe',
        gsmNumber: '+905350000000',
        email: '[email protected]',
        identityNumber: '74300864791',
        lastLoginDate: '2015-10-05 12:43:35',
        registrationDate: '2013-04-21 15:12:09',
        registrationAddress: 'Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1',
        ip: '85.34.78.112',
        city: 'Istanbul',
        country: 'Turkey',
        zipCode: '34732'
    },
    shippingAddress: {
        contactName: 'Jane Doe',
        city: 'Istanbul',
        country: 'Turkey',
        address: 'Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1',
        zipCode: '34742'
    },
    billingAddress: {
        contactName: 'Jane Doe',
        city: 'Istanbul',
        country: 'Turkey',
        address: 'Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1',
        zipCode: '34742'
    },
    basketItems: [
        {
            id: 'BI101',
            name: 'Binocular',
            category1: 'Collectibles',
            category2: 'Accessories',
            itemType: Iyzipay.BASKET_ITEM_TYPE.PHYSICAL,
            price: '0.3'
        },
        {
            id: 'BI102',
            name: 'Game code',
            category1: 'Game',
            category2: 'Online Game Items',
            itemType: Iyzipay.BASKET_ITEM_TYPE.VIRTUAL,
            price: '0.5'
        },
        {
            id: 'BI103',
            name: 'Usb',
            category1: 'Electronics',
            category2: 'Usb / Cable',
            itemType: Iyzipay.BASKET_ITEM_TYPE.PHYSICAL,
            price: '0.2'
        }
    ]
};

iyzipay.payment.create(request, function (err, result) {
    console.log(err, result);
    done();
});

You can see further examples in test/samples folder, and run them by npm run-script samples

Mock test cards

Test cards that can be used to simulate a successful payment:

Card Number Bank Card Type
5890040000000016 Akbank Master Card (Debit)
5526080000000006 Akbank Master Card (Credit)
4766620000000001 Denizbank Visa (Debit)
4603450000000000 Denizbank Visa (Credit)
4729150000000005 Denizbank Bonus Visa (Credit)
4987490000000002 Finansbank Visa (Debit)
5311570000000005 Finansbank Master Card (Credit)
9792020000000001 Finansbank Troy (Debit)
9792030000000000 Finansbank Troy (Credit)
5170410000000004 Garanti Bankası Master Card (Debit)
5400360000000003 Garanti Bankası Master Card (Credit)
374427000000003 Garanti Bankası American Express
4475050000000003 Halkbank Visa (Debit)
5528790000000008 Halkbank Master Card (Credit)
4059030000000009 HSBC Bank Visa (Debit)
5504720000000003 HSBC Bank Master Card (Credit)
5892830000000000 Türkiye İş Bankası Master Card (Debit)
4543590000000006 Türkiye İş Bankası Visa (Credit)
4910050000000006 Vakıfbank Visa (Debit)
4157920000000002 Vakıfbank Visa (Credit)
5168880000000002 Yapı ve Kredi Bankası Master Card (Debit)
5451030000000000 Yapı ve Kredi Bankası Master Card (Credit)

Cross border test cards:

Card Number Country
4054180000000007 Non-Turkish (Debit)
5400010000000004 Non-Turkish (Credit)

Test cards to get specific error codes:

Card Number Description
5406670000000009 Success but cannot be cancelled, refund or post auth
4111111111111129 Not sufficient funds
4129111111111111 Do not honour
4128111111111112 Invalid transaction
4127111111111113 Lost card
4126111111111114 Stolen card
4125111111111115 Expired card
4124111111111116 Invalid cvc2
4123111111111117 Not permitted to card holder
4122111111111118 Not permitted to terminal
4121111111111119 Fraud suspect
4120111111111110 Pickup card
4130111111111118 General error
4131111111111117 Success but mdStatus is 0
4141111111111115 Success but mdStatus is 4
4151111111111112 3dsecure initialize failed

Mock APM Accounts

Mock APM Accounts that can be used to simulate a payment with alternative payment method:

Account Holder Name Description
success Succeeded payment after succeeded initialize
fail-after-init Failed payment after succeeded initialize
error Failed initialize

Testing

You need to have mocha installed on your machine in order to run tests.

npm test

Author

Originally by Huseyin Babal ([email protected]). Now officially maintained by iyzico.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].