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

First API request

Now that your Sandbox API credentials are ready, you can make your first authenticated request using the KwikPaisa Payment Gateway APIs.

In this guide, you will:

  • Create your first payment order

  • Generate authentication headers

  • Send an authenticated API request

  • Receive a hosted checkout payment link

Before continuing, ensure you have already completed:

  • Account onboarding

  • Sandbox credential generation

  • Authentication setup

Recommended prerequisites:


Create Your First Payment Order

The Create Order API generates a hosted checkout session and returns a secure payment link that can be shared with customers.

Example request payload:

{
  "order_id": 6116229263036,
  "order_amount": 105,
  "order_currency": "INR",
  "order_note": "Additional order info",
  "service_type": "DIGITAL",
  "customer": {
    "name": "Ajay",
    "email": "developer@jangras.co",
    "phone": "9816512345",
    "address": {
      "line1": "Capital Office, Kemp House",
      "line2": "152 - 160 City Road",
      "city": "London",
      "state": "London",
      "country": "UK",
      "postal_code": "EC1V 2NX"
    }
  },
  "return_url": "https://merchant.in/process_return.php?order_id=order_1626945143520"
}

Generate Authentication Headers

Before sending the request:

  1. Generate a UNIX timestamp

  2. Generate the HMAC SHA256 signature

  3. Attach authentication headers

Required authentication headers:

Send Your First API Request

Example cURL request:


Example Success Response


Redirect Customer to Hosted Checkout

Use the returned:

to redirect customers to the KwikPaisa Hosted Checkout page.

Example:

Customers can then complete payment securely using the hosted payment interface.


Verify Payment Status

After payment completion:

  • Verify payment status server-side

  • Use the Order Status API

  • Validate webhook notifications

  • Reconcile transaction records

Recommended references:


  1. Generate API credentials

  2. Configure authentication

  3. Create payment order

  4. Verify payment status

  5. Process webhook events

  6. Reconcile transaction


Common Integration Errors

Error
Possible Reason

Invalid Signature

Incorrect signature generation

Expired Timestamp

Reused or old timestamp

Authentication Failed

Invalid API credentials

Invalid Payload

Incorrect request structure


Production Recommendations

Before moving to production:

  • Complete Sandbox testing

  • Validate webhook verification

  • Implement retry handling

  • Enable secure backend signature generation

  • Verify transaction reconciliation workflows

Recommended references:

➡️ Sandbox Testing ➡️ Retry Logic ➡️ Security Checks ➡️ Production Checklist

Last updated