Introduction

Important!
1. Register as a Business
2. Verify your Account
3. Generate API Key and go Live

Accept now, Better Online Payments for Your Business. We take the complexity out of the payment ecosystem, providing smart and seamless solutions that deliver value to your business.

UniPAY’s core asset is its team, which is made up of qualified industry specialists with more than 10 years of professional experience in banking, Fin Tech and e-Commerce. We’ve been developing payment solutions since 2010 and understand them inside and out. This means we can provide a high conversion rate and service up-time.

$$\   $$\           $$\ $$$$$$$\ $$$$$$\  $$\       $$\
$$ |  $$ |          \__|$$ __$$\ $$  __$$ \\$$\    $$ |
$$ |  $$ |$$$$$$$\  $$\ $$ | $$ |$$ / $$ | \ $$\  $$/
$$ |  $$ |$$ __$$\  $$ |$$$$$$$ |$$$$$$$$|    \$$$$/
$$ |  $$ |$$ | $$ | $$ |$$ ____/ $$ __$$ |    \$$ /
$$ |  $$ |$$ | $$ | $$ |$$ |     $$ | $$ |     $$ |
\$$$$$$  |$$ | $$ |$ $ |$$ |     $$ | $$ |     $$ |
 \______/ \__| \__|\__|\__ |     \__| \__|     \__|

Version 2.0.5
Released 2021
Author: unipayninja
Mission: Modern payments for Georgia

Everything you need to know to give your customers a great online experience. Accept web and mobile payments and monitor your transactions in real time.



This document is intended to provide the partner with a comprehensive guide how to integrate UniPAY Checkout Solution for accepting payments from Visa, MasterCard and AMEX Cards.

The document will be updated every time a new release is delivered. The document itself is stored in the source control system and all of its versions are available for review.

Onboarding

Before to start development process please make sure that your business is fully verified and have an access into unipay dashboard, where you can create API cridentials for your future projects.



for business registration please Sign Up

Verification

Business account verification is most important part. After registration please follow the verification steps into your unipay dashboard. You will be asked to provide company details and information about project

Live credentials

to Get API keys you need to add a project into your dashboard. when business is fully verified you can get you production API keys for integration.

Get started

⚡️ UniPAY Simple Checkout

unipay.com provides a collection of APIs that enable you to process and manage payments. Our APIs accept and return JSON in the HTTP body, and return standard HTTP response codes. You can consume the APIs directly using your favorite HTTP/REST library or make use of one of our SDKs. We have a testing environment called sandbox, which you can sign up for to test API calls without affecting live data.

Workflow

The workflow of processing a transaction can be summarized in the steps described below.



1) The customer logs in the merchant interface (a website or an application).

2) The customer selects goods or services, or enters the amount for purchase and clicks to PAY

3) The customer chooses from the list of available payment options.

4) The UniPAY checkout API authenticates both the merchant and the received values by calculating the SHA256 checksum from the received values and the secret part, and comparing the resulting value against the received checksum.

5) The Customer confirms the transaction.

Signing mechanism

When you sign up for an account, you are given a Merchant ID and API key. You authenticate with our API by providing the appropriate key in the request Authorization header. Never share your secret keys. Keep them guarded and secure.



all endpoints require authentication using your secret key.

Example of signing generation


# request example json params

json = {
  "MerchantID ": "5007009001051",
  "CustomerID": "REF-52265_US",
  "OrderID": "Z9s7Yt0Txsqbbx",
  "OrderPrice": "14.99",
  "OrderCurrency": "GEL",
  "OrderName": "Service Order",
  "Items": [
        {
            "price": 9,
            "quantity": 3,
            "title": "test",
            "description": "",
            "currency": "GEL",
            "attribute": ""
        },
        {
            "price": 0.1,
            "quantity": 1,
            "title": "Flat Shipping Rate",
            "description": "Shipping",
            "currency": "GEL",
            "attribute": ""
        }
    ]
}

MerchantID = "5007009001051";
SecretKey = "08fee27d-7834-49c2-b6a3-01c7486b57f9";

# dont forget not to include in string arrays and objects
# dont include {User} because it is a object
SignatureStr = "{SecretKey}|{MerchantID}|{CustomerID}|{OrderID}|{OrderPrice}|{OrderCurrency}|{OrderName}";

Hash = SHA256( SignatureStr  );

Gateway signing mechanism

All requests and responses must be signed/verified using SHA256

A working example: You must provide HASH, Password is unique per request and generated by the SecretKey and body arguments using delimiter | and SHA256 hash


right you can see example of generation signing hash

Create Order

Endpoint URL: https://apiv2.unipay.com/custom/checkout/v1/createorder

POST /createorder

{
    "Hash": "5a35a2609b5a931ea81bc4b35fb5f4889d8863ae0c39743d809f70cbb1beb5d3",
    "MerchantID": "5005009000211",
    "MerchantUser": "This email address is being protected from spambots. You need JavaScript enabled to view it.",
    "MerchantOrderID": "UN6141ab337e154-29",
    "OrderPrice": 40.59,
    "OrderCurrency": "GEL",
    "SuccessRedirectUrl": "aHR0cHM6Ly9zdWNjZXNzX3JlZGlyZWN0X3VybC51bmlwYXkuY29tLw==",
    "CancelRedirectUrl": "aHR0cHM6Ly9jYW5jZWxfcmVkaXJlY3RfdXJsLnVuaXBheS5jb20v",
    "CallBackUrl": "aHR0cDovL2luZm8udW5pcGF5LmNvbS8=",
    "Language": "GE",
    "OrderName": "StarWars Comics",
    "OrderDescription": "GHOSTS OF VADER’S CASTLE"
}

JSON Response Sample


{
    "errorcode": 0,
    "message": "OK",
    "data": {
        "Checkout": "{{CHECKOUT PAGE URL}}",
        "UnipayOrderHashID": "MP5005009614DF386A5472",
    }
}

HTTP Request

POST https://apiv2.unipay.com/custom/checkout/v1/createorder


To accept a payments merchant should start with createorder function to pass all necessary information for registering the transactions.



Parameters

Value Type Description
Hash String Hash is calculated with secret key and all string parameters which are passed to function. You must not include in hash string parameters which are array or object, and must not include Hash parameter itself use a delimiter between each parameter
MerchantID Integer Merchant unique ID obtained from UniPAY system.
MerchantUser String Clients Identification Account in Merchant System
MerchantOrderID String Merchant Transaction Number
OrderPrice Int >= 0 The payment amount.
OrderCurrency String GEL - Georgian Lari
SuccessRedirectUrl String - Base64 Success redirect URL
CancelRedirectUrl String - Base64 Fail redirect URL
CallBackUrl String - Base64 URL provided by merchant to get transaction status after the payment
Languege String GE – Georgia, EN- English,
OrderName String A Title of the payment
OrderDescription String A description of the payment

CallBack

It is best practice for your project to receive POST a callback. We will send request on CallBackUrl parameter.

{
"MerchantOrderID": 51823,
"Status": 3,
"Hash": "808a827a928917e15e79b531227c5b1c81d6bf552b347aad9a91ed0e53a0b317",
"Amount": 20.00,
"UnipayOrderID": "MP50050176151C206A41D9",
"ErrorCode": 0,
"ErrorMessage": "OK",
"Reason": ""
}

Hash Calculation

Hash must be calculated based on SHA 256 based on following params + SecretKey provided by unipay.

Status List

Code Name Description
1 PROCESS Payment is under process
2 HOLD Payment was hold
3 SUCCESS Payment is successful
5 REFUNDED Payment was refunded
13 FAILED Payment failed due to some errors
19 PARTIAL_REFUNDED was initiated a partial refund
22 INCOMPLETE_BANK Payment timeout
23 INCOMPLETE Payment is incomplete
1000 CREATED Payment was created
1001 PROCESSING Payment is processing and waiting to get update status

Error List

Code Description
0 OK
403 HTTP_AUTORIZATION_MERCHANT_ID_WRONG
402 HTTP_AUTORIZATION_MERCHANT_NOT_DEFINED
401 HTTP_AUTORIZATION_HASH_WRONG
101 ERROR_MERCHANT_IS_DISABLED
102 ERROR_MERCHANT_ID_NOT_DEFINED
103 ERROR_MERCHANT_ORDER_ID_NOT_DEFINED
104 ERROR_ORDER_PRICE_NOT_DEFINED
105 ERROR_ORDER_CURRENCY_NOT_DEFINED
106 ERROR_ORDER_CURRENCY_BAT_FORMAT
107 ERROR_LANGUAGE_BAD_FORMAT
108 ERROR_MIN_AMOUNT
109 ERROR_MAX_AMOUNT
110 ERROR_HASH
111 ERROR_BAD_FORMAT_OF_BACKLINKS
112 ERROR_BAD_FORMAT_OF_LOGO
140 INSUFFICIENT_FUNDS
141 AMOUNT_LIMIT_EXCEEDED
142 FREQUENCY_LIMIT_EXCEEDED
143 CARD_NOR_EFFECTIVE
144 CARD_EXPIRED
145 CARD_LOST
146 CARD_STOLEN
147 CARD_RESTRICTED
148 DECLINED_BY_ISSUER
149 BANK_SYSTEM_ERROR
150 UNKNOWN
151 AUTHENTICATION_FAILED
152 OFFER_TIMEOUT

Not-Code Options

E-Commerce Platforms
1. WIX
2. Shopify
3. Ecwid
4. Woocommerce
5. Wordpress
6. Unishop
7. Desk
8. OpenCart
9. CS Cart
10. NopCommerce
11. Magento
12. Tilda
13. PrestaShop
14. Virtuemart
15. WHCSM

Not using APIs?

We've partnered with many popular e-commerce platforms so you can get up and running quickly, processing online payments with one of our e-commerce plugins.

it si very easy to integrate using ready integrations, You just need to download unipay checkout plugin for specific e commerce platform, enter your merchant id and API KEY and you are ready to start accepting the payments.