System Flow


A payment has following flow:

  1. Initiating debit request (Accept Payment)
    Merchant does a server to server call to initiate a debit request. In the response to this debit call, a URL is returned for PhonePe payment page for the particular transaction.Merchant also passes a redirect URL in the same request. PhonePe will redirect to this URL once the transaction is complete to pass the control back to merchant.

  2. Redirecting user to PhonePe web page
    Merchant does a client-side redirection to the URL returned in step 1. This will take the customer to PhonePe payment page.

  3. Redirecting user to merchant web page
    Post the transaction is complete, PhonePe will do a client-side redirection to merchant’s success/failure page. The URL for this redirection will be the one which is passed by merchant in debit call in step 1.

  4. Status verification post redirection to merchant website
    Merchant checks the transaction status and verifies the checksum. The order is then placed based on the transaction status provided by PhonePe. It is recommended to verify the transaction status using the Check transaction status API.

  5. Refund
    In case of any cancellations or returns, a refund will be initiated by the merchant through PhonePe. This refund will be done against a provider reference id (PhonePe transaction id original transaction).