Confirm withdrawal request
curl --request POST \
--url https://v2.prod.halliday.xyz/payments/withdraw/confirm \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"signature": "<string>",
"state_token": "<string>",
"polling_timeout": 300000
}
'import requests
url = "https://v2.prod.halliday.xyz/payments/withdraw/confirm"
payload = {
"signature": "<string>",
"state_token": "<string>",
"polling_timeout": 300000
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({signature: '<string>', state_token: '<string>', polling_timeout: 300000})
};
fetch('https://v2.prod.halliday.xyz/payments/withdraw/confirm', 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://v2.prod.halliday.xyz/payments/withdraw/confirm",
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([
'signature' => '<string>',
'state_token' => '<string>',
'polling_timeout' => 300000
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://v2.prod.halliday.xyz/payments/withdraw/confirm"
payload := strings.NewReader("{\n \"signature\": \"<string>\",\n \"state_token\": \"<string>\",\n \"polling_timeout\": 300000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://v2.prod.halliday.xyz/payments/withdraw/confirm")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"signature\": \"<string>\",\n \"state_token\": \"<string>\",\n \"polling_timeout\": 300000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v2.prod.halliday.xyz/payments/withdraw/confirm")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"signature\": \"<string>\",\n \"state_token\": \"<string>\",\n \"polling_timeout\": 300000\n}"
response = http.request(request)
puts response.read_body{
"payment_id": "<string>",
"transaction_hash": "<string>"
}{
"errors": [
{
"kind": "other",
"message": "Invalid request body"
}
]
}{
"errors": [
{
"kind": "other",
"message": "Invalid API key"
}
]
}{
"errors": [
{
"kind": "other",
"message": "You are not authorized to withdraw funds from this payment"
}
]
}Payments
Confirm withdrawal request
Submit and execute the signed withdrawal request to return funds back to the owner or to a requoted processing address.
POST
/
payments
/
withdraw
/
confirm
Confirm withdrawal request
curl --request POST \
--url https://v2.prod.halliday.xyz/payments/withdraw/confirm \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"signature": "<string>",
"state_token": "<string>",
"polling_timeout": 300000
}
'import requests
url = "https://v2.prod.halliday.xyz/payments/withdraw/confirm"
payload = {
"signature": "<string>",
"state_token": "<string>",
"polling_timeout": 300000
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({signature: '<string>', state_token: '<string>', polling_timeout: 300000})
};
fetch('https://v2.prod.halliday.xyz/payments/withdraw/confirm', 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://v2.prod.halliday.xyz/payments/withdraw/confirm",
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([
'signature' => '<string>',
'state_token' => '<string>',
'polling_timeout' => 300000
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://v2.prod.halliday.xyz/payments/withdraw/confirm"
payload := strings.NewReader("{\n \"signature\": \"<string>\",\n \"state_token\": \"<string>\",\n \"polling_timeout\": 300000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://v2.prod.halliday.xyz/payments/withdraw/confirm")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"signature\": \"<string>\",\n \"state_token\": \"<string>\",\n \"polling_timeout\": 300000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v2.prod.halliday.xyz/payments/withdraw/confirm")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"signature\": \"<string>\",\n \"state_token\": \"<string>\",\n \"polling_timeout\": 300000\n}"
response = http.request(request)
puts response.read_body{
"payment_id": "<string>",
"transaction_hash": "<string>"
}{
"errors": [
{
"kind": "other",
"message": "Invalid request body"
}
]
}{
"errors": [
{
"kind": "other",
"message": "Invalid API key"
}
]
}{
"errors": [
{
"kind": "other",
"message": "You are not authorized to withdraw funds from this payment"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
The payment owner's signature over the withdraw_authorization payload from POST /payments/withdraw.
Opaque state token returned by POST /payments/withdraw. Pass back unmodified.
Maximum time in milliseconds to wait for the withdrawal to complete before returning a PENDING status.
Required range:
0 <= x <= 300000Response
Withdrawal executed successfully
⌘I

