Skip to main content
DELETE
/
flows
/
{flow}
/
actions
/
{action}
/
rules
/
{rule_id}
Delete flow rule
using RestSharp;


var options = new RestClientOptions("https://api.sandbox.{id}.gr4vy.app/flows/{flow}/actions/{action}/rules/{rule_id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.DeleteAsync(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}/rules/{rule_id}"

req, _ := http.NewRequest("DELETE", 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.delete("https://api.sandbox.{id}.gr4vy.app/flows/{flow}/actions/{action}/rules/{rule_id}")
.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}/rules/{rule_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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}/rules/{rule_id}"

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

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

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

fetch('https://api.sandbox.{id}.gr4vy.app/flows/{flow}/actions/{action}/rules/{rule_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
curl --request DELETE \
--url https://api.sandbox.{id}.gr4vy.app/flows/{flow}/actions/{action}/rules/{rule_id} \
--header 'Authorization: Bearer <token>'
{
  "type": "error",
  "code": "unauthorized",
  "status": 401,
  "message": "No valid API authentication found",
  "details": []
}
{
"type": "error",
"code": "not_found",
"status": 404,
"message": "The resource could not be found",
"details": []
}
This endpoint requires the flows.write 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"

rule_id
string<uuid>
required

The unique ID for a rule.

Example:

"8724fd24-5489-4a5d-90fd-0604df7d3b83"

Response

Returns an empty response.