Order API Flow (Request and Response)

Payment Processing Flow ??


  • Create an order with the mandatory fields from OrderRequest.

  • Once the Order is created , orderkeyid and PaymentProcessUrl will be provided as a response as part of the order creation - which redirects the user/customer to the Process payment page.

  • Customer chooses the payment type and provides the details.

  • Payment is processed and redirects to the url provided in the RedirectUrl parameter of the OrderRequest.

  • Payment details can be obtained by making a call to the Detail API

  • Order can be updated in 10days with customer information and shipping details after payment completion.

Required headers:

Header Name Header Value
basic PayGAuthentication
PayGAuthentication = base64encoded(MerchantAuthenticationKey:MerchantAuthenticationToken:M:MerchantKeyId)
OR generate Authorization Header value in PayG Dashboard.

Order Request: ??

integer Please get this merchantkeyid from PayG Dashboard
string(10) Unique Id generated for that particular Request and it should not be repeated, alphanumeric only.
decimal(18,2) Transaction Amount - This amount will be shown to user for payment.
string - Json Object Product/Service detail related to the order, please review ProductData for more detail and example
CustomerData object Customer detail - billing, shipping, Please refer CustomerData for more detail.
IntegrationData Object Required few details like username, source, integration type etc, Please refer IntegrationData for more detail.
IntegrationData Object Required few details like username, source, integration type etc, Please refer IntegrationData for more detail.
OrderType string- Specificed Data only Default - PAYMENT, FUTUREBILLING
OrderId string(20) OrderNo/Id from merchant system , alphanumber only.
OrderAmountData List of AmountDetail Please see contents below AmountDetail
NextStepFlowData string - Json Object what will be next step for user information after payment is completed, please review NextStepFlowData for more detail and example
TransactionData TransactionData Object Specific payment type - used for upi intent, seamless- please review TransactionData for more detail and example
UserDefinedData UserDefinedData Object List user defined custom objects. Please refer UserDefinedData for detail and example
RequestDateTime datetime MMDDYYYY
RedirectUrl url Redirect url given by the merchant after transaction
Note: ProductData, Nextstepflowdata should be in JsonObject converted to string.

AmountDetail: ??

Note: If OrderAmountData is provided then the total OrderAmountData should be equal to OrderAmount
AmountTypeDesc string(20) description of the order amount
Amount decimal(18,2) Order Amount

ProductData Object: ??

Note: Product/service detail of the order, this detail will be displayed on payment page (by default, and can be configured, please check settings in merchant portal) and the transaction reciept.
example "ProductData":"{'PaymentReason':'OnlineOrder for OrderNo- 1234', 'ItemId':'T-shirt', 'Size':'medium', 'AppName':'yourAppName'}"
Suggestion: please refer below table contents as suggestion and you can add as per your requirement. however it should be valid json object
PaymentReason string(50) Reason for this payment
ServiceType string(50) Type of the service
ProductName string(50) Name of the product

TransactionData: ??

Seamless for UPI, Netbanking and Wallets:
UPI : PaymentType:"UPI", VPA is required
Upi Intent: PaymentType as "UPIINTENT", IPAddress is required and IntegrationData
PaymentType Specified Data Payment Mode - NetBanking, UPI, UPIINTENT, Wallet
IndustrySpecificationCode string(20)
PartialPaymentOption specified value - True/false to accept partial payment from user, if true then user will able to moedify amount before payment and order will be marked as partial paid after approval of transaction.

Payment Type - UPI:

Note: If TransactionData PaymentType is UPI, please refer below
string(50) UPI ID/ virtual address of payer - example ramchandra@upi
AccountNumber# string Bank Account Number
Ifsc# string Bank Ifsc Code
AadhaarNo# string Account holder AadhaarNo

Payment Type - Netbanking:

Note: If TransactionData PaymentType is Netbanking, please refer below
string - Specificed Data BankCode for Netbanking, example - PG0001 for Allahabad Bank- Retail
Please refer for Bank Code list

Payment Type - Wallet:

Note: If TransactionData PaymentType is Wallet, please refer below
string - Specificed Data Wallet Type , example - PayTm, PhonePe
Please refer for Wallet Type list
username# string User mobile no or login id

CustomerData: ??

Number(10) Contact number of the customer
CustomerId string(10 ) Id of the customer
CustomerNotes string(200 ) Any considerations mentioned by customer
FirstName string(20) First Name of the customer
LastName string(20) Last Name of the customer
EmailReceiptEmail bool True / False
BillingAddress string(100) Address on which the bill is generated
BillingCity string(20) Billing city of the customer
BillingStatety string(20) Billing state of the customer
BillingCountry string(20) Billing country of the customer
BillingZipCode string(20) Zip code of the billing address
ShippingFirstName string(20) First name of the customer in shipping address
ShippingLastName string(20) Last name of the customer in shipping address
ShippingAddress string(100) Address on which the bill is generated
ShippingCity string(20) shipping city of the customer
ShippingState string(20) shipping state of the customer
ShippingCountry string(20) shipping country of the customer
ShippingZipCode string(20) Zip code of the shipping address
ShippingMobileNo number(10) Mobile no. of the customer in shipping address

UserDefinedData(Object) : ??

Note: Supports upto 20 user defined object. By default pass blank value in each key.
example: "UserDefinedData": { "UserDefined1": ""}
UserDefined1 string(50)
UserDefined2 string(50)
UserDefined3 string(50)
UserDefined4 string(50)
UserDefined5 string(50)
UserDefined6 string(50)
UserDefined7 string(50)
UserDefined8 string(50)
UserDefined9 string(50)
UserDefined10 string(50)
UserDefined11 string(50)
UserDefined12 string(50)
UserDefined13 string(50)
UserDefined14 string(50)
UserDefined15 string(50)
UserDefined16 string(50)
UserDefined17 string(50)
UserDefined18 string(50)
UserDefined19 string(50)
UserDefined20 string(50)

IntegrationData(Object): ??

string(20) Application Name and Version.
Source name should be "MobileSDK" if the integration type is 11.
string(10) // 0 or null default, 1 Seamless - CardNumber should be encrypted and merchant should be enabled for seamless,
11 - Mobile integration
UserName string(20) Username of the customer
HashData string(250) Hash for request data
PlatformId string(10) Integrated Distributor ID - Platform
IPAddress string(250) IP address of the Merchant's server.
If PaymentType is UPIINTENT, IPAddress is required

OrderResponse: ??

string(30) Id generated based on the create order request from PayG and should be stored in your system for status, verification or any communication with PayG.
integer Id which is obtained on MerchantRegistration
string(20) Echo from request
decimal(18,2) Transaction Amount
string(10) Status of the order. Please refer for Order Status Codes
string(50) Order Status Text ex: created, completed-approved transaction,cancelled payment by user. Please refer Order Status Code for any programming decision
string(50) Id generated for that transaction
int Payment Status of the order. Please refer for Payment Response Codes
string(20) Unique number identifying the Approved transaction
string(50) eg: created, completed-approved transaction,cancelled payment by user
string Specified Values Transaction processed as
string(50) Payment processed account detail. Data depending on PaymentMethod. if processed as
UPI - then VPA /UPI ID,
Credit/DebitCard - then Card number first 6 and last 4 of card ,
Netbanking - then BankName,
Wallet - then Wallet Name like PayTM, PhonePe etc
url PayG payment url for customer to pay, you need to redirect to this url for payment processing.
OrderType string(20) Echo from request
OrderId string(20) Echo from request
OrderNotes string(100) Risk and Security Notes - if you see detail in this, make sure to address with business team as soon as possible
PaymentDateTime datetime Time & Date of the payment
UpdatedDateTime datetime Updated time & date of the payment
OrderPaymentCustomerData object of CustomerData if user have changed their customer data on payG payment page while transaction processing, updated data will be provided in this.

OrderStatusRequest: ??

Note: Order status can be checked once order is created.
string(30) OrderKeyId generated based on the create order request
integer MerchantKeyId obtained on Merchant registration
string(50) PaymentTransactionId generated for specific transaction provided by PayG system
string(20) Identifies the type of the payment., eg:Credit/debit/upi,etc

Validation Error Response: ??

Note: Due to any invalid input values or invalid configuration, response will be provided as validation errors
ResponseCode int
Code string Defined ErrorCode
Message string Error Description
FieldName string Name of invalid field if error due to data issue
DeveloperMessage string Message for developers to understand issue, mostly configuration issue detail will be available in this field
MoreInfoUrl string Url to learn more about this issue
RequestUniqueId string Echo from request
 Content-Type: application/json
    "Merchantkeyid":"Your MerchantKeyId - Provided by PayG",
        'PaymentReason':'OnlineOrder for OrderNo- 1234', 
        "CustomerNotes":"Mens clothing",
        "BillingAddress":"44 bhagvan nagar",
        "ShippingAddress":"44 bhagvan nagar",