ContiPay 1.0.0

dotnet add package ContiPay --version 1.0.0
                    
NuGet\Install-Package ContiPay -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ContiPay" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ContiPay" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="ContiPay" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ContiPay --version 1.0.0
                    
#r "nuget: ContiPay, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ContiPay@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ContiPay&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=ContiPay&version=1.0.0
                    
Install as a Cake Tool

ContiPay .NET SDK

.NET SDK for integrating with the ContiPay and processing Mobile Money and Card Payments .

This SDK provides a clean, secure, and flexible way to integrate ContiPay payment services into your .NET applications.


✨ Features

  • 📱 Mobile payments: EcoCash, OneMoney, Omari, InnBucks
  • 💳 Card payments: Visa, MasterCard, ZimSwitch
  • 🌍 Supports Dev and Live environments
  • 🔁 Direct and Redirect payment flows
  • 🔐 Secure API key authentication
  • Supports payment initiation, status checks, and transaction management
  • Designed for .NET 8.0 with modern C# features and nullable reference types enabled
  • Compatible with all .NET 8.0 supported platforms

Installation

Install via NuGet Package Manager:

dotnet add package ContiPay --version 1.0.0

🚀 Quick Start

Import & Credentials


using ContiPay.Core;
using ContiPay.Services;
using System.Text.Json;

## 1️⃣ Create client (keys come from the Contipay APP)
var client = new ContiPayClient(
    apiKey: "YOUR_API_KEY",
    apiSecret: "YOUR_API_SECRET",
    mode: "DEV" ## lIVE for Live environment
);

💳 Full Card Payment Example (Visa)


using ContiPay.Core;
using ContiPay.Services;
using System.Threading.Tasks;

var client = new ContiPayClient(
    apiKey: "your_api_key",
    apiSecret: "your_api_secret",
    mode: "dev"
);

##2️⃣ Create services
var card = new CardService(client);

##3️⃣ CARD PAYLOAD (example – adjust fields to match API spec if needed)
var cardPayload = new
{
    customer = new
    {
        nationalId = "00000000",
        surname = "Doe",
        firstName = "John",
        middleName = "",
        email = "john.doe@example.com",
        cell = "0770000000",
        countryCode = "ZW"
    },

    transaction = new
    {
        providerCode = "VA",
        providerName = "VISA",
        currencyCode = "USD",
        merchantId = 1,
        reference = "CARD_ORDER_12345",
        description = "Card payment",
        amount = 50.00,
        webhookUrl = "https://yoursite.com/webhook",
        successUrl = "https://yoursite.com/success",
        cancelUrl  = "https://yoursite.com/cancel"
    },

    accountDetails = new
    {
        accountNumber = "4111111111111111",
        accountName = "John Doe",
        accountExtra = new
        {
            code = "123",
            expiry = "12/2030"
        }
    }
};

## 5️⃣ Execute requests
var cardResponse = await card.PayAsync(cardPayload);


📱 Full Mobile Payment Example (EcoCash)


using ContiPay.Core;
using ContiPay.Services;
using System.Threading.Tasks;

var client = new ContiPayClient(
    apiKey: "your_api_key",
    apiSecret: "your_api_secret",
    mode: "dev"
);

##2️⃣ Create services
var mobile = new MobileService(client);

##3️⃣ MOBILE PAYLOAD (example – adjust fields to match API spec if needed)
var mobilePayload = new
{
    customer = new
    {
        nationalId = "00000000",
        surname = "John",
        firstName = "Doe",
        middleName = "",
        email = "john.doe@example.com",
        cell = "0776368211",
        countryCode = "ZW"
    },

    transaction = new
    {
        providerCode = "EC",
        providerName = "EcoCash",
        currencyCode = "USD",
        merchantId = 1, // replace with your actual merchant ID if needed
        reference = "PYT_11",
        description = "Payment for Order #1631",
        amount = 100.00,
        webhookUrl = "https://yoursite.com/webhook",
        successUrl = "https://yoursite.com/success",
        cancelUrl = "https://yoursite.com/cancel"
    },

    accountDetails = new
    {
        accountNumber = "0776368211",
        accountName = "John Doe"
    }
};

## 5️⃣ Execute requests
var mobileResponse = await mobile.PayAsync(mobilePayload);

📱 Usage Example

using ContiPay.Core;
using ContiPay.Services;
using System.Text.Json;


## 1️⃣ Create client (keys come from the Contipay APP)
var client = new ContiPayClient(
    apiKey: "your_api_key",
    apiSecret: "your_api_secret",
    mode: "dev"
);

## 2️⃣ Create services
var card = new CardService(client);
var mobile = new MobileService(client);

## 3️⃣ CARD PAYLOAD (example – adjust fields to match API spec if needed)
var cardPayload = new
{
    customer = new
    {
        nationalId = "00000000",
        surname = "Doe",
        firstName = "John",
        middleName = "",
        email = "john.doe@example.com",
        cell = "0770000000",
        countryCode = "ZW"
    },

    transaction = new
    {
        providerCode = "VA",
        providerName = "VISA",
        currencyCode = "USD",
        merchantId = 1,
        reference = "CARD_ORDER_12345",
        description = "Card payment",
        amount = 50.00,
        webhookUrl = "https://yoursite.com/webhook",
        successUrl = "https://yoursite.com/success",
        cancelUrl  = "https://yoursite.com/cancel"
    },

    accountDetails = new
    {
        accountNumber = "4111111111111111",
        accountName = "John Doe",
        accountExtra = new
        {
            code = "123",
            expiry = "12/2030"
        }
    }
};

## 4️⃣ MOBILE PAYLOAD 
var mobilePayload = new
{
    customer = new
    {
        nationalId = "00000000",
        surname = "John",
        firstName = "Doe",
        middleName = "",
        email = "john.doe@example.com",
        cell = "0776368211",
        countryCode = "ZW"
    },

    transaction = new
    {
        providerCode = "EC",
        providerName = "EcoCash",
        currencyCode = "USD",
        merchantId = 1, // replace with your actual merchant ID if needed
        reference = "PYT_11",
        description = "Payment for Order #1631",
        amount = 100.00,
        webhookUrl = "https://yoursite.com/webhook",
        successUrl = "https://yoursite.com/success",
        cancelUrl = "https://yoursite.com/cancel"
    },

    accountDetails = new
    {
        accountNumber = "0776368211",
        accountName = "John Doe"
    }
};


## 5️⃣ Execute requests
Console.WriteLine("===== CARD RESPONSE =====");
var cardResponse = await card.PayAsync(cardPayload);


Console.WriteLine("\n===== MOBILE RESPONSE =====");
var mobileResponse = await mobile.PayAsync(mobilePayload);


⚙️ Configuration

Core Classes

The SDK exposes two main classes:

→ Mobile – Mobile money payments

→ Card – Card payments

📲 Mobile Payments

Supported Providers

✅ EcoCash

✅ OneMoney

✅ Omari

✅ InnBucks

Provider selection is done using the provider name or code when calling pay().

🔐 Security

All API requests are encrypted using TLS

Sensitive customer data is never logged

API credentials are required for every request

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 129 2/5/2026