Skip to content

anddone-kit/AndDone-SecureAPI-ClientLibrary-DotNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AndDone Client Library - .NET

This client library integrates with AndDone's secure APIs.

Please see our developer documentation & API Explorer, linked below, for detailed instructions on how to integrate this into your systems.

Secure API .NET Client

This .NET SDK is an auto-generated client for the AndDone Secure API, built using the OpenAPI Generator. This .NET SDK targets both .Net 8 and NetStandard 2.0 for client consumption. Based on the client's target framework, the appropriate Nuget package will be pulled when referenced.

  • API version: 2.3
  • Package version: 1.0.3
  • Generator version: 7.9.0
  • Build package: org.openapitools.codegen.languages.CSharpClientCodegen
  • Developer Documentation: DevDocs
  • API Explorer: AndDone API Explorer

Table of Contents


Requirements

  • .NET 6.0+ (supports .NET Core and .NET Framework)
  • Access to AndDone Merchant Portal for API keys.

Dependencies are managed through NuGet:


Installation

Install dependencies via NuGet:

Install-Package RestSharp
Install-Package Newtonsoft.Json
Install-Package JsonSubTypes
Install-Package System.ComponentModel.Annotations

Then include the DLLs or reference the project, and import the namespaces:

using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

Configuration

  1. Retrieve Developer Credentials:

    1. Log in to AndDone Merchant Portal:

    2. Go to Developer → API Keys in the left menu.

    3. Copy:

      • xApiKey (API Key)
      • xAppKey (App Key)
  2. Determine Your Origin: The origin is your public IP address. Find it by searching "what's my IP" in Google or visiting https://www.whatsmyip.org.

  3. Optional: Create a Configuration File: Rename config.example.json to config.json and fill it with your values:

    {
      "xApiKey": "YOUR_API_KEY",
      "xAppKey": "YOUR_APP_KEY",
      "xVersion": "2.3",
      "origin": "YOUR_IP_ADDRESS"
    }

Quickstart

Here’s a minimal working example to call the Secure Create Payment Intent API:

using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

var config = new Configuration
{
    BasePath = "https://api.uat.anddone.com"
};

var apiInstance = new SecurePaymentIntentApi(config);

// Required headers
string xApiKey = "YOUR_API_KEY";
string xAppKey = "YOUR_APP_KEY";
float xVersion = 2.3F;
string origin = "YOUR_ORIGIN";

var request = @"{
    ""saveForFuture"": true,
    ""amount"": 10000,
    ""title"": ""test title 001a"",
    ""shortDescription"": ""shortDescription"",
    ""paymentDescription"": ""paymentDescription"",
    ""invoiceNumber"": ""postman"",
    ""expiresIn"": ""300000"",
    ""intent"": {
        ""paymentTypes"": [
            ""CreditCard"", 
            ""ACH""
        ]
    },
    ""enablePremiumFinance"": true,
    ""splits"": null,
    ""additionalDetailsPreference"": ""NoAdditionalDetails""
}";
JObject data = JObject.Parse(request);
PaymentIntentRequest postBody = JsonConvert.DeserializeObject<PaymentIntentRequest>(data.ToString());

try
{
    var response = apiInstance.SecurePaymentintentsPostWithHttpInfo(xApiKey, xAppKey, xVersion, origin, postBody);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.WriteLine("Exception when calling SecurePaymentIntentApi: " + e.Message);
}

API Endpoints

All URIs are relative to:

  • UAT: https://api.uat.anddone.com
  • Production: https://api.anddone.com
Click to view all endpoints
Class Method HTTP request Description
SecureEmbeddedPremiumFinanceApi SecureEpfMerchantsQuotesPolicyPut PUT /secure/epf/merchants/quotes/policy This API is will update the policy number
SecureEmbeddedPremiumFinanceApi SecureEpfQuotesBookingPut PUT /secure/epf/quotes/booking This API will update PFA to book a quote.
SecureEmbeddedPremiumFinanceApi SecureEpfQuotesCaptureesignPut PUT /secure/epf/quotes/captureesign This API will eSign the pfa with insured name.
SecureEmbeddedPremiumFinanceApi SecureEpfQuotesGeneratePost POST /secure/epf/quotes/generate This API is used to Generate Quotes
SecureEmbeddedPremiumFinanceApi SecureEpfQuotesIntentPost POST /secure/epf/quotes/intent This API will return quotes created againsts a payment intent.
SecureEmbeddedPremiumFinanceApi SecureEpfQuotesPost POST /secure/epf/quotes This API will return quote by QuoteKey.
SecureEmbeddedPremiumFinanceApi SecureEpfRetrievepfaPost POST /secure/epf/retrievepfa This API will return PFA for given quoteKey.
SecureEmbeddedPremiumFinanceEndorsementsApi SecureEpfEndorsementsPost POST /secure/epf/endorsements This API will do a check of eligibility of account
SecureEmbeddedPremiumFinanceEndorsementsApi SecureEpfQuoteEndorsementBookingPut PUT /secure/epf/quote/endorsement/booking This API will update PFA to book a endorsement quote.
SecureEmbeddedPremiumFinanceEndorsementsApi SecureEpfQuoteEndorsementPost POST /secure/epf/quote/endorsement This API will do return a quote for an existing policy or new policy for an existing account
SecureOrumApi SecureBankaccountsDetailsPost POST /secure/bankaccounts/details This API will request for verified bank account.
SecureOrumApi SecureBankaccountsVerifyPost POST /secure/bankaccounts/verify This API will request for account verification.
SecureOutboundPaymentsApi VendorapiSecureOutboundPaymentsTimelinesPost POST /vendorapi/secure/outboundPayments/timelines This API gets outbound payment timelines
SecureOutboundPaymentsApi VendorapiSecureOutboundpaymentsCancelPost POST /vendorapi/secure/outboundpayments/cancel This API cancel outbound payment request
SecureOutboundPaymentsApi VendorapiSecureOutboundpaymentsDetailPost POST /vendorapi/secure/outboundpayments/detail This API fetch outbound payment by paymentId
SecureOutboundPaymentsApi VendorapiSecureOutboundpaymentsPost POST /vendorapi/secure/outboundpayments This API creates outbound payment request
SecureOutboundPaymentsApi VendorapiSecureOutboundpaymentsSearchPost POST /vendorapi/secure/outboundpayments/search This API gets all outbound payment
SecurePaymentBatchingApi SecureBatchesDetailsPost POST /secure/batches/details This API is used for getting Secure Payment Batch Details
SecurePaymentBatchingApi SecureBatchesExecutePost POST /secure/batches/execute This API execute on-demand batch transaction.
SecurePaymentBatchingApi SecureBatchesPost POST /secure/batches This API is used for getting Secure Payment Batches
SecurePaymentBatchingApi SecureBatchesTimelinesPost POST /secure/batches/timelines This API will returns batch timeline.
SecurePaymentBatchingApi SecureBatchesTransactionsCancelPost POST /secure/batches/transactions/cancel This API cancels transactions from an active batch.
SecurePaymentIntentApi SecurePaymentintentsExpirationsPost POST /secure/paymentintents/expirations This API expires the payment Intent or link.
SecurePaymentIntentApi SecurePaymentintentsPost POST /secure/paymentintents This API is use to create Secure payment Intent.
SecurePaymentLinksApi SecurePaymentlinksDetailsPost POST /secure/paymentlinks/details This API is used for getting Payment Links by PaymentLink ID
SecurePaymentLinksApi SecurePaymentlinksExpirationsPost POST /secure/paymentlinks/expirations This API is used for to set expired payment link
SecurePaymentLinksApi SecurePaymentlinksIdPut PUT /secure/paymentlinks/{id} This API is used to update Payment Links
SecurePaymentLinksApi SecurePaymentlinksPost POST /secure/paymentlinks This API is used to create Payment Links
SecurePaymentsApi SecurePaymentsExportPost POST /secure/payments/export This API gets Secure payment by search criteria for the merchant.
SecurePaymentsApi SecurePaymentsPost POST /secure/payments This API posts new Secure payment request for the merchant.
SecurePaymentsApi SecurePaymentsSearchPost POST /secure/payments/search This API gets Secure payment by search criteria for the merchant.
SecurePaymentsApi SecurePaymentsdetailsPost POST /secure/paymentsdetails This API is used for getting details of Payments
SecurePremiumFinanceLiteApi SecureEpfliteQuotesGeneratePost POST /secure/epflite/quotes/generate This API is used to generate the quote from the provider.
SecurePremiumFinanceLiteApi SecureEpfliteQuotesLinkPost POST /secure/epflite/quotes/link This API will return quotes created againsts a payment link.
SecurePremiumFinanceLiteApi SecureEpfliteQuotesPaymentlinksPost POST /secure/epflite/quotes/paymentlinks This API is used to create Payment Links
SecureRefundsApi SecureRefundsEligibilityPost POST /secure/refunds/eligibility This API return refund eligibility of a transaction.
SecureRefundsApi SecureRefundsPost POST /secure/refunds This API will refund a transaction which has been settled by the processor.
SecureReportsApi SecureReportsDownloadsPost POST /secure/reports/downloads This API will add system report.
SecureTokenLinksApi SecureTokenlinksDetailsPost POST /secure/tokenlinks/details This API is used for getting Token Links by TokenLink ID
SecureTokenLinksApi SecureTokenlinksExpirationsPost POST /secure/tokenlinks/expirations This API expires the token link.
SecureTokenLinksApi SecureTokenlinksListPost POST /secure/tokenlinks/list This API is used for getting all Token Links for Merchant
SecureTokenLinksApi SecureTokenlinksPost POST /secure/tokenlinks This API is use to create Secure Token Links
SecureTokenLinksApi SecureTokenlinksPut PUT /secure/tokenlinks This API will update the expireIn and paymentType of Token Link.
SecureTokenManagementApi SecureTokensActivationsDelete DELETE /secure/tokens/activations This API is used for deactivating merchant token securely
SecureTokenManagementApi SecureTokensDetailsPost POST /secure/tokens/details This API is used for getting details of Merchant Token by Token link.
SecureVendorManagementApi VendorapiSecureMerchantsVendorsDeletePost POST /vendorapi/secure/merchants/vendors/delete This API deletes vendor into system
SecureVendorManagementApi VendorapiSecureMerchantsVendorsDetailsPost POST /vendorapi/secure/merchants/vendors/details This API gets details of particular vendor
SecureVendorManagementApi VendorapiSecureMerchantsVendorsEditPost POST /vendorapi/secure/merchants/vendors/edit This API Updates the existing vendor
SecureVendorManagementApi VendorapiSecureMerchantsVendorsPost POST /vendorapi/secure/merchants/vendors This API creates vendor into system
SecureVendorManagementApi VendorapiSecureMerchantsVendorsSearchPost POST /vendorapi/secure/merchants/vendors/search This API returns list of all the Vendors of Merchant
SecureVendorManagementApi VendorapiSecureMerchantsVendorsSuspendPost POST /vendorapi/secure/merchants/vendors/suspend This API suspends vendor into system
SecureVendorManagementApi VendorapiSecureMerchantsVendorsTimelinePost POST /vendorapi/secure/merchants/vendors/timeline This API gets timeline of particular vendor
SecureVendorManagementApi VendorapiSecureMerchantsVendorsUnsuspendPost POST /vendorapi/secure/merchants/vendors/unsuspend This API unsuspends vendor into system
SecureVoidsApi SecureCancellationsPost POST /secure/cancellations This API cancel a transaction.

Models

Click to view all models

Including library

To include this AndDone's DotNet client library in your project:

Manually

  1. Add the package source reference to the local machine by running the following in Powershell:
dotnet nuget add source --name githubanddone "https://nuget.pkg.github.com/AndDone-kit/index.json"
  1. In your .csproj file, add a package reference to:
<PackageReference Include="AndDoneSecureClientLibrary" Version="1.0.0" />

Within Visual Studio

To include the AndDone's DotNet client library in your project, a nuget.config file is included at the solution level to reference the package library.

Authorization

Authentication is handled via API keys in HTTP headers:

Key Location Description
x-api-key Header Your API key
x-app-key Header Your App key
x-version Header API version (e.g., 2.3)
origin Header Your public IP address

Support & Versioning

  • API Environments: Use UAT for testing; switch to Production only after validation.
  • Issues: Report bugs or request features via the GitHub Issues page.

About

AndDone-SecureAPI-ClientLibrary-DotNet

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •