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
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
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
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
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
Response
Fetch Order
V2 Endpoint:GET /api/v2/pg/via/cashfree/orders/{order_id}
Response
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
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
Worldline
Emulates Worldline’s order creation API.Create Order
V2 Endpoint:POST /api/v2/order/via/worldline/create (Basic Auth)
Request
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
Support
For integration support or issues:- Email: support@paytring.com
- Documentation: https://docs.paytring.com

