# PaymentMethod

## Module endpoints

* [`GET /payment-methods`](#get-payment-methods)
* [`GET /payment-methods/:slug`](#get-payment-methods-slug)

### `GET /payment-methods`

> `GET` <https://api.slyk.i&#x6F;**/payment-methos>\*\*

Returns a list of `payment methods`.

{% tabs %}
{% tab title="Available Filters" %}

<table data-header-hidden><thead><tr><th width="232.66666666666666">Name</th><th>Type</th><th>Example</th></tr></thead><tbody><tr><td>Name</td><td>Type</td><td>Example</td></tr><tr><td><strong>createdAt</strong></td><td><code>=</code> <code>gte</code> <code>lte</code></td><td><code>filter[createdAt]=gte:2019-07-21</code></td></tr><tr><td><strong>enabled</strong></td><td><code>=</code> <code>in</code> <code>nin</code></td><td><code>filter[enabled]=in:false</code></td></tr><tr><td><strong>slug</strong></td><td><code>=</code> <code>in</code> <code>nin</code></td><td><code>filter[slug]=in:paypal,stripe</code></td></tr></tbody></table>
{% endtab %}

{% tab title="Response" %}

```javascript
{
  "data": [
    {
      "createdAt": "2019-07-21T14:30:37.483Z",
      "enabled": true,
      "metadata": {
        "clientId": "corge",
        "secret": "01234*****"
      },
      "name": "Paypal",
      "slug": "paypal"
    },
    {
      "createdAt": "2019-07-21T14:30:37.483Z",
      "enabled": true,
      "metadata": {
        "apiPublishableKey": "foobar",
        "apiSecretKey": "01234*****"
      },
      "name": "Stripe",
      "slug": "stripe"
    }
  ]
}
```

{% endtab %}
{% endtabs %}

### `GET /payment-methods/:slug`

> `GET` <https://api.slyk.i&#x6F;**/payment-methods/:slug>\*\*

Returns the `payment method` details of the given `slug`.

{% tabs %}
{% tab title="Response" %}

```javascript
{
  "data": {
    "createdAt": "2019-07-21T14:30:37.483Z",
    "enabled": true,
    "metadata": {
      "clientId": "corge",
      "secret": "01234*****"
    },
    "name": "Paypal",
    "slug": "paypal"
  }
}
```

{% endtab %}
{% endtabs %}
