ZiniPay Documentation

Introduction to ZiniPay

ZiniPay is a simple and secure payment automation tool designed to use personal accounts as a payment gateway, allowing you to accept payments from customers through your website. This documentation provides a complete overview of how ZiniPay works and how you can integrate the ZiniPay API into your website.

API Introduction

ZiniPay Payment Gateway enables Merchants to receive money from their customers by temporarily redirecting them to ZiNiPay.com. The gateway connects multiple payment terminals including card systems, mobile financial systems, and local and international wallets. After the payment is complete, the customer is returned to the merchant's site, and seconds later the Merchant receives notification about the payment along with the details of the transaction.

API Operation

REST APIs are supported in two environments. Use the Sandbox environment for testing purposes, then move to the live environment for production processing. When testing, generate an order URL with your test credentials to make calls to the Sandbox URIs. When you're set to go live, use the live credentials assigned to your new signature key to generate a live order URL to be used with the live URIs. Your server must support the cURL system.

Live API End Point (For Create Payment URL):

https://api.zinipay.com/v1/payment/create

Create Payment Examples

The following examples show how to create a payment request with the ZiniPay API in various programming languages.

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.zinipay.com/v1/payment/create',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{"redirect_url":"yourdomain.com/success","cancel_url":"yourdomain.com/cancel","webhook_url":"yourdomain.com/webhook","metadata":{"phone":"016****"},"amount":"10"}',
  CURLOPT_HTTPHEADER => array(
    'zini-api-key: gnXi7etgWNhFyFGZFrOMYyrmnF4A1eGU5SC2QRmUvILOlNc2Ef',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

?>

Response Example

{
  "status": true,
  "message": "Payment URL generated successfully",
  "payment_url": "https://secure.zinipay.com/payment/abc123xyz456"
}

Required Parameters

ParameterDescriptionRequiredExample
amountThe payment amount in your currencyYes10.00
redirect_urlURL where customer will be redirected after successful paymentYesyourdomain.com/success
cancel_urlURL where customer will be redirected after cancellationYesyourdomain.com/cancel

Verify Payment

After a payment is completed, you might want to verify its status. ZiniPay provides an API endpoint to verify payment status using the transaction ID.

Payment Verify API:

https://api.zinipay.com/v1/payment/verify

Variables Needed For Payment Verification

Field NameDescriptionRequiredExample Values
val_idTransaction ID received as a query parameter from the success URL provided during payment creation.NoOVKPXW165414
invoiceIdTransaction ID received as a query parameter from the success URL provided during payment creation.Yes553ca0ac-28c0-41f7-adc0-6243710b1e1b
<?php
// Verify Payment Example
$apiKey = "YOUR_API_KEY";
$secretKey = "YOUR_SECRET_KEY";

// Initialize cURL session
$ch = curl_init();

// Transaction ID received from success URL
$invoiceId = $_GET['invoiceId']; 

// Prepare data for API request
$data = [
    'invoiceId' => $invoiceId,
    'merchantId' => 'YOUR_MERCHANT_ID',
    'apiKey' => $apiKey
];

// Configure cURL request
curl_setopt($ch, CURLOPT_URL, 'https://api.zinipay.com/v1/payment/verify');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'Authorization: Bearer ' . $secretKey
]);

// Execute request and get response
$response = curl_exec($ch);
curl_close($ch);

// Process the response
$paymentData = json_decode($response, true);

if ($paymentData && isset($paymentData['status']) && $paymentData['status'] === 'success') {
    // Payment is verified, process order
    echo "Payment verified successfully!";
    echo "Transaction ID: " . $paymentData['data']['transactionId'];
    echo "Amount: " . $paymentData['data']['amount'];
    // Update your database, fulfill the order, etc.
} else {
    // Payment verification failed
    echo "Payment verification failed: " . ($paymentData['message'] ?? 'Unknown error');
}
?>

Response Example

{
  "status": "success",
  "message": "Payment verification successful",
  "data": {
    "transactionId": "OVKPXW165414",
    "invoiceId": "553ca0ac-28c0-41f7-adc0-6243710b1e1b",
    "amount": "900.00",
    "currency": "USD",
    "paymentMethod": "card",
    "status": "COMPLETED",
    "customerName": "John Doe",
    "customerEmail": "[email protected]",
    "metadata": {
      "orderId": "ORD-12345",
      "productId": "PROD-567"
    },
    "createdAt": "2023-09-15T14:23:45Z"
  }
}

API Reference

Comprehensive documentation of all available ZiniPay API endpoints.

Payment Endpoints

  • POST/v1/payment/create
  • POST/v1/payment/verify

Tools & SDKs

ZiniPay provides various tools and SDKs to help you integrate faster.

WordPress Plugin

Easy integration with WordPress sites. Add ZiniPay payment gateway to your WooCommerce store.

Download

SMM Panel Module v1

Integration for old version of social media management panels.

Download (v1)

SMM Panel Module v2

Integration for new version of social media management panels.

Download (v2)
Please download app or apk from Dashboard

WordPress & WooCommerce Integration

ZiniPay offers a seamless integration with WordPress and WooCommerce, allowing you to accept payments in Bangladesh through bKash, Nagad, and Rocket with a simple plugin installation. Our automatic payment gateway solution works with both merchant and personal accounts.

Features of ZiniPay WordPress Plugin

bKash Integration

Accept payments through bKash personal or merchant accounts with automatic transaction verification.

Nagad Integration

Process payments via Nagad personal accounts with automated payment confirmation.

Rocket Payment Gateway

Accept Rocket payments through our automated system without manual verification.

WooCommerce Compatible

Fully compatible with WooCommerce for seamless e-commerce integration.

Installation Guide

1

Download the Plugin

Download the latest version of the ZiniPay WordPress plugin from the link above.

2

Install the Plugin

Login to your WordPress admin dashboard. Go to Plugins - Add New - Upload Plugin. Choose the downloaded ZIP file and click "Install Now".

3

Activate the Plugin

After installation, click "Activate Plugin" to enable ZiniPay on your WordPress site.

4

Configure Settings

Go to WooCommerce - Settings - Payments. Find "ZiniPay" and click "Manage". Enter your ZiniPay API credentials and customize settings according to your needs.

5

Enable Payment Methods

Choose which payment methods to enable (bKash, Nagad, Rocket) and save your settings.

Configuration Options

OptionDescriptionExample
API KeyYour ZiniPay API key from your dashboardzp_api_abc123xyz789
Secret KeyYour ZiniPay Secret Key for secure transactionszp_secret_def456uvw321
Payment TitleText displayed to customers during checkoutPay with bKash/Nagad/Rocket
Payment DescriptionDetailed description of the payment methodPay securely using your mobile banking app

Benefits of Using ZiniPay with WordPress

No Merchant Account Required - Use personal bKash, Nagad, or Rocket accounts for accepting payments.

Automatic Payment Verification - No need to manually check transactions; our system automatically verifies payments.

Easy Customer Experience - Seamless checkout process with clear payment instructions.

Automatic Order Status Updates - Orders automatically transition from "Pending" to "Processing" upon successful payment.

Important Note

Make sure to configure IPN (Instant Payment Notification) URL in your ZiniPay dashboard to match your WordPress site's URL. This ensures automatic payment verification works correctly.