QR codes and barcodes

UPI payment QR code

A QR code any UPI app can scan to pay, built to NPCI's upi://pay link format. format=json returns the link instead of the image. Nothing is checked with a bank.

get/v1/upi-qr

Request

  • Base URL: https://api.dharun.dev
  • URL: https://api.dharun.dev/v1/upi-qr
  • Auth: none declared

Query parameters

pastring required

Payee UPI ID, such as shop@okaxis.

pnstring

Payee name shown in the app.

amstring

Amount in rupees, up to two decimals. Leave out to let the payer type it.

tnstring

Note shown with the payment, up to 80 characters.

trstring

Your reference for the transaction.

mcstring

Merchant category code, four digits.

format'svg' | 'png'

Image format. Default svg.

sizeinteger

2D codes: width in pixels to stay within, 32 to 2048. Default 256.

margininteger

Light border (quiet zone), in modules, 0 to 16. Default 4.

fgstring

Dark colour, hex such as 000000. Default black.

bgstring

Light colour, hex, or transparent. Default white.

Response

Success

Changes

No recorded changes to this operation across all 1 revision of this API.