Customer Fee Bearer on Credit Card on UPI
Accept S2S UPI payments from your customers.
Customer Fee Bearer (CFB) on Credit Card on UPI is a payment feature that allows you to pass on processing fees to customers when they make UPI payments using their linked credit cards. This feature enables you to maintain your profit margins while offering customers the convenience of using credit cards through UPI for everyday transactions. When enabled, the checkout will:
- 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
to get this feature enabled.- 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:
Follow the integration steps given below:
Order is an important step in the payment process.
- An order should be created for every payment.
- You can create an order using the . It is a server-side API call. Know how to 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.
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.
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.
Use this endpoint to create an order using the Orders API.
curl -X POST https://api.razorpay.com/v1/orders-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET]-H 'content-type:application/json'-d '{"amount": 500,"currency": "INR","receipt": "qwsaq1","partial_payment": true,"first_payment_min_amount": 230,"notes": {"key1": "value3","key2": "value2"}}'
{"id": "order_IluGWxBm9U8zJ8","entity": "order","amount": 5000,"amount_paid": 0,"amount_due": 5000,"currency": "INR","receipt": "rcptid_11","offer_id": null,"status": "created","attempts": 0,"notes": [],"created_at": 1642662092}
amount
mandatory
integer Payment amount in the smallest currency subunit. For example, if the amount to be charged is ₹299.00, 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
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
(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 ₹7,000.00 is to be received from the customer in two installments of #1 - ₹5,000.00, #2 - ₹2,000.00 then you can set this value as 500000. This parameter should be passed only if partial_payment is true.
Know more about
.Descriptions for the response parameters are present in the
parameters table.The error response parameters are available in the
.Use this API to get the fee breakdown before displaying it to customers:
curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \-X POST https://api.razorpay.com/v1/payments/calculate/fees \-H "Content-Type: application/json" \-d '{"amount": 100,"currency": "INR","method": "upi","upi": {"flow": "intent"},"contact": "9000090000","email": "gaurav.kumar@example.com","description": "testing payment create","payer_account_type": "credit_card"}'
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.
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.
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.
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.

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
Below is the sample code for partial CFB (credit card on UPI only):
curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \-X POST https://api.razorpay.com/v1/payments/create/json \-H "Content-Type: application/json" \-d '{"amount": 100,"currency": "INR","contact": "9000090000","email": "gaurav.kumar@example.com","description": "testing payment create","order_id": "order_QvjHcQ48WcXXXX","method": "upi","fee": 1,"upi": {"flow": "intent"},"notes": {"prod": "test"}}'
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.
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
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.
Once the payment is successfully processed, you will receive a payment captured webhook with the following structure:
{"event": {"name": "payment_captured","data": {"payment": {"id": "RFGWLM9pHQXXXX","created_at": 1757369021,"authorized_at": 1757369048,"status": 2,"amount": 101,"currency": "INR","method": "upi","gateway": "upi_rzpaxis","description": "testing payment create","fee_data": {"fee_bearer": 1,"fee": 1},"settled_by": "Razorpay","base_amount": 101},"payment_method_details": {"upi": {"flow": "intent","vpa": "gaurav.kumar@exampleupi","payer_account_type": "credit_card"}}}}}
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
.The convenience fee varies based on the payment method selected. Use the
to get the exact fee amount, which customers will see in the checkout fee breakdown before confirming their payment.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.
Is this integration guide useful?