---
title: "Sync Razorpay Payments State"
method: POST
path: "/api/payments/razorpay/sync"
tags: ["Razorpay Payments"]
---

# Sync Razorpay Payments State

`POST /api/payments/razorpay/sync`

Sync items, plans, customers, subscriptions, invoices, and payments for every configured Razorpay environment. Razorpay remains the source of truth.

## Response `200`

Sync result for configured Razorpay environments

- SyncRazorpayPaymentsResponse
  - `results` SyncRazorpayPaymentsEnvironmentResult[], required
    - `environment` 'test' | 'live', required
    - `status` 'succeeded' | 'failed', required
    - `connection` RazorpayConnection, required
      - `environment` 'test' | 'live', required
      - `status` 'unconfigured' | 'connected' | 'error', required
      - `accountId` string, nullable, required
      - `merchantName` string, nullable, required
      - `accountLivemode` boolean, nullable, required
      - `webhookEndpointId` string, nullable, required
      - `webhookEndpointUrl` string, nullable, required
      - `webhookConfiguredAt` string, date-time, nullable, required
      - `maskedKey` string, nullable, required
      - `lastSyncedAt` string, date-time, nullable, required
      - `lastSyncStatus` 'succeeded' | 'failed', required
      - `lastSyncError` string, nullable, required
      - `lastSyncCounts` object, required
    - `syncCounts` RazorpaySyncCounts, required
      - `plans` integer, required
      - `items` integer, required
      - `customers` integer, required
      - `subscriptions` integer, required
      - `invoices` integer, required
      - `payments` integer, required
    - `error` string, nullable, required

## Other responses

- `400` — Invalid request
- `401` — Unauthorized
- `403` — Forbidden

---

[API](https://skmtc.net/insforge/apis/insforge-authentication-api.md) · [All operations](https://skmtc.net/insforge/apis/insforge-authentication-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/insforge/insforge-authentication-api/revisions/a935bb49f932/schema)
