- 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
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 BettingIntegration 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_idreceived in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered.
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.
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/feesRequest
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
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
amountincluding UPI base fees. - Pass
feeparameter with the fee amount.
- Pass
- Partial CFB (Charge fees only for Credit Card on UPI)
- Pass original
amountas is. - Pass
feeparameter with the fee amount.
- Pass original
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.
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 thepayer_account_type parameter.