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

# Terms and Submission Tests

> Test terms acceptance and submission on Onboarding APIs in Test Mode, including activation and rejection scenarios.

Available in
🇮🇳 India

Accept Razorpay's terms of service on a test account, submit the product and force every outcome after submission before you go live.

The sub-merchant accepts Razorpay's terms of service in your UI. You submit by sending the acceptance. The product's outcome follows, in the same response for most products.

Start with the [overview](https://razorpay.com/docs/partners/aggregators/onboarding-api/test-integration) for test credentials and headers.

## 1. Test Mode Coverage

### Test Mode Differences

The table below lists how submission behaves in each mode:

| Behaviour | Live mode | Test mode |
| - | - | - |
| Accept and submit | Razorpay records the acceptance and returns the time in `accepted_at`. | The same as live mode. |
| Outcome after submission | A reviewer decides when a review runs. A review can take days. | No reviewer. The settlement account or a business-name suffix decides the outcome, about 5 sec after submission when a review runs. |
| Video KYC | The sub-merchant joins a call with an agent. | A hosted test page where you pick the outcome of the call. |
| Held in review | A deferred check waits for a reviewer. | Settlement account `000000000005` holds the product in `under_review` for 5 min. |
| After activation | Live API keys become available. | The status only. A test account never goes live and never gets live API keys. |

### What You Can Test

The table below lists the areas to test for submission:

| Area | What to test | In test mode |
| - | - | - |
| Accept and submit | The terms page, the acceptance and its errors | Available |
| Outcomes | `activated`, `edd_pending`, `under_review`, `needs_clarification` and `rejected` | Available |
| Video KYC | Approved, rejected and unable to verify | Available |
| Held in review | A deferred check | Available |
| After activation | `activated`, then `suspended` | Available |

### Endpoint Coverage in Test Mode

The table below lists the endpoints this page uses:

| API | Endpoint | Available in test mode |
| - | - | - |
| [Update an Account](https://razorpay.com/docs/api/partners/accounts/update.md) | `PATCH /v1/accounts/{account_id}`, to accept and submit | Available |
| [Run an Action](https://razorpay.com/docs/api/partners/accounts/run-action.md) | `POST /v1/accounts/{account_id}/actions/{action}`, for the video KYC link | Available |
| [Fetch Accounts](https://razorpay.com/docs/api/partners/accounts/fetch.md) | `GET /v1/accounts/{account_id}` | Available |

## 2. Before You Begin

Prepare the following before you run the scenarios:

* Meet every requirement except `accept_terms_of_service`.
* Pick the outcome you want to test with the settlement bank account, from the table below.

### Outcomes After Submission

Pick the outcome with the settlement bank account number. Each of these accounts verifies whatever the holder's name, so it works with every business type. Any other verified account gives the default: `activated` in the response, or `edd_pending` without a Central KYC Records Registry (CKYC) record.

The table below lists the settlement accounts that force each outcome:

| Settlement account | Outcome | Use it to test |
| - | - | - |
| `000000000001` | `activated` in the submission response | The default outcome, for a business type with no matching test account |
| `000000000002` | `under_review` in the response, then `rejected` about 5 sec later | A rejection, for any business type |
| `000000000003` | `under_review` in the response, then `needs_clarification` about 5 sec later, flagging the bank account | Needs clarification. Once answered and resubmitted, the product is activated. |
| `000000000004` | `edd_pending` in the response. Video KYC is due, even with a CKYC record. | Video KYC, for every type whose requirements list it: all types except Hindu Undivided Family (HUF), government, judicial person and local authority |
| `000000000005` | The bank check is deferred. `under_review` in the response, held for 5 min, then `activated`. | A deferred check, and a review that takes a while |
| `000000000006` | `activated` in the response, then `suspended` about 60 sec later. `status_reason.code` is `website_review_failed`, and the website is due again. | A suspension after activation. Send `https://curlec.com` and the product is activated again. |
| `000000000007` | `activated` in the response. About 60 sec later, the sub-merchant withdraws your access. | `account.consent.withdrawn`, and `403 consent_withdrawn` on every later call |

Registered business types can use a business-name suffix instead. `_REJECT` (such as `SUNRISE ENTERPRISES_REJECT`) rejects the product, and `_EDD` asks for video KYC. The suffix does not affect the name matches.

### Sample Request

Submission is the last update. Show the sub-merchant Razorpay's terms of service for the `accept_terms_of_service` requirement. Once they accept in your UI, send their `ip` and `device_fingerprint_id` in the product's `terms_of_service_acceptance`.

```bash Curl theme={null}
curl -X PATCH https://api.razorpay.com/v1/accounts/acc_TcdGEzmfKQzEl1 \
-u rzp_test_partner_[CLIENT_ID]:[CLIENT_SECRET] \
-H "Content-Type: application/json" \
-H "X-Idempotency-Key: [UNIQUE_KEY]" \
-d '{
  "products": {
    "payment_gateway": {
      "terms_of_service_acceptance": {
        "ip": "203.0.113.42",
        "device_fingerprint_id": "df_9Hq4Lt2Vb5Ks8Zp"
      }
    }
  }
}'
```

The table below lists the fields of `terms_of_service_acceptance`:

| Field | Required | Description |
| - | - | - |
| `ip` | Yes | The Internet Protocol (IP) address the sub-merchant accepted from. |
| `device_fingerprint_id` | Yes | The device fingerprint of the sub-merchant's device. |
| `metadata` | No | Details of the acceptance. `{}` when the acceptance has none. |
| `accepted_at` | No | Response only. The time Razorpay recorded the acceptance. |

Know more about the [request parameters](https://razorpay.com/docs/api/partners/accounts/update.md).

### Sample Response

Razorpay records the acceptance and submits the product. The response carries the acceptance's `accepted_at`. Most products come back `activated` in this response, as below.

> [accordion] Response: HTTP 200
>
> ```json Response theme={null}
> {
>   "id": "acc_TcdGEzmfKQzEl1",
>   "country": "IN",
>   "statement_descriptor": {
>     "value": "Rzp Test Store",
>     "verification": {
>       "status": "verified",
>       "verified_at": 1793164800
>     }
>   },
>   "is_mfa_enabled": false,
>   "user": {
>     "role": "owner",
>     "email": "test.owner@example.com",
>     "phone": "+919876543210",
>     "name": "Rzp Test QA Merchant",
>     "is_email_verified": true,
>     "is_phone_verified": true
>   },
>   "business_profile": {
>     "business_type": "individual",
>     "business_name": "Rzp Test QA Merchant",
>     "date_of_establishment": null,
>     "identity_numbers": {},
>     "documents": {},
>     "business_category": {
>       "category": "ecommerce",
>       "subcategory": "computers_peripheral_equipment_software",
>       "mcc": "5732",
>       "business_description": "Payment and billing software, sold online"
>     },
>     "authorized_person": {
>       "name": "Rzp Test QA Merchant",
>       "identity_numbers": {
>         "individual_pan": {
>           "type": "individual_pan",
>           "value": "ABCPD1234A",
>           "verification": {
>             "status": "verified",
>             "error_code": null,
>             "error_description": null,
>             "verified_at": 1793164860,
>             "metadata": {},
>             "created_at": 1793164858
>           },
>           "metadata": {},
>           "is_skipped": false,
>           "created_at": 1793164858,
>           "updated_at": 1793164860
>         },
>         "individual_ckyc": {
>           "type": "individual_ckyc",
>           "value": null,
>           "verification": {
>             "status": "verified",
>             "error_code": null,
>             "error_description": null,
>             "verified_at": 1793165040,
>             "metadata": {},
>             "created_at": 1793165038
>           },
>           "metadata": {
>             "ckyc_mobile": "+919845098450"
>           },
>           "is_skipped": false,
>           "created_at": 1793165038,
>           "updated_at": 1793165040
>         }
>       },
>       "documents": {},
>       "address": null,
>       "date_of_birth": null,
>       "additional_data": {},
>       "created_at": 1793164858,
>       "updated_at": 1793165040
>     },
>     "stakeholders": {},
>     "addresses": [],
>     "metadata": {}
>   },
>   "bank_accounts": {
>     "settlements_primary": {
>       "type": "settlements_primary",
>       "account_number": "1234567890",
>       "routing_code": "HDFC0123456",
>       "routing_code_type": "IFSC",
>       "supporting_document": null,
>       "verification": {
>         "status": "verified",
>         "error_code": null,
>         "error_description": null,
>         "verified_at": 1793164940,
>         "metadata": {},
>         "created_at": 1793164938
>       }
>     }
>   },
>   "products": {
>     "payment_gateway": {
>       "type": "payment_gateway",
>       "status": "activated",
>       "status_reason": null,
>       "created_at": 1793164800,
>       "updated_at": 1793165101,
>       "requirements": [],
>       "terms_of_service_acceptance": {
>         "ip": "203.0.113.42",
>         "device_fingerprint_id": "df_9Hq4Lt2Vb5Ks8Zp",
>         "metadata": {},
>         "accepted_at": 1793165100
>       },
>       "payment_channels": {
>         "website": {
>           "primary": "https://curlec.com",
>           "additional": [],
>           "verification": {
>             "status": "verified",
>             "error_code": null,
>             "error_description": null,
>             "verified_at": 1793164935,
>             "metadata": {},
>             "created_at": 1793164930
>           }
>         },
>         "app_android": null,
>         "app_ios": null
>       }
>     }
>   },
>   "notes": {
>     "shop_id": "60291847"
>   },
>   "created_at": 1793164800,
>   "updated_at": 1793165101
> }
> ```

## 3. Test Scenarios

Work through these scenarios in order. Each row gives the trigger to send and what to confirm in the response.

### 3.1 Scenarios

**Live** scenarios work in test mode today. **Coming soon** scenarios are not available in test mode yet.

The table below lists 14 scenarios. 2 are live and 12 are coming soon:

<table>
  <colgroup>
    <col width="6%" />

    <col width="22%" />

    <col width="24%" />

    <col width="48%" />
  </colgroup>

  <thead><tr><th>#</th><th>Scenario</th><th>Trigger</th><th>What to confirm</th></tr></thead>

  <tbody>
    <tr><td>1</td><td>Accept the terms and submit Coming soon</td><td>Individual A, with every requirement but the terms met</td><td>Show Razorpay's terms of service to the sub-merchant, who accepts. Send their `ip` and `device_fingerprint_id`, as in the [sample request](#sample-request). Confirm `activated`, with `accepted_at` on the acceptance.</td></tr>
    <tr><td>2</td><td>Submit with something still due Live</td><td>The acceptance before the bank account</td><td>Confirm `400 step_not_due` with `metadata.due`.</td></tr>
    <tr><td>3</td><td>A missing field Live</td><td>No `device_fingerprint_id`</td><td>Confirm `400 invalid_request`, with `field` naming it.</td></tr>
    <tr><td>4</td><td>No CKYC record: video KYC Coming soon</td><td>PAN `ABCPD7891B`</td><td>Submit. Confirm `edd_pending` in the response, and `create_video_kyc_link` due as an action.</td></tr>
    <tr><td>5</td><td>Video KYC approved Coming soon</td><td>#4, then **Approved** on the hosted test page</td><td>Run `create_video_kyc_link`. The link is in the response's `metadata`. Open the `url` and pick **Approved**. Confirm `under_review`, then `activated` about 5 sec later.</td></tr>
    <tr><td>6</td><td>Video KYC rejected Coming soon</td><td>#4, then **Rejected** on the hosted test page</td><td>Pick **Rejected**. Confirm `under_review`, then `rejected` about 5 sec later.</td></tr>
    <tr><td>7</td><td>Video KYC unable to verify Coming soon</td><td>#4, then **Unable to verify** on the hosted test page</td><td>Pick **Unable to verify**. Confirm the product stays `edd_pending`, and `create_video_kyc_link` is still due. Run it again for a new call.</td></tr>
    <tr><td>8</td><td>Rejected Coming soon</td><td>Settlement account `000000000002`, or `business_name` ending `_REJECT`</td><td>Submit. Confirm `under_review` in the response, then `rejected` about 5 sec later.</td></tr>
    <tr><td>9</td><td>Video KYC by value Coming soon</td><td>Settlement account `000000000004`, or `business_name` ending `_EDD`</td><td>Submit. Confirm `edd_pending` in the response.</td></tr>
    <tr><td>10</td><td>Needs clarification Coming soon</td><td>Settlement account `000000000003`</td><td>Submit. Confirm `under_review`, then `needs_clarification` about 5 sec later. Answer it, as on [Needs Clarification](https://razorpay.com/docs/partners/aggregators/onboarding-api/test-integration/needs-clarification.md).</td></tr>
    <tr><td>11</td><td>Held in review Coming soon</td><td>Settlement account `000000000005`</td><td>Send it. Its verification is `deferred`, and `bank_account` clears. Submit and confirm `under_review`. Confirm it stays `under_review`, then turns `activated` after 5 min.</td></tr>
    <tr><td>12</td><td>Locked after submission Coming soon</td><td>#4, then a new bank account</td><td>Confirm `409 field_locked` with `metadata.status: edd_pending`.</td></tr>
    <tr><td>13</td><td>A rejected product Coming soon</td><td>#8, then any update or action</td><td>Confirm `409 field_locked` on updates and `400 step_not_due` on actions.</td></tr>
    <tr><td>14</td><td>Suspended after activation Coming soon</td><td>Settlement account `000000000006`</td><td>Submit and confirm `activated`. Confirm `suspended` about 60 sec later, with `status_reason.code: website_review_failed` and the website due again. Send `https://curlec.com`, and the product is activated again.</td></tr>
  </tbody>
</table>

### 3.2 Scenario Details

The details below expand the scenarios that need more than one step:

> [accordion] 1. Accept the Terms and Submit
>
> **Before you begin:** Meet every requirement, so only `accept_terms_of_service` is due.
>
> **How to test:**
>
> 1. Show Razorpay's terms of service to the sub-merchant, unchanged.
> 2. When they accept in your UI, record their IP address and your device fingerprint for the session.
> 3. Send both values, as in the [sample request](#sample-request).
>
> **Expected result:** HTTP 200, as in the sample response. The product is `activated` and `requirements` is empty. The acceptance carries `ip`, `device_fingerprint_id` and `accepted_at`.
>
> **Webhooks:** `account.product.activated`.
>
> **Your integration should:** Send the acceptance only after the sub-merchant accepts, with their own `ip`. Keep the `accepted_at` time Razorpay returns.

> [accordion] 3. A Missing Field
>
> **How to test:** Send `terms_of_service_acceptance` with only `ip`.
>
> **Expected result:** HTTP 400 with `reason: invalid_request` and `field: products.payment_gateway.terms_of_service_acceptance.device_fingerprint_id`. Nothing is recorded.
>
> **Your integration should:** Collect both values before you send, because both are required.

> [accordion] 4. No CKYC Record: Video KYC
>
> **Before you begin:** Use Individual B (PAN `ABCPD7891B`) with everything else sent. See [Individual](https://razorpay.com/docs/partners/aggregators/onboarding-api/test-integration/individual.md).
>
> **How to test:** Submit, as in #1.
>
> **Expected result:** `edd_pending` in the response, with 1 requirement: `create_video_kyc_link`, `requirement_type: action`. The KYC details are locked.
>
> **Webhooks:** `account.product.edd_pending`.
>
> **Your integration should:** Show the sub-merchant why a call is needed, and show the link (#5). Do not report the outcome of the call yourself.

> [accordion] 5. Video KYC Approved
>
> **Before you begin:** Complete #4.
>
> **How to test:**
>
> 1. Run `create_video_kyc_link`. The link is in the response's `metadata`, as in scenario 10 on [Actions](https://razorpay.com/docs/partners/aggregators/onboarding-api/test-integration/actions.md).
> 2. Open the `url`. The hosted test page shows the outcomes.
> 3. Pick **Approved**.
> 4. Fetch the account.
>
> **Expected result:** The action clears by itself. The product moves to `under_review`, then `activated` about 5 sec later.
>
> **Webhooks:** `account.requirements.updated`, `account.product.under_review`, then `account.product.activated`.
>
> **Your integration should:** Open the link inside your product. The link expires and works only for this account.

> [accordion] 8. Rejected
>
> **Before you begin:** Use any test business with settlement account `000000000002`. Or use Proprietorship A with `business_name` set to `SUNRISE ENTERPRISES_REJECT`. See [Proprietorship](https://razorpay.com/docs/partners/aggregators/onboarding-api/test-integration/proprietorship.md).
>
> **How to test:**
>
> 1. Submit.
> 2. Fetch after 5 sec.
>
> **Expected result:** `under_review` in the response, then `rejected`, with `requirements` empty. No further changes are accepted.
>
> **Webhooks:** `account.product.under_review`, then `account.product.rejected`.
>
> **Your integration should:** Tell the sub-merchant the application was not approved, and stop offering changes.

> [accordion] 11. Held in Review
>
> **Before you begin:** Get an account ready to submit.
>
> **How to test:**
>
> 1. Send settlement account `000000000005`. Its `verification.status` is `deferred`, `error_code` is `null` and `bank_account` clears.
> 2. Submit.
>
> **Expected result:** `under_review` in the response. The product stays there for 5 min while a reviewer decides, then moves to `activated`.
>
> **Webhooks:** `account.product.under_review`, then `account.product.activated`.
>
> **Your integration should:** Show `under_review` as waiting, never as live or failed. No timeout in your code should move the sub-merchant to a failure state.

### 3.3 Errors to Handle

Every error returns the same object. Branch on `error.reason` and `error.field`, because the description can change. The [overview](https://razorpay.com/docs/partners/aggregators/onboarding-api/test-integration) lists the errors every operation shares.

The table below lists the errors submission returns:

| Trigger | HTTP | `error.reason` | `error.field` |
| - | - | - | - |
| The acceptance with other requirements due | 400 | `step_not_due` | `products.payment_gateway.terms_of_service_acceptance` |
| No `ip` or no `device_fingerprint_id`, or a key the acceptance does not take | 400 | `invalid_request` | `products.payment_gateway.terms_of_service_acceptance.ip`, `products.payment_gateway.terms_of_service_acceptance.device_fingerprint_id` or the key |
| KYC changes after submission | 409 | `field_locked` | The key |

## 4. Common Integration Gaps

These mistakes most often stall an onboarding or leave an account in the wrong state after go-live. The **Test with** column points to the scenario that proves you have handled each one.

**Terms**

The table below lists the gaps in handling the terms:

| Gap | What goes wrong in production | What to do | Test with |
| - | - | - | - |
| Accepting on the sub-merchant's behalf | The acceptance is not the sub-merchant's, and the account's acceptance record is wrong. | Show the terms. Send the acceptance only after they accept. | #1 |
| Submitting too early | The call fails with `step_not_due`, and the sub-merchant thinks they have finished. | Show the terms only when they are the last requirement. | #2 |

**After submission**

The table below lists the gaps after submission:

| Gap | What goes wrong in production | What to do | Test with |
| - | - | - | - |
| Treating `under_review` as final | The sub-merchant hears they are live, or stuck, before the outcome arrives. | Show `under_review` as waiting. Act on the outcome. | #8, #11 |
| No path for `edd_pending` | The sub-merchant never sees the video KYC link, and the account stalls. | Show the link when it is due. | #4, #5 |

## 5. Best Integration Practices

These practices apply to every onboarding integration. The **On this page** column says what each one means here.

The table below lists the practices for submission:

| Topic | What to know | On this page | Test it | Read more |
| - | - | - | - | - |
| Product status | Each product has its own status. | Read `products.payment_gateway.status`. | #1 | [Fetch an Account](https://razorpay.com/docs/partners/aggregators/onboarding-api/test-integration/fetch-account.md) |
| Activation | Live API keys exist only after `activated`, in live mode. | Test accounts never activate for real. | #1 | Not applicable |
| Rejected and suspended | `rejected` takes no further changes. `suspended` comes after activation. `status_reason` says why, and `requirements` lists what to fix. | Stop offering changes for `rejected`. For `suspended`, stop payments and ask for what is listed. | #13, #14 | Not applicable |

### Related Information

* [Test Your Integration](https://razorpay.com/docs/partners/aggregators/onboarding-api/test-integration)
* [Create an Account](https://razorpay.com/docs/partners/aggregators/onboarding-api/test-integration/create-account.md)
* [Fetch an Account](https://razorpay.com/docs/partners/aggregators/onboarding-api/test-integration/fetch-account.md)
* [Update an Account](https://razorpay.com/docs/partners/aggregators/onboarding-api/test-integration/update-account.md)
* [Actions](https://razorpay.com/docs/partners/aggregators/onboarding-api/test-integration/actions.md)
* [Documents](https://razorpay.com/docs/partners/aggregators/onboarding-api/test-integration/documents.md)
* [Needs Clarification](https://razorpay.com/docs/partners/aggregators/onboarding-api/test-integration/needs-clarification.md)
* [Webhooks](https://razorpay.com/docs/partners/aggregators/onboarding-api/test-integration/webhooks.md)
* [Test Values](https://razorpay.com/docs/partners/aggregators/onboarding-api/test-integration/test-values.md)
* [Error Index](https://razorpay.com/docs/partners/aggregators/onboarding-api/test-integration/error-index.md)
