Create payment flow configuration
Generate a new configuration ID to be used for initiating executions in subsequent phases. This configuration should include the operations you intend to incorporate into the workflow, such as TRANSFER, CONVERT, and DISBURSE, in addition to your pre-screening preferences, which are disabled by default.
POST
/
payments
/
workflow_config
Create payment flow configuration
curl --request POST \
--url https://api.fireblocks.io/v1/payments/workflow_config \
--header 'Content-Type: application/json' \
--data '
{
"configName": "<string>",
"configOperations": [
{
"type": "CONVERSION",
"params": {
"destAssetId": "<string>",
"amount": "<string>",
"accountId": "<string>",
"srcAssetId": "<string>",
"slippageBasisPoints": 5000
}
}
],
"externalCorrelationData": {}
}
'import requests
url = "https://api.fireblocks.io/v1/payments/workflow_config"
payload = {
"configName": "<string>",
"configOperations": [
{
"type": "CONVERSION",
"params": {
"destAssetId": "<string>",
"amount": "<string>",
"accountId": "<string>",
"srcAssetId": "<string>",
"slippageBasisPoints": 5000
}
}
],
"externalCorrelationData": {}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
configName: '<string>',
configOperations: [
{
type: 'CONVERSION',
params: {
destAssetId: '<string>',
amount: '<string>',
accountId: '<string>',
srcAssetId: '<string>',
slippageBasisPoints: 5000
}
}
],
externalCorrelationData: {}
})
};
fetch('https://api.fireblocks.io/v1/payments/workflow_config', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fireblocks.io/v1/payments/workflow_config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'configName' => '<string>',
'configOperations' => [
[
'type' => 'CONVERSION',
'params' => [
'destAssetId' => '<string>',
'amount' => '<string>',
'accountId' => '<string>',
'srcAssetId' => '<string>',
'slippageBasisPoints' => 5000
]
]
],
'externalCorrelationData' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fireblocks.io/v1/payments/workflow_config"
payload := strings.NewReader("{\n \"configName\": \"<string>\",\n \"configOperations\": [\n {\n \"type\": \"CONVERSION\",\n \"params\": {\n \"destAssetId\": \"<string>\",\n \"amount\": \"<string>\",\n \"accountId\": \"<string>\",\n \"srcAssetId\": \"<string>\",\n \"slippageBasisPoints\": 5000\n }\n }\n ],\n \"externalCorrelationData\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fireblocks.io/v1/payments/workflow_config")
.header("Content-Type", "application/json")
.body("{\n \"configName\": \"<string>\",\n \"configOperations\": [\n {\n \"type\": \"CONVERSION\",\n \"params\": {\n \"destAssetId\": \"<string>\",\n \"amount\": \"<string>\",\n \"accountId\": \"<string>\",\n \"srcAssetId\": \"<string>\",\n \"slippageBasisPoints\": 5000\n }\n }\n ],\n \"externalCorrelationData\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fireblocks.io/v1/payments/workflow_config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"configName\": \"<string>\",\n \"configOperations\": [\n {\n \"type\": \"CONVERSION\",\n \"params\": {\n \"destAssetId\": \"<string>\",\n \"amount\": \"<string>\",\n \"accountId\": \"<string>\",\n \"srcAssetId\": \"<string>\",\n \"slippageBasisPoints\": 5000\n }\n }\n ],\n \"externalCorrelationData\": {}\n}"
response = http.request(request)
puts response.read_body{
"configId": "<string>",
"configName": "<string>",
"status": "PENDING",
"createdAt": 123,
"configOperations": [
{
"operationId": "<string>",
"type": "CONVERSION",
"params": {
"destAssetId": "<string>",
"amount": "<string>",
"accountId": "<string>",
"srcAssetId": "<string>",
"slippageBasisPoints": 5000
},
"status": "PENDING",
"validationFailure": {
"reason": "ACCOUNT_NOT_FOUND",
"data": {}
}
}
],
"preScreening": {
"enabled": true
},
"externalCorrelationData": {}
}{
"error": {
"type": "INTERNAL",
"message": "<string>"
}
}{
"error": {
"type": "INTERNAL",
"message": "<string>"
}
}Headers
Body
application/json
Response
Configuration is being generated
Was this page helpful?
⌘I
Create payment flow configuration
curl --request POST \
--url https://api.fireblocks.io/v1/payments/workflow_config \
--header 'Content-Type: application/json' \
--data '
{
"configName": "<string>",
"configOperations": [
{
"type": "CONVERSION",
"params": {
"destAssetId": "<string>",
"amount": "<string>",
"accountId": "<string>",
"srcAssetId": "<string>",
"slippageBasisPoints": 5000
}
}
],
"externalCorrelationData": {}
}
'import requests
url = "https://api.fireblocks.io/v1/payments/workflow_config"
payload = {
"configName": "<string>",
"configOperations": [
{
"type": "CONVERSION",
"params": {
"destAssetId": "<string>",
"amount": "<string>",
"accountId": "<string>",
"srcAssetId": "<string>",
"slippageBasisPoints": 5000
}
}
],
"externalCorrelationData": {}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
configName: '<string>',
configOperations: [
{
type: 'CONVERSION',
params: {
destAssetId: '<string>',
amount: '<string>',
accountId: '<string>',
srcAssetId: '<string>',
slippageBasisPoints: 5000
}
}
],
externalCorrelationData: {}
})
};
fetch('https://api.fireblocks.io/v1/payments/workflow_config', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fireblocks.io/v1/payments/workflow_config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'configName' => '<string>',
'configOperations' => [
[
'type' => 'CONVERSION',
'params' => [
'destAssetId' => '<string>',
'amount' => '<string>',
'accountId' => '<string>',
'srcAssetId' => '<string>',
'slippageBasisPoints' => 5000
]
]
],
'externalCorrelationData' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fireblocks.io/v1/payments/workflow_config"
payload := strings.NewReader("{\n \"configName\": \"<string>\",\n \"configOperations\": [\n {\n \"type\": \"CONVERSION\",\n \"params\": {\n \"destAssetId\": \"<string>\",\n \"amount\": \"<string>\",\n \"accountId\": \"<string>\",\n \"srcAssetId\": \"<string>\",\n \"slippageBasisPoints\": 5000\n }\n }\n ],\n \"externalCorrelationData\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fireblocks.io/v1/payments/workflow_config")
.header("Content-Type", "application/json")
.body("{\n \"configName\": \"<string>\",\n \"configOperations\": [\n {\n \"type\": \"CONVERSION\",\n \"params\": {\n \"destAssetId\": \"<string>\",\n \"amount\": \"<string>\",\n \"accountId\": \"<string>\",\n \"srcAssetId\": \"<string>\",\n \"slippageBasisPoints\": 5000\n }\n }\n ],\n \"externalCorrelationData\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fireblocks.io/v1/payments/workflow_config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"configName\": \"<string>\",\n \"configOperations\": [\n {\n \"type\": \"CONVERSION\",\n \"params\": {\n \"destAssetId\": \"<string>\",\n \"amount\": \"<string>\",\n \"accountId\": \"<string>\",\n \"srcAssetId\": \"<string>\",\n \"slippageBasisPoints\": 5000\n }\n }\n ],\n \"externalCorrelationData\": {}\n}"
response = http.request(request)
puts response.read_body{
"configId": "<string>",
"configName": "<string>",
"status": "PENDING",
"createdAt": 123,
"configOperations": [
{
"operationId": "<string>",
"type": "CONVERSION",
"params": {
"destAssetId": "<string>",
"amount": "<string>",
"accountId": "<string>",
"srcAssetId": "<string>",
"slippageBasisPoints": 5000
},
"status": "PENDING",
"validationFailure": {
"reason": "ACCOUNT_NOT_FOUND",
"data": {}
}
}
],
"preScreening": {
"enabled": true
},
"externalCorrelationData": {}
}{
"error": {
"type": "INTERNAL",
"message": "<string>"
}
}{
"error": {
"type": "INTERNAL",
"message": "<string>"
}
}