Payment methods

The endpoint lists all available payment methods that can be transferred in the endpoint checkouts/1/complete.


List

Returns a collection of payment methods.

Filtering

You can filter your results as follows:

  • List payment methods for specified name(s)
    • /payment-methods?filter[name]=Invoice
    • /payment-methods?filter[name]=Invoice,Pickup
  • List payment methods for specified handle(s)
    • /payment-methods?filter[handle]=invoice
    • /payment-methods?filter[handle]=invoice,pickup

{info} Pagination, Filtering

Example

{primary.fa-paper-plane} Request

GET /payment-methods HTTP/1.1

{success} Response

HTTP/1.1 200 OK

{
    "data": [
        {
            "name": "Invoice",
            "handle": "invoice",
        },
        {
            "name": "Pickup",
            "handle": "pickup",
        }
        ...
    ],
    "links": {
        "first": "https://api.smake.io/v2/payment-methods?page=1",
        "last": null,
        "prev": null,
        "next": "https://api.smake.io/v2/payment-methods?page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "path": "https://api.smake.io/v2/payment-methods",
        "per_page": 25,
        "to": 25
    }
}