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

Overview of the Payments APIs

Covers each of the payment method types (CARD, NB, WALLET, or UPI) with eight Transaction APIs.

The Payment Methods API returns a list of payment methods (with details) available for your account. Optional Query parameters can be sent to get a filtered list of payment methods that support Emandates, Wallet Direct Debits, Third-Party Validation, and Gateway Reference IDs.

Other Payments APIs are the Verify VPA API (checks VPA for the UPI Collect API), and the EMI Plans V2 API (returns EMI plan details for Card, Debit, and Cardless EMIs).

Transaction APIs

All eight of the Transaction APIs below use the same request URL format:

    POST      https://api.juspay.in/txns

There are no URL embedded Path or Query parameters for these APIs.

Payment Method Details (Table 1) are sent with each of the Transaction APIs, plus other API specific parameters as described in Parameter Reference Tables 2-3.

The response for each of the Transaction APIs is a Payment Status Object as described in Parameter Reference Table 4.

Once a response is received, use the “method” attribute to determine how the customer should be redirected, as explained here.

Basic flow diagram for a Transaction API:

PaymentsAPIFlowPaymentsAPIFlow

Credit / Debit Card transaction - Initiates a credit/debit card payment for an order using either the given card parameters or a token for a stored card.

User has the option of performing an EMI transaction on the given card. If using this option, EMI bank and tenure are must be enabled and supported by your gateway account.

Required:   Payment Method Details,  Card Details         Optional:   EMI Parameters
Returns:   Payment Status Object

Card Encryption - Create a payment transaction for Credit or Debit card with encryped details (card number, expiry month, expiry year, CVV). These details are encrypted using the asymmetric cryptographic algorithm. The encrypted details are prepended with "enc-", and passed to Juspay in the transaction call

Required:   Payment Method Details,  Card Details (encrypted),  card_encoding_version
Returns:   Payment Status Objecttxn_uuid,  and  offer_details: {...} (Obect)

NetBanking Payment - Create a payment transaction for NetBanking. The payment_method attribute must be one from the given table below. You will need to redirect the customer depending on the “method” attribute in the response (see the "Handling the Redirection Method" section below).

Required:   Payment Method Details         Returns:   Payment Status Object

Wallet Payment - Create a payment transaction for paying from a prepaid Wallet. The payment_method attribute must be one from the given table below. You will need to redirect the customer depending on the “method” attribute in the response (see the "Handling the Redirection Method" section below).

Required:   Payment Method Details         Returns:   Payment Status Object

Wallet Direct Debit - Directly debit the amount from a Wallet that is linked to a Customer’s account. If the status in the response is CHARGED, then the payment is immediately successful. If the status in the response is PENDING, then the user wallet doesn’t have sufficient balance for the payment and the topup URL is returned in the response.

NOTE: This is an authenticated call unlike other transaction APIs. This API must be invoked from your server directly. DO NOT send the API Key to client.

Required:   Payment Method Details,   direct_wallet_token    (see List Wallets API)
Returns:   Payment Status Object

ATM Seamless PIN Payment - Create a payment transaction for Credit or Debit card with ATM PIN authentication. In seamless mode, card details will be captured at the merchant’s end. ATM PIN payments are currently limited to only a set of cards. Use /cardbins/:card_bin API to check for a card’s eligibility.
Note: This API is obsolete.

Required:   Payment Method Details,  Card Details,   auth_type = ATMPIN
Returns:   Payment Status Object

ATM Redirection Payment - Create a payment transaction for Credit or Debit card with ATM PIN authentication. In redirection mode, user will be taken to the configured aggregator’s page where the card details will be captured. This is currently supported only through Billdesk.
Note: This API is obsolete.

Required:   Payment Method Details,   auth_type = ATMPIN
Returns:   Payment Status Object

UPI Collect Payment - Create a collect transaction for given VPA. In a UPI collect transaction, payment collect request is sent to the UPI app.

Required:   Payment Method Details,   upi_vpa,  txn_type = UPI_COLLECT
Returns:   Payment Status Object

UPI Intent Payment - Create a UPI payment transaction. In UPI Pay transactions, the response of the /txns call can optionally have SDK parameters for generating the intent URI/ QR code, etc. Merchants can then use these parameters appropriately.

Required:   Payment Method Details,   txn_type = UPI_PAY, and sdk_params ('true' to return SDK parameters)
Returns:   Payment Status Objecttxn_uuid, and  payment.sdk_params: {...}  (Obect)

UPI/Bharat Pay Payment - Create a UPI payment transaction. In UPI Pay transactions, the QR code will be generated and shared in the response. Users can scan the QR from their UPI app and complete the payment.
Note: This API is obsolete.

Required:   Payment Method Details,   txn_type = UPI_PAY or BHARAT_PAY
Returns:   Payment Status Object,   which includes  payment.qrcode: {format, size, data}

Consumer Finance Payment - Create a transaction for paying from a consumer finance application. User may select one from three payment methods: EPAYLATER, SEZZLE, or SHOPSE.

Required:   Payment Method Details
Returns:   Payment Status Objecttxn_uuid



Non-Transaction APIs

UPI Collect (Verify VPA) - Checks the validity of the Virtual Payment Address (VPA) of a customer. In the case of UPI Collect, VPA is a mandatory parameter, and merchants are always advised to check if the VPA is valid or not.

Required:   vpa and  merchant_id
Returns:   vpa, status ("VALID" or "INVALID"), and  customer_name
    POST    https://api.juspay.in/upi/verify-vpa1

EMI Plans V2 - Merchants may send this to get a consolidated list of the EMIs enabled on the merchant MIDs across gateways. The response would cover:

  • Card EMIs (Standard, No Cost & Low Cost)
  • Debit EMIs (Standard, No Cost & Low Cost)
  • Cardless EMIs (Standard, No Cost & Low Cost)

For each coverage, the response shows the monthly EMI amount and the interest levied to the end customers on the merchant checkout page.

Required:   Order Data object and an order_basket array.
Returns:  (See detailed response parameters at the: EMI Plans V2 page.)
    GET     https://api.juspay.in/v2/emi/plans
Order Data object     (click to open table)
ParameterTypeDescription
order_amount*IntegerTotal order amount. Conditional (either order_id or amount are required).
order_id*StringJusPay Order ID. Conditional (either order_id or amount are required).
merchant_id*StringThe username of the account you hold at Juspay
customer_idStringJusPay Customer identifier
mobile_numberStringCustomer Mobile number for eligibility check
  * = Required
  * = Conditionally required.
Order Basket array     (click to open table)
Each object in array contains these parameters:
FieldTypeDescription
idStringProduct ID
descriptionStringDescription of Product
quantityDoubleTotal Product Amount
unitPriceDoubleCost of one Product
categoryStringType of Product
skuStringSKU Number of Product
productURLStringURL where Product can be found
sellerTypeStringType of Seller
"customParams":
{"name1":"value1","name2":"value2"}
ObjectDescriptive Attributes of Product
  * = Required

Payment Methods API - Gives a list (with details) of all the payment methods available
for your account. Optional Query parameters can be used to list payment methods that support Emandates, Wallet Direct Debits, Gateway Reference IDs, Outages, and Third-Party Validation (TPV).

Required:  merchant_id
Optional:   Query parameters -- see table below
Returns:    Payment Methods array -- see table below
(includes optional arrays for payment methods that support a given type)
    GET     https://api.juspay.in/merchants/:merchant_id/paymentmethods
Field - Type Description
merchant_id * String URL Embedded (Path) Parameter
ID of the merchant_account that you hold with us.
* = Required
There are no Request (Form) parameters for this API.
Optional URL embedded Query parameters can be sent to get a list of payment methods that support the given type.     (click to open table)
options.add_emandate_payment_methodsBoolean
options.check_wallet_direct_debit_supportBoolean
options.add_supported_reference_idsBoolean
options.add_tpv_payment_methodsBoolean
options.add_outageBoolean
A list (array) of Payment Methods is returned, along with optional lists (arrays) for payment methods that support a given type, as selected by the Query Parameters.       (click to view)
If a Query option is selected for listing payment methods with supported Gateway Reference IDs or Direct Wallet Debit support, the result is shown in the payment_methods array, as marked by the extra parameters below.

If a Query option is selected for listing payment methods that support Emandates, Outages, or Third-Party Validation (TPV), the result is listed in a separate array, as shown below.
{

payment_methods: [...],

    Optionally includes extra parameters for payment methods with
    Supported Gateway Reference IDs and payment methods that
    support Direct Wallet Debit (see table below for parameters).

emandate_payment_methods: [...],

outages: [...],

tpv_payment_methods: [...]

}
Each element in a payment_methods array is a Payment Method Object. Same object is used in arrays listing payment methods that support a given type.
FieldTypeDescription
payment_method_typeStringMust be either CARD, NB, WALLET. Or UPI
payment_methodStringThe actual payment method that was selected by the user. This must be one from the tables for payment method of the corresponding Payments API listed above. For cards, use one of VISA/MASTERCARD/MAESTRO/AMEX/RUPAY. This is usually inferred from the card number itself and we will take care of this if you are unable to provide this from your end.
descriptionStringBank associated with payment method (or card type)
These extra parameters are returned with the Payment Method Object when listing payment methods of certain types:
FieldTypeDescription
wallet_direct_debit_supportwwBooleanOptionally included in the "payment_methods" list. Returns 'true' or 'false' only when "payment_method_type" = "WALLET"
supported_reference_ids: [....]Array of
Strings
Optionally included in the "payment_methods" list. Only used for payment methods with supported gateway reference IDs
statusStringOnly used when listing the payment methods with outages. Examples: "DOWN", "FLUCTUATE"
juspay_bank_codeStringOnly used when listing the payment methods with outages. By using juspay_bank_code as a look-up, a merchant can determine whether a payment method has outage or not.