Skip to content
ZytePedevelopersDashboard
DocsAccept payments
Accept payments

Payment links

Connect a collection intent to your invoice and payment notification.

Create a collection intent

Call Create payment link with merchant HMAC. Use external_id for your invoice/order reference and retain the returned short_id, intent ID and checkout_url.

The example includes amount, expiry_days, usage_limit, customer_context and tags. It is not a complete required-field schema. The reviewed local CCAvenue handler specifically checks fixed amount, customer_context and external_id; account PSP mapping is also necessary.

Share the hosted URL

Give the customer the returned checkout_url. Use a link-specific notify_url when you need that intent's callback delivered separately from account defaults.

Track the outcome

Use inbound callbacks for backend payment updates. Public payment status supports the checkout experience but should not replace authenticated transaction recovery and your payment records.

Resolve configuration failures

A documented merchant test reached authentication successfully but returned CCAvenue PSP MID is not assigned to this merchant. This is a merchant/provider mapping issue. Confirm enablement with support instead of repeatedly creating intents.

Request example

Choose Node.js, Python, PHP, Ruby, Java or cURL. Run signed requests on your backend. PHP, Ruby and Java include signing directly. Java requires JDK 17 or newer.

import { signedHeaders } from './signing.mjs';
const path = `/api/v1/collections/intents/api`;
const query = '';
const payload = {
  "title": "Invoice INV-2042",
  "description": "April subscription renewal",
  "usage_limit": 1,
  "amount": 2500,
  "min_limit": 1,
  "max_limit": 50000,
  "currency": "INR",
  "expiry_days": 7,
  "external_id": "INV-2042",
  "notify_url": "https://merchant.example.com/hooks/collection-link",
  "customer_context": {
    "full_name": "Rahul Sharma",
    "email_address": "rahul@example.com",
    "phone_number": "9876543210",
    "dial_code": "+91"
  },
  "tags": {
    "source": "merchant-api",
    "channel": "web"
  }
};
const body = JSON.stringify(payload);
const headers = signedHeaders({
  method: 'POST', path, query, body,
  keyId: process.env.ZYTEPE_API_KEY_ID,
  secret: process.env.ZYTEPE_API_SECRET,
});
headers['Content-Type'] = 'application/json';
const url = 'https://api.zytepe.com' + path + (query ? '?' + query : '');
const response = await fetch(url, { method: 'POST', headers, body });
if (!response.ok) throw new Error('Request failed: HTTP ' + response.status);
const result = await response.json();
// Store the returned identifiers securely. Do not log customer data.

Request fields

Optional fields can be omitted. Conditional fields depend on the payment method. Labels reflect the reviewed API schemas and handler checks.

titleRequired

Checkout title.

amountRequired

Payment amount in the documented currency.

external_idRequired

Your order or invoice reference; required by the API checkout handler.

customer_contextRequired

Customer identity; required by the API checkout handler.

customer_context.full_nameRequired

Required customer detail.

customer_context.email_addressRequired

Required customer detail.

customer_context.phone_numberRequired

Required customer detail.

descriptionOptional

Additional checkout description.

usage_limitOptional

Defaults to 1.

min_limitOptional

Defaults to 1.0000.

max_limitOptional

Upper amount limit; source examples do not establish its effect on a fixed-amount checkout.

currencyOptional

Defaults to INR.

expiry_daysOptional

Defaults to 7 days.

customer_context.dial_codeOptional

Defaults to +91.

notify_urlOptional

Link-specific callback destination.

tagsOptional

Additional business context.

Request body

JSON · request.json
{
  "title": "Invoice INV-2042",
  "description": "April subscription renewal",
  "usage_limit": 1,
  "amount": 2500,
  "min_limit": 1,
  "max_limit": 50000,
  "currency": "INR",
  "expiry_days": 7,
  "external_id": "INV-2042",
  "notify_url": "https://merchant.example.com/hooks/collection-link",
  "customer_context": {
    "full_name": "Rahul Sharma",
    "email_address": "rahul@example.com",
    "phone_number": "9876543210",
    "dial_code": "+91"
  },
  "tags": {
    "source": "merchant-api",
    "channel": "web"
  }
}

Example response

JSON · response
{
  "success": true,
  "message": "Payment link created via API.",
  "data": {
    "id": "49c2ebf2-f651-473e-ab78-6c154665df92",
    "short_id": "s0oJRkuT6OY",
    "title": "Invoice INV-2042",
    "description": "April subscription renewal",
    "fixed_amount": "2500.0000",
    "min_limit": "1.0000",
    "max_limit": null,
    "currency": "INR",
    "usage_limit": 1,
    "current_usage_count": 0,
    "status": "active",
    "is_active": true,
    "expires_at": "2026-05-10T10:30:00Z",
    "checkout_url": "https://pay.zytepe.com/s0oJRkuT6OY"
  }
}