Skip to main content
  • Automatically detect when a customer selects UPI as the payment method.
  • Display fee breakdown transparently before payment, showing the convenience fee separately from the order amount.
  • Process payment seamlessly after customer confirmation.
Feature Enablement
This is an on-demand feature. Contact your account manager or raise a request with our Support team to get this feature enabled.

Prerequisites

  • This feature is available on the Axis Switch gateway only.
  • Integrate with Server-to-Server (S2S) integration:
  • This feature is not available on UPI Collect method (NPCI restriction).
  • Certain business categories are restricted as per NPCI guidelines. The following MCC codes cannot accept credit card payments on UPI:

Restricted MCC codes

MCC Code | Category

6012 | Lending, NBFC, Cooperatives, Pension Fund

4829 | Wire Transfers and Money Orders

7322 | Debt Collection Agencies

6010 | Forex

6011 | ATMs

6051 | Cryptocurrency

6211 | Mutual Fund, Securities, Commodities, Trading

7800 | Lottery

7802 | Horse or Dog Racing

7995 | Lottery and Betting

Integration Steps

Follow the integration steps given below:

Step 1: Create an Order

Order is an important step in the payment process.
  • An order should be created for every payment.
  • You can create an order using the Orders API. It is a server-side API call. Know how to authenticate Orders API.
  • The order_id received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered.
Watch Out!Payments made without an order_id cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing.You can create an order:
  • Using the sample code on the Razorpay Postman Public Workspace.
  • By manually integrating the API sample codes on your server.

Razorpay Postman Public Workspace

You can use the Postman workspace below to create an order:
Handy Tips
Under the Authorization section in Postman, select Basic Auth and add the Key Id and secret as the Username and Password, respectively.

API Sample Code

Use this endpoint to create an order using the Orders API./orders
Curl
Success Response

Request Parameters

amount mandatory : integer Payment amount in the smallest currency subunit. For example, if the amount to be charged is 299, then pass 29900 in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295.
Watch Out!As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as 99990 and not 99991.currency mandatory : string The currency in which the transaction should be made. See the list of supported currencies. Length must be 3 characters.
Handy Tips
Razorpay has added support for zero decimal currencies, such as JPY and three decimal currencies, such as KWD, BHD and OMR, allowing businesses to accept international payments in these currencies. Know more about Currency Conversion (May 2024).receipt optional : string Your receipt id for this order should be passed here. Maximum length is 40 characters.notes optional : json object Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”.partial_payment optional : boolean Indicates whether the customer can make a partial payment. Possible values:
  • true: The customer can make partial payments.
  • false (default): The customer cannot make partial payments.
first_payment_min_amount optional : integer Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of 7000 is to be received from the customer in two installments of #1 - 5000, #2 - 2000 then you can set this value as 500000. This parameter should be passed only if partial_payment is true.Know more about Orders API.

Response Parameters

Descriptions for the response parameters are present in the Orders Entity parameters table.

Error Response Parameters

The error response parameters are available in the API Reference Guide.

Step 2: Calculate Fees Using Calculate Fee API

Use this API to get the fee breakdown before displaying it to customers: /payments/calculate/fees
Request
Request

Request Parameters

amount mandatory : integer The transaction amount, expressed in the currency subunit, such as paise (in case of INR). For example, for an actual amount of ₹299.35, the value of this field should be 29935. currency mandatory : string The currency in which the transaction should be made. Length must be of 3 characters. method mandatory : string Payment method used to make the payment. In this case, it is upi. contact mandatory : string Customer’s phone number. email mandatory : string Customer’s email address. description optional : string A brief description of the payment. payer_account_type mandatory : string (CFB Credit Card on UPI only) Indicates the type of account from which the payment is made. Pass credit_card to calculate fees for credit card payments made via UPI. upi mandatory : object Additional fields to accept UPI payments. flow mandatory : string The UPI flow for the payment. In this case, it is intent.

Response Parameters

input : object Contains the processed input parameters along with calculated fees. amount : integer Total amount including fees in the smallest currency unit. For example, 101 for ₹1.01. currency : string The currency in which the transaction is made. Length must be of 3 characters. method : string Payment method used to make the payment. In this case, it is upi. fee : integer Total fee amount in the smallest currency unit. For example, 1 for ₹0.01 fee on regular UPI or 236 for ₹2.36 fee on credit card on UPI. tax : integer Tax amount on the fees in the smallest currency unit. For example, 0 for regular UPI or 36 for ₹0.36 tax on credit card on UPI. payer_account_type : string (CFB Credit Card on UPI only) Account type used for payment. Returns credit_card when present in request. upi : object UPI payment details. flow : string The UPI flow type. In this case, it is intent. type : string UPI type. In this case, it is default. display : object Contains fee breakdown for display purposes in rupees. originalAmount : integer Original order amount in rupees. For example, 1 for ₹1. original_amount : integer Original order amount in rupees (alternative field). For example, 1 for ₹1. fees : decimal Total fees amount in rupees. For example, 0.01 for regular UPI or 2.36 for credit card on UPI. razorpay_fee : decimal Razorpay processing fee in rupees. For example, 0.01 for regular UPI or 2.00 for credit card on UPI. tax : decimal Tax amount on fees in rupees. For example, 0 for regular UPI or 0.36 for credit card on UPI. amount : decimal Total amount including fees in rupees. For example, 1.01 for regular UPI or 3.36 for credit card on UPI. currency : string The currency in which the transaction is made. Length must be of 3 characters.

Step 3: Display Fee Breakdown to Customer

Use the Calculate Fee API response to show customers:
  • Original order amount
  • Processing fee (convenience fee)
  • Total amount to be charged
The fee breakdown must be displayed transparently before the customer confirms payment.

Step 4: Process Payment

Create the payment using the standard payment creation endpoint. The implementation varies based on your CFB configuration:
  • Full CFB (Charge customer fee on all UPI payments)
    • Pass amount including UPI base fees.
    • Pass fee parameter with the fee amount.
  • Partial CFB (Charge fees only for Credit Card on UPI)
    • Pass original amount as is.
    • Pass fee parameter with the fee amount.
Below is the sample code for partial CFB (credit card on UPI only): /payments/create/json
Request

Request Parameters

amount mandatory : integer Amount to be paid by the customer in the smallest currency unit. For Full CFB, include the UPI base fees in this amount. For Partial CFB, pass the original order amount. For example, for an actual amount of ₹1, pass 100. currency mandatory : string The 3-letter ISO currency code for the payment. Length must be of 3 characters. contact mandatory : string Customer’s phone number. email mandatory : string Customer’s email address. description optional : string A brief description of the payment. method mandatory : string Payment method used to make the payment. In this case, it is upi. fee mandatory : integer (CFB feature only) The fee amount obtained from the calculate fee API response in the smallest currency unit. For example, 1 for ₹0.01 fee on regular UPI or 236 for ₹2.36 fee on credit card on UPI. order_id mandatory : string Unique identifier of the order created using the Orders API. upi mandatory : object Additional fields to accept UPI payments. flow mandatory : string The UPI flow for the payment. In this case, it is intent. notes optional : json object A key-value pair that can hold additional information about the payment. Maximum 15 key-value pairs, 256 characters (maximum) each.

Response Parameters

razorpay_payment_id : string Unique identifier for the payment. For example, pay_RU1AJqAF1WXXXX. link : string UPI deep link for payment processing. For CFB transactions, the link contains the payment amount and fee breakdown with split=CCONFEE: parameter.

Webhook Response

Once the payment is successfully processed, you will receive a payment captured webhook with the following structure:
Payload

Settlements

You will receive the payments in your bank account as per the settlement cycle agreed upon at the time of Razorpay account setup. The settlement breakdown includes:
  • Order Amount: Original transaction amount.
  • Debit: Total amount debited from customer.
  • Fees: Processing fees.
  • Tax: Applicable taxes.
  • CFB: When enabled, Order amount + fees = debit amount.
Refer to the Settlement APIs.

Frequently Asked Questions (FAQs)

1. How much convenience fee will customers pay?

The convenience fee varies based on the payment method selected. Use the Calculate Fee API to get the exact fee amount, which customers will see in the checkout fee breakdown before confirming their payment.

2. Can I control which customers see this fee?

The fee is automatically applied when customers select UPI as the payment method and use a linked credit card. The system detects this automatically during the payment flow using the payer_account_type parameter.

3. Does this work with all UPI apps?

This feature works with UPI apps that support credit card linking, subject to the individual app’s capabilities and the customer’s credit card issuer support.