Skip to main content

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:
Hash Calculation:
  1. Sort all request parameters alphabetically by key
  2. Concatenate values with | separator
  3. Append | + API secret
  4. Generate SHA512 hash
See Hash Documentation for details.

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

Order Status Values:

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

Refund Status Values:

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

  1. Replace base URL: https://api.razorpay.com/v1https://api.paytring.com/api/v2/order/via/rzp
  2. Update authentication to use Paytring API credentials
  3. No changes needed to request/response handling

From PayU

  1. Replace endpoint: PayU’s endpoint → https://api.paytring.com/api/v2/order/via/payu
  2. Update key and salt to Paytring credentials
  3. Hash calculation remains the same

From Pinelabs

  1. Replace base URL → https://api.paytring.com/api/v2/order/via/pinelabs
  2. Use Paytring API credentials
  3. Response format remains compatible

From Cashfree

  1. Replace base URL: https://api.cashfree.com/pghttps://api.paytring.com/api/v2/pg/via/cashfree
  2. Update x-client-id and x-client-secret headers with Paytring credentials
  3. All endpoints and response formats remain compatible

Rate Limits


Support

For integration support or issues: