Payment Links

Payment Links

Now you can send or message payment links to your customers. This will be very convenient for a variety of use cases including Pay on Delivery (an alternative for Cash on Delivery). These links are available as part of the POST /order/create API.

Example

{
  "order_id": "1478851764",
  "id": "ord_e294a26e66ad4336a992ceab81ad704c",
  "status": "CREATED",
  "status_id": 1,
  "payment_links": {
    "web": "https://api.juspay.in/merchant/pay/ord_e294a26e66ad4336a992ceab81ad704c",
    "mobile": "https://api.juspay.in/merchant/pay/ord_e294a26e66ad4336a992ceab81ad704c?mobile=true",
    "iframe": "https://api.juspay.in/merchant/ipay/ord_e294a26e66ad4336a992ceab81ad704c"
  }
}

payment_links attribute will be present in both /order/create API and /order/status API. We have provided three variants to make it easy for your customers. As the name implies, these are best suited for the respective channels.

Variant Description
web Renders a desktop optimized version of the checkout page
mobile Renders a mobile optimized version of the checkout page
iframe Provides an iFrame that you can embed as part of your checkout page

Payment methods

All the payment methods enabled in your account will be displayed to the user. This is to ensure maximum acceptance which improves your success rate significantly.

Expiry

Links become invalid as soon as the order expires. The default expiry is 15 minutes from the time of creation. This value is customizable via our dashboard. Please follow this link to customize it to your need.

The maximum expiry time is 24 hours. This limit is set due to security restrictions. If you wish to extend the expiry period, then please reach out to us. Your chances of convincing us will improve significantly, if you use a good random generator for Order ID attribute.

Pay on Delivery

The link can be directly shared with your customers at the time of product delivery. All the payment options are available to the customer (including stored cards). This makes it very convenient for the customer to pay using their favorite payment option.

Pay on Delivery scenario

The image you see above is a simple depiction of an experience that can be built using our API.

  1. As your Delivery executive is preparing to deliver an order, they can initiate payment for that order.
  2. Your server sends a notification to your customer via email or SMS or push notification.
  3. Customer sees the checkout page with all the payment options. Proceeds to make payment and completes successfully. You can make it a 1-click experience if you use our Mobile SDK and open the URL there.
  4. Your Delivery executive can refresh the screen and check the payment status, once payment is confirmed can deliver the order.

We are excited to see what you can build using these links!