Overview & Architecture

Intent-Payment's is the central payment processing platform for the Intent Network ecosystem (pay.int.yt). It provides a unified gateway for Razorpay (UPI, Indian Cards, NetBanking), PayPal (Global Cards, International checkout), and NOWPayments (Cryptocurrency).

Security Protocol: Zero Client Secrets Merchant private keys and webhook secrets are strictly stored in the server environment. The frontend only ever interacts with temporary session IDs and public client tokens.

Authentication

Server-to-server endpoints (such as creating sessions or plans) require authentication. Pass your API key via the X-Intent-API-Key header or as a Bearer token:

X-Intent-API-Key: intent_live_sec_99712a3f890e4f26b5e1

Or:

Authorization: Bearer intent_live_sec_99712a3f890e4f26b5e1

Checkout Sessions

To accept a payment, your server makes a request to create a session, then directs the user to the returned checkoutUrl or opens it via the SDK.

POST /api/v1/sessions
Field Type Required Description
amount Number Yes Total amount to charge (e.g. 5.00)
currency String No ISO currency code (Default: USD, supports INR, EUR, etc.)
title String Yes Item / service name shown on checkout page
customer_email String No Customer's email address
return_url String No Redirect URL upon successful completion
webhook_url String No Merchant endpoint to receive instant completion webhook
metadata Object No Custom key-value pairs (order_id, user_id, etc.)

cURL Example

curl -X POST https://pay.int.yt/api/v1/sessions \
  -H "Content-Type: application/json" \
  -H "X-Intent-API-Key: intent_live_sec_99712a3f890e4f26b5e1" \
  -d '{
    "amount": 9.99,
    "currency": "USD",
    "title": "Intent Mail Pro 1 Year",
    "customer_email": "sreervaj@acradic.net",
    "return_url": "https://email.int.yt/account?upgraded=true",
    "metadata": { "accountId": "acc_102" }
  }'

Response (201 Created)

{
  "success": true,
  "data": {
    "sessionId": "sess_81ab29e34015f8a02c510e11",
    "checkoutUrl": "https://pay.int.yt/checkout?session_id=sess_81ab29e34015f8a02c510e11",
    "amount": 9.99,
    "currency": "USD",
    "title": "Intent Mail Pro 1 Year",
    "status": "pending",
    "expiresAt": 1791450000000
  }
}

Subscriptions & Recurring Plans

Create plans with weekly, monthly, or yearly intervals. Subscriptions can be paid through Razorpay or PayPal.

POST /api/v1/plans
curl -X POST https://pay.int.yt/api/v1/plans \
  -H "Content-Type: application/json" \
  -H "X-Intent-API-Key: YOUR_KEY" \
  -d '{
    "name": "MistFox Pro Developer",
    "amount": 12.00,
    "currency": "USD",
    "interval": "month"
  }'

Webhooks

When a session completes, Intent-Payment's Gateway sends an HTTP POST event to your specified webhook_url with header X-Intent-Signature containing the HMAC SHA256 signature of the payload.

{
  "event": "payment.completed",
  "sessionId": "sess_81ab29e34015f8a02c510e11",
  "amount": 9.99,
  "currency": "USD",
  "paymentMethod": "razorpay",
  "providerOrderId": "order_TkxYisfFrwA6FY",
  "providerPaymentId": "pay_OqkZ18239a01",
  "metadata": { "accountId": "acc_102" },
  "timestamp": 1791364000000
}

Mobile Apps & Android WebView

Intent-Payment's checkout is designed to work inside native Android WebViews and mobile browsers without popup blocking issues.

Android Kotlin WebView Setup

// Enable JavaScript & DOM Storage
webView.settings.javaScriptEnabled = true
webView.settings.domStorageEnabled = true
webView.settings.setSupportMultipleWindows(true)

// Load Hosted Checkout URL
val checkoutUrl = "https://pay.int.yt/checkout?session_id=sess_xxx"
webView.loadUrl(checkoutUrl)

Client SDK Widget

Easily embed checkout anywhere using the official client script:

<script src="https://pay.int.yt/sdk/intent-pay.js"></script>
<script>
  IntentPay.open({
    sessionId: 'sess_xxx',
    onSuccess: function (data) {
      console.log('Payment successful!', data);
    },
    onCancel: function () {
      console.log('Payment cancelled');
    }
  });
</script>