Subvention Refund for Aggregators API

API Command: subvention_refund_aggregator

This API will helps in posting only subvention amount refunds. Also, transaction refunds must be initiated beforehand to get these refunds processed. Subvention Refund of the given transaction will not be allowed otherwise.

📘

Note:

Subvention Refunds will only be processed if it is activated on the respective merchant by PayU.

HTTP Method: POST

Environment

Request parameters

ParameterDescriptionExample
key
mandatory
string This parameter must contain the merchant key provided by PayU.Your Test Key
command

mandatory
string command to be used to invoke subvention API for aggregator merchantssubvention_refund_aggregator
hash 

mandatory
string sha512(key|command|var1|salt)
sha512 is the encryption method used here.
command
var1 

mandatory
string Parent Payuid8768769869678678
var2

mandatory
string unique alphanumeric token to distinguish refundPLYH68898398TGHKL
var3 

mandatory
string(json) This parameter contains the refund mode and beneficiary details in the following format:

{"subvention_mode":3, "beneficiary_full_name":" Nucleus"," beneficiary_account_no":" 50100002965304"," beneficiary_ifsc”:"HDFC0001626"}

Where:
- Payout to Account Number : "subvention_m ode":3
- Payout to Internal Cards : "subvention_mode":1
 
var4
mandatory
string(json) This parameters contains the refunds split for each child payuid in the following format:


{"5****8":{"subventionAmount":5," originalRefundAmount":1},"73gAMf":{"subventionAmount":5," originalRefundAmount”:3}}

Where:
originalRefundAmount is the value of the refund that has been fired prior to calling this API.
subventionAmount is the amount to be deducted from the subvented amount.
 

The valid values for subvention_mode are listed in the following table:

Refund modeValueDescription
Source1Refunds with Normal or to card
UPI2Refunds with UPI method
IMPS3Refunds with IMPS method
NEFT4Refunds with NEFT method

Sample request

curl --request POST \
     --url 'https://info.payu.in/merchant/postservice.php?form=2' \
     --header 'content-type: application/x-www-form-urlencoded' \
     --data 'var3={"subvention_mode":3, "beneficiary_full_name":" Nucleus"," beneficiary_account_no":" 50100002965304","beneficiary_ifsc”:"HDFC0001626"}' \
     --data 'var4={"5***8":{"subventionAmount":5," originalRefundAmount":1},"7****f":{"subventionAmount":5," originalRefundAmount”:3}}' \
     --data key=5***8 \
     --data command=subvention_refund_aggregator \
     --data var1=403993715525150780 \
     --data var2=test567

Response parameters

ParameterDescription
request_idThe unique reference number of the refund request is returned in this parameter.
subvention-refund_statusThe status of Subvention refund is returned with any of the following:
- 1: Returns this values if request has been accepted
- 0: Returns this value if the request is not successful
mihpayidThe transaction reference number provided by PayU.
msgThe message statement is returned in this parameter.
txn statusThe current status of the transaction for the given token is returned in this parameter.
amountThe amount of the transaction for the given token is returned in this parameter.

Sample responses

  • When original transaction refunds are not initiated
{"5XAPG8":{"subvention_refund_status":0,"msg":"Please initiate or get
processed the original refund of this
transaction."},"73gAMf":{"subvention_refund_status":0,"msg":"Please
initiate or get processed the original refund of
this transaction."},"mihpayid":"999000000001122"}
  • When an invalid subvention amount is refunded
{"5XAPG8":{"subvention_refund_status":0,"msg":" Subvention Amount is
invalid"},"73gAMf":{"subvention_refund_status":0,"msg":" Subvention
Amount is invalid"},"mihpayid":"999000000001122"}
  • Response for successful queued subvention refund
{"5XAPG8":{"subvention_refund_status":1,"msg":"Subvention refund will be
processed.","request_id":"698"},"73gAMf":{"subvention_refund_status":1,"
msg":"Subvention refund will be
processed.","request_id":"699"},"mihpayid":"999000000001122"}
  • When an invalid subvention mode is requested:
{"5XAPG8":{"subvention_refund_status":0,"msg":"Invalid Subvention Mode
Received"},"73gAMf":{"subvention_refund_status":0,"msg":"Invalid
Subvention Mode
Received"},"mihpayid":"999000000001122"}
  • When proper beneficiary details are not passed:
{"5XAPG8":{"subvention_refund_status":0,"msg":"Beneficiary details
missing required for Subvention
Refund."},"73gAMf":{"subvention_refund_status":0,"msg":"Beneficiary
details missing required for Subvention
Refund."},"mihpayid":"999000000001122"}