Skip to main content
GET
/
flows
/
{flow}
/
actions
/
{action}
/
outcomes
List flow outcomes
using RestSharp;


var options = new RestClientOptions("https://api.sandbox.{id}.gr4vy.app/flows/{flow}/actions/{action}/outcomes");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);

Console.WriteLine("{0}", response.Content);
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.sandbox.{id}.gr4vy.app/flows/{flow}/actions/{action}/outcomes"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.sandbox.{id}.gr4vy.app/flows/{flow}/actions/{action}/outcomes")
.header("Authorization", "Bearer <token>")
.asString();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.{id}.gr4vy.app/flows/{flow}/actions/{action}/outcomes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
import requests

url = "https://api.sandbox.{id}.gr4vy.app/flows/{flow}/actions/{action}/outcomes"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.sandbox.{id}.gr4vy.app/flows/{flow}/actions/{action}/outcomes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
curl --request GET \
--url https://api.sandbox.{id}.gr4vy.app/flows/{flow}/actions/{action}/outcomes \
--header 'Authorization: Bearer <token>'
{
  "items": [
    {
      "type": "action",
      "id": "card",
      "label": "Card",
      "active": true,
      "group": "Bank",
      "icon_url": "<string>"
    }
  ]
}
{
"type": "error",
"code": "unauthorized",
"status": 401,
"message": "No valid API authentication found",
"details": []
}
This endpoint requires the flows.read scope.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

flow
enum<string>
required

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. The name of the Flow.
Available options:
checkout,
card-transaction,
non-card-transaction,
redirect-transaction
Example:

"checkout"

action
enum<string>
required

The flow action. 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
Example:

"select-payment-options"

Query Parameters

locale
string
default:en

An ISO 639-1 Language Code and optional ISO 3166 Country Code. This locale determines the language for the labels returned for every payment option.

Pattern: ^[a-z]{2}(?:-[A-Z]{2})?$
Example:

"en-US"

Response

Returns a list of rule outcomes.

Defines the outcome of a rule in a flow. Currently the outcomes can be a boolean value, or a list of string values. The meaning of this outcome depends on the action this rule is triggered for.

items
(Checkout/Payment Option Outcome · object | Card Transactions/Routing Outcome · object | Redirect Transactions/Routing Outcome · object)[]

A list of outcomes.

Outcome for checkout flow/select payment options action. Each option is a Gr4vy payment option object.