Recurring Debit Execute

To debit the amount from the user’s account on recurring periods.

Headers

Header Name

Header Value

Content-Type

application/json

X-VERIFY

SHA256(base64 encoded payload + "/v3/recurring/debit/execute" + salt key) + ### + salt index

{
  "merchantId": "MID12345",
  "merchantUserId": "U123456789",
  "subscriptionId": "OMS2006110139450123456789",
  "notificationId": "OMN2006110139450123456789",
  "transactionId": "TX1234567890"
}
{
  "request":"ewogICJtZXJjaGFudElkIjogIk1JRDEyMzQ1IiwKICAibWVyY2hhbnRVc2VySWQiOiAiVTEyMzQ1Njc4OSIsCiAgInN1YnNjcmlwdGlvbklkIjogIk9NUzIwMDYxMTAxMzk0NTAxMjM0NTY3ODkiLAogICJub3RpZmljYXRpb25JZCI6ICJPTU4yMDA2MTEwMTM5NDUwMTIzNDU2Nzg5IiwKICAidHJhbnNhY3Rpb25JZCI6ICJUWDEyMzQ1Njc4OTAiCn0="
}

Request Parameters

Parameter Name

Data Type

Mandatory

Description

merchantId

String

Yes

MID provide by PhonePe

merchantUserId

String

No
(Optional)

User's unique Id maintained by merchant

subscriptionId

String

Yes

PhonePe subscription Id

notificationId

String

Yes

PhonePe's notification Id sent in Recurring Init API response

transactionId

String

Yes

Merchant's transaction Id of Recurring Init

{
  "success": true,
  "code": "SUCCESS",
  "message": "Your request has been successfully submitted.",
  "data": {
    "merchantId": "MID12345",
    "transactionId": "TX1234567890",
    "state": "PENDING",
    "amount": 39900
  }
}

Response Parameters

Field Name

Data Type

Description

merchantId

String

Merchant ID provided by PhonePe

transactionId

String

Merchant’s TransactionId of Recurring Init

notificationDetails

Object

Contains notification details

transactionDetails

Object

Same as normal Transaction, please refer here

subscriptionDetails

Object

Contains subscriptionId and state

S2S Callback - Recurring Debit Execute

📘

Callback for Recurring Debit Execute

The server to server callback for Recurring Debit Execute will have the "callbackType": "DEBIT".

🚧

Validations

Validate the checksum and amount which has been passed with the response received in the Server to Server callback.

Sample Response

{
    "response": "ewogICJzdWNjZXNzIjogdHJ1ZSwKICAiY29kZSI6ICJTVUNDRVNTIiwKICAibWVzc2FnZSI6ICJZb3VyIHBheW1lbnQgaXMgc3VjY2Vzc2Z1bC4iLAogICJkYXRhIjogewogICAgImNhbGxiYWNrVHlwZSI6ICJERUJJVCIsCiAgICAibWVyY2hhbnRJZCI6ICJNSUQxMjM0NSIsCiAgICAidHJhbnNhY3Rpb25JZCI6ICJUWDEyMzQ1Njc4OTAiLAogICAgIm5vdGlmaWNhdGlvbkRldGFpbHMiOiB7CiAgICAgICJub3RpZmljYXRpb25JZCI6ICJPTU4yMDA2MTEwMTM5NDUwMTIzNDU2Nzg5IiwKICAgICAgInN0YXRlIjogIk5PVElGSUVEIiwKICAgICAgImFtb3VudCI6IDM5OTAwLAogICAgICAibm90aWZpZWRBdCI6ICIxNjIyNTM5NzUxNTg2IgogICAgfSwKICAgICJ0cmFuc2FjdGlvbkRldGFpbHMiOiB7CiAgICAgICJwcm92aWRlclJlZmVyZW5jZUlkIjogIlAxODA2MTUxMzIzMDkzOTAwNTU0OTU3IiwKICAgICAgImFtb3VudCI6IDM5OTAwLAogICAgICAic3RhdGUiOiAiQ09NUExFVEVEIiwKICAgICAgInBheVJlc3BvbnNlQ29kZSI6ICJTVUNDRVNTIiwKICAgICAgInBheW1lbnRNb2RlcyI6IFsKICAgICAgICB7CiAgICAgICAgICAibW9kZSI6ICJBQ0NPVU5UIiwKICAgICAgICAgICJhbW91bnQiOiAzOTkwMDAsCiAgICAgICAgICAidXRyIjogIjgxNjYyNjUyMTYxNiIKICAgICAgICB9CiAgICAgIF0KICAgIH0sCiAgICAic3Vic2NyaXB0aW9uRGV0YWlscyI6IHsKICAgICAgInN1YnNjcmlwdGlvbklkIjogIk9NUzIwMDYxMTAxMzk0NTAxMjM0NTY3ODkiLAogICAgICAic3RhdGUiOiAiQUNUSVZFIgogICAgfQogIH0KfQ=="
}
{
  "success": true,
  "code": "SUCCESS",
  "message": "Your payment is successful.",
  "data": {
    "callbackType": "DEBIT",
    "merchantId": "MID12345",
    "transactionId": "TX1234567890",
    "notificationDetails": {
      "notificationId": "OMN2006110139450123456789",
      "state": "NOTIFIED",
      "amount": 39900,
      "notifiedAt": "1622539751586"
    },
    "transactionDetails": {
      "providerReferenceId": "P1806151323093900554957",
      "amount": 39900,
      "state": "COMPLETED",
      "payResponseCode": "SUCCESS",
      "paymentModes": [
        {
          "mode": "ACCOUNT",
          "amount": 399000,
          "utr": "816626521616"
        }
      ]
    },
    "subscriptionDetails": {
      "subscriptionId": "OMS2006110139450123456789",
      "state": "ACTIVE"
    }
  }
}
{
    "response": "ewogICJzdWNjZXNzIjogdHJ1ZSwKICAiY29kZSI6ICJTVUNDRVNTIiwKICAibWVzc2FnZSI6ICJQYXltZW50IEZhaWxlZCIsCiAgImRhdGEiOiB7CiAgICAiY2FsbGJhY2tUeXBlIjogIkRFQklUIiwKICAgICJtZXJjaGFudElkIjogIk1JRDEyMzQ1IiwKICAgICJ0cmFuc2FjdGlvbklkIjogIlRYMTIzNDU2Nzg5MCIsCiAgICAibm90aWZpY2F0aW9uRGV0YWlscyI6IHsKICAgICAgIm5vdGlmaWNhdGlvbklkIjogIk9NTjIwMDYxMTAxMzk0NTAxMjM0NTY3ODkiLAogICAgICAic3RhdGUiOiAiTk9USUZJRUQiLAogICAgICAiYW1vdW50IjogMzk5MDAsCiAgICAgICJub3RpZmllZEF0IjogIjE2MjI1Mzk3NTE1ODYiCiAgICB9LAogICAgInRyYW5zYWN0aW9uRGV0YWlscyI6IHsKICAgICAgInByb3ZpZGVyUmVmZXJlbmNlSWQiOiAiUDE4MDYxNTEzMjMwOTM5MDA1NTQ5NTciLAogICAgICAiYW1vdW50IjogMzk5MDAsCiAgICAgICJzdGF0ZSI6ICJGQUlMRUQiLAogICAgICAicGF5UmVzcG9uc2VDb2RlIjogIkFVVEhPUklaQVRJT05fRkFJTEVEIiwKICAgICAgInBheW1lbnRNb2RlcyI6IFsKICAgICAgICB7CiAgICAgICAgICAibW9kZSI6ICJBQ0NPVU5UIiwKICAgICAgICAgICJhbW91bnQiOiAzOTkwMDAsCiAgICAgICAgICAidXRyIjogIjgxNjYyNjUyMTYxNiIKICAgICAgICB9CiAgICAgIF0KICAgIH0sCiAgICAic3Vic2NyaXB0aW9uRGV0YWlscyI6IHsKICAgICAgInN1YnNjcmlwdGlvbklkIjogIk9NUzIwMDYxMTAxMzk0NTAxMjM0NTY3ODkiLAogICAgICAic3RhdGUiOiAiQUNUSVZFIgogICAgfQogIH0KfQ=="
}
{
  "success": true,
  "code": "SUCCESS",
  "message": "Payment Failed",
  "data": {
    "callbackType": "DEBIT",
    "merchantId": "MID12345",
    "transactionId": "TX1234567890",
    "notificationDetails": {
      "notificationId": "OMN2006110139450123456789",
      "state": "NOTIFIED",
      "amount": 39900,
      "notifiedAt": "1622539751586"
    },
    "transactionDetails": {
      "providerReferenceId": "P1806151323093900554957",
      "amount": 39900,
      "state": "FAILED",
      "payResponseCode": "AUTHORIZATION_FAILED",
      "paymentModes": [
        {
          "mode": "ACCOUNT",
          "amount": 399000,
          "utr": "816626521616"
        }
      ]
    },
    "subscriptionDetails": {
      "subscriptionId": "OMS2006110139450123456789",
      "state": "ACTIVE"
    }
  }
}
Language
Click Try It! to start a request and see the response here!