Skip to content

Get Customer Payments

Endpoint

GET /api/v1/subscriber/getCustomerPayments

This endpoint retrieves a list of payments made by the authenticated subscriber.


Authorization

  • Type: Bearer Token
  • Header:
    Authorization: Bearer <your_token_here>
    

Example Request

curl -X GET "https://yourispcrmdomain/api/v1/subscriber/getCustomerPayments" \
-H "Authorization: Bearer YOURAPITOKENHERE"

Response

Success Response (200 OK)

{
  "success": true,
  "data": [
    {
      "payment_id": 101,
      "amount": 50.00,
      "date": "2023-12-01T10:00:00Z",
      "method": "Razorpay",
      "status": "successful",
      "invoice_id": 202
    },
    {
      "payment_id": 102,
      "amount": 30.00,
      "date": "2023-11-01T10:00:00Z",
      "method": "PayPal",
      "status": "successful",
      "invoice_id": 203
    }
  ]
}

Explanation: - success - Indicates if the request was successful. - data - An array of payment records: - payment_id - Unique ID of the payment. - amount - Payment amount. - date - Date and time of the payment. - method - Payment method used (e.g., Razorpay, PayPal). - status - Payment status (e.g., successful, pending). - invoice_id - Associated invoice ID.


Error Responses

404 Not Found

{
  "success": false,
  "message": "No payments found"
}

Explanation: - This error occurs if no payment records are found for the subscriber.


Example Response

{
  "success": true,
  "data": [
    {
      "payment_id": 101,
      "amount": 50.00,
      "date": "2023-12-01T10:00:00Z",
      "method": "Razorpay",
      "status": "successful",
      "invoice_id": 202
    },
    {
      "payment_id": 102,
      "amount": 30.00,
      "date": "2023-11-01T10:00:00Z",
      "method": "PayPal",
      "status": "successful",
      "invoice_id": 203
    }
  ]
}

For further assistance, contact our support team at support@netgroot.com.