# createPaymentMethod

> Required permission: RestaurantReportWrite

Source: https://docs.gastrogate.io/docs/api/mutations/createPaymentMethod

```graphql
createPaymentMethod(
  restaurantId: ID!
  input: PaymentMethodInput!
): PaymentMethod
```

## Arguments

| Name | Type | Description |
| --- | --- | --- |
| `restaurantId` | [`ID`](https://docs.gastrogate.io/docs/api/types/ID.md)! |  |
| `input` | [`PaymentMethodInput`](https://docs.gastrogate.io/docs/api/types/PaymentMethodInput.md)! |  |

## Returns

[`PaymentMethod`](https://docs.gastrogate.io/docs/api/types/PaymentMethod.md)

## Example

```graphql
mutation CreatePaymentMethod($restaurantId: ID!, $input: PaymentMethodInput!) {
  createPaymentMethod(restaurantId: $restaurantId, input: $input) {
    id
    iconUrl
    isLegacy
    name
    paymentProvider
    receiptPaymentMethodLabel
  }
}
```

```bash
curl https://api.thelocoapp.com/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $LOCO_API_KEY" \
  -d '{"query": "mutation { createPaymentMethod(...) { __typename } }"}'
```
