Juspay Developer Guide

Welcome to the Juspay Developer Guide. You'll find comprehensive guides and documentation to help you start working with Juspay Docs as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started

Transaction Initiation


  1. At PG level: Pre-auth should be enabled for your PG account.
  2. At Juspay dashboard: Please enable “Is Pre Authorisation Enabled?” flag on the dashboard.

With Pre-Auth enabled, this API will mark the transaction in the AUTHORIZED state. Please note that the first step is to create order at our end before initiating any transaction. For order creation API, please check here.



  • Pre-Auth is enabled only for MASTERCARD and VISA, for specific card issuers and brands, please check with Cashfree. For other card networks, the transaction will be auto-captured by Cashfree.
  • Refer Transaction Initiation API / JS implementation to initiate a transaction. Once the transaction is completed, the retun_url will have the status as AUTHORIZED, only if auth is successful on the payment instrument used. In other cases, it could be any of these except NEW.
  • Refer Order Status API, the response will have txn_uuid that needs to be persisted for further Capturing / Voiding the transaction. The transaction can be Captured or Voided, only if the status is AUTHORIZED
    "udf9": "",
    "udf8": "",
    "udf7": "",
    "udf6": "",
    "udf5": "",
    "udf4": "",
    "udf3": "",
    "udf2": "",
    "udf10": "",
    "udf1": "",
    "txn_uuid": "eul29gssNA7uowMMU7u",
    "txn_id": "87jhsjkhf93",
    "status_id": 25,
    "status": "AUTHORIZED",
    "return_url": "https://api.juspay.in",
    "refunded": false,
    "product_id": "",
    "payment_method_type": "CARD",
    "payment_method": "MASTERCARD",
    "payment_links": {
        "web": "https://api.juspay.in/merchant/pay/ord_0ef66158c07040cf866bd5c5aa48294d",
        "mobile": "https://api.juspay.in/merchant/pay/ord_0ef66158c07040cf866bd5c5aa48294d?mobile=true",
        "iframe": "https://api.juspay.in/merchant/ipay/ord_0ef66158c07040cf866bd5c5aa48294d"
    "payment_gateway_response": {
        "txn_id": "87jhsjkhf93",
        "rrn": "",
        "resp_message": "PRE_AUTH|Transaction Successful | Approved",
        "resp_code": "SUCCESS",
        "epg_txn_id": "14343145",
        "created": "2019-03-01T09:53:52Z",
        "auth_id_code": "NA"
    "order_id": "873984732",
    "merchant_id": "merchant_id",
    "id": "ord_0ef66158c07040cf866bd5c5aa48294d",
    "gateway_id": 70,
    "date_created": "2019-03-01T09:53:05Z",
    "customer_phone": "3434234234",
    "customer_id": "FUR14920977945",
    "customer_email": "[email protected]",
    "currency": "INR",
    "card": {
        "using_saved_card": true,
        "saved_to_locker": false,
        "name_on_card": "test",
        "last_four_digits": "",
        "expiry_year": "2018",
        "expiry_month": "12",
        "card_type": "DEBIT",
        "card_reference": "aa301450fe38c65cd813a8c33897942b",
        "card_issuer": "HDFC Bank",
        "card_isin": "54189",
        "card_fingerprint": "6rds4re1p3678ftk333q64gs1g",
        "card_brand": "MASTERCARD"
    "bank_error_message": "PRE_AUTH|Transaction Successful | Approved",
    "bank_error_code": "SUCCESS",
    "auth_type": "THREE_DS",
    "amount_refunded": 0,
    "amount": 10
  "status": "error",
  "error_code": "access_denied",
  "error_message": "Invalid Authentication"

Updated 10 months ago

Transaction Initiation

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.