Cancel Payment Request

Used to cancel the collect request

Request Headers

Header Name

Header Value

Content-Type

application/json

X-VERIFY

SHA256("/v3/charge/{merchantId}/{transactionId}/cancel" +
salt key) + ### + salt index

Path Parameters

Parameter Name

Type

Description

Mandatory

merchantId

STRING

Unique Merchant ID assigned to the merchant by PhonePe

Yes

transactionId

STRING

Unique Transaction ID generated by the merchant to track this request to PhonePe

Yes

Response Parameters

Parameter Name

Type

Description

success

BOOLEAN

Success status of the request

code

ENUM

See below section for list of codes

message

STRING

Short message about status

data

OBJECT

Empty object

Response Codes

The code in the above API response could be.

  • SUCCESS
  • INTERNAL_SERVER_ERROR : There can be internal server error. Merchant should retry the cancel API request.
  • INVALID_TRANSACTION_ID
  • PAYMENT_ALREADY_COMPLETED : Payment has been succesful hence can't cancel the request. For this case merchant should trigger successful transaction, generating the bill.
Language
Click Try It! to start a request and see the response here!