GET
/
api
/
v2
/
subscriptions
/
{subReferenceId}
/
payments
curl --request GET \
  --url https://sandbox.cashfree.com/api/v2/subscriptions/{subReferenceId}/payments \
  --header 'X-Client-Id: <x-client-id>' \
  --header 'X-Client-Secret: <x-client-secret>'
{
  "status": "OK",
  "message": "Subscription Payments",
  "payments": [
    {
      "paymentId": 98456,
      "cfOrderId": 2571132,
      "orderId": "SUB_test_checkout_123_AUTH_98456",
      "referenceId": 885308845,
      "subReferenceId": 73949,
      "currency": "INR",
      "amount": 0,
      "cycle": 0,
      "status": "SUCCESS",
      "remarks": "auth payment",
      "addedOn": "2022-06-23 15:23:08",
      "scheduledOn": null,
      "retryAttempts": 0,
      "failureReason": null
    },
    {
      "paymentId": 3027901,
      "cfOrderId": 647464356,
      "orderId": "SUB_AUTH_98456",
      "referenceId": 584317815,
      "subReferenceId": 2568045,
      "currency": "INR",
      "amount": 1,
      "cycle": 0,
      "status": "PENDING",
      "remarks": "Scheduled payment",
      "addedOn": "2021-10-25 12:33:01",
      "scheduledOn": null,
      "retryAttempts": 0,
      "failureReason": null
    },
    {
      "paymentId": 3027869,
      "cfOrderId": 647456025,
      "orderId": "SUB_TXN_836464",
      "referenceId": 584310425,
      "subReferenceId": 2568045,
      "currency": "INR",
      "amount": 1,
      "cycle": 0,
      "status": "FAILED",
      "addedOn": "2021-10-25 12:26:47",
      "scheduledOn": null,
      "retryAttempts": 0,
      "failureReason": "Update Enrolment failure with MmsApiException"
    }
  ],
  "lastId": 3027869
}

Headers

X-Client-Id
string
required

Client ID provided by Cashfree.

Example:

"asdf1234"

X-Client-Secret
string
required

Client Secret provided by Cashfree.

Example:

"qwer9876"

Path Parameters

subReferenceId
integer
required

The reference ID of the subscription whose payments are to be fetched.

Example:

175124

Query Parameters

lastId
integer

The last payment ID from the previous fetch to continue retrieving payments.

Example:

3027869

count
integer

The number of payments to fetch in the current request.

Example:

3

Response

200
application/json

Successful retrieval of subscription payments.

The response is of type any.