Skip to content

[FEATURE] Allow JWT authentication for Payments Void flow #11900

@deepanshu-iiitu

Description

@deepanshu-iiitu

Feature Description

POST /payments/{id}/cancel (v1) accepts only API-key auth. The dashboard uses JWT, so voiding a payment from the dashboard fails with IR_01. Merchants can refund from the dashboard but not void has to be done via direct API call.

Possible Implementation

In crates/router/src/routes/payments.rs → payments_cancel (v1), swap the ApiKeyAuth-only setup for auth::auth_type(ApiKeyAuth, JWTAuth { permission: ProfilePaymentWrite }) — same pattern as refunds_create. Then wire a Void button on the dashboard, analogous to the Refund button.

No API contract, DB, or connector changes.

Have you spent some time checking if this feature request has been raised before?

  • I checked and didn't find a similar issue

Have you read the Contributing Guidelines?

Are you willing to submit a PR?

Yes, I am willing to submit a PR!

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions