API Documentation

Welcome to the TingPay API documentation. Our REST APIs allow you to integrate UPI payments into your applications.

Base URL

https://api.tingpay.com/v1

Authentication

All API requests must include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Create Payment

Create a new payment request:

Endpoint

POST /payments

Request Body

{
  "amount": 1000,
  "currency": "INR",
  "description": "Payment for Order #123",
  "customer": {
    "name": "John Doe",
    "email": "john@example.com",
    "phone": "+91 9876543210"
  }
}

Response

{
  "id": "pay_123456789",
  "status": "created",
  "amount": 1000,
  "currency": "INR",
  "qr_code": "upi://pay?pa=merchant@tingpay&pn=TingPay...",
  "created_at": "2024-01-01T12:00:00Z"
}

Get Payment Status

Check the status of a payment:

Endpoint

GET /payments/:id

Response

{
  "id": "pay_123456789",
  "status": "completed",
  "amount": 1000,
  "currency": "INR",
  "utr": "123456789012",
  "completed_at": "2024-01-01T12:05:00Z"
}