> ## 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.

# TPV S2S Integration - Debit Card

> Understand Third-Party Validation (TPV) support on S2S Integration with the debit card payment method by Razorpay.

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

Investors can pay with a debit card and input the necessary card details (card number, CVV, expiry information). When a debit card payment request is made, the system checks to confirm that the bank account associated with the debit card matches the registered bank account details. If this verification is successful, the customer is prompted to enter a one-time password (OTP) from the card to complete the payment.

### Checkout Flow

* **Guest Checkout**: Investors can add a new debit card for their purchase in this flow. They are given the option to save the card for future use or proceed with the purchase without saving the card details.

* **\[Coming Soon] Tokenized or Saved Card**: We will introduce a streamlined checkout experience where customers can select a saved debit card for their purchase, eliminating the need to re-enter the card information.

<Info>
  **Handy Tips**

  * You must have a PCI compliance certificate to enable this feature on your account. For more details, refer to the [PCI Compliance](https://www.pcisecuritystandards.org/) website.
  * To begin accepting Debit Card payment requests, make sure to prominently display **Debit Cards** as a payment option in your user interface (UI).
</Info>

## Prerequisites

* Contact our [Support Team](https://razorpay.com/support/#raise-a-request) to get this feature enabled for your account.
* Keep the API key (combination of `Key_Id` and `Key_Secret`) handy for integration.
* [Generate API Keys from the Dashboard](/docs/api/authentication#generate-api-keys) if you have not done already.
* Configure the [payment capture settings](/docs/payments/payments/capture-settings) on the Dashboard.

## Integration

Given below are the steps:

1. [Collect Investor Bank Account Details](#step-1-collect-investor-bank-account-details)
2. [Create an Order](#step-2-create-an-order)
3. [Create a Payment](#step-3-create-a-payment)
4. [Store Fields in Your Server](#step-4-store-fields-in-your-server)
5. [Verify the Signature](#step-5-verify-the-signature)

### Step 1: Collect Investor Bank Account details

Collect the investor's bank details or UPI ID at the time of investor registration.

### Step 2: Create an Order

If the user is choosing debit cards on your UI, pass the method as `card`.

`POST /orders`

<CodeGroup>
  ```bash Curl theme={null}
  curl -u <YOUR_KEY_ID>:<YOUR_KEY_SECRET> \
  -X POST https://api.razorpay.com/v1/orders \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 100,
    "method": "card",
    "receipt": "BILL13375649",
    "currency": "INR",
    "bank_account": {
      "account_number": "765432123456789",
      "name": "Gaurav Kumar",
      "ifsc": "HDFC0000053"
    }
  }'
  ```

  ```java Java theme={null}
  RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]");

      JSONObject orderRequest = new JSONObject();
      orderRequest.put("amount", 100); // amount in the smallest currency unit
      orderRequest.put("currency", "INR");
      orderRequest.put("receipt", "BILL13375649");
      orderRequest.put("method", "card");

      JSONObject bank_account = new JSONObject();
      bank_account.put("account_number", "765432123456789");
      bank_account.put("name", "Gaurav Kumar");
      bank_account.put("ifsc, "HDFC0000053");
      orderRequest.put("bank_account", bank_account);

      Order order = razorpayclient.orders.create(orderRequest);
      System.out.print(order);
          
  ```

  ```python Python theme={null}
  import razorpay
  client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET"))

  client.order.create({
  {
    "amount": 100,
    "method": "card",
    "receipt": "BILL13375649",
    "currency": "INR",
    "bank_account": {
      "account_number": "765432123456789",
      "name": "Gaurav Kumar",
      "ifsc": "HDFC0000053"
    }
   })
  ```

  ```php PHP theme={null}
  $api = new Api($key_id, $secret);

  $api->order->create(array('amount' => 100, 'receipt' => 'BILL13375649', 'method' => 'card', 'currency' => 'INR', 'bank_account'=> array('account_number'=> '765432123456789','name'=> 'Gaurav Kumar','ifsc'=>'HDFC0000053')));
  ```

  ```csharp .NET theme={null}
  RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]");

  Dictionary<string, object> orderRequest = new Dictionary<string, object>();
  orderRequest.Add("amount", 100);
  orderRequest.Add("method", "card");
  orderRequest.Add("currency", "INR");
  orderRequest.Add("receipt", "receipt#1");
  Dictionary<string, object> bankAccount = new Dictionary<string, object>();
  bankAccount.Add("account_number","765432123456789");
  bankAccount.Add("name","Gaurav Kumar");
  bankAccount.Add("ifsc","HDFC0000053");
  orderRequest.Add("bank_account", bankAccount);

  Order order = client.Order.Create(orderRequest);
  ```

  ```ruby Ruby theme={null}
  require "razorpay"
  Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET')

  para_attr = {
    "amount": 100,
    "method": "card",
    "receipt": "BILL13375649",
    "currency": "INR",
    "bank_account": {
      "account_number": "765432123456789",
      "name": "Gaurav Kumar",
      "ifsc": "HDFC0000053"
    }
  }  

  Razorpay::Order.create(para_attr)
  ```

  ```javascript Node.js theme={null}
  var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' })

  instance.orders.create({
    "amount": 100,
    "method": "card",
    "receipt": "BILL13375649",
    "currency": "INR",
    "bank_account": {
      "account_number": "765432123456789",
      "name": "Gaurav Kumar",
      "ifsc": "HDFC0000053"
    }
  })
  ```

  ```go Go theme={null}
  import ( razorpay "github.com/razorpay/razorpay-go" )
  client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET")

  data := map[string]interface{}{
    "amount": 100,
    "method": "card",
    "receipt": "BILL13375649",
    "currency": "INR",
    "bank_account": map[string]interface{}{
      "account_number": "765432123456789",
      "name": "Gaurav Kumar",
      "ifsc": "HDFC0000053",
    },
  }

  body, err := client.Order.Create(data, nil)
  ```

  ```json Response theme={null}
  {
    "id": "order_GAWN9beXgaqRyO",
    "entity": "order",
    "amount": 100,
    "amount_paid": 0,
    "amount_due": 500,
    "currency": "INR",
    "receipt": "BILL13375649",
    "offer_id": null,
    "status": "created",
    "attempts": 0,
    "notes": [],
    "created_at": 1573044247
  }
  ```
</CodeGroup>

If the user selects the payment method within the Razorpay UI, there is no need to include the `method` field. Below is a sample code for reference.

<CodeGroup>
  ```bash Curl theme={null}
  curl -u <YOUR_KEY_ID>:<YOUR_KEY_SECRET> \
  -X POST https://api.razorpay.com/v1/orders \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 100,
    "receipt": "BILL13375649",
    "currency": "INR",
    "bank_account": {
      "account_number": "765432123456789",
      "name": "Gaurav Kumar",
      "ifsc": "HDFC0000053"
    }
  }'
  ```

  ```java Java theme={null}
  RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]");

  JSONObject orderRequest = new JSONObject();
  orderRequest.put("amount",100);
  orderRequest.put("currency","INR");
  orderRequest.put("receipt", "receipt#1");
  JSONObject notes = new JSONObject();
  notes.put("notes_key_1","Tea, Earl Grey, Hot");
  notes.put("notes_key_1","Tea, Earl Grey, Hot");
  orderRequest.put("notes",notes);

  Order order = instance.orders.create(orderRequest);
          
  ```

  ```python Python theme={null}
  import razorpay
  client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET"))

  client.order.create({
    "amount": 100,
    "currency": "INR",
    "receipt": "receipt#1",
    "partial_payment":False,
    "notes": {
      "key1": "value3",
      "key2": "value2"
    }
  })
  ```

  ```php PHP theme={null}
  $api = new Api($key_id, $secret);

  $api->order->create(array('receipt' => '123', 'amount' => 100, 'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2')));
  ```

  ```csharp .NET theme={null}
  RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]");

  Dictionary<string, object> orderRequest = new Dictionary<string, object>();
  orderRequest.Add("amount", 100);
  orderRequest.Add("currency", "INR");
  orderRequest.Add("receipt", "receipt#1");
  Dictionary<string, object> notes = new Dictionary<string, object>();
  notes.Add("notes_key_1", "Tea, Earl Grey, Hot");
  notes.Add("notes_key_2", "Tea, Earl Grey, Hot");
  orderRequest.Add("notes", notes);

  Order order = client.Order.Create(orderRequest);
  ```

  ```ruby Ruby theme={null}
  require "razorpay"
  Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET')

  para_attr = {
    "amount": 100,
    "currency": "INR",
    "receipt": "receipt#1",
    "notes": {
      "key1": "value3",
      "key2": "value2"
    }
  }

  Razorpay::Order.create(para_attr)
  ```

  ```javascript Node.js theme={null}
  var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' })

  instance.orders.create({
    "amount": 100,
    "currency": "INR",
    "receipt": "receipt#1",
    "partial_payment": false,
    "notes": {
      "key1": "value3",
      "key2": "value2"
    }
  })
  ```

  ```go Go theme={null}
  import ( razorpay "github.com/razorpay/razorpay-go" )
  client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET")

  data := map[string]interface{}{
    "amount": 100,
    "currency": "INR",
    "receipt": "some_receipt_id",
    "partial_payment": false,
    "notes": map[string]interface{}{
        "key1": "value1",
        "key2": "value2",
      },
  }
  body, err := client.Order.Create(data, nil)
  ```

  ```json Response theme={null}
  {
    "id": "order_GAWRjlWkVcRh0V",
    "entity": "order",
    "amount": 100,
    "amount_paid": 0,
    "amount_due": 100,
    "currency": "INR",
    "receipt": "BILL13375649",
    "offer_id": null,
    "status": "created",
    "attempts": 0,
    "notes": [],
    "created_at": 1573044206
  }
  ```
</CodeGroup>

#### Request Parameters

Create a request payload using the following attributes:

`amount` *mandatory*
: `integer` The transaction amount expressed in paise (currency supported is INR). For example, for an actual amount of ₹1, the value of this field should be `100`.

`currency` *mandatory*
: `string` The currency in which the transaction should be made. You can create orders in **INR** only.

`receipt` *optional*
: `string` Receipt number that corresponds to this order, set for your internal reference. Maximum length is 40 characters.

`notes` *optional*
: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`.

`method` *mandatory*
: `string` The payment method used to make the payment. If this parameter is not passed, investors will be able to make payments using both netbanking and UPI payment methods. Possible values:

* `netbanking`: Investors can make payments only using netbanking.
* `card`: Investors can make payments using debit card.
* `upi`: Investors can make payments only using UPI.

`bank_account` *mandatory*
: `object` Details of the bank account that the investor has provided at the time of registration.

`account_number`  *mandatory*
: `string` The bank account number from which the investor should make the payment. For example, `765432123456789` Payments will not be processed for an incorrect account number.

`name` *mandatory*
: `string` The name linked to the bank account. For example, `Gaurav Kumar`.

`ifsc` *mandatory*
: `string` The bank IFSC. For example, `HDFC0000053`.

### Step 3: Create a Payment

`POST /payments/create/json`

<CodeGroup>
  ```bash Curl theme={null}
  curl -u <YOUR_KEY_ID>:<YOUR_KEY_SECRET> \
  -X POST https://api.razorpay.com/v1/payments/create/json \
  -H "Content-Type: application/json" \
   -d '{
    "amount": "100",
    "currency": "INR",
    "email": "gaurav.kumar@example.com",
    "contact": "9000090000",
    "order_id": "order_GAWN9beXgaqRyO",
    "method": "card",
    "card":{
      "number": "4386289407660153",
      "name": "Gaurav",
      "expiry_month": "11",
      "expiry_year": "30",
      "cvv": "100"
    },
  }'
  ```

  ```java Java theme={null}
  RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]");

  JSONObject paymentRequest = new JSONObject();
  paymentRequest.put("amount",100);
  paymentRequest.put("currency","INR");
  paymentRequest.put("email", "gaurav.kumar@example.com");
  paymentRequest.put("contact", "9000090000");
  paymentRequest.put("order_id", "order_JZluwjknyWdhnU");
  paymentRequest.put("method", "card");
  JSONObject card = new JSONObject();
  card.put("number","4854980604708430");
  card.put("cvv","123");
  card.put("expiry_month","12");
  card.put("expiry_year","30");
  card.put("name","Gaurav Kumar");
  paymentRequest.put("card",card);
                
  Payment payment = instance.payments.createJsonPayment(paymentRequest);
  ```

  ```python Python theme={null}
  import razorpay
  client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET"))

  client.payment.createPaymentJson({
    "amount": 100,
    "currency": "INR",
    "order_id": "order_EAkbvXiCJlwhHR",
    "email": "gaurav.kumar@example.com",
    "contact": 9000090000,
    "method": "card",
    "card":{
      "number": 4386289407660153,
      "name": "Gaurav",
      "expiry_month": 11,
      "expiry_year": 30,
      "cvv": 100
    }
  })
  ```

  ```php PHP theme={null}
  $api = new Api($key_id, $secret);

  $api->payment->createPaymentJson(array('amount' => 100,'currency' => 'INR','email' => 'gaurav.kumar@example.com','contact' => '9000090000','order_id' => 'order_I6LVPRQ6upW3uh','method' => 'card','card' => array('number' => '4854980604708430','cvv' => '123','expiry_month' => '12','expiry_year' => '30','name' => 'Gaurav Kumar')));
  ```

  ```csharp .NET theme={null}
  RazorpayClient client = new RazorpayClient(your_key_id, your_secret);

  Dictionary<string, object> paymentRequest = new Dictionary<string, object>();
  paymentRequest.Add("amount", 100);
  paymentRequest.Add("currency", "INR");
  paymentRequest.Add("email", "gaurav.kumar@example.com");
  paymentRequest.Add("contact", "9000090000");
  paymentRequest.Add("order_id", "order_MScdJxfAb4NFbD");
  paymentRequest.Add("method", "card");
  Dictionary<string, object> card = new Dictionary<string, object>();
  card.Add("number", "4854980604708430");
  card.Add("cvv", "123");
  card.Add("expiry_month", "12");
  card.Add("expiry_year", "30");
  card.Add("name", "Gaurav Kumar");
  paymentRequest.Add("card", card);

  Payment payment = client.Payment.CreateJsonPayment(paymentRequest);
  ```

  ```ruby Ruby theme={null}
  require "razorpay"
  Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET')

  para_attr = {
    "amount": 100,
    "currency": "INR",
    "order_id": "order_EAkbvXiCJlwhHR",
    "email": "gaurav.kumar@example.com",
    "contact": 9000090000,
    "method": "card",
    "card":{
      "number": 4386289407660153,
      "name": "Gaurav",
      "expiry_month": 11,
      "expiry_year": 30,
      "cvv": 100
    }
  }

  Razorpay::Payment.create_json_payment(para_attr)
  ```

  ```javascript Node.js theme={null}
  var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' })

  instance.payments.createPaymentJson({
    "amount": 100,
    "currency": "INR",
    "order_id": "order_EAkbvXiCJlwhHR",
    "email": "gaurav.kumar@example.com",
    "contact": 9000090000,
    "method": "card",
    "card":{
      "number": 4386289407660153,
      "name": "Gaurav",
      "expiry_month": 11,
      "expiry_year": 30,
      "cvv": 100
    }
  })
  ```

  ```go Go theme={null}
  import ( razorpay "github.com/razorpay/razorpay-go" )
  client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET")

  para_attr := map[string]interface{}{
    "amount": 100,
    "currency": "INR",
    "order_id": "order_EAkbvXiCJlwhHR",
    "email": "gaurav.kumar@example.com",
    "contact": 9000090000,
    "method": "card",
    "card": map[string]interface{}{
      "number": "4386289407660153",
      "name": "Gaurav",
      "expiry_month": 11,
      "expiry_year": 30,
      "cvv": 100,
    },
  }
  body, err := client.Payment.CreatePaymentJson(para_attr, nil)
  ```

  ```json Response theme={null}
  {
    "razorpay_payment_id": "pay_GAWOYqPlvrtPSi",
    "next": [
      {
        "action": "redirect",
        "url": "https://api.razorpay.com/v1/payments/pay_GAWOYqPlvrtPSi/authorize"
      }
    ]
  }
  ```
</CodeGroup>

#### Request Parameters

`amount` *mandatory*
: `integer` The transaction amount expressed in paise (currency supported is INR). For example, for an actual amount of ₹1, this field's value should be `100`.

`currency` *mandatory*
: `string` The currency in which the transaction should be made. You can create Orders in **INR** only.

`order_id` *mandatory*
: `string` Unique identifier of the order created in the previous step.

`method` *mandatory*
: `string` The payment method used to make the payment. Possible value: `card`

`card` *mandatory*
: \`object\`\` Details associated with the card.

`number`
: `string` Unformatted card number.

`name`
: `string` Name of the cardholder.

`expiry_month`
: `string` Expiry month for the card in MM format.

`expiry_year`
: `string` Expiry year for the card in YY format.

`cvv`
`string` CVV printed on the back of the card.

`email` *mandatory*
: `string` The customer's email address.

`contact` *mandatory*
: `string` The customer's phone number.

#### Response Parameters

If the payment request is valid, the response contains the following fields:

`razorpay_payment_id`
: `string` Unique identifier of the payment. Present for all responses.

`next`
: `array` A list of action objects available to you to continue the payment process. Present when the payment requires further processing.

`action`
: `string` An indication of the next step available to you to continue the payment process. Possible values:

* `redirect` - Use this URL to redirect the customer to the bank page.
* `poll` - A payment request notification is sent to the customer's UPI PSP app.

`url`
: `string`  URL to be used for the action indicated.

### Step 4: Store Fields in Your Server

A successful payment returns the following fields to the Checkout form.

<AccordionGroup>
  <Accordion title="Success Callback">
    * You need to store these fields in your server.
    * You can confirm the authenticity of these details by verifying the signature in the next step.

    <CodeGroup>
      ```json Success Callback theme={null}
      {
        "razorpay_payment_id": "pay_29QQoUBi66xm2f",
        "razorpay_order_id": "order_9A33XWu170gUtm",
        "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d"
      }
      ```
    </CodeGroup>

    <br />

    `razorpay_payment_id`
    : `string` Unique identifier for the payment returned by Checkout **only** for successful payments.

    `razorpay_order_id`
    : `string` Unique identifier for the order returned by Checkout.

    `razorpay_signature`
    : `string` Signature returned by the Checkout. This is used to verify the payment.
  </Accordion>
</AccordionGroup>

### Step 5: Verify the Signature

This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments.

<AccordionGroup>
  <Accordion title="To verify the `razorpay_signature` returned to you by the Checkout form:">
    1. Create a signature in your server using the following attributes:
       * `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout.
       * `razorpay_payment_id`: Returned by Checkout.
       * `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](/docs/payments/dashboard/account-settings/api-keys#generate-api-keys).

    2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below:

    ```html HMAC Hex Digest theme={null}
    generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret);

      if (generated_signature == razorpay_signature) {
        payment is successful
      }
    ```

    3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source.
  </Accordion>
</AccordionGroup>

<AccordionGroup>
  <Accordion title="Generate Signature on Your Server">
    Given below is the sample code for payment signature verification:

    <CodeGroup>
      ```java Java theme={null}
      RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]");

      String secret = "EnLs21M47BllR3X8PSFtjtbd";

      JSONObject options = new JSONObject();
      options.put("razorpay_order_id", "order_IEIaMR65cu6nz3");
      options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l");
      options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f");

      boolean status =  Utils.verifyPaymentSignature(options, secret);
      ```

      ```php PHP theme={null}
      $api = new Api($key_id, $secret);

      $api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature));
      ```

      ```ruby Ruby theme={null}
      require "razorpay"
      Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET')

      payment_response = {
             razorpay_order_id: 'order_IEIaMR65cu6nz3',
             razorpay_payment_id: 'pay_IH4NVgf4Dreq1l',
             razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f'
           }
      Razorpay::Utility.verify_payment_signature(payment_response)
      ```

      ```python Python theme={null}
      import razorpay
      client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET"))

      client.utility.verify_payment_signature({
        'razorpay_order_id': razorpay_order_id,
        'razorpay_payment_id': razorpay_payment_id,
        'razorpay_signature': razorpay_signature
        })
      ```

      ```c .NET theme={null}
      RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]");

      Dictionary<string, string> options = new Dictionary<string, string>();
      options.Add("razorpay_order_id", "order_IEIaMR65cu6nz3");
      options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l");
      options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f");

      Utils.verifyPaymentSignature(options);
      ```

      ```javascript Node.js theme={null}
      var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' })

      var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils');
      validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret);
      ```

      ```go Go theme={null}
      import ( razorpay "github.com/razorpay/razorpay-go" )
      client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET")

      params := map[string]interface{}{
       "razorpay_order_id": "order_IEIaMR65cu6nz3",
       "razorpay_payment_id": "pay_IH4NVgf4Dreq1l",
      }

      signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f";
      secret := "EnLs21M47BllR3X8PSFtjtbd";
      utils.VerifyPaymentSignature(params, signature, secret)
      ```
    </CodeGroup>
  </Accordion>
</AccordionGroup>

<AccordionGroup>
  <Accordion title="Post Signature Verification">
    After you have completed the integration, you can [set up webhooks](/docs/webhooks/setup-edit-payments), make test payments, replace the test key with the live key and integrate with other [APIs](/docs/api).
  </Accordion>
</AccordionGroup>

### Payment Capture Settings

After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time.

<Warning>
  **Watch Out**

  * You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments.
  * You can track the payment status using our [Fetch a Payment API](/docs/api/payments#fetch-a-payment) or webhooks.
</Warning>

<Tabs>
  <Tab title="Auto-capture Payments (Recommended)">
    Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](/docs/payments/payments/capture-settings#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](/docs/payments/payments/capture-settings).

    <Warning>
      **Watch Out!**

      Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](/docs/api/orders/create).
    </Warning>
  </Tab>

  <Tab title="Manually Capture Payments">
    Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](/docs/api/payments/capture) or [Dashboard](/docs/payments/payments/dashboard#manually-capture-payments). Know more about [capture settings for payments](/docs/payments/payments/capture-settings).
  </Tab>
</Tabs>

### Related Information

* [Webhooks](/docs/webhooks) (Recommended)
* [Error Codes](/docs/errors) (Recommended)
* [How Payment Gateway Works](/docs/payments/payment-gateway/how-it-works)
* [Payment States](/docs/payments/payments)
* [Settlements](/docs/payments/settlements)
* [Refunds](/docs/payments/refunds)
