Get Account's Payment Method Information
This API endpoint retrieves the list of payment methods associated with the account. The response includes details of each payment method, such as the payment provider, type, and whether it is set as the default payment method.

Authorization: Bearer YOUR_TOKEN


Expected Behavior:


  • On success, the system will return the list of payment methods along with relevant details.
  • If the request fails, an appropriate error message will be returned.
JavaScript
Response codes
const axios = require('axios');

const url = 'https://payment-query.api.pinghome.io/v1/payment-methods';

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).