openapi: 3.0.0 info: title: Razorpay Bills Settlements API version: 1.0.0 description: Razorpay payment gateway APIs for accepting payments, managing orders, processing refunds, payouts, and subscriptions. All amounts are in the smallest currency sub-unit (e.g. paise for INR). Supports 180+ payment methods including UPI, cards, netbanking, wallets, and EMI. termsOfService: https://razorpay.com/terms/ contact: name: Razorpay Support url: https://razorpay.com/support/ email: support@razorpay.com license: name: Proprietary url: https://razorpay.com/terms/ x-logo: url: https://razorpay.com/favicon.png x-auth-environments: test: keyPrefix: rzp_test_ description: Test mode — keys prefixed rzp_test_. Same API endpoint (https://api.razorpay.com/v1). No real money movement. Use test card numbers from https://razorpay.com/docs/payments/payments/test-card-details/. live: keyPrefix: rzp_live_ description: Live mode — keys prefixed rzp_live_. Real money movement. Requires KYC and business activation on the Razorpay Dashboard. servers: - url: https://api.razorpay.com/v1 description: Production security: - basicAuth: [] - oauth2: - read_only tags: - name: Settlements description: Settlements represent batch transfers of collected payment funds to your bank account. Use the recon endpoint for transaction-level reconciliation reports mapping each payment, refund, and adjustment to its settlement. paths: /settlements: get: operationId: fetchAllSettlements summary: Fetch all settlements description: Retrieve a paginated list of settlements. Each settlement represents a batch transfer to your bank account. Maximum 100 per call. tags: - Settlements parameters: - $ref: '#/components/parameters/from' - $ref: '#/components/parameters/to' - $ref: '#/components/parameters/count' - $ref: '#/components/parameters/skip' responses: '200': description: Collection of settlements. content: application/json: schema: allOf: - $ref: '#/components/schemas/Collection' - properties: items: type: array items: $ref: '#/components/schemas/Settlement' '401': $ref: '#/components/responses/401' '429': $ref: '#/components/responses/429' /settlements/{id}: get: operationId: fetchSettlement summary: Fetch settlement by ID description: Retrieve details of a specific settlement transaction. tags: - Settlements parameters: - name: id in: path required: true description: Settlement ID (setl_*). schema: type: string responses: '200': description: Settlement details. content: application/json: schema: $ref: '#/components/schemas/Settlement' '401': $ref: '#/components/responses/401' '404': $ref: '#/components/responses/404' '429': $ref: '#/components/responses/429' /settlements/recon/combined: get: operationId: fetchSettlementRecon summary: Fetch settlement reconciliation report description: Retrieve a detailed transaction-level reconciliation report for a given month (or day). Each record maps a payment, refund, transfer, or adjustment to its settlement. Use for accounting reconciliation. Maximum 1000 records per call. tags: - Settlements parameters: - name: year in: query required: true description: Settlement year in YYYY format. schema: type: integer example: 2024 - name: month in: query required: true description: Settlement month in MM format (01–12). schema: type: integer minimum: 1 maximum: 12 example: 4 - name: day in: query description: Settlement day in DD format (1–31). Omit to fetch the full month. schema: type: integer minimum: 1 maximum: 31 - name: count in: query description: Records per call. Maximum 1000. Default 10. schema: type: integer minimum: 1 maximum: 1000 default: 10 - name: skip in: query description: Records to skip for pagination. schema: type: integer default: 0 responses: '200': description: Reconciliation report records. content: application/json: schema: allOf: - $ref: '#/components/schemas/Collection' - properties: items: type: array items: $ref: '#/components/schemas/SettlementReconRecord' '400': $ref: '#/components/responses/400' '401': $ref: '#/components/responses/401' '429': $ref: '#/components/responses/429' components: schemas: SettlementReconRecord: type: object description: A single transaction line item in the settlement reconciliation report. properties: entity_id: type: string description: ID of the transaction entity (payment, refund, etc.). settlement_id: type: string order_id: type: string payment_id: type: string dispute_id: type: string type: type: string enum: - payment - refund - transfer - adjustment amount: type: integer debit: type: integer credit: type: integer fee: type: integer tax: type: integer currency: type: string method: type: string description: type: string notes: type: string settled: type: boolean on_hold: type: boolean created_at: type: integer settled_at: type: integer posted_at: type: integer card_network: type: string card_issuer: type: string card_type: type: string settlement_utr: type: string order_receipt: type: string credit_type: type: string Settlement: type: object properties: id: type: string description: 'Unique settlement identifier. Prefix: setl_' entity: type: string enum: - settlement amount: type: integer description: Settlement amount in paise. status: type: string enum: - created - processed - failed fees: type: integer description: Processing fees charged (typically 0 for normal settlements). tax: type: integer description: Tax on fees (paise). utr: type: string description: Unique Transaction Reference (UTR) number for bank tracking. created_at: type: integer Error: type: object properties: error: type: object properties: code: type: string description: 'Error code. Examples: BAD_REQUEST_ERROR, GATEWAY_ERROR, SERVER_ERROR.' description: type: string source: type: string description: Where the error originated (e.g. business, gateway). step: type: string reason: type: string description: 'Machine-readable reason. Examples: insufficient_funds, invalid_expiry_date, declined_by_bank.' metadata: type: object field: type: string Collection: type: object properties: entity: type: string enum: - collection count: type: integer description: Number of items in the current page. items: type: array items: {} parameters: from: name: from in: query description: Unix timestamp (seconds). Fetch records created on or after this time. schema: type: integer to: name: to in: query description: Unix timestamp (seconds). Fetch records created on or before this time. schema: type: integer skip: name: skip in: query description: Number of records to skip. Use with count for pagination. Default 0. schema: type: integer minimum: 0 default: 0 count: name: count in: query description: Number of records to return per call. Maximum 100. Default 10. schema: type: integer minimum: 1 maximum: 100 default: 10 responses: '429': description: Rate limit exceeded. Implement exponential backoff with jitter before retrying. content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Resource not found. content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad request. Invalid parameters or missing required fields. content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Authentication failed. Invalid or missing API key credentials. content: application/json: schema: $ref: '#/components/schemas/Error' securitySchemes: basicAuth: type: http scheme: basic description: HTTP Basic authentication using your Razorpay API key pair. Use key_id as the username and key_secret as the password. Encode as Base64(key_id:key_secret). Keys are environment-scoped (Test vs Live). Obtain keys at https://dashboard.razorpay.com/app/keys. Keys are case-sensitive. oauth2: type: oauth2 description: OAuth 2.0 via the Razorpay MCP server (mcp.razorpay.com). Supports Authorization Code with PKCE (S256) for user-delegated access and Client Credentials for server-to-server access. Tokens expire in 3600 seconds. Dynamic Client Registration available at the registration endpoint. For integration setup see https://razorpay.com/docs/build/llm-docs/mcp-server/oauth.md. flows: authorizationCode: authorizationUrl: https://mcp.razorpay.com/authorize tokenUrl: https://mcp.razorpay.com/token refreshUrl: https://mcp.razorpay.com/token scopes: read_only: Read-only access to Razorpay account data (payments, orders, refunds, payouts, subscriptions, invoices) clientCredentials: tokenUrl: https://mcp.razorpay.com/token scopes: read_only: Read-only access to Razorpay account data (payments, orders, refunds, payouts, subscriptions, invoices) externalDocs: description: Razorpay API Documentation url: https://razorpay.com/docs/api/ x-tagGroups: - name: Core Payments tags: - Orders - Payments - Refunds - Payment Downtimes - name: Payment Collection tags: - Payment Links - QR Codes - name: Billing & Subscriptions tags: - Items - Invoices - Plans - Subscriptions - name: Customer Management tags: - Customers - Documents - name: Finance & Reconciliation tags: - Settlements - Instant Settlements - Disputes - name: Route & Marketplace tags: - Linked Accounts - Transfers - name: Smart Collect tags: - Virtual Accounts - name: Partners & Onboarding tags: - Partner Accounts - Partner Products - Partner Stakeholders - Partner Documents - Partner Webhooks - name: Bills tags: - Bills - name: RazorpayX tags: - X Contacts - X Fund Accounts - X Account Validation - X Banking Balances - X Payouts - X Payout Links - X Transactions x-rateLimit: description: Razorpay does not publish specific rate limits. If you receive HTTP 429, implement exponential backoff with jitter and retry. Add randomisation to avoid thundering-herd effects. throttleStatus: 429 strategy: exponential backoff with jitter x-pagination: description: All list endpoints return at most 100 records per call (1000 for settlement recon). Use count and skip together to paginate. Date range filters (from/to) use Unix timestamps in seconds. example: GET /payments?from=1700000000&to=1700086400&count=100&skip=100 x-amountEncoding: description: 'All monetary amounts are in the smallest currency sub-unit. For INR: 1 rupee = 100 paise, so ₹500 = 50000. Minimum for INR is 100 paise (₹1). Three-decimal currencies (KWD, BHD, OMR): drop last decimal digit. Zero-decimal currencies (JPY): pass value as-is.'