Initialize Transaction

Use this API to Initialize a new transaction

POST https://checkout.finzen.money/api/v1/payment/transaction/init

Headers

Name
Type
Description

MerchantId*

String

Merchant ID, Can be found under Accounts in User Menu

AccessToken*

String

API Token, Can be generated from dashboard, See the Authentication page for more information

Request Body

Name
Type
Description

order_id*

String (10, 50)

Unique client order id for transaction identification at client side

store_id*

String

Store ID, For now use S01

amount*

Double

Transaction amount in rupees, up to 2 decimal places is allowed

currency*

String

Currency, For now use INR

payment_mode*

String

Payment Mode, For now use seamless

payment_method*

String

Following Methods are supported:

UPI

UPI_INTENT

UPIQRCODE

payment_data

Object

Payment Data Object

payment_data["vpa_address"]

String

VPA Address of customer, Required in case of UPI Payment Method

product_type*

String

Product Type that is being purchased, Can be: - physical - digital

product_name*

String

Name of the product that is being purchased, Minimum 5 Character

customer*

Object

Customer Details Object

customer["name"]

String

Customer Name

customer["email"]

String

Customer Email

customer["mobile"]

String

Customer Mobile

customer_ip*

String

Customer IP

success_url

String

Valid URL, Required only in case of Hosted Payment Mode

failure_url

String

Valid URL, Required only in case of Hosted Payment Mode

callback_url

String

Valid URL, If provided we will post the payment status on this URL (This will override the callback URL configured in dashboard)

signature*

String

Signature Generated from your request data

Response Body

{
    "status": true,
    "message": "Transaction Created Successfully",
    "data": {
        "status": true,
        "transaction_id": "xxxxxxxx",
        "require_redirect": true,
        "redirect_url": "upi://pay?xxx", // Intent URL Incase of UPI Intent & Base64 Encoded impage incase of UPI QR Payment mode
        "redirect_method": null,
        "redirect_payload": {
            "token": null
        }
    }
}

Signature Generation

Initialize dataString as an empty string

Remove the 'signature' key from requestBody if available

Define function getArrayValues(requestBody, dataString):
    For each key-value pair in requestBody:
        If value is an array:
            Call getArrayValues(value, dataString)
        Else:
            Append value + '|' to dataString
    Return dataString

Call getArrayValues(requestBody, dataString)
Append '#' to dataString

Generate signature as HMAC-SHA512 hash of dataString using apiSecret as the key

API Secret is generated along with API Token, See Authentication page for more information

Last updated