> ## Documentation Index
> Fetch the complete documentation index at: https://razorpay-881012b3.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Razorpay S2S Integration - Best Practices

> Follow these Best practices while doing TPV integration.

<div style={{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"0.35rem 0.9rem",border:"1px solid rgba(128,128,128,0.28)",borderRadius:"0.5rem",padding:"0.45rem 0.75rem",margin:"0 0 1.25rem",fontSize:"0.875rem"}}>
  <span style={{fontWeight:600}}>Available in</span>
  <span>🇮🇳 India</span>
</div>

S2S integration is an API-based white label integration provided by Razorpay wherein you can capture payment details on your page and pass on the same to Razorpay via a backend API call.

Given below are some of the best practices to be followed for a smoother integration and payment experience:

1. We recommended using [S2S JSON API](/docs/payments/payment-gateway/s2s-integration/json/v2) for S2S integration.
2. For redirect flow, you must open the HTML provided as part of the API response, as is from the customer's browser.
3. You should pass the actual `user_agent`, `customer IP` and `referrer` to avoid any failures due to risk.
4. You should integrate [webhooks](/docs/webhooks) to get a callback via a server to server call.
5. Integrate the [Payments Rainy Day kit](/docs/payments/payment-gateway/rainy-day) to tackle payment exceptions such as late authorized payments, payment downtimes and errors.
