PayG (2.0.0)

Update Order API 🔗

You can customize a current order to update the Notes field only. These notes are advantageous in documenting additional Order related information. A key-value store, the notes field can have 15 key-value pairs (maximum), each of 256 characters (maximum).

With Patch Operations, the entire notes object for the entity can be replaced.

In order to amend the notes field in a specific order, set up the API request as follows.

REQUEST BODY SCHEMA:APPLICATION/JSON

PayG object that needs to be added to the store

Merchantkeyid
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
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:<MerchantKeyId>
  
 
 
                        
'Merchantkeyid' => $this->MerchantKeyId,
'UniqueRequestId'=>PayGIntegration::generateRandomString(),
'OrderKeyId'=>$orderKeyID,
'UserDefinedData'=>array('UserDefined1' =>'' ),
''=> array(
	'UserName' => 'JoeSmith','Source'=>'','IntegrationType'=>'','HashData'=>'','PlatformId'=>'' ),
	'RequestDateTime'=>'09212020',
	'RedirectUrl' => 'https://a2zfame.com',
	'TransactionData'=> array(
		'AcceptedPaymentTypes' =>'' ,
		'PaymentType'=>'',
		'SurchargeType'=>'',
		'SurchargeValue'=>'',
		'RefTransactionId'=>'',
		'IndustrySpecificationCode'=>'',
		'PartialPaymentOption'=>''
	 ),
  
 
 
         
//basic authentication with base64encoded 
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => uatapi.payg.in/payment/api/order/Update',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS =>$arrDatajson,
  CURLOPT_HTTPHEADER => $header,
));

$response = curl_exec($curl);

curl_close($curl);
    
	 

 
                        
Python
  
 
 
                        
{
"OrderKeyId": "210619M7771U4cd49796bf",
"MerchantKeyId": 7771,
"UniqueRequestId": "4cd49796bf",
"OrderType": "PAYMENT",
"OrderAmount": 200,
"OrderId": "",
"OrderStatus": "1",
"OrderPaymentStatus": 0,
"OrderPaymentStatusText":" ",
"PaymentStatus": 1,
"PaymentTransactionId": "720314",
"PaymentResponseCode": 1,
"PaymentApprovalCode":" ",
"PaymentTransactionRefNo":" ",
"PaymentResponseText": "Approved",
"PaymentMethod": "CreditCard",
"PaymentAccount": "411111 - XXXX - 1111",
"OrderNotes": "",
"PaymentDateTime": "6/19/2021 3:02:23 PM",
"UpdatedDateTime": "6/19/2021 3:11:28 PM",
"PaymentProcessUrl":" ",
"OrderPaymentCustomerData":" ",
"UpiLink": " ",
}
  
 

Response 🔗

OrderKeyId Id generated based on the create order request
MerchantKeyId 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