Timestamp
Generate and validate secure UNIX timestamps for every KwikPaisa API request to ensure request authenticity, improve transaction security, and protect APIs against replay attacks, unauthorized request
Last updated
const timestamp = Math.floor(Date.now() / 1000);
console.log(timestamp);<?php
$timestamp = time();
echo $timestamp;import time
timestamp = int(time.time())
print(timestamp)const timestamp = Math.floor(Date.now() / 1000);
console.log(timestamp);long timestamp = System.currentTimeMillis() / 1000;
System.out.println(timestamp);package main
import (
"fmt"
"time"
)
func main() {
timestamp := time.Now().Unix()
fmt.Println(timestamp)
}using System;
class Program
{
static void Main()
{
long timestamp = DateTimeOffset
.UtcNow
.ToUnixTimeSeconds();
Console.WriteLine(timestamp);
}
}int timestamp = DateTime.now()
.millisecondsSinceEpoch ~/ 1000;
print(timestamp);curl
--request
POST \
--url
https://sandbox.kwikpaisa.com/api/v3/pg/order/create \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-API-KEY: pk_test_xxxxxxxxx" \
--header "X-SIGNATURE: GENERATED_SIGNATURE" \
--header "X-TIMESTAMP: 1778659835" \
--data '{}'