Transformation Layer API’s
The Transformation Layer enables merchants to integrate with Paytring using API formats they’re already familiar with from other payment gateways. This eliminates the need for code changes when migrating from Razorpay, PayU, Pinelabs, Cashfree, or Worldline.Overview
| Gateway | Authentication | Endpoints | Features |
|---|---|---|---|
| Razorpay | Hash-based (V1) / Basic Auth (V2) | Create, Fetch | Order creation & status |
| PayU | Hash-based (V1) / Basic Auth (V2) | Create, Fetch | Order creation & status |
| Pinelabs | Hash-based (V1) / Basic Auth (V2) | Create, Fetch | Order creation & status |
| Cashfree | Header-based (x-client-id/secret) | Create, Fetch, Payments, Refunds | Full order & refund lifecycle |
| Worldline | None (V1) / Basic Auth (V2) | Create | Order creation |
Authentication Methods
V1 - Hash-based Authentication
Used by: Razorpay, PayU, Pinelabs Include in request body:- Sort all request parameters alphabetically by key
- Concatenate values with
|separator - Append
|+ API secret - Generate SHA512 hash
V2 - Basic Authentication
Used by: Razorpay, PayU, Pinelabs, Worldline Include HTTP header:Cashfree-style Header Authentication
Used by: Cashfree Include HTTP headers:Razorpay
Emulates Razorpay’s order API format.Create Order
V2 Endpoint:POST /api/v2/order/via/rzp/create
Request
| Field | Type | Required | Description |
|---|---|---|---|
amount | integer | Yes | Amount in paise (e.g., 50000 = ₹500) |
currency | string | Yes | Currency code (INR) |
receipt | string | Yes | Unique receipt/order identifier |
notes | object | No | Additional metadata |
Response
Fetch Order
V2 Endpoint:POST /api/v2/order/via/rzp/fetch
Request
Response
PayU
Emulates PayU’s order API format.Create Order
V2 Endpoint:POST /api/v2/order/via/payu/create
Request
| Field | Type | Required | Description |
|---|---|---|---|
txnid | string | Yes | Unique transaction ID |
amount | string | Yes | Amount in rupees (e.g., “500.00”) |
productinfo | string | Yes | Product/order description |
firstname | string | Yes | Customer first name |
email | string | Yes | Customer email |
phone | string | Yes | Customer phone |
surl | string | Yes | Success callback URL |
furl | string | Yes | Failure callback URL |
Response
Fetch Order
V2 Endpoint:POST /api/v2/order/via/payu/fetch
Request
Response
Pinelabs
Emulates Pinelabs’ order API format.Create Order
V2 Endpoint:POST /api/v2/order/via/pinelabs/create
Request
| Field | Type | Required | Description |
|---|---|---|---|
merchant_txn_id | string | Yes | Unique transaction ID |
amount | integer | Yes | Amount in paise |
currency | string | Yes | Currency code |
customer_name | string | No | Customer name |
customer_email | string | No | Customer email |
customer_mobile | string | No | Customer phone |
callback_url | string | Yes | Webhook callback URL |
Response
Fetch Order
V2 Endpoint:POST /api/v2/order/via/pinelabs/fetch
Request
Response
Cashfree
Emulates Cashfree’s PG API format with full order and refund lifecycle support.Create Order
V2 Endpoint:POST /api/v2/pg/via/cashfree/orders
Request
| Field | Type | Required | Description |
|---|---|---|---|
order_id | string | Yes | Unique order identifier |
order_amount | number | Yes | Amount in rupees (decimal, e.g., 500.50) |
order_currency | string | Yes | Currency code (INR) |
customer_details.customer_id | string | Yes | Customer identifier |
customer_details.customer_name | string | No | Customer name |
customer_details.customer_email | string | Yes | Customer email |
customer_details.customer_phone | string | Yes | Customer phone (10 digits) |
order_meta.return_url | string | No | Return URL after payment |
order_meta.notify_url | string | No | Webhook notification URL |
order_note | string | No | Order description |
Response
Fetch Order
V2 Endpoint:GET /api/v2/pg/via/cashfree/orders/{order_id}
Response
| Status | Description |
|---|---|
ACTIVE | Order created, awaiting payment |
PAID | Payment successful |
EXPIRED | Order expired or payment failed |
Get Order Payments
V2 Endpoint:GET /api/v2/pg/via/cashfree/orders/{order_id}/payments
Response
Create Refund
V2 Endpoint:POST /api/v2/pg/via/cashfree/orders/{order_id}/refunds
Request
| Field | Type | Required | Description |
|---|---|---|---|
refund_id | string | Yes | Unique refund identifier |
refund_amount | number | Yes | Refund amount in rupees |
refund_note | string | No | Reason for refund |
Response
List Refunds
V2 Endpoint:GET /api/v2/pg/via/cashfree/orders/{order_id}/refunds
Response
Fetch Refund
V2 Endpoint:GET /api/v2/pg/via/cashfree/orders/{order_id}/refunds/{refund_id}
Response
| Status | Description |
|---|---|
PENDING | Refund initiated |
SUCCESS | Refund processed successfully |
CANCELLED | Refund cancelled |
Worldline
Emulates Worldline’s order creation API.Create Order
V2 Endpoint:POST /api/v2/order/via/worldline/create (Basic Auth)
Request
| Field | Type | Required | Description |
|---|---|---|---|
merchant_id | string | Yes | Merchant identifier |
order_id | string | Yes | Unique order ID |
amount | string | Yes | Amount in rupees |
currency | string | Yes | Currency code |
customer_name | string | No | Customer name |
customer_email | string | No | Customer email |
customer_phone | string | No | Customer phone |
return_url | string | Yes | Return URL after payment |
Response
Error Responses
All endpoints return consistent error responses:Validation Error (400)
Authentication Error (401)
Not Found (404)
Server Error (500)
Migration Guide
From Razorpay
- Replace base URL:
https://api.razorpay.com/v1→https://api.paytring.com/api/v2/order/via/rzp - Update authentication to use Paytring API credentials
- No changes needed to request/response handling
From PayU
- Replace endpoint: PayU’s endpoint →
https://api.paytring.com/api/v2/order/via/payu - Update
keyandsaltto Paytring credentials - Hash calculation remains the same
From Pinelabs
- Replace base URL →
https://api.paytring.com/api/v2/order/via/pinelabs - Use Paytring API credentials
- Response format remains compatible
From Cashfree
- Replace base URL:
https://api.cashfree.com/pg→https://api.paytring.com/api/v2/pg/via/cashfree - Update
x-client-idandx-client-secretheaders with Paytring credentials - All endpoints and response formats remain compatible
Rate Limits
| Endpoint Type | Limit |
|---|---|
| Create Order | 100 requests/minute |
| Fetch Order | 300 requests/minute |
| Refund Operations | 50 requests/minute |
Support
For integration support or issues:- Email: [email protected]
- Documentation: https://docs.paytring.com

