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.

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

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-4 below.

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

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:

PaymentsAPIFlow

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

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.

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.

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/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.

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



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, 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
A list (array) of Payment Methods is returned, along with optional lists (arrays)
for payment methods that support a given type.   (click to view)
payment_methods: [...,

payment_methods.
        emandate_payment_methods: [...]

payment_methods.
        wallet_direct_debit_support: [...]

payment_methods.
        supported_reference_ids: [...]
                ]
tpv_payment_methods: [...]
  Note:
TPV Payment Methods array should be grouped with the other three arrays for payment methods that support a given type.
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.
descriptionStringBank associated with payment method (or card type)