Skip to content

Web Integration

SkyPay makes it easy to accept payments on your website with minimal code and zero crying. Here's how it works:


How SkyPay Checkout Works

  1. User Adds to Cart: Your app generates a unique code (like an order ID) for the payment.
  2. Checkout: You redirect the user to SkyPay with the code, amount, and redirect URLs.
  3. Payment Page: SkyPay handles the transaction at https://checkout.skypay.com.
  4. Redirect Back: On success/failure, users are redirected back to your site with extra info.
  5. Verify: Use the Verify Payment API to confirm the payment.
  6. Deliver: Fulfill the order or unlock access once verified.
  7. Everyone Wins:

Environment URLs

EnvironmentBase URL
Livehttps://checkout.skypay.dev

ParamDescription
api_keyYour merchant API key
amountAmount to be paid (in Rupees)
codeUnique order ID (used later for verification)
success_urlRedirect after successful payment (can be null — defaults to SkyPay page)
failure_urlRedirect after failed payment (can be null — defaults to SkyPay page)
debug(Optional) Set to 1 to bypass redirects and stay on the success page.

Method 1: Direct Checkout URL

html
<a href="https://checkout.skypay.dev?api_key=YOUR_API_KEY&amount=100&code=ORDER123&success_url=https://yourapp.com/success&failure_url=https://yourapp.com/failure" target="_blank">
  Pay with SkyPay
</a>

This is perfect for quick redirects, email/SMS links, or low-code flows.


Method 2: HTML Form (GET)

html
<form action="https://checkout.skypay.dev" method="GET">
  <input type="hidden" name="api_key" value="YOUR_API_KEY">
  <input type="hidden" name="amount" value="500">
  <input type="hidden" name="code" value="ORDER123">
  <input type="hidden" name="success_url" value="https://yourapp.com/success">
  <input type="hidden" name="failure_url" value="https://yourapp.com/failure">
  <input type="submit" value="Pay with SkyPay">
</form>

Use this for a more integrated, styled experience.


Handling Redirects

On Success

Users are redirected to:

https://yourapp.com/success?data=<base64_encoded_transaction_data>
  • data is a base64-encoded JSON string with transaction details.
  • Decode it server-side for security.
json
{
  "code": "ORDER123",
  "amount": 100,
  "status": "complete"
}

On Failure

Users are redirected to:

https://yourapp.com/failure?message=Something+went+wrong
  • message helps show friendly error messages.

Integration Modes Explained

SkyPay allows you to choose how much control you want over the integration:

  • Flow: User clicks pay -> Redirect to SkyPay -> Choose Provider -> Automatic Redirect to Provider (eSewa/Khalti) -> Pay -> Return.
  • Setup: Provide your own merchant credentials for eSewa/Khalti in the SkyPay dashboard.
  • Best for: Businesses with existing merchant accounts who want a unified integration.

2. Manual Mode (QR/Bank)

  • Flow: User clicks pay -> Redirect to SkyPay -> Choose "Manual Transfer" -> Scan QR or copy bank details -> Pay via banking app -> Upload screenshot.
  • Setup: Simply add your bank account/QR in the SkyPay dashboard.
  • Best for: Small businesses, P2P sellers, and social media commerce.

3. Assisted Mode (Managed)

  • Flow: Similar to API mode but uses SkyPay's own merchant accounts.
  • Setup: Zero. SkyPay manages the transaction and aggregates your balance.
  • Best for: Startups and individuals who don't want to deal with bank paperwork.

Security Note

All checkout sessions expire after 15 minutes. Ensure your users are aware that they need to complete the payment within this window to avoid transaction failure.

Proudly built in Pokhara, Nepal — a product by Skybase Innovations