Payments
- Transactions
- Buyers
- Checkout Sessions
- Payment links
- Payment options
- Payouts
- Refunds
- Sessions
- Settlement records
Instruments
- Card schemes
- Digital wallets
- Gift cards
- Payment methods
- Payment method definitions
Vault
- Account updater
- Network tokens
- Payment service tokens
- Vault Forward
- Vault Forward endpoints
- Vault Forward authentication
Connections
- All services
- Payment services
- Digital wallets
- Anti-fraud services
- Gift-card services
Other
- Flow
- Merchant accounts
- Reports
- Report executions
- Webhook subscriptions
List flow rules
Returns a list of rules for a given flow. Each rule has an associated action, conditions, and outcome.
curl --request GET \
--url https://api.{gr4vy_id}.gr4vy.app/flows/{flow} \
--header 'Authorization: Bearer <token>'
{
"items": [
{
"type": "rule",
"id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
"merchant_account_id": "default",
"description": "example rule.",
"flow": "checkout",
"action": "select-payment-options",
"conditions": [
{
"name": "amount",
"operator": "less_than",
"value": {
"Amount condition value": {
"value": {
"description": "example amount value.",
"currency": "USD",
"value": 100
}
}
}
}
],
"outcome": {
"type": "card-routing",
"result": [
{
"payment_service_id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
"instrument\"": "network_token",
"transformations": []
},
{
"payment_service_id": "d88aca32-07fb-46cd-a43f-86da02b73c21",
"instrument": "pan",
"transformations": [
{
"name": "force_mit"
}
]
}
],
"version": 2
},
"position": 2,
"created_at": "2013-07-16T19:23:00.000+00:00",
"updated_at": "2013-07-16T19:23:00.000+00:00",
"error_code": "flow_error_code"
}
]
}
This endpoint requires the flows.read
scope.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
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 thedecline-early
action.redirect-transaction
- Applies when processing any other transaction.
checkout
, card-transaction
, non-card-transaction
, redirect-transaction
"checkout"
Response
A list of rule in a flow.
A list of rules.
The type of this resource. Is always rule
.
rule
"rule"
The unique Gr4vy ID for this rule.
"fe26475d-ec3e-4884-9553-f7356683f7f9"
The unique ID for a merchant account.
"default"
Description of the flow rule.
1 - 200
"example rule."
The name of the Flow.
checkout
, card-transaction
, non-card-transaction
, redirect-transaction
"checkout"
Action for the given rule. Actions can only be used in flows that support them.
- The
checkout
flow only supports theselect-payment-options
action. - The
card-transaction
supports theroute-transaction
,skip-3ds
, anddecline-early
actions. - The
non-card-transaction
flow only supports thedecline-early
action. - The
redirect-transaction
flow only supports theroute-transaction
action.
select-payment-options
, decline-early
, route-transaction
, skip-3ds
"select-payment-options"
One or more conditions that apply for this rule. Each condition needs to match for this rule to go into effect.
Amount conditions with a name, operator, and value.
The type of match made for this rule.
amount
"amount"
The comparison to make on the currency code value
.
less_than
, greater_than
"less_than"
Amount value compare the transaction to.
{
"Amount condition value": {
"value": {
"description": "example amount value.",
"currency": "USD",
"value": 100
}
}
}
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.
The type of action outcome for the given rule.
card-routing
"card-routing"
Results for a given flow action.
ID of the payment service to be used when processing the transaction.
"fe26475d-ec3e-4884-9553-f7356683f7f9"
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.
network_token
, pan
"network_token"
[
{
"payment_service_id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
"instrument\"": "network_token",
"transformations": []
},
{
"payment_service_id": "d88aca32-07fb-46cd-a43f-86da02b73c21",
"instrument": "pan",
"transformations": [{ "name": "force_mit" }]
}
]
Version of the rule outcome. Current version is 2
.
2
2
The position of the rule in the flow.
2
The date and time when this buyer was created in our system.
"2013-07-16T19:23:00.000+00:00"
The date and time when this buyer was last updated in our system.
"2013-07-16T19:23:00.000+00:00"
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.
1 - 255
"flow_error_code"
Was this page helpful?
curl --request GET \
--url https://api.{gr4vy_id}.gr4vy.app/flows/{flow} \
--header 'Authorization: Bearer <token>'
{
"items": [
{
"type": "rule",
"id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
"merchant_account_id": "default",
"description": "example rule.",
"flow": "checkout",
"action": "select-payment-options",
"conditions": [
{
"name": "amount",
"operator": "less_than",
"value": {
"Amount condition value": {
"value": {
"description": "example amount value.",
"currency": "USD",
"value": 100
}
}
}
}
],
"outcome": {
"type": "card-routing",
"result": [
{
"payment_service_id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
"instrument\"": "network_token",
"transformations": []
},
{
"payment_service_id": "d88aca32-07fb-46cd-a43f-86da02b73c21",
"instrument": "pan",
"transformations": [
{
"name": "force_mit"
}
]
}
],
"version": 2
},
"position": 2,
"created_at": "2013-07-16T19:23:00.000+00:00",
"updated_at": "2013-07-16T19:23:00.000+00:00",
"error_code": "flow_error_code"
}
]
}