This is the documentation for 2021-02-23 but the latest version is 2022-02-01. You can switch versions in the menu.

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

Example

Request

GET /payment-methods HTTP/1.1

Response

{
    "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
    }
}