# Create UPI Intent Payment with QR Flow

Use this API to initiate a payment through UPI intent QR flow.

## Environment

Use our UAT environment endpoint for testing and for integration utilize our production endpoint.

| Environment                    | Endpoints                                                              |
| :----------------------------- | :--------------------------------------------------------------------- |
| User Acceptance Testing \[UAT] | `https://pluraluat.v2.pinepg.in/api/pay/v1/orders/{order_id}/payments` |
| Production \[PROD]             | `https://api.pluralpay.in/api/pay/v1/orders/{order_id}/payments`       |

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "intent-qr",
    "version": "3.0"
  },
  "servers": [
    {
      "url": "https://pluraluat.v2.pinepg.in/api"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "x-bearer-format": "bearer"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/pay/v1/orders/{order_id}/payments": {
      "post": {
        "summary": "Create UPI Intent Payment with QR Flow",
        "description": "Use this API to initiate a payment through UPI intent QR flow.",
        "operationId": "create-intent-payment-with-qr-image",
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "description": "Unique identifier of the order in the Pine Labs Online database.<br><br>Example: `v1-4405071524-aa-qlAtAf`",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "The type of content included in the HTTP message body.<br><br>Possible value: `application/json`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "The HTTP header where you can include your secret token for authentication.<br><br>Example: `Bearer <access_token>`<br><br>**Note**: Use the access token generated using our <a href=\"https://developer.pluralonline.com/v3.0/reference/generate-token\" target=\"_blank\">Generate Token API</a>.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Request-Timestamp",
            "in": "header",
            "description": "Use ISO 8601 UTC Timestamp, to create a timestamp when the generate token is requested.<br><br>Example: `2024-07-09T07:57:08.022Z`",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Request-ID",
            "in": "header",
            "description": "Use a global unique identifier [GUID] for the request.<ul><li>Minimum: 1 characters.</li><li>Maximum: 50 characters</ul></li>Example: `c17ce30f-f88e-4f81-ada1-c3b4909ed235`",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "payments"
                ],
                "properties": {
                  "payments": {
                    "type": "array",
                    "description": "An array of objects that contains the payment details.",
                    "items": {
                      "properties": {
                        "merchant_payment_reference": {
                          "type": "string",
                          "description": "Unique Payment Reference id sent by merchant.<br><br>Example: 2c8f71b3-2eb0-47af-a18a-52699785f153"
                        },
                        "payment_method": {
                          "type": "string",
                          "description": "Type of payment method you want to use to accept a payment.<br><br>Accepted value: `UPI`<br><br>Example: `UPI`"
                        },
                        "payment_amount": {
                          "type": "object",
                          "description": "**Mandatory object**<br><br>An object that contains the details of the payment amount.",
                          "required": [
                            "value",
                            "currency"
                          ],
                          "properties": {
                            "value": {
                              "type": "string",
                              "description": "The transaction amount you want to accept from your customers.<ul><li>Amount in Paisa.</li><li>Minimum value: `100` (₹1).</li><li>Maximum value: `100000000` (₹10 lakh).<br><br>Example: `100`"
                            },
                            "currency": {
                              "type": "string",
                              "description": "Type of currency.<br><br>Has to be 3 digits.<br><br>Example: `INR`"
                            }
                          }
                        },
                        "payment_option": {
                          "type": "object",
                          "description": "**Mandatory object**<br><br>An object that contains the details of the payment options.",
                          "properties": {
                            "upi_details": {
                              "type": "object",
                              "description": "An object that contains the UPI details.",
                              "required": [
                                "txn_mode",
                                "upi_qr"
                              ],
                              "properties": {
                                "txn_mode": {
                                  "type": "string",
                                  "description": "The transaction mode in which you want to accept payment.<br><br>Accepted value: `INTENT`"
                                },
                                "upi_qr": {
                                  "type": "boolean",
                                  "description": "Indicates whether a UPI QR code is enabled for the payment.<br><br>Accepted value: `True`"
                                }
                              }
                            }
                          }
                        },
                        "location_info": {
                          "type": "object",
                          "description": "An object that contains the customer or device location details.",
                          "properties": {
                            "latitude": {
                              "type": "string",
                              "description": "The geographic latitude of the customer's or device's location is expressed in decimal degrees.\n\nExample: `28.620852`"
                            },
                            "longitude": {
                              "type": "string",
                              "description": "The geographic longitude of the customer's or device's location is expressed in decimal degrees.\n\nExample: `77.355700`"
                            }
                          }
                        }
                      },
                      "required": [
                        "merchant_payment_reference",
                        "payment_method"
                      ],
                      "type": "object"
                    }
                  }
                }
              },
              "examples": {
                "UPI Intent with QR Flow": {
                  "value": {
                    "payments": [
                      {
                        "payment_method": "UPI",
                        "payment_amount": {
                          "value": 100,
                          "currency": "INR"
                        },
                        "payment_option": {
                          "upi_details": {
                            "txn_mode": "INTENT",
                            "upi_qr": true
                          }
                        },
                        "location_info": {
                          "latitude": "28.620852",
                          "longitude": "77.355700"
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "data": {
                        "order_id": "v1-250102053141-aa-TRBQR6",
                        "merchant_order_reference": "f5cba4a4-1c46-4b23-b0a8-7fd6b8027f63",
                        "type": "CHARGE",
                        "status": "PENDING",
                        "challenge_url": "upi://pay?mode=04&pa=pinelabs.1068@hdfcbank&pn=Saklani%20Bhai%20Upi&mc=6012&cu=INR&am=1.00&tr=3562571&tn=Payment%20for%20v1",
                        "merchant_id": "110939",
                        "order_amount": {
                          "value": 100,
                          "currency": "INR"
                        },
                        "pre_auth": false,
                        "allowed_payment_methods": [
                          "CARD",
                          "UPI",
                          "NETBANKING",
                          "POINTS",
                          "WALLET"
                        ],
                        "purchase_details": {
                          "customer": {
                            "email_id": "aayush.sam@gmail.com",
                            "first_name": "joe",
                            "last_name": "kumar",
                            "customer_id": "192212",
                            "mobile_number": "192192883",
                            "country_code": "91",
                            "billing_address": {
                              "address1": "10 Downing Street Westminster London",
                              "address2": "Oxford Street Westminster London",
                              "address3": "Baker Street Westminster London",
                              "pincode": "51524036",
                              "city": "Westminster",
                              "state": "Westminster",
                              "country": "London",
                              "full_name": "Kevin Bob",
                              "adddress_type": "Home",
                              "address_category": "billing"
                            },
                            "shipping_address": {
                              "address1": "10 Downing Street Westminster London",
                              "address2": "Oxford Street Westminster London",
                              "address3": "Baker Street Westminster London",
                              "pincode": "51524036",
                              "city": "Westminster",
                              "state": "Westminster",
                              "country": "London",
                              "full_name": "Kevin Bob",
                              "adddress_type": "Home",
                              "address_category": "shipping"
                            }
                          },
                          "merchant_metadata": {
                            "key1": "value1",
                            "key2": "value2"
                          }
                        },
                        "payments": [
                          {
                            "id": "v1-250102053141-aa-TRBQR6-up-a",
                            "merchant_payment_reference": "2c8f71b3-2eb0-47af-a18a-52699785f153",
                            "status": "PENDING",
                            "payment_amount": {
                              "value": 100,
                              "currency": "INR"
                            },
                            "payment_method": "UPI",
                            "payment_option": {
                              "upi_data": {
                                "txn_mode": "INTENT"
                              }
                            },
                            "location_info": {
                              "latitude": "28.620852",
                              "longitude": "77.355700"
                            },
                            "acquirer_data": {
                              "approval_code": "",
                              "acquirer_reference": "",
                              "rrn": "",
                              "is_aggregator": true
                            },
                            "created_at": "2025-01-02T05:32:08.847Z",
                            "updated_at": "2025-01-02T05:32:11.798Z"
                          }
                        ],
                        "created_at": "2025-01-02T05:31:41.687Z",
                        "updated_at": "2025-01-02T05:32:11.799Z",
                        "image_url": "https://upi-gateway-service-bucket.s3.ap-south-1.amazonaws.com/qr_images/110939/2025-01-02/3562571.png?X-Amz-Security-Token=IQoJb3JpZ2luX2VjEPb%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCmFwLXNvdXRoLTEiRzBFAiEAtxkyw5wTlnnU1YO%2FCCMoce1%2BK1MsaRStLaa8JcSywhcCIBmqqVHbdrmRaaTskcFJ2aQXvMoLWeXBRVcHgNu036P1Kp0FCM%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEQABoMMzA1NzE0MjgxODMwIgw%2FI8Yx5QqHlvdZSmUq8QS1o4FILej9eD96%2FSFv7vcS%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SjM0P19SgAJYPewfmbPWabEhk7bWFI%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20250102T053211Z&X-Amz-SignedHeaders=host&X-Amz-Credential=ASIAUOLP5XVTC44HP7KZ%2F20250102%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Expires=1200&X-Amz-Signature=39ab101fb90f02314fdcf32d9786b2c78484dc729b80b186e84250400612933f",
                        "integration_mode": "SEAMLESS"
                      }
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "order_id": {
                          "type": "string",
                          "example": "v1-250102053141-aa-TRBQR6"
                        },
                        "merchant_order_reference": {
                          "type": "string",
                          "example": "f5cba4a4-1c46-4b23-b0a8-7fd6b8027f63"
                        },
                        "type": {
                          "type": "string",
                          "example": "CHARGE"
                        },
                        "status": {
                          "type": "string",
                          "example": "PENDING"
                        },
                        "challenge_url": {
                          "type": "string",
                          "example": "upi://pay?mode=04&pa=pinelabs.1068@hdfcbank&pn=Saklani%20Bhai%20Upi&mc=6012&cu=INR&am=1.00&tr=3562571&tn=Payment%20for%20v1"
                        },
                        "merchant_id": {
                          "type": "string",
                          "example": "110939"
                        },
                        "order_amount": {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": "integer",
                              "example": 100,
                              "default": 0
                            },
                            "currency": {
                              "type": "string",
                              "example": "INR"
                            }
                          }
                        },
                        "pre_auth": {
                          "type": "boolean",
                          "example": false,
                          "default": true
                        },
                        "allowed_payment_methods": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "example": "CARD"
                          }
                        },
                        "purchase_details": {
                          "type": "object",
                          "properties": {
                            "customer": {
                              "type": "object",
                              "properties": {
                                "email_id": {
                                  "type": "string",
                                  "example": "aayush.sam@gmail.com"
                                },
                                "first_name": {
                                  "type": "string",
                                  "example": "joe"
                                },
                                "last_name": {
                                  "type": "string",
                                  "example": "kumar"
                                },
                                "customer_id": {
                                  "type": "string",
                                  "example": "192212"
                                },
                                "mobile_number": {
                                  "type": "string",
                                  "example": "192192883"
                                },
                                "country_code": {
                                  "type": "string",
                                  "example": "91"
                                },
                                "billing_address": {
                                  "type": "object",
                                  "properties": {
                                    "address1": {
                                      "type": "string",
                                      "example": "10 Downing Street Westminster London"
                                    },
                                    "address2": {
                                      "type": "string",
                                      "example": "Oxford Street Westminster London"
                                    },
                                    "address3": {
                                      "type": "string",
                                      "example": "Baker Street Westminster London"
                                    },
                                    "pincode": {
                                      "type": "string",
                                      "example": "51524036"
                                    },
                                    "city": {
                                      "type": "string",
                                      "example": "Westminster"
                                    },
                                    "state": {
                                      "type": "string",
                                      "example": "Westminster"
                                    },
                                    "country": {
                                      "type": "string",
                                      "example": "London"
                                    },
                                    "full_name": {
                                      "type": "string",
                                      "example": "Kevin Bob"
                                    },
                                    "adddress_type": {
                                      "type": "string",
                                      "example": "Home"
                                    },
                                    "address_category": {
                                      "type": "string",
                                      "example": "billing"
                                    }
                                  }
                                },
                                "shipping_address": {
                                  "type": "object",
                                  "properties": {
                                    "address1": {
                                      "type": "string",
                                      "example": "10 Downing Street Westminster London"
                                    },
                                    "address2": {
                                      "type": "string",
                                      "example": "Oxford Street Westminster London"
                                    },
                                    "address3": {
                                      "type": "string",
                                      "example": "Baker Street Westminster London"
                                    },
                                    "pincode": {
                                      "type": "string",
                                      "example": "51524036"
                                    },
                                    "city": {
                                      "type": "string",
                                      "example": "Westminster"
                                    },
                                    "state": {
                                      "type": "string",
                                      "example": "Westminster"
                                    },
                                    "country": {
                                      "type": "string",
                                      "example": "London"
                                    },
                                    "full_name": {
                                      "type": "string",
                                      "example": "Kevin Bob"
                                    },
                                    "adddress_type": {
                                      "type": "string",
                                      "example": "Home"
                                    },
                                    "address_category": {
                                      "type": "string",
                                      "example": "shipping"
                                    }
                                  }
                                }
                              }
                            },
                            "merchant_metadata": {
                              "type": "object",
                              "properties": {
                                "key1": {
                                  "type": "string",
                                  "example": "value1"
                                },
                                "key2": {
                                  "type": "string",
                                  "example": "value2"
                                }
                              }
                            }
                          }
                        },
                        "payments": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "example": "v1-250102053141-aa-TRBQR6-up-a"
                              },
                              "merchant_payment_reference": {
                                "type": "string",
                                "example": "2c8f71b3-2eb0-47af-a18a-52699785f153"
                              },
                              "status": {
                                "type": "string",
                                "example": "PENDING"
                              },
                              "payment_amount": {
                                "type": "object",
                                "properties": {
                                  "value": {
                                    "type": "integer",
                                    "example": 100,
                                    "default": 0
                                  },
                                  "currency": {
                                    "type": "string",
                                    "example": "INR"
                                  }
                                }
                              },
                              "payment_method": {
                                "type": "string",
                                "example": "UPI"
                              },
                              "payment_option": {
                                "type": "object",
                                "properties": {
                                  "upi_data": {
                                    "type": "object",
                                    "properties": {
                                      "txn_mode": {
                                        "type": "string",
                                        "example": "INTENT"
                                      }
                                    }
                                  }
                                }
                              },
                              "acquirer_data": {
                                "type": "object",
                                "properties": {
                                  "approval_code": {
                                    "type": "string",
                                    "example": ""
                                  },
                                  "acquirer_reference": {
                                    "type": "string",
                                    "example": ""
                                  },
                                  "rrn": {
                                    "type": "string",
                                    "example": ""
                                  },
                                  "is_aggregator": {
                                    "type": "boolean",
                                    "example": true,
                                    "default": true
                                  }
                                }
                              },
                              "created_at": {
                                "type": "string",
                                "example": "2025-01-02T05:32:08.847Z"
                              },
                              "updated_at": {
                                "type": "string",
                                "example": "2025-01-02T05:32:11.798Z"
                              }
                            }
                          }
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2025-01-02T05:31:41.687Z"
                        },
                        "updated_at": {
                          "type": "string",
                          "example": "2025-01-02T05:32:11.799Z"
                        },
                        "image_url": {
                          "type": "string",
                          "example": "https://upi-gateway-service-bucket.s3.ap-south-1.amazonaws.com/qr_images/110939/2025-01-02/3562571.png?X-Amz-Security-Token=IQoJb3JpZ2luX2VjEPb%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCmFwLXNvdXRoLTEiRz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QRD%2ByatYMNvJ2LsGOpsBiR4DGjV%2FDkHj1IYcZTEm2STYa5v43ga5J7x%2BUfR9vPxlaYIAMqr4hc9sediH585AP%2FQ8Xfa9ynuZ9j210J6bMvIjycUjwzReD1jo%2B6rcDcOoZRF8tu3sqTjUuGFCDl5H0I5wqJ8XuAY1ZvYIliiA0szPwoazo%2BgRzUZjv7wCEkwk7bvyzSjM0P19SgAJYPewfmbPWabEhk7bWFI%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20250102T053211Z&X-Amz-SignedHeaders=host&X-Amz-Credential=ASIAUOLP5XVTC44HP7KZ%2F20250102%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Expires=1200&X-Amz-Signature=39ab101fb90f02314fdcf32d9786b2c78484dc729b80b186e84250400612933f"
                        },
                        "integration_mode": {
                          "type": "string",
                          "example": "SEAMLESS"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "500",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"code\": \"INTERNAL_ERROR\",\n  \"message\": \"failed to process because...\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "example": "INTERNAL_ERROR"
                    },
                    "message": {
                      "type": "string",
                      "example": "failed to process because..."
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```