Hey! These docs are for version 3.2, which is no longer officially supported. Click here for the latest version, 1.0!

Create Refund for Split Settled Transactions

Request Parameter Details     (click to open table)
- includes metadata object for Split Settlement Details
unique_request_id*StringRequest ID that uniquely identifies this request. You cannot reuse the value for two different refund requests. This is to avoid processing duplicate refund requests.
amount*StringAmount that has to be refunded. Amount has to be less than or equal to the amount of the order that is not yet refunded.
split_settlement_details= {...}
This field describes the amounts to be refunded from the parent merchant settlement account and respective sub account IDs.
Parameters for the metadata.split_settlement_details object:
Marketplace (Parent merchant account ID) specific data to be passed
Vendor (Sub account IDs) specific data to be passed
Parameters for the marketplace object:
refund_amount*DoubleRefund amount to be reversed from the parent merchant settlement account
Parameters for the vendor object:
split: [{...},{...}...]
*Array of
Split settlement refund information to be passed
Parameters for each split object in array:
sub_mid*StringSub Account ID (maintained at JusPay’s end) to be passed.
refund_amount*DoubleRefund Amount to be reversed from the sub account
* = Required
* = Conditional
The response for this API is an Order Object, which includes the  refunds and  split_settlement_response objects. Other objects contained in the Order Object are listed on top:     (click to open tables)
     {param1, param2, ....}
Provides merchant with details (amounts, sub account IDs) from the split settlement order request
  Split Settlement Response Object Parameters:
split_appliedBooleanSet to 'true' if split settlement was successfully applied
split_details: [{...},{...}...]
Array of
Amount settled in the respective sub-account IDs
Parameters for each split_details object in array:
sub_vendor_idStringSub Account ID (maintained at JusPay’s end).
amountDoubleAmount to be settled in the sub account
refunded_amountDoubleRefund Amount to be reversed from the sub account  (new parameter)
    {web, mobile, iframe}
Contains 3 strings that link to a Desktop optimized, Mobile optimized as well as iFrame checkout screen for the given order
  Payment Links Object Parameters:
webStringLink to checkout page that is optimized for Desktop for the given order.
mobileStringLink to Mobile optimized checkout page for the given order.
iframeStringLink to iFrame checkout screen. This is typically embedded inside of your own page.
Payment Links
These links can directly be emailed or messaged to your customers. They will be redirected using a link to enter payment information. If you wish to use your own branding, then you can embed the iframe link into your page. Note that, these links are not valid perpetually. As soon as your order expires (this can be changed via our dashboard), the link will cease to work.
     {param1, param2, ....}
Object containing payment gateway response details
  Payment Gateway Response Object Parameters:
txn_idStringTransaction ID"11327833"
rrnStringAuthorization Retrieval Reference Number"502913366745"
resp_messageStringResult of API action"Payment Successful"
resp_codeStringNumeric code of response message"0"
epg_txn_idStringElectronic Payment Gateway transaction ID"1532690566017"
createdStringDate time (ISO representation) when order was created"2020-04-28T06:31:37Z"
auth_id_codeStringAuthorization ID Code"475926"

      {param1, param2, ....}
Object containing credit/debit card details
  Card Object Parameters:
using_saved_cardbooleanTrue if using a saved card
saved_to_lockerbooleanTrue if card has been saved to locker
last_four_digitsStringLast four digits of card number
name_on_cardStringCard holder name. Should contain alphabetical characters only.
expiry_yearStringExpiry year of the card (Format: "yyyy")
expiry_monthStringExpiry month of the card (Format: "mm")
card_typeString"CREDIT" or "DEBIT"
card_referenceStringUnique identifier for the card
card_issuerStringCode for bank that issued the card
(Example: "HDFC Bank")
card_isinStringInternational Securities Identification Number for card    (Example: "545721")
card_brandStringBrand of card ("MASTERCARD", "VISA", etc.)

Refunds: [{...},{...},..]
An array of Refund Objects with details of each refund (returned only if the refunded parameter is set to "true".
  Parameters for each object in the Refunds array:
unique_request_idStringThe unique request ID that is passed during refund initiation. Do not pass any special characters.
statusStringThe status of the refund initiated. Initial status will always be PENDING
  Status codes and meaning
     This means that the refund has been successfully
     This would mean that the refund has been queued
     withJusPay or with the downstream system.
     We were unable to process the refund successfully.
     You have to try again with a new unique_request_id.
     This would mean that the refund request was sent an
     ambigious response from the payment gateway and
     the merchant has to manually reconcile it with the
     payment gateway to get the proper response.
     Also, any refunds which are in pending for more
      than 10 days are sent for manual review.
sent_to_gatewayBooleanThe flag denotes if the refund was initiated to gateway. The initial status is always false, as refunds are queued at Juspay for a maximum of 15 minutes.
refund_typeStringThe type of refund. Values can be STANDARD or INSTANT
refund_sourceStringThe name of gateway
refStringThe refund ID provided by the PG
initiated_byStringThe source of initiation
idStringThe reference ID provided by PG, if not available then its mapped to the unique request ID.
error_messageStringThe error message provided by the PG
error_codeStringThe error code provided by the PG
amountIntegerThe refund amount passed in the request
The timestamp when refund was created

merchant_idStringUnique identifier for the merchant.
order_idStringUnique Identifier for the order. It is suggested to keep the order id length at a maximum of 21 characters irrespective of payment methods and gateways.
idStringUnique ID generated by Juspay for the given order.
customer_idStringString that uniquely identifies the customer. Generated by Juspay when you created customer object.
customer_emailStringEmail address of the customer. Must be present if backend gateway requires it.
customer_phoneStringMobile number or fixed line number of the customer. Must be present if backend gateway requires it.
product_idStringAn identifier for the product on the Lender side for which the payment is being done. This field is just echoed back in the response so that Lender can differentiate on their side. Fits well for impulse purchase usecases.
statusStringStatus of the order. If you receive “NEW”, then the order has been successfully created (see Status Mapping table below).
status_idIntegerStatus ID is a numeric id corresponding to the status value (see Status Mapping table below).
amountdoubleThis is the amount that a customer will be charged in this transaction. Will accept double values with up to two decimal places. For example, 100.15 is valid input but 100.1532 is not valid.
currencyStringISO string of the currency. Use INR for Indian Rupee. Among other accepted values are EUR, USD, GBP.
refundedBooleanTrue if the order has been completely refunded. Will be false for partial refunds or if the order doesn’t have any refunds.
amount_refundedDoubleTotal amount refunded from the parent merchant settlement account
(new parameter)
date_createdStringDate-time of mandate or order creation
return_urlStringA fully qualified URL such as http://shop.merchant.com/ to which the customer will be redirected after payment completion. This URL shouldn’t contain any query parameters. This URL takes higher precedence over the common return URL configured in your account. settings.
udf1Stringudf1 to udf10 - User defined field which will be echoed back in the response from Juspay with a Max character limit of 255.
txn_idStringTransaction ID
txn_uuidStringTransaction UUID
gateway_idIntegerUnique numeric identifier for your preferred gateway. (Refer to "Gateway Mapping" table.)
gateway_reference_idStringAlphabetic reference to the payment gateway used
bank_error_codeStringBank Error Code
bank_error_messageStringBank Error Message
payment_method_typeStringMust be either CARD, NB, WALLET, or UPI. Entered when creating the order or mandate
payment_methodStringEntered when creating the order or mandate. Found in the given tables for the corresponding API and transaction type.
auth_typeStringType of authentication used
  Status Mapping - Order status codes and meaning     (click to open table)
Order StatusIDMeaning
CREATED1Returned when order is successfully created.
NEW10Newly created order.
PENDING_VBV23Authentication is in progress. The customer has to approve the mandate through the PSP App of their choice.
CHARGED21Successful transaction. The subscription cost of the period has been charged.
AUTHENTICATION_FAILED26User did not complete authentication.
AUTHORIZATION_FAILED27User completed authentication, but the bank refused the transaction.
JUSPAY_DECLINED22User input is not accepted by the underlying PG.
AUTHORIZING28Transaction status is pending from bank.
Click Try It! to start a request and see the response here!