PayG (2.0.0)

Create Order ??

Create new order inventory.

REQUEST BODY SCHEMA:APPLICATION/JSON

PayG object that needs to be added to the store

Merchantkeyid
required
Id which is obtained on MerchantRegistration
MID
required
Id which is obtained on MerchantRegistration
UniqueRequestId
required
Unique Id generated for that particular Request
OrderAmount
required
Transaction Amount
OrderType
OrderId
OrderStatus Status of the order
If OrderAmountData is provided then the total OrderAmountData should be equal to OrderAmount
AmountTypeDesc

description of the order amount

Amount

Order Amount

ProductData
PaymentReason

Reason for this payment

ServiceType

Type of the service

ProductName

Name of the product

NextStepFlowData
TransactionData
AcceptedPaymentTypes

ALL -by default

PaymentType

Type of the payment

SurchargeType

Amount/Percentage

SurchargeValue

amount / percentage charged as surcharge

RefTransactionId

A reference generated to identify a transaction

IndustrySpecificationCode
PartialPaymentOption

True/false

RedirectUrl string RedirectUrl For CallBack Url
CustomerData this PayG belongs to
CustomerId

Id of the customer

CustomerNotes

Any considerations mentioned by customer

FirstName

First Name of the customer

LastName

Last Name of the customer

MobileNo

COntact number of the customer

Email

Email id of the customer

EmailReceipt

True/false

BillingAddress

Address on which the bill is generated

BillingCity

Billing city of the customer

BillingState

Billing state of the customer

BillingCountry

Billing country of the customer

BillingZipCode

Zip code of the billing address

ShippingFirstName
ShippingLastName
ShippingAddress

Address on which the bill is generated

ShippingCity

shipping city of the customer

ShippingState

shipping state of the customer

ShippingCountry

shipping country of the customer

ShippingZipCode

Zip code of the shipping address

ShippingMobileNo
UserDefinedData this PayG belongs to
UserDefined1
UserDefined2
UserDefined3
UserDefined4
UserDefined5
UserDefined6
UserDefined7
UserDefined8
UserDefined9
UserDefined10
IntegrationData this PayG belongs to
UserName
required

Username of the customer

Source
required

Application Name and Version

IntegrationType

// 0 default, 1 Seamless - CardNumber should be encrypted

HashData

Hash for request data

PlatformId

Integrated Distributor ID - Platform

ShipmentData
RequestDateTime MMDDYYYY

API request parameters ??

 
                        
PayGAuthentication �
<MerchantAuthenticationKey>:<MerchantAuthenticationToken>:M:<MID>
  
 
 
                        
{
    "MID": "54AC000B0C78853",
    "UniqueRequestId": "f3f5b5c",
    "UserDefinedData": {
      "UserDefined1": ""
    },
    "RequestDateTime": "06232021",
    "RedirectUrl": "https://payg.in",
    "TransactionData": {
      "AcceptedPaymentTypes": "",
      "PaymentType": "",
      "SurchargeType": "",
      "SurchargeValue": "",
      "RefTransactionId": "",
      "IndustrySpecificationCode": "",
      "PartialPaymentOption": ""
    },
    "OrderAmount": "100",
    "OrderType": "",
    "OrderAmountData": {
      "AmountTypeDesc": "3",
      "Amount": "2"
    },
    "CustomerData": {
      "CustomerId": "152433",
      "CustomerNotes": "amway product",
      "FirstName": "ravi",
      "LastName": "sharma",
      "MobileNo": "7337327109",
      "Email": "test@gmail.com",
      "EmailReceipt": "true",
      "BillingAddress": "44 bhagvan nagar",
      "BillingCity": "orissa",
      "BillingState": "orissa",
      "BillingCountry": "India",
      "BillingZipCode": "30202020",
      "ShippingFirstName": "ravi",
      "ShippingLastName": "sharma",
      "ShippingAddress": "44 bhagvan nagar",
      "ShippingCity": "orissa",
      "ShippingState": "orissa",
      "ShippingCountry": "India",
      "ShippingZipCode": "30202020",
      "ShippingMobileNo": "08619083450"
    },
    "IntegrationData": {
      "UserName": "ravi",
      "Source": "3213",
      "IntegrationType": "",
      "HashData": "",
      "PlatformId": "1"
    }
}  
 
 
         
 //basic authentication with base64encoded 
$ch = \curl_init();
// set payment order url;
curl_setopt($ch, CURLOPT_URL, uatapi.payg.in/payment/api/order/create');
 // set authentication header;
 curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, $this->timeout);
 curl_setopt($ch, CURLOPT_POST, 1);  
 // set form data set 
curl_setopt($ch, CURLOPT_POSTFIELDS, $arrDatajson); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$PayGresponseArr = json_decode($contents); 
if(curl_errno($ch)){
throw new Exception(curl_error($ch));
}
return  $PayGresponseArr;
curl_close($ch);  




 
                        
Python
  
 
 
      
{
    "OrderKeyId": "210927M8340Uf3f5b5c",
    "MerchantKeyId": 8340,
    "UniqueRequestId": "f3f5b5c",
    "OrderType": "PAYMENT",
    "OrderAmount": 100.0,
    "OrderId": null,
    "OrderStatus": null,
    "OrderPaymentStatus": 0,
    "OrderPaymentStatusText": null,
    "PaymentStatus": 0,
    "PaymentTransactionId": null,
    "PaymentResponseCode": 0,
    "PaymentApprovalCode": null,
    "PaymentTransactionRefNo": null,
    "PaymentResponseText": null,
    "PaymentMethod": null,
    "PaymentAccount": null,
    "OrderNotes": null,
    "PaymentDateTime": null,
    "UpdatedDateTime": null,
    "PaymentProcessUrl": "https://uat.payg.in/payment/payment?orderid=210927M8340Uf3f5b5c",
    "OrderPaymentCustomerData": {
        "FirstName": "ravi",
        "LastName": null,
        "Address": null,
        "City": null,
        "State": null,
        "ZipCode": null,
        "Country": null,
        "MobileNo": "7337327109",
        "Email": "test@gmail.com",
        "UserId": null,
        "IpAddress": null
    }
    
}
  
 

Response ??

OrderKeyId Id generated based on the create order request
MerchantKeyId Id which is obtained on MerchantRegistration
MID Id which is obtained on MerchantRegistration
UniqueRequestId Unique Id generated for that particular Request
OrderType
OrderAmount Transaction Amount
OrderId
OrderStatus Status of the order., eg:- 0,1,2,3,4,5,6,7
OrderPaymentStatus
OrderPaymentStatusText created, completed-approved transaction,cancelled payment by user
PaymentStatus Status of the order., eg:- 0,1,2,3,4,5,6,7
PaymentTransactionId Id generated for that transaction
PaymentResponseCode Status of the order., eg:- 0,1,2,3,4,5,6,7
PaymentApprovalCode Unique number identifying the Approved transaction
PaymentResponseText eg:- created, completed-approved transaction,cancelled payment by user
PaymentMethod Identifies the type of the payment., eg:- Credit/debit/upi,etc
PaymentAccount payment details
OrderNotes
PaymentDateTime
UpdatedDateTime
PaymentProcessUrl This url redirects to the payment page with order details
OrderPaymentCustomerData
UpiLink