---
page_source: https://juspay.io/in/docs/upi-qr-code/docs/scan--pay/instant-delivery-qr
page_title: Instant Delivery QR
---


# Instant Delivery QR



UPI QR Codes provide a seamless solution for instant payments at the time of delivery. Users can quickly and easily complete their payment by simply scanning the QR code when they receive their product, ensuring a hassle-free and efficient transaction process.

To implement this, use the Order + Transaction API. The API returns a QR code in the format of a base64 string. Load the QR image included in the `base64_encoded_qr` parameter of the API response to display the QR code for payment. 

Basic Parameters

## FAQs:

### Is there any expiry time for that QR? If yes, for how much time QR is valid for? Can we generate QR again after expiry?

QR is generated against a new order ID on the Juspay end (merchants can use the same order ID if COD orders are not created with Juspay). In the request, you can see a key (order_fullfillment_threshold_in_mins) where you can set the expiry for the QR in minutes while creating the QR.

* If the fulfillment threshold is not passed in the request, then the default one configured on the Juspay dashboard use case will be used, as they come under the same merchant ID.
* Within the fulfillment window, if the API is called with the same order ID again, then we would send back the same base64 QR. The fulfillment threshold will not be altered again; it will stay as set initially.
* If the API is called with the same order ID again after the fulfillment window, then we would provide just the order status.
* If the transaction becomes successful after this window from the PG end, the debited amount will be auto-refunded and the status will be marked as AUTO_REFUNDED.
* Create an order with a new order ID to get a fresh QR.



## Sample Code Snippets:
### Delivery UPI QR Code:

#### Shell Code Snippet:

```shell
curl --location --request POST 'https://api.juspay.in/orders' \
--header 'Authorization: Basic N0JBRDA4OUExRjYwNEYwREEyNDlCNjY3QTVCMUQzM0Q6' \
--form 'order_id="TEST_ORDER"' \
--form 'amount="1"' \
--form 'options.get_upi_qr="true"' \
–-form 'order_fullfillment_threshold_in_mins="60"' \
--form 'customer_id="cust_Test"' \
--form 'customer_email="test@email.com"' \
--form 'metadata.JUSPAY:gateway_reference_id="testmode"'

```

### Delivery UPI QR Code:

#### Response:
```json
{
    "status": "NEW",
    "status_id": 10,
    "id": "ordeh_fab5fc85809d45ee8000c",
    "order_id": "TEST_ORDER",
    "payment_links": {
        "iframe": "http://localhost:8080/merchant/ipay/ordeh_fab5fc85809d45ee8000c",
        "web": "http://localhost:8080/merchant/pay/ordeh_fab5fc85809d45ee8000c",
        "mobile": "http://localhost:8080/merchant/pay/ordeh_fab5fc85809d45ee8000c?mobile=true"
    },
    "base64_encoded_qr": "qr-image-in-bas64-encoded-for,at",
    "deep_link": "upi://pay?tr=mandate_juspay-TEST_ORDER-1&mc=516&pa=test@ybl&pn=test&am=1.00&cu=INR",
    "udf9": "",
    "udf8": "",
    "udf7": "",
    "udf6": "",
    "udf5": "",
    "udf4": "",
    "udf3": "",
    "udf2": "",
    "udf10": "",
    "udf1": "",
    "refunded": false,
    "merchant_id": "TestMid",
    "date_created": "2024-02-12T07:44:57.150265Z",
    "customer_id": "cust_Test",
    "customer_email": "test@email.com",
    "amount_refunded": 0,
    "source_object": "",
    "source_object_id": "",
    "amount": 1
    }
}

```

