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:

Restricted MCC codes

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

Use this endpoint to create an order using the Orders API.

Request Parameters

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

.

Response Parameters

Descriptions for the response parameters are present in the

parameters table.

Error Response Parameters

The error response parameters are available in the

.

Use this API to get the fee breakdown before displaying it to customers:

POST
/payments/calculate/fees
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"
}'

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.

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.

CFB on CC on UPI fee breakdown

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):

POST
/payments/create/json
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"
}
}'

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

.

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.

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

.

1. How much convenience fee will customers pay?

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.

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.


Is this integration guide useful?