PUT
/
flows
/
{flow}
/
actions
/
{action}
/
rules
/
{rule_id}
This endpoint requires the flows.write
scope.
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
The flow name. This can be one of the following.
checkout
- Applies during checkout to determine what payment options are shown.
card-transaction
- Applies when processing a card transaction.
non-card-transaction
- Applies when processing a gift card only transaction, or a
redirect transaction using the decline-early
action.
redirect-transaction
- Applies when processing any other transaction.
Available options:
checkout
,
card-transaction
,
non-card-transaction
,
redirect-transaction
Available options:
select-payment-options
,
decline-early
,
route-transaction
,
skip-3ds
The unique ID for a rule.
A request to update a rule.
The position of the rule in the flow.
Description of the flow rule.
Required string length: 1 - 200
One or more conditions that apply for this rule. Each condition needs to match for this rule to go into effect.
Flow amount condition Flow amount range condition Flow zero amount condition Flow anti-fraud decision condition Flow BIN range condition Flow browser language condition Flow card country condition Flow card scheme condition Flow card source condition Flow card type condition Flow country condition Flow currency condition Flow gift card BIN range condition Flow has gift cards condition Flow is subsequent payment condition Flow metadata condition Flow merchant initiated condition Flow payment method condition Flow payment methods condition Flow payment source condition Flow product categories condition Flow product types condition Flow SKUs condition
The type of match made for this rule.
Available options:
amount
The comparison to make on the currency code value
.
Available options:
less_than
,
greater_than
Amount value compare the transaction to.
conditions.value. currency
Currency ISO codes to compare the transaction to.
Amount value to compare transaction value to.
Required range: x > 0
Defines the outcome of a rule in a flow where the result
is a boolean.
Boolean outcome Payment method outcome Payment service outcome UUIDs list outcome 3DS outcome
The type of action outcome for the given rule.
Available options:
boolean
Results for a given flow action.
A custom error code returned when this rule is triggered. This only applies
to "decline-early"
rule actions. The value must have a flow_
prefix.
Required string length: 1 - 255
The type of this resource. Is always rule
.
The unique Gr4vy ID for this rule.
The unique ID for a merchant account.
Description of the flow rule.
Required string length: 1 - 200
Available options:
checkout
,
card-transaction
,
non-card-transaction
,
redirect-transaction
Action for the given rule. Actions can only be used in
flows that support them.
The checkout
flow only supports the
select-payment-options
action.
The card-transaction
supports the route-transaction
,
skip-3ds
, and decline-early
actions.
The non-card-transaction
flow only supports the
decline-early
action.
The redirect-transaction
flow only supports
the route-transaction
action.
Available options:
select-payment-options
,
decline-early
,
route-transaction
,
skip-3ds
One or more conditions that apply for this rule. Each condition
needs to match for this rule to go into effect.
Flow amount condition Flow amount range condition Flow zero amount condition Flow anti-fraud decision condition Flow BIN range condition Flow browser language condition Flow card country condition Flow card scheme condition Flow card source condition Flow card type condition Flow country condition Flow currency condition Flow is subsequent payment condition Flow metadata condition Flow merchant initiated condition Flow payment method condition Flow payment methods condition Flow payment source condition Flow product categories condition Flow product types condition Flow SKUs condition
The type of match made for this rule.
Available options:
amount
The comparison to make on the currency code value
.
Available options:
less_than
,
greater_than
Amount value compare the transaction to.
conditions.value. currency
Currency ISO codes to compare the transaction to.
Amount value to compare transaction value to.
Required range: x > 0
Defines the outcome of a rule in a flow where the result
is a list of dictionaries that define the payment service,
instrument and transformation to be used to process a
transaction.
Payment service outcome Payment method outcome Boolean outcome UUIDs list outcome 3DS outcome
The type of action outcome for the given rule.
Available options:
card-routing
Results for a given flow action.
outcome.result. payment_service_id
ID of the payment service to be used when processing the transaction.
outcome.result. instrument
The name of the instrument to be used to process the transaction.
For pan
, if a Payment Service token is available, the API will use that
for stored payment methods.
Available options:
network_token
,
pan
outcome.result. transformations
List of transformations to apply when processing the transaction.
outcome.result.transformations. name
Name of the transformation.
Available options:
force_mit
,
use_additional_scheme
Version of the rule outcome. Current version is 2
.
The position of the rule in the flow.
The date and time
when this buyer was created in our system.
The date and time
when this buyer was last updated in our system.
A custom error code returned when this rule is triggered. This only applies
to "decline-early"
rule actions. The value must have a flow_
prefix.
Required string length: 1 - 255