Skip to content

Remove IMPS as payment rail for INR accounts#239

Merged
AaryamanBhute merged 1 commit intomainfrom
remove-imps
Mar 2, 2026
Merged

Remove IMPS as payment rail for INR accounts#239
AaryamanBhute merged 1 commit intomainfrom
remove-imps

Conversation

@AaryamanBhute
Copy link
Contributor

Summary

  • Removes IMPS from the paymentRails enum in the INR account OpenAPI schema
  • Updates the country support docs to list only UPI for India
  • Updates the grid visualizer currency data to remove IMPS from INR rails

Test plan

  • Verify make build and make lint pass
  • Confirm API reference pages render correctly with only UPI for INR

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

✱ Stainless preview builds

This PR will update the grid SDKs with the following commit messages.

kotlin

feat(types): remove IMPS payment rail from InrExternalAccountInfo and PaymentInstructions

openapi

feat(types): remove IMPS from payment type enum

python

fix(types): remove IMPS from payment_rails in INR account types

typescript

fix(types): remove IMPS from paymentRails in external-accounts and quotes
grid-openapi studio · code

Your SDK build had at least one "note" diagnostic.
generate ✅

grid-python studio · code

Your SDK build had at least one "note" diagnostic.
generate ✅build ✅lint ✅test ✅

pip install https://pkg.stainless.com/s/grid-python/12a087c5d322176a06de33492ab9c884787f774d/grid-0.0.1-py3-none-any.whl
grid-kotlin studio · code

Your SDK build had at least one "note" diagnostic.
generate ✅build ✅lint ✅test ✅

grid-typescript studio · code

Your SDK build had at least one "note" diagnostic.
generate ✅build ✅lint ✅test ✅

npm install https://pkg.stainless.com/s/grid-typescript/85a6d9c66b1de6e631abc8514e213a54f43a52f6/dist.tar.gz

This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push.
If you push custom code to the preview branch, re-run this workflow to update the comment.
Last updated: 2026-03-02 22:26:31 UTC

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 2, 2026

Greptile Summary

This PR removes IMPS as a supported payment rail for INR accounts, updating the OpenAPI schema source file, the two bundled openapi.yaml copies, the Mintlify country-support docs, and the grid-visualizer frontend data. The changes are internally consistent across all five files.

Key points:

  • All five files are updated in sync — no stale references to IMPS remain in the changed files.
  • Backwards-compatibility concern: Removing an enum value from paymentRails is a breaking change for any existing API clients that currently send IMPS in a create-external-account request. No deprecation step or migration window is included in this PR.
  • No backend business logic is modified in this PR, so it is unclear whether the backend still accepts or returns IMPS at runtime. If there is a mismatch, the spec and implementation will be out of sync until a follow-up change is deployed.

Confidence Score: 3/5

  • Safe to merge only if IMPS has already been fully sunset at the backend and no active customers are using it; otherwise this is a breaking change without a deprecation period.
  • The code change itself is small, consistent, and correct across all five files. The score is reduced because removing an enum value from a public API schema is a backwards-incompatible change that could break existing integrations, and no deprecation step or confirmation of zero in-flight IMPS usage is provided.
  • openapi/components/schemas/common/InrAccountInfo.yaml and its two bundled copies (openapi.yaml, mintlify/openapi.yaml) — confirm backend has already stopped accepting/returning IMPS before merging.

Important Files Changed

Filename Overview
openapi/components/schemas/common/InrAccountInfo.yaml Removes IMPS from the paymentRails enum in the canonical INR account source schema, leaving only UPI as a valid rail.
openapi.yaml Removes IMPS from the InrAccountInfo paymentRails enum in the bundled OpenAPI spec; consistent with the source schema change.
mintlify/openapi.yaml Mirrors the same IMPS removal in the Mintlify copy of the OpenAPI spec; consistent with the other schema files.
mintlify/snippets/country-support.mdx Updates the India row in the country-support table to display only UPI, removing the IMPS badge.
components/grid-visualizer/src/data/currencies.ts Removes IMPS from INR's allRails array in the grid-visualizer frontend data; internally consistent since instantRails already had no IMPS entry.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[INR External Account Creation Request] --> B{paymentRails value?}
    B -- UPI --> C[✅ Accepted - passes enum validation]
    B -- IMPS --> D[❌ Rejected - removed from enum in this PR]
    D --> E[Schema validation error returned to client]

    F[InrAccountInfo source schema\nopenapi/components/schemas/common/InrAccountInfo.yaml] --> G[openapi.yaml bundled copy]
    F --> H[mintlify/openapi.yaml bundled copy]
    F --> I[InrExternalAccountInfo\nused in POST /external-accounts request body]
    F --> J[PaymentInrAccountInfo\nused in GET payment response]
Loading

Last reviewed commit: 1f185d4

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment on lines 14 to 16
type: string
enum:
- UPI
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Breaking API change — no deprecation period

Removing IMPS from the paymentRails enum is a non-backwards-compatible change. InrAccountInfo is composed into both PaymentInrAccountInfo (response) and InrExternalAccountInfo (used in external-account creation request bodies at the /external-accounts endpoint). Any existing API clients that currently supply "IMPS" in the paymentRails array when creating or reading an INR external account will:

  1. Fail schema validation on requests that include IMPS.
  2. Receive unexpected responses if the backend still returns IMPS (which isn't changed by this PR).

Before hard-removing the value, the standard approach would be to:

  1. Deprecate IMPS in the schema (add a description/deprecated: true annotation) and give integrators a migration window.
  2. Only remove the value once all in-flight usage is confirmed to be zero.

If IMPS has already been sunset at the backend level and zero customers are using it, that context would be helpful to document here (e.g., a comment or PR note).

Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/InrAccountInfo.yaml
Line: 14-16

Comment:
**Breaking API change — no deprecation period**

Removing `IMPS` from the `paymentRails` enum is a non-backwards-compatible change. `InrAccountInfo` is composed into both `PaymentInrAccountInfo` (response) **and** `InrExternalAccountInfo` (used in external-account creation request bodies at the `/external-accounts` endpoint). Any existing API clients that currently supply `"IMPS"` in the `paymentRails` array when creating or reading an INR external account will:

1. Fail schema validation on requests that include `IMPS`.
2. Receive unexpected responses if the backend still returns `IMPS` (which isn't changed by this PR).

Before hard-removing the value, the standard approach would be to:
1. Deprecate `IMPS` in the schema (add a description/`deprecated: true` annotation) and give integrators a migration window.
2. Only remove the value once all in-flight usage is confirmed to be zero.

If IMPS has already been sunset at the backend level and zero customers are using it, that context would be helpful to document here (e.g., a comment or PR note).

How can I resolve this? If you propose a fix, please make it concise.

@AaryamanBhute AaryamanBhute merged commit 4c4d0ed into main Mar 2, 2026
8 checks passed
Copy link
Contributor Author

Merge activity

@AaryamanBhute AaryamanBhute deleted the remove-imps branch March 2, 2026 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants