# Mutations / Payment Methods

# Payment Methods

**Mutation**
## createPaymentMethod — Returns [PaymentMethod](/documentation/Objects/Payment-Method#PaymentMethod)

**Scopes required:** modify_payment_methods

| Arguments | Type | Description |
| --- | --- | --- |
| name | *String!* | The name of the payment method |
| type | [PaymentMethodTypeEnum](/documentation/Enums/Payment-Method-Type-Enum#PaymentMethodTypeEnum) | The type of payment method |
| enableForRegisters | [[ID!]](/documentation/Types/UUID#UUID) | The registers this payment method is automatically enabled for |

**Example Mutation**

```graphql
mutation CreatePaymentMethod($name: String!) {
    createPaymentMethod(name: $name) {
        id,
        name,
        type,
        surcharge,
        denominations
    }
}

# Example variables
{
    "name": "<NAME>"
}
```

**Mutation**
## deletePaymentMethod — Returns [PaymentMethod](/documentation/Objects/Payment-Method#PaymentMethod)

**Scopes required:** modify_payment_methods

| Arguments | Type | Description |
| --- | --- | --- |
| id | [ID!](/documentation/Types/UUID#UUID) | The ID of the payment method to delete |

**Example Mutation**

```graphql
mutation DeletePaymentMethod($id: ID!) {
    deletePaymentMethod(id: $id) {
        id,
        name,
        type,
        surcharge,
        denominations
    }
}

# Example variables
{
    "id": "<ID>"
}
```

**Mutation**
## updatePaymentMethod — Returns [PaymentMethod](/documentation/Objects/Payment-Method#PaymentMethod)

**Scopes required:** modify_payment_methods

| Arguments | Type | Description |
| --- | --- | --- |
| id | [ID!](/documentation/Types/UUID#UUID) | The ID of the payment method to update |
| name | *String* | The name of the payment method |
| type | [PaymentMethodTypeEnum](/documentation/Enums/Payment-Method-Type-Enum#PaymentMethodTypeEnum) | The type of payment method |
| surcharge | *Float* | The surcharge to apply when this payment method is use (not currently implemented - coming soon) |
| actualDenominations | *[Float]* | The denominations to display in the cash calculator when closing the register (only valid when `type` is set to `CASH`) |
| alwaysOpenDrawer | *Boolean* | Whether to always open the cash drawer when this payment method is used |
| alwaysPrint | *Boolean* | Whether to always print a receipt when this payment method is used |
| useRounding | *Boolean* | Whether this payment method should use rounding |
| defaultPayExact | *Boolean* | Whether this payment method can be selected to pay with without having to specify an amount |
| cashoutMethod | [ID](/documentation/Types/UUID#UUID) | The method to use when providing a cash out with this method (if null no cash out will be allowed) |
| gatewayUrl | *String* | A URL to use with the Payment Method API (only valid when `type` is set to `CUSTOM`) |
| backgroundColour | *String* | The background colour of this button in the finalise sale screen |
| textColour | *String* | The text colour of this button in the finalise sale screen |
| darkModeBackgroundColour | *String* | The background colour of this button in the finalise sale screen when in dark mode |
| darkModeTextColour | *String* | The text colour of this button in the finalise sale screen when in dark mode |

**Example Mutation**

```graphql
mutation UpdatePaymentMethod($id: ID!) {
    updatePaymentMethod(id: $id) {
        id,
        name,
        type,
        surcharge,
        denominations
    }
}

# Example variables
{
    "id": "<ID>"
}
```