---
page_title: 5. Handling Payment Response
product: Hypercheckout
platform: Capacitor
page_source: https://juspay.io/in/docs/hyper-checkout/capacitor/base-sdk-integration/handling-payment-response
llms_txt: https://juspay.io/in/docs/llms.txt
product_llms_txt: https://juspay.io/in/docs/hyper-checkout/llms.txt
---


## Handling Payment Response




### Step 1 Check Payment Status


After receiving process response from SDK, it is mandatory to do a Server-to-Server [Order Status API call](https://docs.juspay.in/ec-headless/capacitor/base-sdk-integration/order-status-api) to determine the final payment status. Please ensure that you verify the order ID and amount transaction.

To understand how to handle payment status, refer to the flow diagram below.

![Image](https://dth95m2xtyv8v.cloudfront.net/tesseract/assets/hyper-checkout/payment_status_handling.png)

### Mermaid code for the above image

```mermaid
flowchart TD
    1[1. Transaction completed on bank page]

    1 -->|On App/I-Frame Web| 2_1[2.1 SDK gives callback in process_result]
    1 -->|On Web| 2_2[2.2 User is redirected to RETURN_URL]

    2_1 --> 4
    2_2 --> 4
    2_1 -.->|Asynchronously| 3[3. Asynchronously listen for webhooks]
    2_2 -.->|Asynchronously| 3

    4[4. Call Order Status S2S API]

    4 -->|Status = CHARGED| 5[5. Show Success Screen & Fulfill order]
    4 -->|Status = AUTHORIZATION_FAILED / AUTHENTICATION_FAILED| 6[6. Show Failure Screen & decline the order]
    4 -->|Status = PENDING_VBV / AUTHORIZING| OFW{Order Fulfillment Window Over?}

    OFW -->|No| 7[7. Show Pending Screen]
    7 -->|After 10 Seconds| 4

    OFW -->|Yes| 8[8. Show Failure Screen & decline the order]

    8 -.-> SWR{Success Webhook Received post fulfillment window?}

    SWR -.-> 9[9. Do Manual Refund from Juspay Dashboard]
    SWR -.-> 10[10. Do Refund via Refund API]
    SWR -.-> 11[11. Handle Refund via Auto-Refund Feature]

    style 5 fill:#00897B,color:#fff
    style 6 fill:#E91E63,color:#fff
    style 7 fill:#FFC107,color:#000
    style 8 fill:#E91E63,color:#fff
```






### Step 2 Consume webhooks asynchronously 


After the completion of every payment/refund, Juspay will provide direct notification to your server regarding the event. These are called Webhooks.You must configure a valid HTTPS endpoint that is reachable from our servers to consume these notifications. Our servers will push data using HTTP POST calls to your endpoint. [Click here for Detailed Webhook Specifications](https://docs.juspay.in/ec-headless/capacitor/base-sdk-integration/webhooks)




### Step 3 Display Payment Status


Once the payment status is determined via the API, the final status should be displayed to the user. This screen needs to be handled by the merchant, it is not provided by the SDK



---

## See Also

- [4. HyperSDK Events](https://juspay.io/in/docs/hyper-checkout/capacitor/base-sdk-integration/hypersdk-events)
- [Introduction](https://juspay.io/in/docs/hyper-checkout/capacitor/mandates/introduction)
