---
title: "Sale"
method: POST
path: "/tsp/pg/api/v2/initiateSale"
---

# Sale

`POST /tsp/pg/api/v2/initiateSale`

API to create new order/sale

## Request body

- object
  - `merchantId` string, required — Merchant account ID, size- 12
  - `merchantTxnNo` string, required — Txn ref Number, size- 20
  - `amount` string, required — Transaction amount, size- 9 significant and 2 decimal point
  - `currencyCode` string, required — Transaction Currency, size- 3
  - `payType` string, required — Possible values are `0`, `1` Where `0` = Standard (Hosted Checkout) `1` = Direct (Merchant Checkout)
  - `customerEmailID` string, required — Email id of customer. In case Customer email ID is not available, send guest@jiopay.com, size- 48
  - `transactionType` string, required — Pass `SALE`, `PREAUTH` based on the preffered flow
  - `paymentMode` string — Payment instrument restriction list `CARD`, `NB`, `WALLET`, `UPI`, `Sodexo`. Can be used to restrict the payment options. For payType = 1, this field should indicate the exact paymentMode For AADHAAR the payType has to be 1
  - `paymentOptionCodes` string — To be used to specify providers where paymentMode is NB or WALLET
  - `returnURL` string, required — Call back url on which the response will be posted on payment success/rejection. If available in request, the same would be used for response else the preconfigured URL of the merchant would be used. In case the transaction involves OTP capture on merchant page then the return URL is not used. Size-64
  - `txnDate` string, required — Date of transaction. YYYYMMDDHHMISS
  - `cardNo` string — Card Number / token Number (in case of tokenized card). This will be Mandatory, If payType is ‘1’ and paymentMode is CARD, Size-19
  - `cardExpiry` string — Card expiration (YYYYMM). This will be Mandatory, If payType is ‘1’ and paymentMode is CARD
  - `nameOnCard` string — Name on Card. This will be Mandatory, If payType is ‘1’ and paymentMode is CARD, Size-45
  - `cvv` string — Card Verification Value. This will be Mandatory, If payType is ‘1’ and paymentMode is CARD Optional in case token number is passed in cardNo field, Size-4
  - `tokenCryptogram` string — Cryptogram / TAVV received from TRG/TR for transacting using token number, Size-128
  - `tokenRefId` string — Token ReferenceID corresponding to the token number, Size-64
  - `saveCardIndicator` string — Y / N. Y – Indicates that the customer has opted to tokenize the card. Applicable only if the cardNo passed is an actual card no (Not applicable for token card No), Size-1
  - `authOnlyIndicator` string — Y / N. Default is N. Y – The transaction is only for authentication. Save card indicator would also needs to be sent as Y for authOnly to work. This field is for supporting Rupay tokenization with Authentication (no authorization). Note: amount field is not required for authOnly transaction, Size-1
  - `tokenizeOnAuth` string — Y / N. Default is N. Y – Tokenize the card during the transaction. Auth only indicator would also need to be sent as Y for this to work.. This field is for supporting Rupay tokenization with Authentication (no authorization). Size-1
  - `panReferenceId` string — PAN reference Id of the card generated during the earlier tokenization call. "This will be used for authentication & tokenization. Either card number or panReferenceId should be present in the request. Auth Only indicator would also need to be Y for this to work." Size-64
  - `customerUPIAlias` string — If paymentMode is UPI then this field will be used to pass the payer’s UPI Alias (VPA), Size-45
  - `aggregatorID` string — Merchant Aggregator ID
  - `customerName` string — Customer Name, size-45
  - `customerMobileNo` string — Customer Mobile No, size-15
  - `invoiceNo` string — Merchant Invoice No, Size-32
  - `orderDesc` string — This variable is for future use. Short description of the purchased items, size-45
  - `addlParam1` string — Additional info 1, size-45
  - `addlParam2` string — Additional info 2, size-45
  - `addline1` string — Address line 1, size-45
  - `addline2` string — Address line 2, size-45
  - `cityname` string — City name, size-32
  - `state` string — State code, size-32
  - `zipCode` string — Pin code of the location, size-12
  - `country` string — Two digit country code, size-2
  - `txnChannel` string — 1) WEB 2) MOBILE 3) IVR 4) POS
  - `terminalID` string — Terminal ID provided by acquirer, size-8
  - `settlementProdCode` string — Size-12
  - `customerID` string — ID of customer as identified by Merchant, size-48
  - `accountNo` string — Size-16
  - `accountIFSC` string — Size-12
  - `gstIn` string — GSTIN of the merchant. Required if gst details are passed by the merchant. Size-15
  - `gst` string — The GST amount calculated by the merchant
  - `cgst` string — The CGST amount
  - `sgst` string — The SGST amount
  - `igst` string — The IGST amount
  - `cess` string — CESS amount
  - `gstIncentive` string — GST Incentive
  - `gstPercentage` string — GST Percentage used.
  - `secureHash` string, required — Check the Secure Hash logic. Size-64
  - `udfFields` object
    - `udfField1` string
    - `udfField22` string

## Response `200`

Successful response

- object
  - `responseCode` string — Response code indicating success/failure. R1000 – Request Initiated successfully Any other value indicates failure
  - `responseDescription` string — Description of failure. Ignore for success response.
  - `merchantId` string — Merchant account ID
  - `aggregatorID` string — Merchant aggregator ID
  - `merchantTxnNo` string — Merchant Txn ref Number
  - `redirectURI` string — Redirection URL. Will be available in case merchant is required to redirect to complete payment authorization. Either this field or showOTPCaptureP age field will be available in response.
  - `generateOTPURI` string — generateOTP . Will be available when showOTPCaptureP age is ’Y’
  - `verifyOTPURI` string — verifyOTPURI, Will be available when showOTPCaptureP age is ’Y’
  - `authorizeURI` string — authorizeURL, Will be available when showOTPCaptureP age is ’Y’
  - `showOTPCapturePage` string — Show OTP Page indicator, `Y` / `N`. Y – Merchant should display a page to ask for OTP. Please do contact integration team for OTP capture page requirements
  - `tranCtx` string — The transaction context generated by the PG, Needs to be sent as is to the redirectURI / authorizeURI endpoint
  - `secureHash` string — Hash value
  - `oth_charge` number — OTH charge

## Other responses

- `4XX` — Client Error

---

[API](https://skmtc.net/jiopay/apis/jiopay-pg.md) · [All operations](https://skmtc.net/jiopay/apis/jiopay-pg/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/jiopay/jiopay-pg/revisions/55aa41b8482f/schema)
