Get Subscription Payment History
This API endpoint retrieves the details of a subscription and its associated payments. You must provide the subscription ID in the path parameter to retrieve the information.

Authorization: Bearer YOUR_TOKEN


Expected Behavior:


  • On success, the system will return the subscription details, including its status, plan, and a list of payments with detailed information.
  • If the request fails, an appropriate error message will be returned.
Path Parameters
  • id string
    The unique subscription ID to retrieve.
JavaScript
Response codes
const axios = require('axios');

const url = 'https://payment-query.api.pinghome.io/v1/subscription/{id}/payments';

axios.get(url, {
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN'
  }
})
.then(response => {
  console.log(response.data);
})
.catch(error => {
  console.error(error);
});
ResponseThis section is used to view the possible HTTP response codes returned by the API. These codes indicate the status of a request, such as 201 (Created), 401 (Unauthorized), 409 (Conflict), or 422 (Unprocessable Entity).