Order Updation Events

1. updateOrder Event

Allows the merchant to update the orderDetails payload after Juspay Payment Page has been opened (SDK process call is done).

Sample Payload Structure

{
  "service": "in.juspay.hyperpay",
  "requestId": "e17d4cd0-55z0-410f-84d6-038d69cx3819",
  "payload": {
    "action": "updateOrder",
    "orderDetails": "<updated-order-details-payload>",
    "signature": "<updated-signature>"
  }
}

Note: Refer here for the parameters to be passed in orderDetails payload.

As the orderDetails payload is being changed, it is mandatory to generate a new signature as well that corresponds to the updated payload.

New Line

2. paymentAttempt Event

This event is triggered from Juspay to merchant on clicking the "Proceed to Pay" button (on Juspay Payment Page).

This is a blocking call and it is applicable to all payment instruments; for merchant’s approval for proceeding with the transaction initiation to payment gateway.

Sample Payload Structure

{
  "event": "paymentAttempt",
  "payload": {
    "payment_card_issuer": "",
    "payment_card_type": "",
    "payment_method_type": "",
    "payment_method": "",
    "txnReference": "<txn_reference>"
  }
}

  • resumePayment : In response to paymentAttempt, merchant needs to call the resumePayment event with hyperServices.process call.

    Status value true is indicative of merchant approval to proceed with the transaction, whereas false aborts the payment and SDK exits to return control back to merchant application.

  • Sample Payload Structure

    {
      "requestId": "d19e5af1-76c1-475e-98f9-906a69bc4512",
      "service": "in.juspay.hyperpay",
      "payload": {
        "action": "resumePayment",
        "txnReference": "<txn_reference>",
        "status": true | false,
        "orderDetails": "<updated-order-details-payload>",
        "signature": "<updated-signature>"
      }
    }
    

    Note: Refer here for the parameters to be passed in orderDetails payload.

    If the orderDetails payload is being changed, it is mandatory to generate a new signature as well that corresponds to the updated payload. Else, merchant can skip the orderDetails payload and signature from this call.