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 '
{
"payment_id": "<string>",
"token_amounts": [
{
"token": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amount": "<string>"
}
],
"recipient_address": "<string>",
"owner_signature": "<string>",
"withdraw_account": "SPW",
"payload": "<string>"
}
'import requests
url = "https://v2.prod.halliday.xyz/payments/withdraw/confirm"
payload = {
"payment_id": "<string>",
"token_amounts": [
{
"token": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amount": "<string>"
}
],
"recipient_address": "<string>",
"owner_signature": "<string>",
"withdraw_account": "SPW",
"payload": "<string>"
}
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({
payment_id: '<string>',
token_amounts: [
{
token: 'ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
amount: '<string>'
}
],
recipient_address: '<string>',
owner_signature: '<string>',
withdraw_account: 'SPW',
payload: '<string>'
})
};
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([
'payment_id' => '<string>',
'token_amounts' => [
[
'token' => 'ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
'amount' => '<string>'
]
],
'recipient_address' => '<string>',
'owner_signature' => '<string>',
'withdraw_account' => 'SPW',
'payload' => '<string>'
]),
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 \"payment_id\": \"<string>\",\n \"token_amounts\": [\n {\n \"token\": \"ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"amount\": \"<string>\"\n }\n ],\n \"recipient_address\": \"<string>\",\n \"owner_signature\": \"<string>\",\n \"withdraw_account\": \"SPW\",\n \"payload\": \"<string>\"\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 \"payment_id\": \"<string>\",\n \"token_amounts\": [\n {\n \"token\": \"ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"amount\": \"<string>\"\n }\n ],\n \"recipient_address\": \"<string>\",\n \"owner_signature\": \"<string>\",\n \"withdraw_account\": \"SPW\",\n \"payload\": \"<string>\"\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 \"payment_id\": \"<string>\",\n \"token_amounts\": [\n {\n \"token\": \"ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"amount\": \"<string>\"\n }\n ],\n \"recipient_address\": \"<string>\",\n \"owner_signature\": \"<string>\",\n \"withdraw_account\": \"SPW\",\n \"payload\": \"<string>\"\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 '
{
"payment_id": "<string>",
"token_amounts": [
{
"token": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amount": "<string>"
}
],
"recipient_address": "<string>",
"owner_signature": "<string>",
"withdraw_account": "SPW",
"payload": "<string>"
}
'import requests
url = "https://v2.prod.halliday.xyz/payments/withdraw/confirm"
payload = {
"payment_id": "<string>",
"token_amounts": [
{
"token": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amount": "<string>"
}
],
"recipient_address": "<string>",
"owner_signature": "<string>",
"withdraw_account": "SPW",
"payload": "<string>"
}
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({
payment_id: '<string>',
token_amounts: [
{
token: 'ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
amount: '<string>'
}
],
recipient_address: '<string>',
owner_signature: '<string>',
withdraw_account: 'SPW',
payload: '<string>'
})
};
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([
'payment_id' => '<string>',
'token_amounts' => [
[
'token' => 'ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
'amount' => '<string>'
]
],
'recipient_address' => '<string>',
'owner_signature' => '<string>',
'withdraw_account' => 'SPW',
'payload' => '<string>'
]),
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 \"payment_id\": \"<string>\",\n \"token_amounts\": [\n {\n \"token\": \"ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"amount\": \"<string>\"\n }\n ],\n \"recipient_address\": \"<string>\",\n \"owner_signature\": \"<string>\",\n \"withdraw_account\": \"SPW\",\n \"payload\": \"<string>\"\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 \"payment_id\": \"<string>\",\n \"token_amounts\": [\n {\n \"token\": \"ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"amount\": \"<string>\"\n }\n ],\n \"recipient_address\": \"<string>\",\n \"owner_signature\": \"<string>\",\n \"withdraw_account\": \"SPW\",\n \"payload\": \"<string>\"\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 \"payment_id\": \"<string>\",\n \"token_amounts\": [\n {\n \"token\": \"ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"amount\": \"<string>\"\n }\n ],\n \"recipient_address\": \"<string>\",\n \"owner_signature\": \"<string>\",\n \"withdraw_account\": \"SPW\",\n \"payload\": \"<string>\"\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
ID of the payment to withdraw
List of token amounts to withdraw back to the owner or to a requoted processing address
Show child attributes
Show child attributes
On-chain address to withdraw the funds to, on the same chain as the assets to withdraw.
The payment owner's signature on the withdrawal_authorization, authorizing the withdrawal
Type of account to withdraw from. Use the account value from the balance result.
Available options:
INTENT, SPW The withdraw_authorization string returned from the POST /payments/withdraw response.
⌘I

