Payment Request

The Payment Request endpoint allows merchants to initiate a UPI payment request using a customer's UPI ID. Customers will complete the transaction via their preferred UPI app.


Endpoint

POST /v1/payments/createPaymentRequest

πŸ”§ Example: Axios POST Request

await axios.post(
  "https://api.upitranzact.com/v1/payments/createPaymentRequest",
  {
    mid: "Your Merchant ID", // Example: ABC
    amount: "Numeric value between 1-100000", // Example: 200
    order_id: "Unique order ID", // Example: bd79da4cc3ff1 (optional)
    vpa: "Customer UPI Id", // Example: upiId@oksbi
    note: "Add money", // Payment remark
    customer_name: "John",
    customer_email: "[email protected]",
    customer_mobile: "Your Customer Mobile", // Must be a valid phone number
  },
  {
    headers: {
      Authorization: "Basic base64(public_key:secret_key)"
    }
  }
);

🧾 Key Parameters

  • mid: Your merchant identifier.
  • amount: Must be a numeric value between 1 and 100000.
  • order_id: A unique string for transaction tracking (optional).
  • vpa: UPI ID of the customer.
  • note: Payment remark.
  • customer_name: Full name of the customer.
  • customer_email: A valid email address.
  • customer_mobile: A valid mobile number.
  • Authorization: Must be in the format Basic base64(public_key:secret_key).
βœ…

Make sure to replace placeholder values with actual data before executing.


πŸ“¨ Headers

NameValue
Content-Typeapplication/x-www-form-urlencoded
AuthorizationBasic base64(public_key:secret_key)

πŸ“₯ Request Body Parameters

NameTypeDescriptionExampleRequired
midstringMerchant ID assigned by UPITranzactABCYes
amountintegerThe total amount200Yes
order_idstringUnique identifier for the orderbd79da4cccff1No
vpastringCustomer UPI IDupiId@oksbiYes
notestringRemark for the paymentAdd MoneyYes
customer_namestringCustomer's full nameJohnYes
customer_emailstringCustomer's email address[email protected]Yes
customer_mobilestringCustomer's mobile number0123456789Yes

πŸ” Authorization

Requests must include the Authorization header with a Base64-encoded string of public_key:secret_key.

Example Format:

Authorization: Basic base64(public_key:secret_key)

Example Encoded Header:

Authorization: Basic eW91cl9wdWJsaWNfa2V5OnlvdXJfc2VjcmV0X2tleQ==

Successful Response

{
    "status": true,
    "statusCode": 200,
    "msg": "Payment request created successfully",
    "data": {
        "orderId": "utz_ccxxzsdf",
        "payment_url": "https://upitz.com/checkout/payment/xxxxxxx..."
    }
}

Error Example (Order ID Conflict)

{
    "status": false,
    "statusCode": 409,
    "msg": "Order ID already exists"
}