Cancel Authorized Payment
This endpoint cancels an active OTM authorization, releasing the hold on the user’s funds. It can only be called after the transaction has successfully reached the AUTHORIZED state.
API Endpoint
| Environment | HTTP Method | API |
Sandbox | POST | https://api-preprod.phonepe.com/apis/pg-sandbox/payments/v2/{merchantOrderId}/cancel |
Production | POST | https://api.phonepe.com/apis/pg/payments/v2/{merchantOrderId}/cancel |
Request
Request Header
| Header Name | Header Value |
Authorization | O-Bearer <merchant-auth-token> |
Path Parameters
Request Header
| Parameter | Data Type | Mandatory | Description |
merchantOrderId | String | Yes | The merchant order ID used in the pay call |
Response
HTTP 202 Accepted No response body is returned. The 202 Accepted status indicates the cancellation has been accepted for processing.