> ## Documentation Index
> Fetch the complete documentation index at: https://razorpay-60c89f9a-mintlify-audit-missing-sections-1778528421.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Razorpay S2S Integration - Best Practices

> 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:

<Steps>
  <Step title="Step 1">
    We recommended using [S2S JSON API](/payments/payment-gateway/s2s-integration/json/v2) for S2S integration.
  </Step>

  <Step title="Step 2">
    For redirect flow, you must open the HTML provided as part of the API response, as is from the customer's browser.
  </Step>

  <Step title="Step 3">
    You should pass the actual `user_agent`, `customer IP` and `referrer` to avoid any failures due to risk.
  </Step>

  <Step title="Step 4">
    You should integrate [webhooks](/webhooks) to get a callback via a server to server call.
  </Step>

  <Step title="Step 5">
    Integrate the [Payments Rainy Day kit](/payments/payment-gateway/rainy-day) to tackle payment exceptions such as late authorized payments, payment downtimes and errors.
  </Step>
</Steps>
