How can I access the available payment methods in my store through my API?

AI-generated summary

A developer is trying to retrieve a list of active payment methods from their store via API. They currently have Stripe, Cash on Delivery (COD), and Bank Transfers enabled.

The developer has reviewed the documentation but hasn’t found clear guidance on how to fetch this information. They need an API response that returns:

  • Payment method ID
  • Method name (e.g., “Stripe”, “COD”, “Credit/Debit Card”)
  • Description
  • Button text
  • Associated images

The desired response format is a JSON object with status code, message, and a data array containing each payment method’s details. The discussion remains open with no responses yet, indicating the developer is still seeking guidance on the correct API endpoint or approach to retrieve available payment methods.

I want to access the payment methods available in my store through my API. I have explored the documentation but didn’t understand how to retrieve the list of available payment methods. Currently, I have enabled Stripe, COD, and Bank Transfers as payment options.

I need a response similar to this:

{
  "status": 200,
  "message": "Requested results are generated.",
  "data": [
    {
      "method_id": 186,
      "button_text": "Make Payment",
      "name": "Credit/Debit Card",
      "description": "",
      "images": null
    },
{
      "method_id": 600,
      "name": "Stripe",
      "description": "stripe description",
      "images": null,
    },
    {
      "method_id": 6,
      "name": "COD",
      "description": "COD fees of 5 AED will apply.",
      "images": null
    }
  ]
}
1 Like