# updatePaymentMethod

> Required permission: RestaurantReportWrite

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

```graphql
updatePaymentMethod(
  restaurantId: ID!
  paymentMethodId: ID!
  patch: PaymentMethodPatch!
): PaymentMethod
```

## Arguments

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

## Returns

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

## Example

```graphql
mutation UpdatePaymentMethod($restaurantId: ID!, $paymentMethodId: ID!, $patch: PaymentMethodPatch!) {
  updatePaymentMethod(restaurantId: $restaurantId, paymentMethodId: $paymentMethodId, patch: $patch) {
    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 { updatePaymentMethod(...) { __typename } }"}'
```
