For the complete documentation index, see llms.txt. This page is also available as Markdown.

Redirect User

After successfully creating an order using the Create Order API, KwikPaisa returns a hosted checkout URL in the:

payment_link

parameter.

You must redirect the customer to this payment link to complete the payment securely using the KwikPaisa hosted checkout page.

Payment Flow

  1. Merchant creates payment order

  2. KwikPaisa returns payment_link

  3. Merchant redirects customer to hosted checkout

  4. Customer completes payment

  5. KwikPaisa redirects customer back to merchant return_url

  6. Merchant verifies payment using Order Status API or Webhook


Example Create Order Response

{
  "code": "200",
  "status": "success",
  "message": "API authentication successful!",
  "return_data": {
    "kwikX_order_id": "kp_40dec464-7155-43a3-855d-c95c5ab1be71",
    "created_at": "13-05-2026 08:34 AM",
    "order_id": 6116229263036,
    "order_status": "UN_PAID",
    "payment_link": "https://sandbox.kwikpaisa.com/payment/checkout/..."
  }
}

Redirect Customer

Redirect the customer to:

returned in the API response.


JavaScript Redirect Example


PHP Redirect Example


Successful Payment Redirection

After the customer completes the payment successfully, KwikPaisa redirects the customer back to the merchant return_url.

The redirect is sent as a GET request with:

appended automatically.


Example Redirect URL


Important Notes

  • The return_url must be publicly accessible

  • Always use HTTPS URLs

  • order_id returned in redirect is the merchant order ID

  • Frontend redirects should not be used as final payment confirmation

  • Always verify payment using:

    • Order Status API

    • Webhook notifications


After receiving the redirect:

  1. Extract order_id

  2. Call Order Status API

  3. Verify payment status server-side

  4. Update transaction status in your system


Why Verification is Important

Customer redirects may fail due to:

  • Browser interruptions

  • Network issues

  • User closing the page

  • Device crashes

For reliable payment confirmation, always validate transactions server-side.


  1. Create Order

  2. Redirect customer to payment_link

  3. Customer completes payment

  4. Receive redirect on return_url

  5. Verify transaction using APIs/webhooks

  6. Mark order as successful


Best Practices

  • Always verify payment status server-side

  • Do not trust frontend redirects alone

  • Store merchant order_id securely

  • Use unique order IDs for every transaction

  • Enable webhook handling for real-time updates

Last updated