Flow402 Settle
curl --request POST \
--url https://api.flow402.net/settle \
--header 'Content-Type: application/json' \
--data '
{
"nonce": "<string>",
"txHash": [
"0x...merchantTx"
],
"intentId": "<string>",
"feeTxHash": [
"0x...feeTx"
]
}
'import requests
url = "https://api.flow402.net/settle"
payload = {
"nonce": "<string>",
"txHash": ["0x...merchantTx"],
"intentId": "<string>",
"feeTxHash": ["0x...feeTx"]
}
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({
nonce: '<string>',
txHash: ['0x...merchantTx'],
intentId: '<string>',
feeTxHash: ['0x...feeTx']
})
};
fetch('https://api.flow402.net/settle', 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.flow402.net/settle",
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([
'nonce' => '<string>',
'txHash' => [
'0x...merchantTx'
],
'intentId' => '<string>',
'feeTxHash' => [
'0x...feeTx'
]
]),
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.flow402.net/settle"
payload := strings.NewReader("{\n \"nonce\": \"<string>\",\n \"txHash\": [\n \"0x...merchantTx\"\n ],\n \"intentId\": \"<string>\",\n \"feeTxHash\": [\n \"0x...feeTx\"\n ]\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.flow402.net/settle")
.header("Content-Type", "application/json")
.body("{\n \"nonce\": \"<string>\",\n \"txHash\": [\n \"0x...merchantTx\"\n ],\n \"intentId\": \"<string>\",\n \"feeTxHash\": [\n \"0x...feeTx\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flow402.net/settle")
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 \"nonce\": \"<string>\",\n \"txHash\": [\n \"0x...merchantTx\"\n ],\n \"intentId\": \"<string>\",\n \"feeTxHash\": [\n \"0x...feeTx\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"settled": true,
"txHash": "<string>",
"receipt": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Endpoints
Settle
Verify proof on-chain and settle PaymentIntent.
POST
/
settle
Flow402 Settle
curl --request POST \
--url https://api.flow402.net/settle \
--header 'Content-Type: application/json' \
--data '
{
"nonce": "<string>",
"txHash": [
"0x...merchantTx"
],
"intentId": "<string>",
"feeTxHash": [
"0x...feeTx"
]
}
'import requests
url = "https://api.flow402.net/settle"
payload = {
"nonce": "<string>",
"txHash": ["0x...merchantTx"],
"intentId": "<string>",
"feeTxHash": ["0x...feeTx"]
}
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({
nonce: '<string>',
txHash: ['0x...merchantTx'],
intentId: '<string>',
feeTxHash: ['0x...feeTx']
})
};
fetch('https://api.flow402.net/settle', 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.flow402.net/settle",
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([
'nonce' => '<string>',
'txHash' => [
'0x...merchantTx'
],
'intentId' => '<string>',
'feeTxHash' => [
'0x...feeTx'
]
]),
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.flow402.net/settle"
payload := strings.NewReader("{\n \"nonce\": \"<string>\",\n \"txHash\": [\n \"0x...merchantTx\"\n ],\n \"intentId\": \"<string>\",\n \"feeTxHash\": [\n \"0x...feeTx\"\n ]\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.flow402.net/settle")
.header("Content-Type", "application/json")
.body("{\n \"nonce\": \"<string>\",\n \"txHash\": [\n \"0x...merchantTx\"\n ],\n \"intentId\": \"<string>\",\n \"feeTxHash\": [\n \"0x...feeTx\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flow402.net/settle")
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 \"nonce\": \"<string>\",\n \"txHash\": [\n \"0x...merchantTx\"\n ],\n \"intentId\": \"<string>\",\n \"feeTxHash\": [\n \"0x...feeTx\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"settled": true,
"txHash": "<string>",
"receipt": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Body
application/json
Response
Successful Response
Example:
true
Example:
"0x...merchantTx"
Example:
{
"amount": "0.50",
"currency": "USDC",
"facilitatorRecipient": "0x...facilitator",
"fee": "0.005",
"feeTxHash": "0x...feeTx",
"intentId": "pi_...",
"merchant": "0x...merchantAddress",
"network": "base-sepolia"
}⌘I
