Saltar al contenido principal

PaymentRule

Merchant-defined rule evaluated per transaction. When conditions match, action is applied (e.g. route the transaction to a provider, hide a payment method at checkout, or decline).

type PaymentRule {
id: ID!
accountId: ID!
name: String
priority: Int!
enabled: Boolean!
conditions: AWSJSON!
action: AWSJSON!
createdAt: AWSTimestamp!
updatedAt: AWSTimestamp
}

Fields

PaymentRule.id ● ID! non-null scalar

Rule ID.

PaymentRule.accountId ● ID! non-null scalar

Account that owns the rule.

PaymentRule.name ● String scalar

Human-readable label. Optional.

PaymentRule.priority ● Int! non-null scalar

Evaluation order. Lower values are evaluated first.

PaymentRule.enabled ● Boolean! non-null scalar

Whether the rule is evaluated. Disabled rules are skipped.

PaymentRule.conditions ● AWSJSON! non-null scalar

JsonLogic expression evaluated against the transaction context. Returned as a JSON-encoded string.

PaymentRule.action ● AWSJSON! non-null scalar

Action applied when conditions match. Shape mirrors PaymentRuleActionInput; which fields are populated depends on action.type. Returned as a JSON-encoded string.

PaymentRule.createdAt ● AWSTimestamp! non-null scalar

Creation timestamp (Unix seconds).

PaymentRule.updatedAt ● AWSTimestamp scalar

Last-update timestamp (Unix seconds); absent if the rule has never been updated.

Returned By

createPaymentRule mutation ● paymentRule query ● updatePaymentRule mutation

Member Of

PaymentRulesConnection object