QR Codes

Integrate with QR Codes API using partner auth.


Use Razorpay QR Codes to receive UPI payments from your customers. Create QR Codes from the Razorpay Dashboard or using our APIs and share them with your customers. Customers can scan these codes and make payments.

Handy Tips

Consider these

before getting started with QR Codes.

Given below is the sample code for Create a QR Code API. Pass the account_id of the sub-merchant using X-Razorpay-Account in the header. Refer to the

.

POST
payments/qr_codes

type

mandatory

string The type of QR code. Possible values:

  • upi_qr: Create a QR code that accepts only UPI payments.
  • bharat_qr: Create a QR code that accepts UPI and card payments. This is an on-demand feature. Know more about .

name

optional

string Label entered to identify the QR code. For example, Store Front Display.

usage

mandatory

string Indicates if the QR code should be allowed to accept single payment or multiple payments. Possible values:

  • single_use: QR code will accept only one payment and then close automatically.
  • multiple_use (default): QR code will accept multiple payments.

fixed_amount

optional

boolean Indicates if the QR should accept payments of specific amounts or any amount. Possible values:

  • true: QR code accepts only a specific amount.
  • false (default): QR code will accept any amount.

payment_amount

mandatory if fixed_amount=true

integer The amount allowed for a transaction. If this is specified, then any transaction of amount less than or more than this value will not be allowed. For example, if this amount is set as 500000, the customer cannot pay an amount less than or more than ₹5000.

description

optional

string A brief description about the QR code.

notes

optional

object Key-value pair that can be used to store additional information about the QR code. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty".

customer_id

optional

string Unique identifier of the customer the QR code is linked with. Know more about the

.

close_by

optional

integer UNIX timestamp at which the QR code is scheduled to be automatically closed. The time must be at least 2 minutes after the current time. The date range can be set to 2147483647 in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30).

Watch Out!

Any request beyond 2147483647 UNIX timestamp will fail.

Descriptions for the response parameters are present in the

parameters table.

Error codes and descriptions are present in the

table.

Given below is the sample code for Fetch all QR Codes API. Pass the account_id of the sub-merchant using X-Razorpay-Account in the header.

GET
payments/qr_codes
curl -u [CLIENT_ID]:[CLIENT_SECRET] \
-X GET https://api.razorpay.com/v1/payments/qr_codes \
-H "Content-Type: application/json" \
-H "X-Razorpay-Account: acc_Ef7ArAsdU5t0XL" \

Descriptions for the response parameters are present in the

parameters table.

Error codes and descriptions are present in the

table.


Was this page helpful?