# createPaymentRule

Creates a payment rule in the current account and returns it. At most 20 rules of an account can be enabled. Arguments: - `input`: Rule to create.

```
createPaymentRule(

  input: CreatePaymentRuleInput!

): PaymentRule!
```

### Arguments[​](#arguments "Enlace directo al Arguments")

#### [`createPaymentRule.input`](#input) ● [`CreatePaymentRuleInput!`](https://docs.monei.com/es/apis/graphql/types/inputs/create-payment-rule-input.md) non-null input[​](#input "Enlace directo al input")

### Type[​](#type "Enlace directo al Type")

#### [`PaymentRule`](https://docs.monei.com/es/apis/graphql/types/objects/payment-rule.md) object[​](#paymentrule- "Enlace directo al paymentrule-")

Rule of the current account that is checked on each payment. When `conditions` match, `action` applies: for example, route the payment to a processor, hide a payment method at checkout, or decline the payment. Settings > Payments orchestration shows the rules. Enabled rules run in `priority` order, and rules of equal priority in creation order. Every matching rule applies. For routing, store and point of sale tags, 3DS challenge and MONEI Flex, only the first matching rule counts. `hide`, `block_provider` and `trigger_fraud_check` rules add up.
