FirstData.Gateway 1.0.0

.Net SDK to be used with a First Data Gateway account. This SDK has been created and packaged to offer the easiest way to integrate your application into the First Data Gateway. This SDK gives you the ability to run transactions such as sales, preauthorizations, postauthorizations, credits, voids, and returns; transaction inquiries; setting up scheduled payments and much more.

There is a newer version of this package available.
See the version list below for details.
Install-Package FirstData.Gateway -Version 1.0.0
dotnet add package FirstData.Gateway --version 1.0.0
<PackageReference Include="FirstData.Gateway" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FirstData.Gateway --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

FirstApiClient C# library

Frameworks supported

  • .NET 2.0

Dependencies

  • Mono compiler
  • Newtonsoft.Json.7.0.1
  • RestSharp.Net2.1.1.11

Installation

Install Via NuGet

-OR-

Local

Run the following command to generate the DLL

  • [Mac/Linux] /bin/sh compile-mono.sh
  • [Windows] TODO

Include the DLL (under the bin folder) in the C# project

Use the namespaces:

using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
using IO.Simple;

Getting Started

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
using IO.Simple;

namespace Example
{
    public class Example
    {
        public void main()
        {
            string apiKey = "Your API Key Here";
            string apiSecret = "Your API Secret Here";

            MerchantCredentials credentials = new MerchantCredentials(apiKey, apiSecret);
            Gateway gateway = Gateway.create(credentials);

            PaymentMethod pMethod = new PaymentMethod();
            Expiration expiryDate = new Expiration();
            PaymentCard card = new PaymentCard();
            expiryDate.Month = "12";
            expiryDate.Year = "25";
            card.ExpiryDate = expiryDate;
            card.Number = "4111111111111111";
            pMethod.PaymentCard = card;
            pMethod.Type = transaction_params.payload.paymentMethod.type;
            PrimaryTransaction trans = new PrimaryTransaction
            {
                Amount = GetAmount(),
                StoreId = StoreId(),
                PaymentMethod = pMethod,
                TransactionType = transaction_params.payload.transactionType
            };

            ApiResponse response = gateway.PrimaryPaymentTransaction(
                payload
            );

            Console.WriteLine(response.JsonData);
        }
    }
}

Documentation for API Endpoints

All URIs are relative to https://cert.api.firstdata.com/gateway

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
AuthenticationApi | V1AuthenticationAccessTokensPost | POST /v1/authentication/access-tokens | Generate an access token for user authentication
OrderApi | PerformPaymentPostAuthorisation | POST /v1/orders/{order-id}/postauth | Use this to capture/complete a transaction. Partial postauths are allowed.
OrderApi | ReturnTransaction | POST /v1/orders/{order-id}/return | Use this to return/refund on the order. Partial returns are allowed.
PaymentApi | PerformPaymentPostAuthorisation | POST /v1/payments/{transaction-id}/postauth | Use this to capture/complete a transaction. Partial postauths are allowed.
PaymentApi | PrimaryPaymentTransaction | POST /v1/payments | Generate a primary transaction
PaymentApi | ReturnTransaction | POST /v1/payments/{transaction-id}/return | Return/refund a transaction.
PaymentApi | TransactionInquiry | GET /v1/payments/{transaction-id} | Retrieve the state of a transaction
PaymentApi | VoidTransaction | POST /v1/payments/{transaction-id}/void | Reverse a previous action on an existing transaction

Documentation for Models

FirstApiClient C# library

Frameworks supported

  • .NET 2.0

Dependencies

  • Mono compiler
  • Newtonsoft.Json.7.0.1
  • RestSharp.Net2.1.1.11

Installation

Install Via NuGet

-OR-

Local

Run the following command to generate the DLL

  • [Mac/Linux] /bin/sh compile-mono.sh
  • [Windows] TODO

Include the DLL (under the bin folder) in the C# project

Use the namespaces:

using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
using IO.Simple;

Getting Started

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
using IO.Simple;

namespace Example
{
    public class Example
    {
        public void main()
        {
            string apiKey = "Your API Key Here";
            string apiSecret = "Your API Secret Here";

            MerchantCredentials credentials = new MerchantCredentials(apiKey, apiSecret);
            Gateway gateway = Gateway.create(credentials);

            PaymentMethod pMethod = new PaymentMethod();
            Expiration expiryDate = new Expiration();
            PaymentCard card = new PaymentCard();
            expiryDate.Month = "12";
            expiryDate.Year = "25";
            card.ExpiryDate = expiryDate;
            card.Number = "4111111111111111";
            pMethod.PaymentCard = card;
            pMethod.Type = transaction_params.payload.paymentMethod.type;
            PrimaryTransaction trans = new PrimaryTransaction
            {
                Amount = GetAmount(),
                StoreId = StoreId(),
                PaymentMethod = pMethod,
                TransactionType = transaction_params.payload.transactionType
            };

            ApiResponse response = gateway.PrimaryPaymentTransaction(
                payload
            );

            Console.WriteLine(response.JsonData);
        }
    }
}

Documentation for API Endpoints

All URIs are relative to https://cert.api.firstdata.com/gateway

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
AuthenticationApi | V1AuthenticationAccessTokensPost | POST /v1/authentication/access-tokens | Generate an access token for user authentication
OrderApi | PerformPaymentPostAuthorisation | POST /v1/orders/{order-id}/postauth | Use this to capture/complete a transaction. Partial postauths are allowed.
OrderApi | ReturnTransaction | POST /v1/orders/{order-id}/return | Use this to return/refund on the order. Partial returns are allowed.
PaymentApi | PerformPaymentPostAuthorisation | POST /v1/payments/{transaction-id}/postauth | Use this to capture/complete a transaction. Partial postauths are allowed.
PaymentApi | PrimaryPaymentTransaction | POST /v1/payments | Generate a primary transaction
PaymentApi | ReturnTransaction | POST /v1/payments/{transaction-id}/return | Return/refund a transaction.
PaymentApi | TransactionInquiry | GET /v1/payments/{transaction-id} | Retrieve the state of a transaction
PaymentApi | VoidTransaction | POST /v1/payments/{transaction-id}/void | Reverse a previous action on an existing transaction

Documentation for Models

Release Notes

Initial release.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.8.0 38 9/11/2020
1.7.1 36 8/20/2020
1.7.0 91 7/10/2020
1.6.0 236 5/12/2020
1.5.0 185 2/11/2020
1.4.2 533 10/22/2019
1.4.1 123 10/17/2019
1.4.0 127 10/7/2019
1.3.0 208 8/6/2019
1.2.0 733 6/18/2019
1.1.0 186 3/22/2019
1.0.0 237 10/25/2018
Show less