API Documentation

Introduction

This document helps developers integrate with Payorb – the Payorb payment platform.

Terminology:

  1. Payment Platform (PP) – The Payorb Payment system
  2. Merchant – Site integrating with Payorb
  3. API Key – Also called Secret Key, provided after successful onboarding. Used to generate the secure HMAC hash for API requests.

This integration has two parts:

  1. Payorb Pay APIs invoked by Merchant site:
    1. Create Order
    2. Create Payout Order
    3. Verify Order
  2. Merchant API implemented per Payorb Pay specification:
    1. Callback

Before development, register with PP, complete onboarding & KYC, and set payout limits. PP will provide a merchant ID and API key. Whitelist your IP for testing.

API calls use standard HTTPS POST (application/json). Provide these redirect URLs:

  • → {YOURDOMAIN}/success
  • → {YOURDOMAIN}/pending
  • → {YOURDOMAIN}/failed

Flow Diagram

Payorb Payment System Sequence Diagram

Authentication

Every API call requires a HmacSHA256 signature generated with your private key. The server generates its own HMAC and compares it with yours — mismatches are discarded. The signature is sent as an HTTP header named signature.

Example Java implementation:

Java
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.nio.charset.StandardCharsets;

public class HashGenerator {
    public static String generateHash(String secretKey, String payload) throws Exception {
        Mac shaHMAC = Mac.getInstance("HmacSHA256");
        SecretKeySpec secretKeySpec = new SecretKeySpec(
            secretKey.getBytes(StandardCharsets.UTF_8), "HmacSHA256");
        shaHMAC.init(secretKeySpec);
        byte[] hash = shaHMAC.doFinal(payload.getBytes(StandardCharsets.UTF_8));
        StringBuilder hexString = new StringBuilder();
        for (byte b : hash) {
            String hex = Integer.toHexString(0xff & b);
            if (hex.length() == 1) hexString.append('0');
            hexString.append(hex);
        }
        return hexString.toString();
    }
    public static void main(String[] args) {
        try {
            String secretKey = "your-secret-key";
            String payload = "example-payload-data";
            String hash = generateHash(secretKey, payload);
            System.out.println("Generated Hash: " + hash);
        } catch (Exception e) {
            System.err.println("Error: " + e.getMessage());
        }
    }
}

POST create-order INR

{{payURL}}/pay/transaction/payer/create-order

Creates a payment order in the system and returns a payment URL to redirect the user. After payment completion or cancellation, the user is redirected to your callback URL, from which you can retrieve payment details via the Verify Order API.

payURL: Reach out to PP for the create-order URL

Headers

signature{generated Hash}
Content-Typeapplication/json
Acceptapplication/json
Body (raw JSON)

json
{
    "payerInfo": {
        "fname": "testaccount",
        "lname": "testaccount",  // optional
        "address": "Hyderabad",  // optional
        "pin": "500085",  // optional
        "city": "Hyderabad",  // optional
        "mobile": "+91-547-845-4960",  // optional
        "state": "Telangana",  // optional
        "email": "[email protected]"
    },
    "transaction": {
        "amount": 1500.00,
        "merchantId": "1f169e08-53dd-4bbf-a3df-c52583c6d508",
        "orderId": "f7c057f1-81f1-4b58-9ca2-beec4fc35262",
        "paymentMethod": "UPI",
        "currency": "INR"
    },
    "additionalData": {  // optional
        "service": "",  // optional
        "bankType": ""  // optional
    }
}
payerInfo (Object) – Payer Details
ParameterTypeRequiredDescription
fnameStringRequiredUser first name
lnameStringOptionalUser last name
addressStringOptionalUser address
pinStringOptionalPIN/postal code
cityStringOptionalCity
mobileStringOptionalMobile number
stateStringOptionalState/province
emailStringRequiredUser email address
transaction (Object) – Transaction Details
ParameterTypeRequiredDescription
amountDecimalRequiredRequested amount for creating order
merchantIdStringRequiredMerchant ID provided by the platform
orderIdStringRequiredUnique merchant-generated order ID
paymentMethodStringRequiredPayment method: UPI (INR), IPAY (LKR), EASYPAISA (PKR)
currencyStringRequiredCurrency code: INR / LKR / PKR
additionalData (Object) – Optional
ParameterTypeRequiredDescription
serviceStringOptionalType of service being requested
bankTypeStringOptionalType of bank

Example Request

curl
curl --location -g '{{payURL}}/pay/transaction/payer/create-order' \
--header 'signature: {generated Hash}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "payerInfo": {
        "fname": "testaccount",
        "email": "[email protected]"
    },
    "transaction": {
        "amount": 1500.00,
        "merchantId": "cac2f8e6-9f60-44a7-ad70-4139d0260526",
        "orderId": "a0fdfa9e-d716-4dc7-a99a-d79eda07a47b",
        "paymentMethod": "UPI",
        "currency": "INR"
    }
}'

Example Response

json
{
    "success": true,
    "message": "Payment order created",
    "code": 200,
    "data": {
        "orderId": "8abe1eba-8d88-4e46-9df6-b73d139fa581",
        "merchantOrderId": "d6551e06-e6c9-4dbb-8447-e8fce5af9779",
        "amount": 1500,
        "currency": "INR",
        "merchantId": "cac2f8e6-9f60-44a7-ad70-4139d0260526",
        "paymentURL": "{{paymentpage_url}}/pay/transaction/..."
    }
}

POST create-payout-order INR

{{payURL}}/pay/transaction/payer/create-payout-order

Generates a payout (withdrawal) order on the Payment Platform.

Note: Choose a bank from the Available Banks list. Choose a payment method from the Supported Payment Methods list.

Headers

signature{generated Hash}
Content-Typeapplication/json
Acceptapplication/json
Body (raw JSON)

json
{
    "accountNumber": "",
    "ifscCode": "SBIN78945612",
    "amount": 1200.00,
    "transactionType": "PAY_OUT",
    "bank": "SBI",
    "bnfNickName": "pay",
    "payeeName": "John Doe",
    "orderId": "6d029a1e-f5be-4be8-95de-c905ad46436a",
    "phoneNumber": "7894561234",
    "pinCode": "500068",
    "emailId": "[email protected]",
    "merchantId": "1f1db3f2-e217-40c6-ac8c-b7f1cc804308",
    "paymentMethod": "NEFT",
    "currency": "INR"
}
ParameterTypeRequiredDescription
accountNumberStringRequiredAccount number to credit
ifscCodeStringRequiredIFSC code of the account
amountDecimalRequiredRequested payout amount
transactionTypeStringRequiredMust be PAY_OUT
bankStringRequiredBank name from the available banks list
bnfNickNameStringOptionalBeneficiary nickname
payeeNameStringRequiredPayee name (must match bank records)
orderIdStringRequiredUnique merchant-generated order ID
phoneNumberStringRequiredUser phone number
pinCodeStringOptionalPIN/postal code
emailIdStringRequiredUser email address
merchantIdStringRequiredMerchant ID from the platform
paymentMethodStringRequiredNEFT / IMPS / UPI / BANK
currencyStringRequiredCurrency code (INR / LKR / PKR)

Example Request

curl
curl --location -g '{{payURL}}/pay/transaction/payer/create-payout-order' \
--header 'signature: {generated Hash}' \
--data-raw '{
    "accountNumber": "",
    "ifscCode": "SBIN78945612",
    "amount": 1200.00,
    "transactionType": "PAY_OUT",
    "bank": "SBI",
    "payeeName": "John Doe",
    "orderId": "ddb51809-31f2-4ba6-a521-81e371959609",
    "phoneNumber": "7894561234",
    "merchantId": "cac2f8e6-9f60-44a7-ad70-4139d0260526",
    "paymentMethod": "NEFT",
    "currency": "INR"
}'

Example Response

json
{
    "success": false,
    "message": "Insufficient funds",
    "code": 200
}
{
    "success": true,
    "message": "success",
    "code": 200,
    "data": {
        "id": "3fd8551a-7ac2-48de-ba4c-31c5b5941173"
    }
}

POST verify-order

{{payURL}}/pay/transaction/payer/verify-order

Reconfirms a successfully processed order and obtains further details on the order placed.

Headers

signature{generated Hash}
Content-Typeapplication/json
Acceptapplication/json
Body (raw JSON)

json
{
    "merchantId": "1f1db3f2-e217-40c6-ac8c-b7f1cc8043084",
    "merchantOrderId": "ac8cb3f2-ac8c-40c6-e217-b7f1cc8043084",
    "orderId": "e217b3f2-e217-40c6-ac8c-b7f1cc8043084",
    "transactionUserUtr": "112233445566"  // optional
}
ParameterTypeRequiredDescription
merchantIdStringRequiredMerchant ID provided by the platform
merchantOrderIdStringRequiredUnique order ID generated while creating order
orderIdStringRequiredUnique order ID assigned by the platform
transactionUserUtrStringOptionalUnique Transaction Reference ID

Example Request

curl
curl --location -g '{{payURL}}/pay/transaction/payer/verify-order' \
--header 'signature: {generated Hash}' \
--header 'Content-Type: application/json' \
--data '{
    "merchantId": "1f1db3f2-e217-40c6-ac8c-b7f1cc8043084",
    "merchantOrderId": "ac8cb3f2-ac8c-40c6-e217-b7f1cc8043084",
    "orderId": "e217b3f2-e217-40c6-ac8c-b7f1cc8043084",
    "transactionUserUtr": "112233445566"
}'

Example Response

json
{
    "success": true,
    "message": "success",
    "code": 200,
    "data": {
        "orderId": "f03e20d4-a197-4d8f-a5d9-61c7e0d7bcd8",
        "merchantOrderId": "7939675d-0851-48db-9980-74764f604d31",
        "merchantId": "f5461ebc-5b1c-4008-b63d-392ad2325358",
        "transactionUserUtr": "jg1p2hgfi9wsde5mnf",
        "transactionAmount": 55.00
    }
}

GET callbackrequest

{{URL}}/{{APIPath}}?orderId={{orderId}}&status={{status}}&tt={{transactionType}}

Implemented by the Merchant and called by PP to send order status. Upon success, the Merchant must call Verify Order to reconfirm and get full details. Respond with success: true/false per the response below.

Note: Consider the transaction's final status only after verify-order.

Query Parameters

ParameterTypeRequiredDescription
orderIdStringRequiredMerchant order ID
statusStringRequiredTransaction status (SUCCESS, FAILURE, PENDING)
tt (transactionType)StringRequiredPAY_IN or PAY_OUT

Example Request

curl
curl --location -g '{{URL}}/{{APIPath}}?orderId={{orderId}}&status={{status}}&tt={{transactionType}}'

Expected Response

json
{
    "code": "200",
    "description": "success",
    "success": true
}

GET balance

{{payURL}}/pay/merchant/balance/{merchantId}/{currency}

Verifies the available merchant balance before initiating a payout.

Headers

signature{generated Hash} (SECRETKEY + merchantId + currency)
Content-Typeapplication/json
Acceptapplication/json
ParameterTypeRequiredDescription
merchantIdStringRequiredMerchant ID from the platform
currencyStringRequiredCurrency code for balance inquiry

Example Request

curl
curl --location '{{payURL}}/pay/merchant/balance/{merchantId}/{currency}' \
--header 'signature: {generated Hash}' \
--header 'Content-Type: application/json'

Example Response

json
{
    "success": true,
    "message": "SUCCESS",
    "code": 200,
    "data": {
        "balance": "108336.1050",
        "merchantId": "f5461ebc-5b1c-4008-b63d-392ad2325358",
        "currency": "INR"
    }
}

Error Codes

HTTP StatusCodeError Message
200–Merchant Not Found
200–Merchant Wallet not created
200–Hash Mismatched
200–Invalid Parameter
401–Unauthorized – Invalid or missing signature
400–Bad Request – Malformed JSON body
500–Internal Server Error

Available Banks (INR)

  • Canara Bank
  • DCB Bank
  • Federal Bank
  • HDFC Bank
  • Punjab National Bank
  • Indian Bank
  • ICICI Bank
  • Syndicate Bank
  • Karur Vysya Bank
  • Union Bank of India
  • Kotak Mahindra Bank
  • IDFC First Bank
  • Andhra Bank
  • Karnataka Bank
  • ICICI Corporate Bank
  • Axis Bank
  • UCO Bank
  • South Indian Bank
  • Yes Bank
  • Standard Chartered Bank
  • State Bank of India
  • Indian Overseas Bank
  • Bandhan Bank
  • Central Bank of India
  • Bank of Baroda
  • UPI

Supported Payment Methods (INR)

  • UPI
  • NEFT
  • IMPS
  • BANK

Payorb API Documentation · Confidential